
:root{
  --bg:#0b1116; --bg2:#121c22; --panel:#15232b; --panel2:#0f181e; --line:#2b3f48;
  --text:#e7eee9; --muted:#99aaa4; --gold:#c9a45d; --red:#bd4c42; --green:#65b891; --blue:#6fa8dc;
  --shadow:0 24px 70px rgba(0,0,0,.45); --radius:22px;
}
*{box-sizing:border-box} html{scroll-behavior:smooth} body{margin:0;font-family:Inter, system-ui, -apple-system, Segoe UI, Arial, sans-serif;background:radial-gradient(circle at top left,#1b3037 0,#0b1116 42%,#06090c 100%);color:var(--text);min-height:100vh} body:before{content:"";position:fixed;inset:0;background-image:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);background-size:38px 38px;pointer-events:none;mask-image:linear-gradient(to bottom,black,transparent 85%)}
a{color:inherit}.glass{background:linear-gradient(145deg,rgba(21,35,43,.92),rgba(10,17,22,.78));border:1px solid rgba(201,164,93,.22);box-shadow:var(--shadow);backdrop-filter: blur(16px)}
.login-body{display:grid;place-items:center;padding:28px}.login-shell{width:min(1120px,100%);display:grid;grid-template-columns:1.05fr .75fr;gap:24px;align-items:stretch}.login-card,.case-panel{border-radius:var(--radius);padding:34px}.brand-row{display:flex;align-items:center;gap:16px}.brand-row.compact h1{font-size:22px}.brand-logo{width:168px;max-width:52vw;height:auto;display:block}.brand-logo.small{width:190px}.brand-lockup{display:grid;gap:4px}.seal{width:58px;height:58px;border-radius:17px;display:grid;place-items:center;background:linear-gradient(135deg,#f2c978,#725629);color:#111;font-weight:900;letter-spacing:-1px;box-shadow:inset 0 1px 0 rgba(255,255,255,.35)}.eyebrow{margin:0 0 4px;text-transform:uppercase;letter-spacing:.14em;color:var(--gold);font-size:11px;font-weight:800}.login-card h1,.case-panel h2,.topbar h2,.hero-card h3,.file-card h3,.modal-header h3{margin:0;font-weight:850;letter-spacing:-.03em}.classified-strip{margin:28px 0 18px;border:1px solid rgba(189,76,66,.45);color:#ffd8d5;background:rgba(189,76,66,.12);padding:10px 12px;border-radius:12px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px}.login-copy{color:var(--muted);line-height:1.65;max-width:590px}.login-form{display:grid;gap:16px;margin-top:28px}.login-form label{display:grid;gap:8px;color:#c8d4cf;font-size:13px;font-weight:750}.login-form input{width:100%;border:1px solid var(--line);background:#071014;color:var(--text);border-radius:14px;padding:14px 16px;font-size:16px;outline:none}.login-form input:focus{border-color:var(--gold);box-shadow:0 0 0 4px rgba(201,164,93,.12)}button{border:0;border-radius:14px;background:linear-gradient(135deg,#d3af66,#9a7337);color:#0b1116;font-weight:900;letter-spacing:.04em;padding:14px 18px;cursor:pointer;transition:.18s transform,.18s filter}button:hover{transform:translateY(-1px);filter:brightness(1.06)}.login-message{min-height:22px;margin:0;font-size:14px;color:#ffb6ae}.tester-hint{margin-top:18px;color:var(--muted);font-size:13px}.tester-hint summary{cursor:pointer}.case-panel{display:flex;flex-direction:column;justify-content:space-between}.case-panel p{color:var(--muted);line-height:1.65}.signal-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.signal-grid span{border:1px solid var(--line);background:rgba(255,255,255,.035);padding:13px;border-radius:13px;text-align:center;color:#cfd9d5;font-weight:800}
.app-layout{display:grid;grid-template-columns:290px 1fr;min-height:100vh}.sidebar{position:sticky;top:0;height:100vh;padding:24px;background:linear-gradient(180deg,#111c22,#080d11);border-right:1px solid var(--line);display:flex;flex-direction:column;gap:28px}.sidebar nav{display:grid;gap:8px}.sidebar nav a{padding:12px 14px;border-radius:13px;color:var(--muted);text-decoration:none;font-weight:750}.sidebar nav a.active,.sidebar nav a:hover{background:rgba(201,164,93,.12);color:#fff}.version-chip{border:1px solid var(--line);background:rgba(255,255,255,.04);border-radius:12px;padding:10px 12px;color:var(--muted);font-size:12px}.ghost-btn{margin-top:auto;background:transparent;border:1px solid var(--line);color:var(--muted)}.content{padding:28px;max-width:1280px;width:100%;margin:0 auto}.topbar{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:24px}.status-pill{border:1px solid rgba(101,184,145,.35);background:rgba(101,184,145,.11);color:#b7f0d4;border-radius:999px;padding:10px 14px;font-size:13px;font-weight:850}.status-pill span{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--green);margin-right:8px;box-shadow:0 0 14px var(--green)}.hero-card{border:1px solid rgba(201,164,93,.2);background:linear-gradient(145deg,rgba(21,35,43,.95),rgba(11,17,22,.78));border-radius:var(--radius);padding:28px;display:grid;grid-template-columns:1fr auto;gap:24px;box-shadow:var(--shadow)}.hero-card p{color:var(--muted);line-height:1.65}.hero-meta{border-left:1px solid var(--line);padding-left:24px;display:grid;align-content:center;gap:8px;min-width:210px}.hero-meta span,.hero-meta small{color:var(--muted)}.folder-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:22px}.file-card{border:1px solid var(--line);background:rgba(15,24,30,.82);border-radius:20px;padding:20px;display:grid;gap:16px;cursor:pointer;min-height:260px}.file-card:hover{border-color:rgba(201,164,93,.55);transform:translateY(-2px);transition:.18s}.file-card p{color:var(--muted);line-height:1.55}.file-card button{align-self:end}.file-card.muted{opacity:.68}.file-icon{width:58px;height:58px;border-radius:18px;display:grid;place-items:center;font-weight:950;letter-spacing:.08em;color:#071014}.file-icon.cal{background:linear-gradient(135deg,#fff0c7,#c9a45d)}.file-icon.pdf{background:linear-gradient(135deg,#f2c7bd,#bd4c42)}.file-icon.web{background:linear-gradient(135deg,#c9dafa,#6fa8dc)}
.terminal-card{margin-top:22px;border:1px solid var(--line);background:#04090c;border-radius:20px;overflow:hidden}.terminal-head{padding:12px 15px;background:#111a20;color:var(--muted);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px}.terminal-head span{display:inline-block;width:10px;height:10px;border-radius:50%;background:#bd4c42;margin-right:6px}.terminal-head span:nth-child(2){background:#c9a45d}.terminal-head span:nth-child(3){background:#65b891}.terminal-card pre{margin:0;padding:18px;color:#b9d6c8;overflow:auto;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;line-height:1.8}.modal{position:fixed;inset:0;display:none;z-index:20}.modal[aria-hidden="false"]{display:block}.modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.72);backdrop-filter:blur(8px)}.modal-panel{position:relative;margin:28px auto;background:#0d151a;border:1px solid rgba(201,164,93,.24);border-radius:24px;box-shadow:var(--shadow);width:min(1120px,calc(100% - 24px));max-height:calc(100vh - 56px);display:flex;flex-direction:column;overflow:hidden}.modal-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 22px;border-bottom:1px solid var(--line);background:#111c22}.close-btn{background:transparent;color:#fff;border:1px solid var(--line);font-size:28px;line-height:1;padding:6px 12px}.modal-body{padding:20px;overflow:auto}.modal-footer{padding:14px 20px;border-top:1px solid var(--line);display:flex;gap:10px;flex-wrap:wrap}.doc-note{color:var(--muted);font-size:13px}.paper{background:#efe7d5;color:#15110b;border-radius:10px;padding:28px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.12);line-height:1.7}.paper h4{font-size:22px;margin:0 0 16px}.paper .stamp{display:inline-block;border:2px solid rgba(189,76,66,.65);color:#8d2d25;padding:5px 10px;transform:rotate(-2deg);font-weight:900;margin-bottom:18px}.download-link{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);color:#fff;text-decoration:none;padding:10px 12px;border-radius:12px;background:rgba(255,255,255,.04);font-weight:800}
.calendar-wrap{background:#0b1217;border:1px solid var(--line);border-radius:18px;overflow:hidden}.calendar-head{display:flex;justify-content:space-between;align-items:end;gap:16px;padding:18px 20px;background:linear-gradient(135deg,rgba(201,164,93,.2),rgba(255,255,255,.03));border-bottom:1px solid var(--line)}.calendar-head h4{font-size:24px;margin:0}.calendar-head p{margin:4px 0 0;color:var(--muted)}.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr)}.weekday{padding:10px 12px;background:#15232b;color:var(--gold);font-weight:850;font-size:12px;text-transform:uppercase;letter-spacing:.08em;border-right:1px solid var(--line)}.day-cell{min-height:155px;border-top:1px solid var(--line);border-right:1px solid var(--line);padding:10px;background:rgba(255,255,255,.02)}.day-cell.outside{opacity:.45}.day-cell.hit{box-shadow:inset 0 0 0 2px rgba(189,76,66,.5);background:rgba(189,76,66,.08)}.date-num{font-weight:900;color:#fff;margin-bottom:8px;display:flex;justify-content:space-between}.event{font-size:12px;line-height:1.35;background:rgba(201,164,93,.12);border:1px solid rgba(201,164,93,.2);border-radius:10px;padding:7px;margin-top:6px;color:#f2eee2}.staff-meta{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:16px}.staff-meta div{background:rgba(255,255,255,.04);border:1px solid var(--line);border-radius:12px;padding:12px}.staff-meta span{display:block;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.08em}.staff-table{width:100%;border-collapse:collapse;background:#0b1217;border-radius:14px;overflow:hidden}.staff-table th,.staff-table td{padding:12px 10px;border-bottom:1px solid var(--line);text-align:left;font-size:14px}.staff-table th{background:#15232b;color:var(--gold);text-transform:uppercase;font-size:11px;letter-spacing:.1em}.staff-table td{color:#d8e2de}.staff-table tr:hover td{background:rgba(201,164,93,.06)}.username{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:#f3d291;font-weight:800}.change-list{margin:0;padding-left:18px;color:#d8e2de;line-height:1.7}.change-list strong{color:#f3d291}
@media (max-width:1050px){.folder-grid{grid-template-columns:repeat(2,1fr)}.calendar-grid{grid-template-columns:repeat(2,1fr)}.weekday{display:none}.staff-meta{grid-template-columns:1fr 1fr}.day-cell{min-height:120px}.day-cell:before{content:attr(data-weekday);display:block;color:var(--gold);font-size:11px;text-transform:uppercase;letter-spacing:.08em;margin-bottom:5px}}
@media (max-width:900px){.login-shell{grid-template-columns:1fr}.app-layout{grid-template-columns:1fr}.sidebar{position:relative;height:auto}.sidebar nav{grid-template-columns:repeat(2,1fr)}.topbar,.hero-card{display:grid;grid-template-columns:1fr}.hero-meta{border-left:0;border-top:1px solid var(--line);padding:18px 0 0}.folder-grid{grid-template-columns:1fr}.content{padding:18px}.modal-panel{margin:10px auto;max-height:calc(100vh - 20px)}.brand-logo.small{width:165px}.calendar-grid{grid-template-columns:1fr}.staff-table{display:block;overflow-x:auto;white-space:nowrap}.staff-meta{grid-template-columns:1fr}}


/* v0.3 functional archive pages */
.page-section{display:none;animation:pageIn .18s ease-out}.page-section.active{display:block}@keyframes pageIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
.section-head{border:1px solid rgba(201,164,93,.2);background:linear-gradient(145deg,rgba(21,35,43,.95),rgba(11,17,22,.78));border-radius:var(--radius);padding:24px;margin-bottom:18px;display:flex;justify-content:space-between;align-items:flex-end;gap:18px}.section-head h3,.notebook-card h3{font-size:28px;margin:0;letter-spacing:-.03em}.section-head p,.notebook-card p{color:var(--muted);line-height:1.6}.file-card.accent{border-color:rgba(111,168,220,.32);background:linear-gradient(145deg,rgba(15,24,30,.95),rgba(24,43,58,.62))}.tool-row{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:0 0 18px}.search-box{display:grid;gap:8px;color:#c8d4cf;font-size:12px;text-transform:uppercase;letter-spacing:.08em;font-weight:850;min-width:min(460px,100%);flex:1}.search-box.big{font-size:13px}.search-box input,.select-filter{border:1px solid var(--line);background:#071014;color:var(--text);border-radius:14px;padding:13px 15px;font-size:15px;outline:none}.search-box input:focus,.select-filter:focus{border-color:var(--gold);box-shadow:0 0 0 4px rgba(201,164,93,.12)}.ghost-btn.inline{margin-top:0;padding:12px 14px}.result-count{color:var(--muted);font-size:13px;margin:6px 0 12px}.day-cell.dimmed{opacity:.22}.day-cell.search-hit{box-shadow:inset 0 0 0 2px rgba(101,184,145,.45);background:rgba(101,184,145,.08)}.notebook-card{margin-top:22px;border:1px solid var(--line);background:rgba(15,24,30,.82);border-radius:20px;padding:20px;display:grid;gap:14px}.changelog-paper{margin-top:20px}.side-nav a{position:relative}.side-nav a.active:before{content:"";position:absolute;left:0;top:11px;bottom:11px;width:3px;border-radius:99px;background:var(--gold)}
@media (max-width:1050px){.section-head{align-items:stretch;display:grid}}
@media (max-width:900px){.tool-row{display:grid}.search-box{min-width:0}.sidebar nav.side-nav{grid-template-columns:repeat(2,1fr)}.summary-grid{grid-template-columns:1fr}}

.archive-summary-card{margin-top:22px}.summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.summary-grid div{background:rgba(255,255,255,.04);border:1px solid var(--line);border-radius:14px;padding:14px}.summary-grid span{display:block;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.08em;margin-bottom:6px}.summary-grid strong{display:block;font-size:15px}

/* v0.5 authentication log UI */
.login-log-card{margin-top:22px}
.compact-head{margin-bottom:12px}
.log-badge{display:inline-flex;align-items:center;align-self:center;border:1px solid rgba(101,184,145,.35);background:rgba(101,184,145,.11);color:#b7f0d4;border-radius:999px;padding:10px 13px;font-size:12px;font-weight:850;white-space:nowrap}
.login-terminal{margin-top:0}
.login-terminal pre{color:#cfe8da}


/* v0.6 mobile layout stability patch */
html, body { max-width: 100%; overflow-x: hidden; }
body { text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }
* { min-width: 0; }
img, svg, video { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }

.content, .login-shell, .app-layout, .sidebar, .topbar, .hero-card, .file-card, .section-head,
.calendar-wrap, .calendar-head, .calendar-grid, .day-cell, .staff-table, .terminal-card, .login-log-card {
  max-width: 100%;
}

.hero-card p, .file-card p, .section-head p, .calendar-head p, .terminal-card pre {
  overflow-wrap: anywhere;
  word-break: normal;
}

@media (max-width: 900px) {
  .login-shell {
    width: min(100%, 560px);
    padding: 16px;
    gap: 18px;
  }

  .login-visual, .login-panel {
    padding: 22px;
    border-radius: 22px;
  }

  .login-visual h1 {
    font-size: clamp(38px, 13vw, 64px);
    line-height: 1.02;
  }

  .login-visual p {
    font-size: clamp(18px, 5.2vw, 28px);
    line-height: 1.45;
  }

  .login-form input {
    font-size: 16px;
    padding: 14px 16px;
  }

  .app-layout {
    display: block;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 18px 16px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 18px;
  }

  .brand-row.compact {
    justify-content: flex-start;
  }

  .brand-logo.small {
    width: 150px;
  }

  .sidebar nav.side-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .sidebar nav a {
    text-align: center;
    padding: 12px 10px;
    border-radius: 12px;
    font-size: 14px;
  }

  .version-chip {
    display: none;
  }

  .ghost-btn {
    margin-top: 0;
    width: 100%;
  }

  .content {
    width: 100%;
    padding: 18px 14px 28px;
    overflow: hidden;
  }

  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 12px;
    margin-bottom: 18px;
  }

  .topbar h2 {
    font-size: clamp(28px, 8vw, 38px);
    line-height: 1.08;
  }

  .status-pill {
    width: 100%;
    justify-content: flex-start;
    display: flex;
  }

  .hero-card {
    grid-template-columns: 1fr;
    padding: 20px;
    border-radius: 20px;
    gap: 16px;
  }

  .hero-card h3 {
    font-size: clamp(24px, 7vw, 34px);
    line-height: 1.12;
  }

  .hero-card p {
    font-size: 16px;
    line-height: 1.55;
  }

  .hero-meta {
    min-width: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 16px 0 0;
  }

  .folder-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 16px;
  }

  .file-card {
    min-height: auto;
    padding: 18px;
    border-radius: 18px;
  }

  .file-card h3 {
    font-size: 24px;
    line-height: 1.15;
  }

  .file-card button {
    width: 100%;
    padding: 13px 16px;
    text-align: center;
  }

  .file-icon {
    width: 52px;
    height: 52px;
    border-radius: 15px;
  }

  .login-log-card {
    margin-top: 16px;
  }

  .section-head {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    padding: 20px;
    border-radius: 20px;
    gap: 14px;
  }

  .section-head h3 {
    font-size: clamp(30px, 9vw, 46px);
    line-height: 1.08;
  }

  .section-head p {
    font-size: 17px;
    line-height: 1.5;
  }

  .download-link, .log-badge {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .tool-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .search-box {
    min-width: 0;
    width: 100%;
  }

  .search-box input, .select-filter {
    width: 100%;
    min-width: 0;
    font-size: 16px;
  }

  .ghost-btn.inline {
    width: 100%;
  }

  .terminal-card {
    border-radius: 18px;
  }

  .terminal-card pre {
    white-space: pre-wrap;
    overflow-x: hidden;
    font-size: 12px;
    line-height: 1.65;
  }

  .staff-meta {
    grid-template-columns: 1fr;
  }

  .staff-table {
    display: table;
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    white-space: normal;
  }

  .staff-table thead {
    display: none;
  }

  .staff-table tbody, .staff-table tr, .staff-table td {
    display: block;
    width: 100%;
  }

  .staff-table tr {
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
  }

  .staff-table td {
    border-bottom: 0;
    padding: 7px 12px;
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px;
    font-size: 14px;
  }

  .staff-table td:nth-child(1)::before { content: "Όνομα"; color: var(--gold); font-weight: 850; }
  .staff-table td:nth-child(2)::before { content: "Επώνυμο"; color: var(--gold); font-weight: 850; }
  .staff-table td:nth-child(3)::before { content: "Username"; color: var(--gold); font-weight: 850; }
  .staff-table td:nth-child(4)::before { content: "Τομέας"; color: var(--gold); font-weight: 850; }
  .staff-table td:nth-child(5)::before { content: "Θέση"; color: var(--gold); font-weight: 850; }
  .staff-table td:nth-child(6)::before { content: "Πρόσληψη"; color: var(--gold); font-weight: 850; }
}

@media (max-width: 700px) {
  .calendar-wrap {
    border-radius: 18px;
  }

  .calendar-head {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    padding: 18px;
  }

  .calendar-head h4 {
    font-size: clamp(30px, 10vw, 42px);
    line-height: 1.05;
  }

  .calendar-head strong {
    font-size: 20px;
  }

  .calendar-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .weekday {
    display: none !important;
  }

  .day-cell {
    min-height: auto;
    padding: 16px 18px;
    border-right: 0;
  }

  .day-cell:before {
    content: attr(data-weekday);
    display: block;
    color: var(--gold);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 6px;
  }

  .date-num {
    align-items: center;
    margin-bottom: 10px;
  }

  .date-num span {
    font-size: 28px;
    line-height: 1;
  }

  .date-num small {
    font-size: 14px;
    text-align: right;
  }

  .event {
    font-size: 15px;
    padding: 11px 12px;
    border-radius: 12px;
  }
}

@media (max-width: 420px) {
  .sidebar {
    padding: 16px 12px;
  }

  .sidebar nav.side-nav {
    grid-template-columns: 1fr;
  }

  .content {
    padding: 14px 10px 24px;
  }

  .hero-card, .section-head, .file-card, .login-visual, .login-panel {
    padding: 16px;
  }

  .staff-table td {
    grid-template-columns: 96px 1fr;
  }
}


/* v0.7 mobile burger menu + hash navigation patch */
.mobile-menu-btn,
.mobile-menu-close,
.mobile-menu-backdrop {
  display: none;
}

@media (max-width: 900px) {
  .mobile-menu-btn {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 60;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 14px;
    border: 1px solid rgba(201,164,93,.32);
    background: rgba(8,13,17,.88);
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 30px rgba(0,0,0,.35);
    display: grid;
    place-items: center;
    gap: 0;
  }

  .mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 99px;
    margin: 2px 0;
  }

  .mobile-menu-close {
    display: block;
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.04);
    color: var(--text);
    font-size: 28px;
    line-height: 1;
    padding: 0;
  }

  .mobile-menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.62);
    backdrop-filter: blur(4px);
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
  }

  body.mobile-menu-open .mobile-menu-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(82vw, 340px) !important;
    height: 100dvh !important;
    z-index: 70;
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform .22s ease;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    padding: 74px 18px 20px !important;
    box-shadow: 26px 0 60px rgba(0,0,0,.46);
  }

  body.mobile-menu-open .sidebar {
    transform: translateX(0);
  }

  .sidebar nav.side-nav {
    grid-template-columns: 1fr !important;
  }

  .sidebar nav a {
    text-align: left;
    font-size: 16px;
  }

  .sidebar .ghost-btn {
    margin-top: 12px;
  }

  .content {
    padding-top: 78px !important;
  }

  .topbar {
    margin-top: 0;
  }
}

@media (min-width: 901px) {
  .sidebar {
    transform: none !important;
  }
}


/* v0.8 mobile topbar burger + overview back guard polish */
.secure-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-title {
  min-width: 0;
}

@media (max-width: 900px) {
  .topbar {
    position: sticky;
    top: 0;
    z-index: 45;
    padding: 12px 0 14px;
    background: linear-gradient(180deg, rgba(11,17,22,.96), rgba(11,17,22,.86));
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(201,164,93,.12);
  }

  .mobile-menu-btn {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    z-index: 1;
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 13px;
    box-shadow: none;
  }

  .secure-line .eyebrow {
    margin: 0;
  }

  .content {
    padding-top: 0 !important;
  }

  .topbar h2 {
    margin-top: 6px;
  }
}

@media (max-width: 420px) {
  .mobile-menu-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }
}


/* v0.9 mobile brand menu trigger */
.mobile-brand-trigger {
  display: none;
}

.desktop-secure-label {
  display: block;
}

@media (max-width: 900px) {
  .desktop-secure-label {
    display: none;
  }

  .topbar {
    gap: 10px;
  }

  .topbar-title {
    width: 100%;
  }

  .mobile-brand-trigger {
    display: inline-flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: min(100%, 360px);
    height: auto;
    min-height: 54px;
    padding: 8px 12px;
    border-radius: 18px;
    border: 1px solid rgba(201,164,93,.30);
    background:
      linear-gradient(135deg, rgba(201,164,93,.16), rgba(255,255,255,.035)),
      rgba(8,13,17,.90);
    color: var(--text);
    box-shadow: 0 12px 32px rgba(0,0,0,.28);
    position: relative !important;
    top: auto !important;
    left: auto !important;
    z-index: 1;
  }

  .mobile-brand-trigger .burger-lines {
    display: grid;
    gap: 4px;
    width: 24px;
    min-width: 24px;
  }

  .mobile-brand-trigger .burger-lines i {
    display: block;
    height: 2px;
    width: 24px;
    border-radius: 99px;
    background: var(--gold);
  }

  .mobile-brand-trigger .mobile-brand-mark {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #071014;
    font-weight: 950;
    font-size: 20px;
    background: linear-gradient(135deg, #fff0c7, #c9a45d);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
  }

  .mobile-brand-copy {
    display: grid;
    gap: 1px;
    text-align: left;
    line-height: 1.05;
  }

  .mobile-brand-copy strong {
    font-size: 15px;
    letter-spacing: .01em;
  }

  .mobile-brand-copy small {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
  }

  .mobile-menu-btn span:not(.burger-lines):not(.mobile-brand-mark):not(.mobile-brand-copy),
  .mobile-menu-btn > span:not(.burger-lines):not(.mobile-brand-mark):not(.mobile-brand-copy) {
    margin: 0;
  }

  .topbar h2 {
    margin-top: 10px;
  }
}

@media (max-width: 420px) {
  .mobile-brand-trigger {
    width: 100%;
    padding: 8px 10px;
  }

  .mobile-brand-copy strong {
    font-size: 14px;
  }

  .mobile-brand-copy small {
    font-size: 10px;
  }
}


/* v0.10 mobile topbar correction */
@media (max-width: 900px) {
  .topbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 12px 0 14px !important;
  }

  .topbar-title {
    width: 100% !important;
    display: block !important;
  }

  /* Hide the large duplicate title on mobile. The brand trigger already contains it. */
  .topbar-title > h2 {
    display: none !important;
  }

  .mobile-brand-trigger {
    width: 100% !important;
    max-width: none !important;
    min-height: 64px !important;
    height: 64px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    padding: 10px 14px !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-radius: 18px !important;
  }

  /* Fully override the old generic hamburger span rule */
  .mobile-brand-trigger > span {
    margin: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    height: auto !important;
  }

  .mobile-brand-trigger .burger-lines {
    display: grid !important;
    gap: 5px !important;
    width: 26px !important;
    min-width: 26px !important;
    max-width: 26px !important;
    height: auto !important;
    place-items: start !important;
  }

  .mobile-brand-trigger .burger-lines i {
    display: block !important;
    width: 26px !important;
    height: 3px !important;
    min-height: 3px !important;
    border-radius: 99px !important;
    background: var(--gold) !important;
  }

  .mobile-brand-trigger .mobile-brand-mark {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, #fff0c7, #c9a45d) !important;
    color: #071014 !important;
    font-size: 22px !important;
    font-weight: 950 !important;
    line-height: 1 !important;
  }

  .mobile-brand-trigger .mobile-brand-copy {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 4px !important;
    width: auto !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    text-align: left !important;
    line-height: 1.05 !important;
    color: var(--text) !important;
  }

  .mobile-brand-copy strong {
    display: block !important;
    font-size: clamp(18px, 5vw, 22px) !important;
    line-height: 1.05 !important;
    letter-spacing: -.02em !important;
    color: var(--text) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .mobile-brand-copy small {
    display: block !important;
    font-size: 10px !important;
    line-height: 1 !important;
    letter-spacing: .22em !important;
    text-transform: uppercase !important;
    color: var(--gold) !important;
    white-space: nowrap !important;
  }

  .status-pill {
    margin-top: 0 !important;
  }
}

@media (max-width: 420px) {
  .mobile-brand-trigger {
    min-height: 58px !important;
    height: 58px !important;
    padding: 8px 10px !important;
    gap: 10px !important;
  }

  .mobile-brand-trigger .burger-lines {
    width: 24px !important;
    min-width: 24px !important;
  }

  .mobile-brand-trigger .burger-lines i {
    width: 24px !important;
    height: 2px !important;
    min-height: 2px !important;
  }

  .mobile-brand-trigger .mobile-brand-mark {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    font-size: 20px !important;
  }

  .mobile-brand-copy strong {
    font-size: 18px !important;
  }
}


/* v0.11 mobile topbar visual cleanup */
@media (max-width: 900px) {
  /* Remove the black band behind the mobile menu/status area */
  .topbar {
    background: transparent !important;
    backdrop-filter: none !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
  }

  .mobile-brand-trigger {
    background:
      linear-gradient(135deg, rgba(201,164,93,.13), rgba(255,255,255,.035)),
      rgba(15,24,30,.76) !important;
    backdrop-filter: blur(8px) !important;
  }

  .mobile-brand-trigger .mobile-brand-mark.logo-mark {
    overflow: hidden !important;
    background: linear-gradient(135deg, #fff0c7, #c9a45d) !important;
    padding: 4px !important;
  }

  .mobile-brand-trigger .mobile-brand-mark.logo-mark img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
  }
}

@media (max-width: 420px) {
  .mobile-brand-trigger .mobile-brand-mark.logo-mark {
    padding: 3px !important;
  }
}


/* v0.12 remove mobile brand mark */
@media (max-width: 900px) {
  .mobile-brand-trigger {
    gap: 14px !important;
    padding-left: 18px !important;
  }

  .mobile-brand-trigger .mobile-brand-mark,
  .mobile-brand-trigger .mobile-brand-mark.logo-mark {
    display: none !important;
  }

  .mobile-brand-copy strong {
    font-size: clamp(20px, 5.6vw, 24px) !important;
  }

  .mobile-brand-copy small {
    letter-spacing: .24em !important;
  }
}

@media (max-width: 420px) {
  .mobile-brand-trigger {
    gap: 12px !important;
    padding-left: 14px !important;
  }

  .mobile-brand-copy strong {
    font-size: 19px !important;
  }
}


/* v0.13 fixed mobile header + stronger overview back behavior support */
@media (max-width: 900px) {
  .topbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 45 !important;
    padding: 12px 14px 10px !important;
    background: linear-gradient(180deg, rgba(11,17,22,.88), rgba(11,17,22,.18), rgba(11,17,22,0)) !important;
    backdrop-filter: none !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
  }

  .content {
    padding-top: 132px !important;
  }

  .mobile-brand-trigger {
    width: 100% !important;
  }

  .status-pill {
    min-height: 48px !important;
  }
}

@media (max-width: 420px) {
  .topbar {
    padding: 10px 10px 8px !important;
  }

  .content {
    padding-top: 124px !important;
  }
}


/* v0.14 mobile header rollback: no overlay, normal document flow */
@media (max-width: 900px) {
  .topbar {
    position: sticky !important;
    top: 0 !important;
    left: auto !important;
    right: auto !important;
    z-index: 45 !important;
    padding: 10px 0 12px !important;
    margin-bottom: 18px !important;
    background: transparent !important;
    backdrop-filter: none !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
  }

  .content {
    padding-top: 14px !important;
  }

  .status-pill {
    position: relative !important;
    z-index: 0 !important;
    margin-top: 0 !important;
    min-height: 48px !important;
  }

  .hero-card,
  .folder-grid,
  .section-head,
  .login-log-card,
  .terminal-card {
    position: relative !important;
    z-index: 1 !important;
  }
}

@media (max-width: 420px) {
  .topbar {
    padding: 8px 0 10px !important;
  }

  .content {
    padding-top: 12px !important;
  }
}
