/*
 * ETSO Akreditasyon | Institutional UI 2.2
 * Progressive visual layer over panel.css (v2.0/v2.1)
 * No external fonts, JS libraries or CDN dependencies.
 */
:root {
    color-scheme: light;
    --nav: #0a1c31;
    --nav-alt: #143c4e;
    --accent: #087d83;
    --blue: #116e87;
    --ink: #16283d;
    --muted: #64748b;
    --page: #f4f7fb;
    --line: #e2e9f1;
    --white: #ffffff;
    --radius: 16px;
    --elevation: 0 4px 24px rgba(13, 37, 63, .045), 0 1px 3px rgba(13, 37, 63, .025);
    --surface-soft: #f8fafc;
    --primary-strong: #07666d;
    --focus-color: #1d9fac;
    font-family: "Segoe UI Variable", "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}
html { scroll-behavior: smooth; }
body.shell { background: #f4f7fb; }
button, input, select, textarea { font-family: inherit; }
::selection { background: #a5e7e2; color: #0b3442; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--focus-color); outline-offset: 3px; }
:where(h1, h2, h3, h4) { text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 2.25vw, 2.55rem); letter-spacing: -.047em; font-weight: 770; }
h2 { letter-spacing: -.025em; }

/* Sidebar: calm enterprise navigation with clear group hierarchy. */
.shell { grid-template-columns: 258px minmax(0, 1fr); }
.rail {
    background: linear-gradient(160deg, #0d2439 0%, #0b1e33 62%, #0b192b 100%);
    border-right: 1px solid rgba(255, 255, 255, .07);
    box-shadow: 5px 0 25px rgba(7, 20, 39, .025);
    padding: 22px 14px 15px;
}
.brand { padding: 4px 9px 21px; border-bottom: 1px solid rgba(221, 242, 255, .095); margin-bottom: 9px; gap: 12px; }
.brand strong { font-size: .96rem; letter-spacing: -.02em; line-height: 1.3; }
.brand strong em { font-style: normal; color: #80e1db; font-size: .78rem; letter-spacing: .025em; }
.brand small { font-size: .7rem; color: #95b7c9; letter-spacing: .01em; }
.monogram {
    width: 46px; height: 46px; flex: 0 0 46px;
    background: linear-gradient(145deg, #0b8b91, #18556d);
    border: 1px solid rgba(134, 232, 219, .35);
    box-shadow: inset 0 1px rgba(255,255,255,.17), 0 7px 18px rgba(1,16,29,.19);
    border-radius: 13px; font-weight: 850; letter-spacing: -.03em;
}
.nav { display: block; overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: 0 2px 10px; scrollbar-width: thin; scrollbar-color: #42627b transparent; }
.nav-group { margin-bottom: 7px; }
.nav-heading { padding: 20px 12px 8px; color: #819eb6; font-weight: 800; font-size: .64rem; letter-spacing: .13em; }
.nav-item {
    min-height: 40px; padding: 10px 12px; gap: 11px; border-radius: 9px;
    font-size: .825rem; font-weight: 560; line-height: 1.27; color: #c2d4e5;
    transition: color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.nav-item svg { width: 17px; height: 17px; color: #91b3c7; }
.nav-item:hover { color: #fff; background: rgba(119, 189, 206, .115); }
.nav-item:hover svg { color: #c2eeed; }
.nav-item.current {
    color: #f4fffe; background: linear-gradient(98deg, rgba(9,134,145,.32), rgba(81,150,178,.12));
    box-shadow: inset 3px 0 #65e1d2, inset 0 0 0 1px rgba(108,217,204,.12);
    font-weight: 730;
}
.nav-item.current svg { color: #87e9db; }
.rail-footer {
    padding: 13px 10px; margin: 4px 1px 0;
    background: rgba(225, 245, 255, .045); border: 1px solid rgba(180,220,245,.1);
    border-radius: 13px;
}
.rail-footer .profile { gap: 10px; }
.rail-footer .profile strong { color: #f0f8fb; font-weight: 700; }
.rail-footer .profile small { color: #aac4d2; }
.rail-footer .signout { border-radius: 8px; color: #c0d5e2; }
.rail-footer .signout:hover { background: rgba(255,255,255,.11); }

/* Work area and persistent top utility bar. */
.main { min-width: 0; background: radial-gradient(ellipse at 70% 0%, #f9fcfe 0, #f4f7fb 52%, #f2f6fb 100%); }
.topbar {
    position: sticky; top: 0; z-index: 11; min-height: 74px; height: auto;
    background: rgba(255,255,255,.97);
    border-bottom: 1px solid #e4ebf2;
    box-shadow: 0 1px 2px rgba(14,37,64,.02);
    padding: 10px clamp(20px, 2.75vw, 46px);
}
@supports (backdrop-filter: blur(12px)) { .topbar { background: rgba(255,255,255,.91); backdrop-filter: blur(12px); } }
.top-left, .top-tools { gap: clamp(11px, 1.7vw, 22px); min-width: 0; }
.breadcrumbs { color: #6d8094; font-size: .73rem; font-weight: 700; letter-spacing: .04em; line-height: 1.5; }
.breadcrumbs strong { color: #183d55; }
.crumb-separator { color: #b6c9d6; }
.global-search {
    width: min(365px, 28vw); border: 1px solid #dce7ef; border-radius: 12px;
    background: #f7fafd; min-height: 42px; padding: 0 13px;
    transition: border-color .16s, box-shadow .16s, background .16s;
}
.global-search input { color: #213a52; font-size: .84rem; }
.global-search input::placeholder { color: #8194a7; opacity: 1; }
.global-search:focus-within { background: #fff; outline: 0; border-color: #7cc8ca; box-shadow: 0 0 0 4px rgba(13,143,146,.10); }
.date-pill { font-weight: 660; color: #536b80; }
.top-avatar { width: 38px; height: 38px; box-shadow: inset 0 0 0 1px #d6e9ec; border: 2px solid #fff; }
.content { max-width: 1720px; padding: clamp(22px, 2.6vw, 37px) clamp(18px, 2.85vw, 49px) 54px; }
.footer { border-top-color: #e0e8f1; background: transparent; color: #7a8da0; }

/* Page hierarchy and editorial micro-labels. */
.page-head { margin-bottom: 24px; align-items: flex-end; }
.page-head h1 { color: #102b43; }
.page-head p, .dashboard-title p { color: #65788a; font-size: .92rem; }
.eyebrow { color: #6a8295; font-size: .67rem; letter-spacing: .135em; }
.small-dot { width: 7px; height: 7px; background: #14a49b; box-shadow: 0 0 0 3px #def8f3; }

/* Buttons: tactile but understated, common design grammar. */
.button {
    border-radius: 11px; padding: 10px 17px; min-height: 42px;
    font-size: .85rem; font-weight: 730;
    transition: background-color .16s, border-color .16s, box-shadow .16s, transform .16s;
}
.button.primary {
    color: #fff; background: linear-gradient(180deg, #078a8d, #08777f); border-color: #087d83;
    box-shadow: 0 4px 10px rgba(3, 112, 120, .16), inset 0 1px rgba(255,255,255,.15);
}
.button.primary:hover { background: linear-gradient(180deg, #087c83, #06626e); box-shadow: 0 7px 14px rgba(3, 112, 120, .19); transform: translateY(-1px); }
.button.secondary { color: #284358; background: #fff; border-color: #d5e0e9; box-shadow: 0 1px 2px rgba(25,53,85,.035); }
.button.secondary:hover { background: #f5fafb; border-color: #8bbdc3; transform: translateY(-1px); }
.button.small { border-radius: 9px; min-height: 33px; }
.button:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; transform: none; }
.text-link, .text-button { color: #087885; font-weight: 760; }
.text-link:hover, .text-button:hover { color: #065c66; }
.back { gap: 6px; font-weight: 700; color: #4d7183; }

/* Standard cards, linked metric cards and tables. */
.card {
    background: rgba(255,255,255,.99); border: 1px solid #e1e9f1;
    border-radius: 17px; box-shadow: var(--elevation);
}
.card-pad { padding: clamp(18px, 1.9vw, 27px); }
.card-head { margin-bottom: 17px; }
.card-head h2 { font-size: 1.08rem; font-weight: 760; color: #18334b; }
.table-card { overflow: hidden; }
.table-head { padding: 19px 24px; }
.metrics-v2 { gap: 15px; margin-bottom: 20px; }
.metric-v2 {
    min-height: 113px; padding: 19px 20px; gap: 15px;
    border: 1px solid #e1eaf2; box-shadow: 0 3px 14px rgba(14,48,75,.045);
    transition: border-color .17s, box-shadow .17s, transform .17s;
}
.metric-v2:hover { border-color: #a9d5d9; box-shadow: 0 13px 30px rgba(16,60,90,.09); transform: translateY(-2px); }
.metric-v2 p { color: #63788e; font-weight: 710; font-size: .82rem; }
.metric-v2 strong { color: #16344d; font-size: clamp(1.65rem,2vw,2.05rem); font-weight: 810; }
.metric-v2 small { color: #8193a3; }
.metric-v2 .icon-box { width: 47px; height: 47px; flex-basis: 47px; border-radius: 13px; }
.icon-box.blue { background: #e5f2fc; color: #1f6c98; }
.icon-box.green { background: #e2f6ee; color: #147456; }
.icon-box.amber { background: #fff1de; color: #9b6524; }
.icon-box.violet { background: #eeebfb; color: #6854a2; }
.metric-arrow { color: #b0c2d1; }
.board-grid { gap: 18px; }
.section-progress a { color: #183a51; }
.section-progress progress { background: #e5eff4; }
.task { padding: 13px 0; border-bottom-color: #eaf0f5; gap: 12px; }
.task a, .task strong { color: #29445b; }
.task small { color: #8294a6; }
.alert-row { padding: 13px 0; gap: 13px; }
.alert-row strong { color: #234257; }
.alert-row:hover strong { color: #047f88; }
.signal { border-radius: 11px; }
.helper-note { background: #f1faf9; color: #496c73; border-color: #d4eae8; }

.table-scroll { scrollbar-width: thin; scrollbar-color: #c1d4df transparent; }
table { font-size: .865rem; }
th {
    background: #f6f9fc; color: #516c82; padding: 14px 16px;
    font-size: .75rem; font-weight: 750; letter-spacing: .035em;
}
td { padding: 14px 16px; color: #324b61; }
th, td { border-top-color: #eaf0f5; }
tbody tr:hover { background: #f4fbfb; }
tbody tr { transition: background-color .13s; }
.row-link { color: #17647f; }
.code { background: #e9f4fa; color: #245a76; border-radius: 7px; font-size: .8rem; }
.status { border: 1px solid transparent; padding: 5px 10px; font-size: .75rem; }
.status.ready, .status.done { background: #e2f6ed; color: #17664c; border-color: #c5e8d8; }
.status.progress { background: #e6f2fb; color: #175a86; border-color: #cde2f2; }
.status.review { background: #f0eafa; color: #65509b; border-color: #e0d4f6; }
.status.open { background: #fff2df; color: #86591f; border-color: #f4dfbb; }
.empty { color: #7c8ea0; }
.pager { background: #fbfcfe; border-top-color: #e6edf4; }

/* Forms and validation: high legibility and clearer focus state. */
label { color: #344f64; font-size: .85rem; font-weight: 680; gap: 7px; }
label small { color: #74889c; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea {
    min-height: 42px; border: 1px solid #ccdae6; background: #fff;
    border-radius: 10px; padding: 10px 12px; color: #193348;
    box-shadow: inset 0 1px 1px rgba(20,55,87,.018);
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}
textarea { min-height: 96px; resize: vertical; }
/* Keep the global search as one integrated control, not an input inside an input. */
.global-search input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
    border: 0; background: transparent; box-shadow: none;
    border-radius: 0; min-height: 0; padding: 9px 0;
}
.global-search input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus {
    border: 0; outline: none; box-shadow: none;
}
input::placeholder, textarea::placeholder { color: #93a2b2; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus, select:focus, textarea:focus {
    border-color: #4ca9ae; outline: none;
    box-shadow: 0 0 0 4px rgba(13, 149, 153, .11);
}
input[readonly], input:disabled, select:disabled, textarea:disabled { background: #f4f7fa; color: #718599; }
input[type="checkbox"],input[type="radio"] { accent-color: #07888c; }
.form-stack { gap: 18px; }
.form-grid { gap: 16px; }
.filters { background: #fbfdff; border-bottom: 1px solid #e6edf3; padding: 19px 21px; }
.criteria-checklist { border-color: #dce8f1; background: #f9fcfe; }
.notice { border-radius: 11px; padding: 13px 16px; }
.notice.success { color: #1b654d; border-color: #c4ead7; background: #effaf4; }
.notice.error { color: #a03336; border-color: #f0ced0; background: #fff5f5; }

/* Executive dashboard / progress readout. */
.hero-v2 {
    background: radial-gradient(circle at 91% 12%, rgba(89,211,190,.24), transparent 29%),
                radial-gradient(circle at 10% 90%, rgba(60,131,176,.20), transparent 40%),
                linear-gradient(115deg, #0e2842 0%, #10445a 63%, #0e5961 100%);
    border: 1px solid rgba(202,246,241,.06); border-radius: 20px;
    box-shadow: 0 16px 35px rgba(12,50,74,.10); min-height: 258px;
    padding: 34px clamp(26px, 3vw, 44px); margin-bottom: 20px;
}
.hero-v2:before,.hero-v2:after { border-color: rgba(196,247,243,.085); }
.hero-label { color: #8de8dd; letter-spacing: .13em; }
.hero-copy h2 { font-size: clamp(1.68rem, 2.15vw, 2.35rem); letter-spacing: -.048em; }
.hero-copy>p { color: #c4e0e8; }
.hero-link { background: #87e4d5; color: #153c48; border-radius: 10px; padding: 11px 17px; }
.hero-link:hover { background: #adf7e9; }
.hero-progress .donut { box-shadow: 0 0 0 11px rgba(236,255,255,.035); }
.hero-progress .donut>div { background: #11475a; }
.hero-progress p { color: #d8f1f1; }
.trend-bar { background: linear-gradient(180deg, #69ddc9, #0b8290); }

/* Personal profile: photo + personnel details. */
.profile-dropdown-trigger { border: 1px solid transparent; border-radius: 12px; }
.profile-dropdown-trigger:hover,.profile-dropdown[open] .profile-dropdown-trigger { background: #f3f9fa; border-color: #dfedef; }
.profile-dropdown-list { border-color: #deeaef; border-radius: 15px; box-shadow: 0 18px 46px rgba(16,52,83,.16); padding: 8px; }
.profile-dropdown-list a,.profile-dropdown-list button { border-radius: 9px; }
.profile-dropdown-list a:hover,.profile-dropdown-list button:hover { background: #edf7f7; }
.user-avatar-fallback,.user-avatar-img { border-color: #e2f3f1; box-shadow: 0 0 0 1px #dce9eb; }
.profile-header-card {
    background: radial-gradient(circle at 94% 0, #e6f6f4 0%, transparent 36%),linear-gradient(112deg, #fff, #f9fcfd);
    border-color: #dbe9ef; padding: clamp(20px,2.35vw,32px); margin-bottom: 20px;
}
.profile-identity h2 { color: #16354d; font-size: 1.6rem; }
.profile-chips span { background: #e7f5f5; color: #0d6977; border: 1px solid #cde7e9; }
.profile-facts>div { padding: 14px 0; border-bottom-color: #e8eff4; }
.profile-facts dt { color: #668097; }
.profile-facts dd { color: #253f53; font-weight: 680; }
.sensitive-personnel-field { background: #f7fbfd; border-color: #dce9f1; border-radius: 13px; }

/* Sign-in, if the same layer is included in the auth layout. */
body.sign-in { background: #fff; }
.login-brand {
    background: radial-gradient(ellipse at 100% 40%, rgba(37,118,130,.43), transparent 58%),
                linear-gradient(135deg, #0c1c30, #102c44 69%, #11515d);
}
.login-line { background: #73e3d2; height: 4px; }
.login-form { width: min(100%, 440px); }
.login-form h2 { color: #18364d; }
.login-form input:not([type="checkbox"]) { min-height: 48px; }
.login-form .button.primary { min-height: 48px; width: 100%; }

/* Responsive design retains the existing mobile drawer logic. */
@media (max-width: 1250px) {
    .shell { grid-template-columns: 242px minmax(0, 1fr); }
    .topbar { padding-inline: 23px; }
    .content { padding-inline: 24px; }
    .global-search { width: 250px; }
    .hero-v2 { padding: 27px 30px; }
}
@media (max-width: 950px) {
    .shell { grid-template-columns: 222px minmax(0, 1fr); }
    .metrics-v2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .board-grid { grid-template-columns: 1fr; }
    .topbar .global-search { width: 210px; }
}
@media (max-width: 720px) {
    .shell { display: block; }
    .rail { display: none; position: fixed; inset: 0 auto 0 0; width: min(294px, 88vw); height: 100dvh; z-index: 25; border-right: 1px solid #1b3d52; }
    .rail.open { display: flex; }
    .topbar { min-height: 62px; height: auto; padding: 9px 15px; }
    .topbar .breadcrumbs { font-size: .68rem; }
    .topbar .global-search { display: none; }
    .date-pill { display: none; }
    .mobile-menu { display: block; }
    .content { padding: 21px 14px 35px; }
    .page-head { align-items: flex-start; }
    .page-head .cluster { width: 100%; }
    .hero-v2 { grid-template-columns: 1fr; gap: 24px; padding: 25px 22px; }
    .metrics-v2 { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
    .metric-v2 { padding: 14px; gap: 10px; min-height: 116px; }
    .metric-v2 .icon-box { width: 38px; height: 38px; flex-basis: 38px; }
    .card-pad { padding: 17px; }
    .profile-cards { grid-template-columns: 1fr; }
    .footer { padding: 17px 14px; }
    .sign-in { grid-template-columns: 1fr; }
    .login-brand { min-height: 0; padding: 27px; }
}
@media (max-width: 400px) {
    .metrics-v2 { grid-template-columns: 1fr; }
    .hero-copy h2 { font-size: 1.5rem; }
    .topbar .breadcrumbs { letter-spacing: 0; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,*::before,*::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
@media print {
    :root { color-scheme: light; }
    body.shell { background: white; }
    .rail,.topbar,.footer,.nav-mobile-overlay,.button,.profile-dropdown { display: none !important; }
    .shell { display: block; }
    .content { padding: 0; max-width: 100%; }
    .card,.hero-v2 { box-shadow: none; border: 1px solid #d5d5d5; break-inside: avoid; }
    .hero-v2 { color: #111; background: white; }
    .hero-copy h2,.hero-copy>p { color: #111; }
    table { min-width: 0; }
}
