/* PROF TOOLS premium interface */
:root {
    --pt-ink: #101828;
    --pt-muted: #667085;
    --pt-line: #e6e8ec;
    --pt-canvas: #f5f7fa;
    --pt-surface: rgba(255, 255, 255, 0.92);
    --pt-navy: #07111f;
    --pt-navy-soft: #111f34;
    --pt-gold: #d99728;
    --pt-gold-bright: #f4bd5b;
    --pt-sidebar: 17.5rem;
    --pt-sidebar-collapsed: 5.25rem;
    --pt-radius: 1.125rem;
    --pt-shadow: 0 1px 2px rgb(16 24 40 / 0.04), 0 12px 32px rgb(16 24 40 / 0.07);
    --pt-shadow-hover: 0 20px 46px rgb(16 24 40 / 0.12);
}

html {
    background: var(--pt-canvas);
    scroll-behavior: smooth;
}

body {
    color: var(--pt-ink);
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    text-rendering: optimizeLegibility;
}

button, a, input, select, textarea {
    -webkit-tap-highlight-color: transparent;
}

.app-body {
    overflow-x: hidden;
    background: var(--pt-canvas);
}

.app-layout {
    width: 100%;
    background: var(--pt-canvas);
}

.app-sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    width: var(--pt-sidebar);
    height: 100vh;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1.35rem 1rem;
    color: #fff;
    background:
        radial-gradient(circle at 15% 0%, rgb(244 189 91 / 0.14), transparent 28%),
        linear-gradient(165deg, #0d1c31 0%, var(--pt-navy) 72%);
    border-right: 1px solid rgb(255 255 255 / 0.08);
    box-shadow: 18px 0 48px rgb(7 17 31 / 0.08);
    transition: width 240ms cubic-bezier(.4, 0, .2, 1), transform 240ms cubic-bezier(.4, 0, .2, 1);
}

.app-sidebar::-webkit-scrollbar { width: 5px; }
.app-sidebar::-webkit-scrollbar-thumb { background: rgb(255 255 255 / 0.14); border-radius: 999px; }

.sidebar-brand {
    min-height: 3.25rem;
    padding: 0 .35rem;
}

.brand-mark {
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 2.75rem;
    color: #1a1204;
    background: linear-gradient(145deg, #ffe5a3, var(--pt-gold-bright) 50%, var(--pt-gold));
    border: 1px solid rgb(255 255 255 / 0.28);
    border-radius: .9rem;
    box-shadow: 0 8px 22px rgb(217 151 40 / 0.25), inset 0 1px 0 rgb(255 255 255 / 0.55);
}

.brand-name {
    font-size: .98rem;
    font-weight: 750;
    letter-spacing: .09em;
    white-space: nowrap;
}

.sidebar-school {
    max-width: 11.5rem;
    margin-top: .15rem;
    overflow: hidden;
    color: rgb(226 232 240 / 0.62);
    font-size: .72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-mobile-close {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    margin-left: auto;
    place-items: center;
    color: rgb(255 255 255 / 0.72);
    border: 1px solid rgb(255 255 255 / 0.12);
    border-radius: .75rem;
}

.sidebar-nav {
    display: grid;
    gap: .35rem;
    margin-top: 2rem;
}

.sidebar-link {
    position: relative;
    display: flex;
    min-height: 2.85rem;
    align-items: center;
    gap: .8rem;
    padding: .7rem .85rem;
    color: rgb(226 232 240 / 0.68);
    font-size: .86rem;
    font-weight: 560;
    border: 1px solid transparent;
    border-radius: .8rem;
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.sidebar-link svg { flex: 0 0 1.2rem; }
.sidebar-link:hover {
    color: #fff;
    background: rgb(255 255 255 / 0.07);
    border-color: rgb(255 255 255 / 0.06);
    transform: translateX(2px);
}
.sidebar-link.is-active {
    color: #fff;
    background: linear-gradient(90deg, rgb(217 151 40 / 0.2), rgb(255 255 255 / 0.07));
    border-color: rgb(244 189 91 / 0.22);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05);
}
.sidebar-link.is-active::before {
    position: absolute;
    left: -.15rem;
    width: .22rem;
    height: 1.35rem;
    content: "";
    background: var(--pt-gold-bright);
    border-radius: 999px;
    box-shadow: 0 0 14px rgb(244 189 91 / 0.55);
}
.sidebar-link-label { white-space: nowrap; }

.sidebar-plan {
    margin-top: auto;
    padding: 1rem;
    background: linear-gradient(145deg, rgb(255 255 255 / 0.09), rgb(255 255 255 / 0.045));
    border: 1px solid rgb(255 255 255 / 0.1);
    border-radius: 1rem;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06);
}
.sidebar-plan-label {
    color: var(--pt-gold-bright);
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.sidebar-plan-name { margin-top: .35rem; font-size: .9rem; font-weight: 650; }
.sidebar-plan-meta { display: grid; gap: .3rem; margin-top: .65rem; color: rgb(226 232 240 / 0.62); font-size: .7rem; }

.sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 35;
    visibility: hidden;
    opacity: 0;
    background: rgb(7 17 31 / 0.58);
    backdrop-filter: blur(3px);
    transition: opacity 200ms ease, visibility 200ms ease;
}

.app-main {
    width: calc(100% - var(--pt-sidebar));
    min-height: 100vh;
    transition: width 240ms cubic-bezier(.4, 0, .2, 1);
}

.app-topbar {
    min-height: 5rem;
    background: rgb(255 255 255 / 0.82);
    border-bottom: 1px solid rgb(230 232 236 / 0.9);
    box-shadow: 0 1px 12px rgb(16 24 40 / 0.035);
    backdrop-filter: blur(18px) saturate(150%);
}
.topbar-inner { min-height: 5rem; padding: .8rem 1.6rem; }
.sidebar-toggle, .icon-button {
    display: grid;
    width: 2.65rem;
    height: 2.65rem;
    flex: 0 0 2.65rem;
    place-items: center;
    color: #475467;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: .8rem;
    box-shadow: 0 1px 2px rgb(16 24 40 / 0.04);
    transition: transform 150ms ease, color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.sidebar-toggle:hover, .icon-button:hover {
    color: var(--pt-ink);
    border-color: #d0d5dd;
    box-shadow: 0 5px 14px rgb(16 24 40 / 0.08);
    transform: translateY(-1px);
}
.topbar-eyebrow { color: var(--pt-muted); font-size: .72rem; font-weight: 600; letter-spacing: .04em; }
.page-heading { margin-top: .08rem; overflow: hidden; font-size: 1.2rem; font-weight: 720; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.topbar-user { padding-right: .2rem; }
.topbar-user-name { color: #344054; font-size: .82rem; font-weight: 650; }
.topbar-user-email { margin-top: .1rem; color: #98a2b3; font-size: .7rem; }

.app-content-bg {
    min-height: calc(100vh - 5rem);
    background-color: var(--pt-canvas);
    background-image:
        radial-gradient(circle at 1px 1px, rgb(16 24 40 / 0.035) 1px, transparent 0),
        radial-gradient(circle at 90% 5%, rgb(217 151 40 / 0.08), transparent 24rem);
    background-size: 26px 26px, auto;
}
.app-content { padding: 1.75rem 1.6rem 3rem; }

.premium-panel, .stat-card, .app-tile, .setup-card, .auth-card {
    border-color: rgb(230 232 236 / 0.92) !important;
    border-radius: var(--pt-radius) !important;
    box-shadow: var(--pt-shadow) !important;
}
.premium-panel {
    overflow: hidden;
    background: var(--pt-surface) !important;
    backdrop-filter: blur(16px) saturate(135%);
}
.panel-heading { padding-bottom: .95rem; border-bottom: 1px solid #eef0f3; }
.panel-icon, .stat-icon {
    display: grid;
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 2.35rem;
    place-items: center;
    color: #9a670f;
    background: linear-gradient(145deg, #fff8e7, #fce8b6);
    border: 1px solid #f5dda1;
    border-radius: .75rem;
}
.panel-heading h2 { color: #1d2939; font-weight: 700; letter-spacing: -.015em; }

.stat-card {
    position: relative;
    overflow: hidden;
    min-height: 8.5rem;
    background: linear-gradient(145deg, #fff 15%, #fbfcfe) !important;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.stat-card::after {
    position: absolute;
    right: -2.2rem;
    bottom: -3.5rem;
    width: 8rem;
    height: 8rem;
    content: "";
    background: radial-gradient(circle, rgb(217 151 40 / 0.11), transparent 68%);
}
.stat-card:hover { border-color: #d9dde4 !important; box-shadow: var(--pt-shadow-hover) !important; transform: translateY(-2px); }
.stat-label { color: var(--pt-muted); font-weight: 550; }
.stat-value { color: #101828; font-weight: 750; letter-spacing: -.045em; }

.app-tile {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #fff, #fbfcfe) !important;
    transition: transform 190ms ease, box-shadow 190ms ease, border-color 190ms ease;
}
.app-tile:hover { border-color: #e3c47b !important; box-shadow: var(--pt-shadow-hover) !important; transform: translateY(-4px); }
.app-tile-icon { background: linear-gradient(145deg, #fff8e7, #f9dfa3) !important; border: 1px solid #f2d790; border-radius: .8rem !important; }
.app-tile h3 { color: #1d2939; font-size: 1rem; font-weight: 700; }
.app-tile-action { color: #9a670f; }
.app-tile:hover .app-tile-action svg { transform: translateX(3px); }
.app-tile-action svg { transition: transform 160ms ease; }

.form-field { color: #344054 !important; font-size: .78rem !important; font-weight: 650 !important; }
.form-control,
.app-content input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.app-content select,
.app-content textarea {
    min-height: 2.85rem;
    color: #101828;
    background: rgb(255 255 255 / 0.94) !important;
    border-color: #dfe3e8 !important;
    border-radius: .72rem !important;
    box-shadow: 0 1px 2px rgb(16 24 40 / 0.025), inset 0 1px 1px rgb(16 24 40 / 0.015);
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}
.form-control:hover,
.app-content input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover,
.app-content select:hover,
.app-content textarea:hover { border-color: #cfd4dc !important; }
.form-control:focus,
.app-content input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
.app-content select:focus,
.app-content textarea:focus {
    outline: none !important;
    background: #fff !important;
    border-color: #d69b36 !important;
    box-shadow: 0 0 0 4px rgb(217 151 40 / 0.13) !important;
}
.app-content input[type="checkbox"] { accent-color: #b7791f; }

.primary-button {
    min-height: 2.8rem;
    color: #fff !important;
    background: linear-gradient(135deg, #16243a, #07111f) !important;
    border: 1px solid rgb(255 255 255 / 0.08);
    border-radius: .75rem !important;
    box-shadow: 0 7px 18px rgb(7 17 31 / 0.16), inset 0 1px 0 rgb(255 255 255 / 0.1);
    transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}
.primary-button:hover { filter: brightness(1.12); box-shadow: 0 10px 24px rgb(7 17 31 / 0.22); transform: translateY(-1px); }
.primary-button:active { box-shadow: 0 3px 10px rgb(7 17 31 / 0.16); transform: translateY(0); }
.secondary-button { min-height:2.8rem; color:#344054; background:#fff; border:1px solid #dfe3e8; box-shadow:0 1px 2px rgb(16 24 40 / .04); transition:border-color 150ms ease,box-shadow 150ms ease,transform 150ms ease; }
.secondary-button:hover { border-color:#d69b36; box-shadow:0 5px 14px rgb(16 24 40 / .08); transform:translateY(-1px); }

.app-content table { overflow: hidden; background: #fff; border-radius: .9rem; }
.app-content thead { color: #667085 !important; background: #f8fafc !important; }
.app-content th { font-size: .68rem; font-weight: 700; letter-spacing: .06em; }
.app-content tbody tr { transition: background 140ms ease; }
.app-content tbody tr:hover { background: #fcfaf5; }
.app-content details > summary { list-style: none; }
.app-content details > summary::-webkit-details-marker { display: none; }
.app-content details > summary::after { margin-left: .4rem; content: "+"; color: #98a2b3; }
.app-content details[open] > summary::after { content: "−"; }

.auth-body, .setup-body {
    background:
        radial-gradient(circle at 80% 10%, rgb(244 189 91 / 0.18), transparent 28rem),
        #f3f5f8 !important;
}
.auth-hero { min-height: 100vh; }
.auth-hero::after {
    position: absolute;
    inset: 1.25rem;
    pointer-events: none;
    content: "";
    border: 1px solid rgb(255 255 255 / 0.16);
    border-radius: 1.25rem;
}
.auth-hero h1 { letter-spacing: -.055em; text-shadow: 0 10px 35px rgb(0 0 0 / 0.28); }
.auth-panel { position: relative; }
.auth-card, .setup-card {
    background: rgb(255 255 255 / 0.88) !important;
    backdrop-filter: blur(22px) saturate(145%);
}
.auth-card { padding: 2rem !important; }
.auth-card h2, .setup-card h1 { color: #101828; font-weight: 740; letter-spacing: -.025em; }
.auth-card .primary-button { width: 100%; }

@media (min-width: 768px) {
    .sidebar-mobile-close { display: none; }
    .sidebar-collapsed .app-sidebar { width: var(--pt-sidebar-collapsed); padding-right: .75rem; padding-left: .75rem; }
    .sidebar-collapsed .app-main { width: calc(100% - var(--pt-sidebar-collapsed)); }
    .sidebar-collapsed .sidebar-brand { justify-content: center; padding: 0; }
    .sidebar-collapsed .sidebar-brand-copy,
    .sidebar-collapsed .sidebar-link-label,
    .sidebar-collapsed .sidebar-plan { display: none; }
    .sidebar-collapsed .sidebar-link { justify-content: center; padding-right: .7rem; padding-left: .7rem; }
    .sidebar-collapsed .sidebar-link:hover { transform: translateY(-1px); }
    .sidebar-collapsed .sidebar-link.is-active::before { left: -.35rem; }
}

@media (max-width: 767.98px) {
    :root { --pt-sidebar: min(86vw, 20rem); }
    .app-sidebar {
        position: fixed;
        left: 0;
        width: var(--pt-sidebar);
        padding: 1.2rem 1rem;
        box-shadow: 24px 0 55px rgb(7 17 31 / 0.28);
        transform: translateX(-102%);
    }
    .sidebar-mobile-close { display: grid; }
    .sidebar-open { overflow: hidden; }
    .sidebar-open .app-sidebar { transform: translateX(0); }
    .sidebar-open .sidebar-overlay { visibility: visible; opacity: 1; }
    .app-main { width: 100%; }
    .app-topbar, .topbar-inner { min-height: 4.5rem; }
    .topbar-inner { padding: .65rem 1rem; }
    .app-content { padding: 1.15rem 1rem 2.5rem; }
    .page-heading { max-width: 60vw; font-size: 1.05rem; }
    .auth-shell { display: block !important; }
    .auth-hero { min-height: 42vh; padding-bottom: 2.25rem !important; }
    .auth-hero::after { inset: .75rem; }
    .auth-hero h1 { font-size: 2.75rem !important; }
    .auth-panel { min-height: 58vh; padding-top: 1rem !important; }
    .auth-card { padding: 1.4rem !important; }
    .premium-panel { border-radius: 1rem !important; }
}

@media (min-width: 768px) and (max-width: 1100px) {
    :root { --pt-sidebar: 15rem; }
    .app-content { padding-right: 1.25rem; padding-left: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

.timetable-hero { position:relative;overflow:hidden;padding:2rem;color:#fff;background:radial-gradient(circle at 85% 20%,rgb(244 189 91 / .28),transparent 20rem),linear-gradient(135deg,#122743,#07111f);border:1px solid rgb(255 255 255 / .08);border-radius:1.25rem;box-shadow:var(--pt-shadow-hover) }
.timetable-hero::after { position:absolute;right:-2rem;bottom:-4rem;width:15rem;height:15rem;content:"";border:1px solid rgb(244 189 91 / .22);border-radius:50% }
.timetable-hero span { color:var(--pt-gold-bright);font-size:.72rem;font-weight:750;letter-spacing:.12em;text-transform:uppercase }.timetable-hero h2{margin-top:.35rem;font-size:clamp(1.55rem,3vw,2.45rem);font-weight:760;letter-spacing:-.045em}.timetable-hero p{max-width:42rem;margin-top:.65rem;color:rgb(226 232 240 / .72);line-height:1.7}
.project-switcher{display:flex;align-items:end;justify-content:space-between;gap:1rem;margin-top:1.25rem;padding:1rem 1.1rem;background:rgb(255 255 255 / .86);border:1px solid var(--pt-line);border-radius:1rem;box-shadow:var(--pt-shadow)}.project-switcher form{display:flex;align-items:end;gap:.65rem}.project-switcher form label{min-width:16rem}.project-switcher>div{display:grid;text-align:right}.project-switcher>div span{color:#9a670f;font-size:.68rem;font-weight:700;text-transform:uppercase}.project-switcher>div strong{margin-top:.2rem;color:#1d2939}
.timetable-board{overflow:hidden;background:rgb(255 255 255 / .94);border:1px solid var(--pt-line);border-radius:1.25rem;box-shadow:var(--pt-shadow)}.timetable-board-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.25rem 1.4rem;border-bottom:1px solid #edf0f3}.timetable-board-head span{color:#9a670f;font-size:.7rem;font-weight:750;letter-spacing:.08em;text-transform:uppercase}.timetable-board-head h2{margin-top:.2rem;font-size:1.2rem;font-weight:740;letter-spacing:-.025em}.timetable-score{padding:.5rem .75rem;color:#344054;font-size:.75rem;font-weight:650;background:#f7f8fa;border:1px solid #e7e9ed;border-radius:999px}
.timetable-scroll{overflow:auto;max-height:72vh}.schedule-grid{width:100%;min-width:62rem;border-collapse:separate!important;border-spacing:0;border-radius:0!important}.schedule-grid th,.schedule-grid td{min-width:11rem;padding:.55rem;vertical-align:top;border-right:1px solid #edf0f3;border-bottom:1px solid #edf0f3}.schedule-grid thead th{position:sticky;top:0;z-index:2;padding:.8rem;color:#475467;background:#f7f9fb!important;text-align:center}.schedule-grid tbody>tr>th{position:sticky;left:0;z-index:1;min-width:8.5rem;color:#344054;background:#fafbfc;text-align:left}.schedule-grid tbody>tr>th strong,.schedule-grid tbody>tr>th span{display:block}.schedule-grid tbody>tr>th span{margin-top:.15rem;color:#98a2b3;font-size:.68rem;font-weight:500}
.schedule-entry{position:relative;display:grid;gap:.2rem;min-height:5rem;margin:.15rem;padding:.7rem 2rem .7rem .75rem;overflow:hidden;background:#f8fafc;border:1px solid #dfe4ea;border-left:4px solid var(--entry-color);border-radius:.7rem;box-shadow:0 3px 10px rgb(16 24 40 / .05)}.schedule-entry strong{color:#1d2939;font-size:.78rem}.schedule-entry span,.schedule-entry small{color:#667085;font-size:.68rem;line-height:1.35}.schedule-entry form{position:absolute;top:.45rem;right:.4rem}.schedule-entry button{display:grid;width:1.7rem;height:1.7rem;place-items:center;color:#667085;background:rgb(255 255 255 / .8);border:1px solid #e5e7eb;border-radius:.45rem}.schedule-empty,.schedule-break{display:grid;min-height:4.75rem;place-items:center;color:#c3c8d0;font-size:.8rem}.schedule-break{color:#8a6116;font-size:.68rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;background:#fffbeb;border:1px dashed #f3d99b;border-radius:.65rem}
@media(max-width:767.98px){.timetable-hero{padding:1.35rem}.project-switcher{align-items:stretch;flex-direction:column}.project-switcher form{align-items:stretch;flex-direction:column}.project-switcher form label{min-width:0}.project-switcher>div{text-align:left}.timetable-board-head{align-items:flex-start;flex-direction:column}.timetable-scroll{max-height:68vh}}
@media print{.app-sidebar,.app-topbar,.sidebar-overlay,.project-switcher,.timetable-board-head form,.schedule-entry form{display:none!important}.app-main{width:100%!important}.app-content{max-width:none!important;padding:0!important}.timetable-scroll{max-height:none;overflow:visible}.schedule-grid{min-width:0;font-size:8pt}.schedule-grid th,.schedule-grid td{min-width:0;padding:3px}.schedule-entry{min-height:0;box-shadow:none;break-inside:avoid}}
@media print{body.print-schedule .app-content>*:not([data-print-area]){display:none!important}body.print-schedule [data-print-area]{margin:0!important;border:0;box-shadow:none}body.print-schedule .timetable-board-head{display:flex!important}}
