/* Screen styles for the refreshed Edura workspace. Printed contract layouts use their original styles. */
@media screen {
    :root {
        --edura-brand-teal: #10656c;
        --edura-brand-deep: #10454a;
        --edura-brand-gold: #c6a150;
        --edura-card-radius: 19px;
        --edura-light-shadow: 0 8px 26px #0c3a3611;
    }

    .edura-login-header {
        display: flex;
        align-items: center;
        min-height: 68px;
        padding: 10px clamp(15px, 4vw, 58px);
        background: #0e3336;
        color: #fff;
    }
    .edura-login-brand {
        display: flex;
        align-items: center;
        gap: 9px;
        color: #fff;
        font: 700 18px/1.15 system-ui, sans-serif;
    }
    .edura-login-brand img { border-radius: 10px; }
    .edura-login-brand small { display: block; margin-block-start: 4px; color: #bad2cb; font-size: 10px; font-weight: 400; }
    .edura-pin-login {
        color-scheme: light;
        min-height: calc(100svh - 68px);
        grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
        background: #f6f9f8;
    }
    .edura-pin-login .pin-brand {
        position: relative;
        isolation: isolate;
        overflow: hidden;
        justify-items: start;
        padding: clamp(26px, 6vw, 96px);
        gap: 26px;
        text-align: start;
        background: radial-gradient(ellipse at 12% 46%, #1b6669, transparent 58%), var(--edura-brand-deep);
    }
    .edura-pin-login .pin-brand::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        background-image: linear-gradient(#effff714 1px, transparent 1px), linear-gradient(90deg, #effff714 1px, transparent 1px);
        background-size: 54px 54px;
        mask-image: radial-gradient(ellipse at 45% 50%, #000, transparent 84%);
    }
    .edura-pin-login .pin-brand::after, .portal-dashboard .portal-hero::after {
        content: "";
        position: absolute;
        z-index: -1;
        pointer-events: none;
        inset-inline-end: -175px;
        inset-block-end: -174px;
        width: 460px;
        height: 460px;
        border: 1px solid #eed49b38;
        border-radius: 50%;
        box-shadow: 0 0 0 32px #eed49b12, 0 0 0 75px #eed49b0b, 0 0 0 118px #eed49b06;
    }
    .edura-pin-login .pin-brand img {
        box-sizing: border-box;
        width: 128px;
        height: 128px;
        object-fit: contain;
        padding: 18px;
        border-radius: 26px;
        background: #fff;
        box-shadow: 0 12px 38px #07292e89;
    }
    .edura-login-intro > small, .portal-dashboard .portal-hero > div > small {
        display: flex;
        gap: 9px;
        align-items: center;
        color: #f1d49a;
        font-size: 12px;
        font-weight: 700;
    }
    .edura-login-intro > small::before, .portal-dashboard .portal-hero > div > small::before {
        content: "";
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--edura-brand-gold);
    }
    .edura-login-intro h2 { max-width: 15ch; margin-block: 8px 4px; font-size: clamp(30px, 4.2vw, 61px); line-height: 1.35; }
    .edura-login-intro p { max-width: 37ch; color: #e1eee7; font-size: clamp(13px, 1.5vw, 17px); }
    .edura-pin-login .pin-stage {
        padding: clamp(21px, 5vw, 68px) clamp(13px, 4.2vw, 62px);
        background: radial-gradient(ellipse at 92% 10%, #e2eee8, transparent 65%), #f6f9f8;
    }
    .edura-pin-login .pin-card-new {
        padding: clamp(19px, 4vw, 34px);
        border-color: #fff;
        background: #ffffffde;
        box-shadow: 0 22px 55px #154f4320;
        --ink: #173c40;
        --field-bg: #f4f8f5;
        --muted: #4d6666;
        --line-strong: #c9dad2;
        --gold: #916d22;
    }
    .edura-pin-login .pin-card-new > .icon {
        width: 43px;
        height: 43px;
        padding: 9px;
        border-radius: 12px;
        color: var(--edura-brand-teal);
        background: #e2f0e9;
    }
    .edura-pin-login .pin-card-new h1 { margin-block: 9px 0; letter-spacing: normal; }
    .edura-pin-login .pin-card-new .btn.primary {
        min-height: 47px;
        background: var(--edura-brand-teal);
        border-color: transparent;
        color: #fff;
    }
    .edura-pin-login .pin-card-new .btn.primary:hover { background: var(--edura-brand-deep); }
    .edura-pin-login .pin-entry:focus-within { border-radius: 10px; outline: 2px solid var(--gold); outline-offset: 4px; }
    .edura-pin-login .pin-pad button {
        min-height: 44px;
        background: #fff;
        font-size: 16px;
    }
    .edura-pin-login .pin-pad button:hover { background: #e6f1ea; }

    .app-shell > .sidebar {
        --ink: #ebf5f0;
        --muted: #bed6cf;
        --raised: #1c4849;
        --line: #386163;
        --line-strong: #4b6e6c;
        --teal: #adede0;
        background: linear-gradient(158deg, #10454a, #102f34 59%, #0b292e);
    }
    .app-shell .sidebar .nav-item { min-height: 44px; font-size: 13px; }
    .app-shell .sidebar .nav-item.active { background: #285355; border-color: #40676a; color: #f3fbf6; }
    .app-shell .sidebar .nav-item.active::after { background: #d5b56f; }
    .app-shell .sidebar .sidebar-header { margin-block-end: 6px; }
    .app-shell .sidebar .account-chip:hover { background: #1d494b; }
    .app-shell .sidebar .account-chip .avatar { background: #ecd099; color: #173c40; }

    .portal-admin-shell .main-shell {
        background: #101b20;
        --surface: #101b20;
        --panel: #17282f;
        --raised: #20333a;
        --field-bg: #14242b;
        --line: #30494d;
        --line-strong: #47636a;
    }
    .edura-staff-shell .main-shell,
    .app-shell .main-shell:has(.calendar-panel),
    .student-workspace {
        color-scheme: light;
        color: #173c40;
        background: #eef4f2;
        --surface: #eef4f2;
        --panel: #fff;
        --raised: #e8f0eb;
        --field-bg: #f6faf7;
        --ink: #173c40;
        --soft: #365957;
        --muted: #4d6666;
        --teal: #10656c;
        --deep: #10454a;
        --gold: #936f2b;
        --line: #d5e3dd;
        --line-strong: #c0d1ca;
        --mint-bg: #e1f1e8;
        --gold-bg: #fbefd7;
        --blue-bg: #e9f1f8;
        --green-bg: #e0f0e7;
        --red-bg: #faece9;
        --negative: #853f3a;
        --metric-blue: #355e85;
        --metric-green: #27513f;
    }
    :is(.edura-staff-shell .main-shell, .app-shell .main-shell:has(.calendar-panel)) .topbar { background: #fcfdfb; }
    :is(.edura-staff-shell .main-shell, .app-shell .main-shell:has(.calendar-panel), .student-workspace) .btn.primary {
        background: var(--edura-brand-teal);
        color: #fff;
        border-color: transparent;
    }
    :is(.edura-staff-shell .main-shell, .app-shell .main-shell:has(.calendar-panel), .student-workspace) .btn.primary:hover {
        background: var(--edura-brand-deep);
    }
    :is(.edura-staff-shell .main-shell, .app-shell .main-shell:has(.calendar-panel), .student-workspace) .btn.secondary:hover {
        background: #deede5;
        border-color: #8baea2;
    }
    :is(.edura-staff-shell .main-shell, .app-shell .main-shell:has(.calendar-panel)) .alert {
        color: #27533e;
        border-color: #b4d1bf;
    }
    :is(.edura-staff-shell .main-shell, .app-shell .main-shell:has(.calendar-panel)) .alert.error {
        color: #853f3a;
        border-color: #e2c4bd;
    }
    :is(.edura-staff-shell .main-shell, .app-shell .main-shell:has(.calendar-panel)) :is(.panel,.program-card,.student-profile-header,.service-summary) {
        border-radius: var(--edura-card-radius);
        box-shadow: var(--edura-light-shadow);
    }

    .portal-dashboard .portal-hero {
        position: relative;
        isolation: isolate;
        overflow: hidden;
        align-items: center;
        min-height: 218px;
        padding: clamp(22px, 3vw, 40px);
        border: 1px solid #2d7777;
        border-radius: 24px;
        background: radial-gradient(ellipse at 12% 10%, #25818a99, transparent 62%), linear-gradient(112deg, #103d43, #14575b);
    }
    .portal-admin .portal-hero {
        min-height: 198px;
        border-color: #3b6062;
        background: radial-gradient(ellipse at 12% 14%, #21636599, transparent 65%), linear-gradient(120deg, #163239, #183e44);
    }
    .portal-dashboard .portal-hero h1 { margin-block: 4px 1px; line-height: 1.48; letter-spacing: normal; }
    .portal-dashboard .portal-hero p { color: #e1eee7; font-size: 14px; }
    .portal-dashboard .portal-hero .portal-light {
        min-height: 44px;
        margin-block-start: 14px;
        background: #eed49b;
        color: #143b3e;
        border-color: transparent;
    }
    .portal-dashboard .portal-hero .portal-light:hover { background: #f8e4bd; }
    .portal-dashboard .portal-quick { grid-template-columns: minmax(0, 1fr) minmax(225px, 33%); }
    .portal-dashboard .portal-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
    .portal-dashboard .portal-modules .portal-tile {
        grid-column: auto;
        position: relative;
        min-height: 143px;
        gap: 7px;
    }
    .portal-dashboard .portal-modules .portal-tile:last-child { background: linear-gradient(140deg, #e5f2eb, #f9fcfa); }
    .portal-dashboard .portal-tile {
        border-radius: var(--edura-card-radius);
        box-shadow: var(--edura-light-shadow);
        transition: transform .16s, border-color .16s;
    }
    .portal-dashboard a.portal-tile:hover { transform: translateY(-2px); }
    .portal-dashboard .portal-tile .portal-icon { margin-block-end: 3px; }
    .portal-staff .portal-tile small, .portal-staff .portal-event small { color: #4d6666; }
    .portal-staff .portal-event time {
        min-width: 56px;
        padding: 4px 6px;
        text-align: center;
        border-radius: 8px;
        background: #e3f0e8;
        color: #10454a;
        font: 700 13px/1.7 system-ui, sans-serif;
    }
    .portal-admin .portal-tile { background: linear-gradient(145deg, #20373b, #17282f); }
    .portal-admin .portal-metrics .portal-tile:nth-child(even) .portal-icon { background: #f4e7cc; color: #6c4a15; }
    .edura-metric-title { display: flex; gap: 9px; align-items: center; font-size: 13px; }

    .calendar-panel .calendar-toolbar { border-block-end: 1px solid var(--line); }
    .calendar-panel .calendar-toolbar > div:last-child:has(> a) { display: flex; flex-wrap: wrap; gap: 6px; }
    .calendar-panel .calendar-toolbar .btn { min-height: 44px; }
    .calendar-panel .appointment-calendar { min-width: 790px; }
    .calendar-panel .appointment-calendar.calendar-grid-single,
    .calendar-panel .appointment-calendar:has([data-calendar-day]):not(:has(thead [data-calendar-day] ~ [data-calendar-day])) { min-width: 0; }
    .calendar-month-grid {
        padding: 12px;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(min(115px, 100%), 1fr));
        gap: 7px;
    }
    .calendar-month-grid > .calendar-month-date {
        min-height: 55px;
        justify-content: flex-start;
        text-align: start;
        white-space: normal;
        background: #f1f8f3;
    }
    .calendar-panel .appointment-calendar td { padding: 4px; }
    .calendar-panel .appointment-calendar thead th { height: auto; }
    :is(.edura-staff-shell .main-shell, .app-shell .main-shell:has(.calendar-panel)) .calendar-slot {
        min-height: 68px;
        padding: 6px 8px;
    }
    .app-shell .main-shell:has(.calendar-panel) .calendar-slot.available {
        background: #f1f8f3; color: #245451; border-color: #bed6c9;
    }
    .app-shell .main-shell:has(.calendar-panel) .calendar-slot.owned {
        background: #dceee6; color: #153f3c; border-color: #92b8a9;
    }
    .app-shell .main-shell:has(.calendar-panel) .calendar-slot.reserved {
        background: #eaf1ee; color: #385756; border-color: #c9d9d2;
    }
    .app-shell .main-shell:has(.calendar-panel) .calendar-slot.blocked,
    .app-shell .main-shell:has(.calendar-panel) .calendar-slot.past {
        background: repeating-linear-gradient(-45deg, #e9eeec, #e9eeec 8px, #f2f5f3 8px, #f2f5f3 16px);
        color: #425c5b;
        border-color: #d3dfd9;
    }
    .app-shell .main-shell:has(.calendar-panel) .appointment-summary article { border: 1px solid var(--line); }
    .student-workspace {
        width: min(990px, calc(100% - 28px));
        margin: clamp(18px, 4vw, 55px) auto;
        padding: clamp(13px, 3vw, 27px);
        border: 1px solid #d5e3dd;
        border-radius: var(--edura-card-radius);
    }
    body:has(.student-workspace) { background: radial-gradient(ellipse at 92% 10%, #dfece5, transparent 65%), #eef4f2; }
    .student-hero {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 12px;
        padding: clamp(17px, 3vw, 31px);
        margin-block-end: 13px;
        background: radial-gradient(ellipse at 12% 10%, #25818a99, transparent 62%), linear-gradient(112deg, #103d43, #14575b);
        color: #fff;
        border-radius: var(--edura-card-radius);
    }
    .student-hero p { color: #efd49d; font-weight: 700; }
    .student-hero h1 { font-size: clamp(23px, 4vw, 39px); letter-spacing: normal; overflow-wrap: anywhere; }
    .student-hero bdi { color: #dbece6; font: 700 13px/1.5 system-ui,sans-serif; }
    .student-hero .btn { min-height: 44px; }
    .student-workspace-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .student-workspace-card {
        min-width: 0;
        padding: clamp(14px, 2vw, 24px);
        border: 1px solid var(--line);
        border-radius: var(--edura-card-radius);
        background: linear-gradient(155deg, #fff, #f6faf7);
        box-shadow: var(--edura-light-shadow);
    }
    .student-workspace-card h2 { display: flex; align-items: center; gap: 8px; color: var(--edura-brand-deep); font-size: 17px; }
    .student-workspace-card h2 .icon { color: var(--edura-brand-teal); }
    .student-workspace-card > p { margin-block-start: 8px; color: var(--muted); }
    .student-workspace-card .student-portal-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
    .student-workspace-card .btn { margin-block-start: 5px; }
    .student-workspace-appointments { grid-column: 1/-1; }
    .student-workspace-appointments article { margin-block-start: 10px; padding-block-start: 10px; border-block-start: 1px solid var(--line); }

    @media (max-width: 1020px) {
        .portal-dashboard .portal-quick { grid-template-columns: minmax(0, 1fr); }
    }
    @media (max-width: 760px) {
        .app-shell[data-mobile-ready] .mobile-dock {
            background: #103a3e;
            border-block-start-color: #407477;
            color: #e8f4ee;
            backdrop-filter: none;
        }
        .app-shell .mobile-dock :is(a, button) { color: #e2efea; }
        .app-shell .mobile-dock :is(a:hover, button:hover, [aria-current=page]) { color: #f4dca5; background: #255358; }
        .calendar-panel .appointment-calendar.day-view { min-width: 0; }
        .calendar-panel .calendar-toolbar > div:first-child:has(> a:nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
        .calendar-panel .calendar-toolbar > div:last-child:has(> a) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
        .calendar-panel .calendar-toolbar > div:last-child > .btn { padding-inline: 4px; }
    }
    @media (max-width: 700px) {
        .edura-pin-login { grid-template-columns: 1fr; min-height: 0; }
        .edura-login-header { min-height: 58px; }
        .edura-pin-login .pin-brand { display: grid; justify-content: stretch; padding: 20px 17px; gap: 11px; }
        .edura-pin-login .pin-brand img { width: 62px; height: 62px; object-fit: contain; padding: 8px; border-radius: 14px; }
        .edura-login-intro h2 { max-width: none; margin-block: 5px 0; font-size: 27px; }
        .edura-login-intro p { font-size: 12px; }
        .edura-pin-login .pin-stage { padding: 14px 13px 22px; }
        .portal-dashboard .portal-hero { min-height: 0; padding: 16px; }
        .portal-dashboard .portal-hero p { font-size: 13px; }
        .portal-dashboard .portal-modules .portal-tile { min-height: 132px; padding: 12px; }
        .portal-dashboard .portal-modules .portal-tile h3 { font-size: 14px; }
        .edura-metric-title { gap: 5px; }
        .student-workspace-grid { grid-template-columns: minmax(0, 1fr); }
    }
    @media (prefers-reduced-motion: reduce) {
        .portal-dashboard .portal-tile { transition: none; }
        .portal-dashboard a.portal-tile:hover { transform: none; }
    }
}
