:root {
    --app-primary: #6c5ce7;
    --app-primary-dark: #5747d6;
    --app-primary-soft: #eeebff;
    --app-text: #2f3349;
    --app-muted: #8990a5;
    --app-border: #ebeef5;
    --app-bg: #f5f6fa;
    --app-success: #54c68a;
    --app-warning: #f4b740;
    --app-danger: #ef6a76;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--app-bg); color: var(--app-text); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: .925rem; }
.app-shell { min-height: 100vh; }
.app-sidebar { width: 272px; height: 100vh; height: 100dvh; position: sticky; top: 0; overflow: hidden; padding: 0 16px 18px; background: #fff; border-right: 1px solid var(--app-border); color: var(--app-text); z-index: 1030; }
.app-sidebar-desktop { position: fixed; inset: 0 auto 0 0; }
.app-sidebar-desktop + .app-main { width: calc(100% - 272px); margin-left: 272px; }
.sidebar-brand { min-height: 82px; display: flex; align-items: center; gap: 12px; padding: 0 10px; color: var(--app-text); }
.sidebar-brand:hover { color: var(--app-text); }
.sidebar-brand strong { display: block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-brand small, .sidebar-help small, .user-menu small { display: block; color: var(--app-muted); font-size: .68rem; font-weight: 500; }
.brand-mark { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 38px; border-radius: 12px; background: linear-gradient(135deg, #7967f5, #5145cd); color: #fff; font-size: 1.15rem; box-shadow: 0 8px 18px rgba(108, 92, 231, .25); }
.sidebar-nav { min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding-top: 4px; padding-right: 3px; scrollbar-width: thin; scrollbar-color: #d8dae3 transparent; }
.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-thumb { border-radius: 99px; background: #d8dae3; }
.sidebar-label { margin: 20px 12px 7px; color: #a5aabd; font-size: .65rem; font-weight: 700; letter-spacing: .12em; }
.sidebar-nav .nav-link { min-height: 43px; display: flex; align-items: center; gap: 12px; margin: 3px 0; padding: 10px 13px; color: #666d82; border-radius: 10px; font-weight: 500; transition: .18s ease; }
.sidebar-nav .nav-link i { width: 20px; text-align: center; font-size: 1rem; }
.sidebar-nav .nav-link:hover { color: var(--app-primary); background: #f7f5ff; transform: translateX(2px); }
.sidebar-nav .nav-link.active { color: #fff; background: linear-gradient(120deg, #7463ef, #6254dd); box-shadow: 0 7px 16px rgba(108, 92, 231, .23); }
.nav-count { margin-left: auto; min-width: 21px; padding: 2px 6px; border-radius: 99px; background: #f25f70; color: #fff; text-align: center; font-size: .65rem; }
.sidebar-help { display: flex; gap: 10px; align-items: center; margin: 24px 4px 0; padding: 13px; border-radius: 12px; background: #f7f5ff; }
.sidebar-help strong { display: block; font-size: .76rem; }
.sidebar-help-icon { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--app-primary); background: #fff; }
.app-main { min-width: 0; }
.app-topbar { min-height: 72px; border-bottom: 1px solid var(--app-border); }
.app-content { max-width: 1660px; margin-inline: auto; }
.topbar-search { width: min(450px, 42vw); gap: 11px; color: #a1a6b7; }
.topbar-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--app-text); }
.topbar-search input::placeholder { color: #a8adbb; }
.topbar-search kbd { border: 1px solid #e2e5ed; background: #f7f8fb; color: #9aa0b1; box-shadow: none; font-weight: 500; }
.topbar-icon { width: 38px; height: 38px; align-items: center; justify-content: center; position: relative; border: 0; color: #697087; }
.topbar-icon:hover { background: #f4f2ff; color: var(--app-primary); }
.notification-dot { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border: 2px solid #fff; border-radius: 50%; background: #ff5969; }
.user-menu { display: flex; align-items: center; gap: 9px; padding: 4px 7px; border: 0; }
.user-menu strong { display: block; max-width: 120px; overflow: hidden; text-overflow: ellipsis; font-size: .78rem; }
.user-avatar { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #ffb76b, #ef6a76); font-weight: 700; }
.profile-avatar { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; object-fit: cover; background: #eef0f7; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(88,96,125,.12); }
.profile-avatar-lg { width: 72px; height: 72px; flex-basis: 72px; }
.user-avatar.profile-avatar { width: 36px; height: 36px; flex-basis: 36px; padding: 0; }
.page-title { color: var(--app-text); font-weight: 750; letter-spacing: -.025em; }
.page-kicker { color: var(--app-primary); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.card { border: 1px solid rgba(231, 233, 242, .8); border-radius: 14px; box-shadow: 0 5px 22px rgba(43, 47, 70, .045); }
.card-header { background: #fff; border-color: var(--app-border); }
.btn { border-radius: 8px; font-weight: 600; }
.btn-primary { --bs-btn-bg: var(--app-primary); --bs-btn-border-color: var(--app-primary); --bs-btn-hover-bg: var(--app-primary-dark); --bs-btn-hover-border-color: var(--app-primary-dark); box-shadow: 0 6px 14px rgba(108, 92, 231, .16); }
.btn-light { border-color: var(--app-border); background: #fff; color: #62697d; }
.form-control, .form-select { border-color: #e3e6ef; border-radius: 9px; min-height: 42px; }
.form-control:focus, .form-select:focus { border-color: #a79cef; box-shadow: 0 0 0 .2rem rgba(108, 92, 231, .12); }
.metric-card .card-body { padding: 1.15rem 1.25rem; }
.metric-icon { width: 43px; height: 43px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; font-size: 1.15rem; }
.metric-icon.purple { color: #6c5ce7; background: #eeebff; }
.metric-icon.green { color: #3aad77; background: #e9f8f0; }
.metric-icon.orange { color: #e99b20; background: #fff5df; }
.metric-icon.blue { color: #348bd4; background: #e9f4ff; }
.metric-value { margin-top: 14px; font-size: 1.55rem; font-weight: 750; letter-spacing: -.035em; }
.metric-label { color: var(--app-muted); font-size: .76rem; }
.metric-trend { color: var(--app-success); font-size: .68rem; font-weight: 700; }
.welcome-card { position: relative; overflow: hidden; color: #fff; background: linear-gradient(125deg, #6e5ce7, #8e80ef); border: 0; }
.welcome-card::after { content: ""; position: absolute; width: 190px; height: 190px; right: -45px; bottom: -90px; border-radius: 50%; border: 28px solid rgba(255,255,255,.1); }
.welcome-card::before { content: ""; position: absolute; width: 80px; height: 80px; right: 90px; top: -34px; border-radius: 50%; background: rgba(255,255,255,.09); }
.welcome-card .card-body { position: relative; z-index: 1; }
.welcome-card .btn { color: var(--app-primary); }
.section-title { font-size: .98rem; font-weight: 700; }
.section-subtitle { color: var(--app-muted); font-size: .73rem; }
.schedule-row { display: grid; grid-template-columns: 68px 1fr auto; gap: 13px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--app-border); }
.schedule-row:last-child { border-bottom: 0; }
.schedule-time { font-size: .72rem; color: var(--app-muted); }
.schedule-time strong { display: block; color: var(--app-text); font-size: .82rem; }
.schedule-mark { border-left: 3px solid var(--app-primary); padding-left: 12px; }
.schedule-mark.green { border-color: var(--app-success); }
.schedule-mark.orange { border-color: var(--app-warning); }
.schedule-mark strong { display: block; font-size: .78rem; }
.schedule-mark span { color: var(--app-muted); font-size: .68rem; }
.attendance-ring { width: 126px; height: 126px; position: relative; display: grid; place-items: center; margin: 12px auto; border-radius: 50%; background: conic-gradient(var(--app-primary) var(--attendance), #eceef5 0); }
.attendance-ring::after { content: ""; width: 90px; height: 90px; position: absolute; border-radius: 50%; background: #fff; }
.attendance-ring span { position: relative; z-index: 1; font-size: 1.4rem; font-weight: 750; }
.legend-dot { width: 8px; height: 8px; display: inline-block; margin-right: 6px; border-radius: 50%; }
.activity-avatar { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px; border-radius: 10px; color: var(--app-primary); background: var(--app-primary-soft); font-weight: 700; }
.table > :not(caption) > * > * { padding: .9rem 1rem; border-bottom-color: var(--app-border); }
.table thead th { color: #8d93a6; font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.badge-soft-success { color: #2d9865; background: #e7f8ef; }
.badge-soft-warning { color: #b77912; background: #fff3d8; }
.badge-soft-primary { color: #5d4bd2; background: #edeaff; }
.module-hero { background: linear-gradient(135deg, #fff, #f7f5ff); }
.module-icon { width: 56px; height: 56px; display: inline-flex; align-items: center; justify-content: center; border-radius: 15px; background: var(--app-primary-soft); color: var(--app-primary); font-size: 1.35rem; }
.empty-state { padding: 42px 20px; text-align: center; }
.empty-state-icon { width: 58px; height: 58px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; border-radius: 50%; background: #f1efff; color: var(--app-primary); font-size: 1.25rem; }
.setup-shell { min-height: 100vh; background: linear-gradient(145deg, #eff6ff 0%, #f8fafc 48%, #f1efff 100%); }
.setup-card { max-width: 920px; width: 100%; }
.setup-step { width: 2.25rem; height: 2.25rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #e2e8f0; color: #64748b; font-weight: 700; }
.setup-step.active, .setup-step.done { background: var(--app-primary); color: #fff; }
.form-wizard-progress { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 5px; border-radius: 12px; background: #f5f6fa; }
.form-wizard-progress span { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 9px; color: var(--app-muted); font-size: .78rem; font-weight: 650; }
.form-wizard-progress b { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #e4e6ef; color: #747b90; }
.form-wizard-progress span.active { color: var(--app-primary); background: #fff; box-shadow: 0 2px 10px rgba(43,47,70,.06); }
.form-wizard-progress span.active b { color: #fff; background: var(--app-primary); }

@media (max-width: 1199.98px) { .app-sidebar { width: 246px; } .app-sidebar-desktop + .app-main { width: calc(100% - 246px); margin-left: 246px; } }
@media (max-width: 991.98px) {
    .app-sidebar-desktop { display: none !important; }
    .app-sidebar-desktop + .app-main { width: 100%; margin-left: 0; }
    .app-sidebar.offcanvas { width: 286px; position: fixed; height: 100vh; }
    .app-sidebar.offcanvas .offcanvas-body { padding: 0; }
    .app-content { padding-bottom: 5rem !important; }
}
@media (max-width: 575.98px) {
    .app-topbar { min-height: 62px; }
    .page-title { font-size: 1.55rem; }
    .schedule-row { grid-template-columns: 58px 1fr; }
    .schedule-row > :last-child { display: none; }
    .form-wizard-progress span { padding: 8px; font-size: .7rem; }
}
.form-control.locked-field:disabled {
    background-color: #eef1f6;
    border-color: #d7dce7;
    color: #6c7486;
    cursor: not-allowed;
    opacity: 1;
    box-shadow: none;
}

.form-control.locked-field:disabled:hover {
    border-color: #d7dce7;
}
