:root {
    --bf-primary: #1c00ff;
    --bf-primary-dark: #1200b8;
    --bf-accent: #ff1900;
    --bf-accent-soft: rgba(255, 25, 0, 0.14);
    --bf-ink: #102546;
    --bf-muted: #5d6f8e;
    --bf-surface: #ffffff;
    --bf-surface-soft: #f6f9ff;
    --bf-border: rgba(16, 37, 70, 0.09);
    --bf-sidebar-bg: linear-gradient(180deg, #1c00ff 0%, #1736b9 58%, #102546 100%);
    --bf-page-bg: radial-gradient(circle at top left, rgba(28, 0, 255, 0.1), transparent 34%), radial-gradient(circle at bottom right, rgba(255, 25, 0, 0.08), transparent 28%), linear-gradient(180deg, #f8fbff 0%, #eef3ff 100%);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--bf-page-bg);
    color: var(--bf-ink);
    font-family: "Inter", "Segoe UI", sans-serif;
}

h1, h2, h3, h4, h5, h6,
.sidebar-title,
.card-title,
.stat-value {
    font-family: "Franklin Gothic Medium", "Trebuchet MS", sans-serif;
    letter-spacing: 0.01em;
}

a {
    text-decoration: none;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 286px;
    padding: 1.5rem 1rem;
    background: var(--bf-sidebar-bg);
    color: rgba(255, 255, 255, 0.92);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
    padding: 0.5rem 0.35rem 1.5rem;
}

.sidebar-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    margin-bottom: 0.85rem;
    background: rgba(255, 255, 255, 0.12);
    color: #fdf2f2;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.sidebar-title {
    display: block;
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
}

.sidebar-copy {
    margin: 0;
    color: rgba(226, 232, 240, 0.8);
    font-size: 0.86rem;
    line-height: 1.5;
}

.sidebar-section + .sidebar-section {
    margin-top: 1.5rem;
}

.sidebar-heading {
    display: block;
    margin: 0 0 0.75rem;
    padding: 0 0.35rem;
    font-size: 0.72rem;
    color: rgba(226, 232, 240, 0.65);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.app-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem 0.9rem;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.78);
    transition: all 0.18s ease;
}

.app-sidebar .nav-link:hover,
.app-sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateX(2px);
}

.app-main {
    flex: 1;
    min-width: 0;
}

.app-topstack {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(248, 250, 252, 0.78);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--bf-border);
}

.app-topbar {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: transparent;
}

.topbar-search {
    flex: 1;
    max-width: 480px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    border-radius: 18px;
    background: var(--bf-surface);
    border: 1px solid var(--bf-border);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
}

.topbar-search i {
    color: var(--bf-muted);
}

.topbar-search .form-control {
    border: 0;
    box-shadow: none;
    padding: 0;
    background: transparent;
}

.topbar-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.topbar-chip {
    min-width: 120px;
    padding: 0.75rem 0.9rem;
    border-radius: 16px;
    background: var(--bf-surface);
    border: 1px solid var(--bf-border);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
}

.chip-label {
    display: block;
    color: var(--bf-muted);
    font-size: 0.75rem;
}

.topbar-icon,
.topbar-user {
    border-radius: 16px;
    border: 1px solid var(--bf-border);
    background: var(--bf-surface);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
}

.topbar-user {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem 0.75rem;
}

.topbar-user small {
    display: block;
    color: var(--bf-muted);
}

.app-contextbar {
    padding: 0 1.5rem 1rem;
}

.contextbar-panel {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    padding: 0.6rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--bf-border);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.05);
}

.contextbar-heading {
    flex: 0 0 auto;
}

.contextbar-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 0.9rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.1);
    color: var(--bf-primary-dark);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.contextbar-links {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    padding: 0.1rem;
    scrollbar-width: thin;
}

.contextbar-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 0.95rem;
    border-radius: 16px;
    color: var(--bf-muted);
    border: 1px solid transparent;
    transition: all 0.18s ease;
}

.contextbar-link:hover,
.contextbar-link.active {
    color: var(--bf-ink);
    border-color: rgba(15, 118, 110, 0.16);
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(245, 158, 11, 0.12));
}

.contextbar-link i {
    font-size: 1rem;
}

.avatar-pill {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--bf-primary), var(--bf-primary-dark));
    color: #fff;
    font-weight: 700;
}

.app-content {
    padding: 0 0.6rem 1.4rem;
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: var(--bf-accent-soft);
    color: var(--bf-accent);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.page-subtitle {
    color: var(--bf-muted);
    margin: 0.5rem 0 0;
}

.glass-card,
.card {
    border: 1px solid var(--bf-border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.05);
}

.card {
    overflow: hidden;
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding: 1.35rem;
}

.stat-card::after {
    content: "";
    position: absolute;
    inset: auto -42px -42px auto;
    width: 138px;
    height: 138px;
    border-radius: 42px;
    background: linear-gradient(135deg, rgba(28, 0, 255, 0.14), rgba(255, 25, 0, 0.14));
    transform: rotate(26deg);
}

.stat-label {
    color: var(--bf-muted);
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.stat-value {
    position: relative;
    z-index: 1;
    margin: 0.7rem 0 0.35rem;
    font-size: 2rem;
}

.stat-meta {
    position: relative;
    z-index: 1;
    color: var(--bf-muted);
}

.surface-panel {
    padding: 1.25rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--bf-border);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.05);
}

.table thead th {
    border-bottom-width: 1px;
    color: var(--bf-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.table > :not(caption) > * > * {
    padding: 0.95rem 1rem;
    vertical-align: middle;
}

.form-control,
.form-select {
    border-radius: 14px;
    padding: 0.75rem 0.9rem;
    border-color: rgba(15, 23, 42, 0.12);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(28, 0, 255, 0.45);
    box-shadow: 0 0 0 0.25rem rgba(28, 0, 255, 0.12);
}

.btn {
    border-radius: 14px;
    padding: 0.65rem 1rem;
}

.btn-primary {
    background: var(--bf-primary);
    border-color: var(--bf-primary);
    box-shadow: 0 12px 28px rgba(28, 0, 255, 0.18);
}

.btn-outline-primary {
    border-color: rgba(28, 0, 255, 0.28);
    color: var(--bf-primary);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at top right, rgba(255, 25, 0, 0.1), transparent 28%),
        radial-gradient(circle at bottom left, rgba(28, 0, 255, 0.12), transparent 32%),
        linear-gradient(180deg, #edf3ff 0%, #f8fafc 100%);
}

.auth-panel {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 0;
    overflow: hidden;
}

.auth-copy {
    padding: 3rem;
    background: linear-gradient(180deg, #0f172a 0%, #134e4a 100%);
    color: rgba(255, 255, 255, 0.92);
}

.auth-copy .auth-product-logo {
    display: block;
    width: min(100%, 210px) !important;
    height: 64px !important;
    max-width: 210px !important;
    margin-bottom: 1.25rem;
    object-fit: contain;
    object-position: left center;
}

.auth-copy h1 {
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    line-height: 1.15;
}

.auth-copy .bullet-list {
    display: grid;
    gap: 0.9rem;
    margin-top: 2rem;
}

.auth-copy .bullet-list span {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: rgba(255, 255, 255, 0.84);
}

.auth-copy > p {
    font-size: 0.94rem;
    line-height: 1.55;
}

.auth-form {
    padding: 3rem;
    background: rgba(255, 255, 255, 0.96);
}

.notification-menu {
    min-width: 320px;
    border: 1px solid var(--bf-border);
    border-radius: 18px;
    padding: 0.5rem;
}

.notification-item {
    display: grid;
    gap: 0.2rem;
    border-radius: 14px;
    white-space: normal;
}

.select2-container--bootstrap-5 .select2-selection {
    border-radius: 14px;
    min-height: calc(2.5rem + 14px);
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    padding: 0.45rem 0.7rem;
}

@media (max-width: 1199.98px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-sidebar {
        width: 240px;
    }

    .topbar-chip {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .app-shell {
        flex-direction: column;
    }

    .app-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .app-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .app-contextbar {
        padding: 0 1rem 1rem;
    }

    .contextbar-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .metric-grid {
        grid-template-columns: 1fr;
    }

    .auth-copy,
    .auth-form {
        padding: 2rem 1.25rem;
    }

    .app-topbar,
    .app-contextbar {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

.install-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.16), transparent 30%),
        radial-gradient(circle at bottom right, rgba(245, 158, 11, 0.18), transparent 32%),
        linear-gradient(180deg, #f8fafc 0%, #ecfeff 100%);
    padding: 3rem 0;
}

.install-card {
    border: 1px solid var(--bf-border);
    border-radius: 28px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.08);
}

.install-side {
    padding: 2.5rem;
    background: linear-gradient(180deg, #0f172a 0%, #134e4a 100%);
    color: rgba(255, 255, 255, 0.92);
}

.install-main {
    padding: 2.5rem;
}

.wizard-steps {
    display: grid;
    gap: 0.9rem;
    margin-top: 2rem;
}

.wizard-step {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.82);
}

.wizard-step.active {
    background: rgba(245, 158, 11, 0.18);
    color: #fff;
}

.wizard-step-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 700;
}

.wizard-requirement {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--bf-border);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.8);
}

.clock-preview {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clock-preview video,
.clock-preview canvas,
.clock-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.clock-preview .preview-placeholder {
    color: rgba(255, 255, 255, 0.78);
    text-align: center;
    padding: 2rem;
}

.status-panel {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    border: 1px solid var(--bf-border);
    background: rgba(248, 250, 252, 0.86);
}

.status-panel strong {
    display: block;
}
