    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --bg:        #0b0d11;
      --surface:   #13161c;
      --surface2:  #1b1f28;
      --border:    rgba(255,255,255,0.06);
      --border-md: rgba(255,255,255,0.10);
      --text:      #dde1ea;
      --muted:     #5a6070;
      --muted2:    #3d4251;
      --accent:    #f4b942;
      --accent-d:  rgba(244,185,66,0.10);
      --green:     #3ecf8e;
      --green-d:   rgba(62,207,142,0.10);
      --red:       #e05252;
      --red-d:     rgba(224,82,82,0.10);
      --blue:      #5b8dee;
      --blue-d:    rgba(91,141,238,0.10);
      --radius:    10px;
      --mono:      'Space Mono', monospace;
      --sans:      'DM Sans', sans-serif;
    }

    html, body {
      height: 100%;
      background: var(--bg);
      color: var(--text);
      font-family: var(--sans);
      font-size: 15px;
      line-height: 1.5;
    }

    /* Grid background */
    body::before {
      content: '';
      position: fixed;
      inset: 0;
      background-image:
        linear-gradient(rgba(244,185,66,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(244,185,66,0.025) 1px, transparent 1px);
      background-size: 56px 56px;
      pointer-events: none;
      z-index: 0;
    }

    .page {
      position: relative;
      z-index: 1;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }

    /* ── Header ── */
    header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 20px 28px;
      border-bottom: 1px solid var(--border);
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 10px;
      text-decoration: none;
    }

    .brand-icon {
      width: 32px;
      height: 32px;
      background: var(--accent-d);
      border: 1px solid rgba(244,185,66,0.2);
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .brand-icon svg { width: 16px; height: 16px; fill: var(--accent); }

    .brand-name {
      font-family: var(--mono);
      font-size: 18px;
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--muted);
    }

    .brand-name span { color: var(--accent); }

    .header-right {
      display: flex;
      align-items: center;
      gap: 16px;
    }

    .pill-time {
      font-family: var(--mono);
      font-size: 11px;
      color: var(--muted);
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 5px 12px;
    }

    .pill-time span { color: var(--text); }

    .btn-login {
      font-family: var(--mono);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--accent);
      background: var(--accent-d);
      border: 1px solid rgba(244,185,66,0.2);
      border-radius: 6px;
      padding: 6px 14px;
      text-decoration: none;
      white-space: nowrap;
      flex-shrink: 0;
      transition: background 0.2s, border-color 0.2s;
    }

    .btn-login:hover {
      background: rgba(244,185,66,0.18);
      border-color: rgba(244,185,66,0.4);
    }

    .btn-logout {
      font-family: var(--mono);
      font-size: 17px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--muted);
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 6px 14px;
      text-decoration: none;
      white-space: nowrap;
      flex-shrink: 0;
      transition: color 0.2s;
    }
    .btn-logout:hover { color: var(--text); }
    .nav-home.active { color: var(--accent) !important; }

    /* ── Main grid ── */
    main {
      flex: 1;
      padding: 32px 28px;
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      grid-template-rows: auto auto auto;
      gap: 16px;
      max-width: 1080px;
      margin: 0 auto;
      width: 100%;
    }

    /* ── Cards ── */
    .card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 24px;
    }

    .card-label {
      font-family: var(--mono);
      font-size: 20px;
      font-weight: 700;
      letter-spacing: 0.10em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 16px;
    }

    /* ── Donut card (spans 1 col, rows 2-4) ── */
    .card-donut {
      grid-column: 1;
      grid-row: 2 / 4;
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .donut-wrap {
      position: relative;
      width: 200px;
      height: 200px;
      margin: 8px auto 20px;
    }

    .donut-svg {
      width: 200px;
      height: 200px;
      transform: rotate(-90deg);
    }

    .donut-track {
      fill: none;
      stroke: var(--surface2);
      stroke-width: 18;
    }

    .donut-occupied {
      fill: none;
      stroke: var(--accent);
      stroke-width: 18;
      stroke-linecap: round;
      transition: stroke-dasharray 1s cubic-bezier(.4,0,.2,1);
    }

    .donut-free {
      fill: none;
      stroke: var(--green);
      stroke-width: 18;
      stroke-linecap: round;
      transition: stroke-dasharray 1s cubic-bezier(.4,0,.2,1), stroke-dashoffset 1s cubic-bezier(.4,0,.2,1);
    }

    .donut-center {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
    }

    .donut-free-num {
      font-family: var(--mono);
      font-size: 42px;
      font-weight: 700;
      color: var(--green);
      line-height: 1;
    }

    .donut-free-label {
      font-size: 11px;
      color: var(--muted);
      margin-top: 4px;
      font-family: var(--mono);
      letter-spacing: 0.06em;
    }

    .donut-legend {
      width: 100%;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .legend-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .legend-left {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 14px;
      color: var(--muted);
    }

    .legend-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    .legend-val {
      font-family: var(--mono);
      font-size: 16px;
      font-weight: 700;
    }

    /* ── Uptime card ── */
    .card-uptime {
      grid-column: 2;
      grid-row: 2;
    }

    .uptime-big {
      font-family: var(--mono);
      font-size: 36px;
      font-weight: 700;
      color: var(--green);
      line-height: 1;
      margin-bottom: 6px;
    }

    .uptime-sub {
      font-size: 14px;
      color: var(--muted);
      font-family: var(--mono);
    }

    .uptime-bar {
      display: flex;
      gap: 3px;
      margin-top: 16px;
    }

    .uptime-seg {
      flex: 1;
      height: 28px;
      border-radius: 4px;
      background: var(--green);
      opacity: 0.7;
      transition: opacity 0.2s;
    }

    .uptime-seg:hover { opacity: 1; }
    .uptime-seg.down { background: var(--red); opacity: 0.5; }

    /* ── Last update card ── */
    .card-update {
      grid-column: 3;
      grid-row: 2;
    }

    .update-widget { }
    .update-widget-title { font-size: 10px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.2em; color: var(--muted); margin-bottom: 12px; }
    .update-widget-row { display: flex; align-items: center; gap: 16px; }
    .update-col { display: flex; flex-direction: column; gap: 2px; }
    .update-label { font-size: 10px; color: var(--muted); font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.1em; }
    .update-date { font-size: 16px; font-weight: 700; color: var(--text); font-family: var(--mono); }
    .update-time { font-size: 12px; color: var(--accent); font-family: var(--mono); }
    .update-time.done { color: var(--green); }
    .update-arrow { font-size: 18px; color: var(--muted); margin-top: 8px; }

    .update-source {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 5px 10px;
      font-family: var(--mono);
      font-size: 11px;
      color: var(--muted);
      margin-top: 14px;
    }

    .dot-live {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--green);
      box-shadow: 0 0 0 0 rgba(62,207,142,0.4);
      animation: pulse 2s infinite;
      flex-shrink: 0;
    }

    @keyframes pulse {
      0%   { box-shadow: 0 0 0 0 rgba(62,207,142,0.4); }
      70%  { box-shadow: 0 0 0 6px rgba(62,207,142,0); }
      100% { box-shadow: 0 0 0 0 rgba(62,207,142,0); }
    }

    /* ── Date header (над donut) ── */
    .date-header {
      grid-column: 1;
      grid-row: 1;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 20px 24px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
    }

    .date-weekday {
      font-family: var(--mono);
      font-size: 20px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 8px;
    }

    .date-day {
      font-family: var(--mono);
      font-size: 48px;
      font-weight: 700;
      color: var(--accent);
      line-height: 1;
    }

    .date-month {
      font-family: var(--mono);
      font-size: 16px;
      color: var(--muted);
      margin-top: 6px;
    }

    /* ── Occupancy bar (под легендой donut) ── */
    .occ-bar-wrap {
      margin-top: 18px;
      width: 100%;
    }

    .occ-bar-header {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      margin-bottom: 8px;
    }

    .occ-bar-label {
      font-family: var(--mono);
      font-size: 20px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--muted);
    }

    .occ-bar-val {
      font-family: var(--mono);
      font-size: 20px;
      font-weight: 700;
      color: var(--accent);
    }

    .occ-bar-track {
      width: 100%;
      height: 6px;
      background: var(--surface2);
      border-radius: 3px;
      overflow: hidden;
    }

    .occ-bar-fill {
      height: 100%;
      border-radius: 3px;
      background: var(--accent);
      transition: width 1s cubic-bezier(.4,0,.2,1);
      width: 0%;
    }

    .c-green { color: var(--green); }
    .c-accent { color: var(--accent); }
    .c-blue  { color: var(--blue); }
    .c-red   { color: var(--red); }
    .c-text  { color: var(--text); }

    /* ── Footer ── */
    footer {
      border-top: 1px solid var(--border);
      padding: 14px 28px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .footer-left {
      font-family: var(--mono);
      font-size: 11px;
      color: var(--muted2);
    }

    .footer-left span { color: var(--muted); }

    .footer-right {
      font-family: var(--mono);
      font-size: 11px;
      color: var(--muted2);
    }

    /* ── Animations ── */
    .card {
      animation: fadeUp 0.35s ease both;
    }

    .date-header { animation-delay: 0.02s; }
    .card-donut  { animation-delay: 0.07s; }
    .card-uptime { animation-delay: 0.12s; }
    .card-update { animation-delay: 0.17s; }

    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(12px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    /* ── Responsive ── */
    @media (max-width: 760px) {
      main {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        padding: 20px 16px;
        gap: 12px;
      }
      .date-header { grid-column: 1 / 3; grid-row: auto; }
      .card-donut  { grid-column: 1 / 3; grid-row: auto; }
      .card-uptime { grid-column: 1 / 3; grid-row: auto; }
      .card-update { grid-column: 1 / 3; grid-row: auto; }
      header { padding: 12px 16px; }
      .pill-time { display: none; }
      .uptime-big { font-size: 28px; }
      .card-label { white-space: nowrap; }
    }

.burger { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; padding: 7px 9px; cursor: pointer; flex-direction: column; gap: 4px; }
.burger span { display: block; width: 18px; height: 2px; background: var(--muted); border-radius: 2px; transition: background 0.2s; }
.burger:hover span { background: var(--text); }
.mobile-menu { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 100; }
.mobile-menu-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.6); }
.mobile-menu-panel { position: absolute; top: 0; left: 0; width: 240px; height: 100%; background: var(--surface); border-right: 1px solid var(--border); padding: 20px 0; display: flex; flex-direction: column; }
.mobile-menu.open { display: block; }
.mobile-menu-header { display: flex; align-items: center; justify-content: space-between; padding: 0 20px 20px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.mobile-menu-brand { font-family: var(--mono); font-size: 18px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.mobile-menu-brand span { color: var(--accent); }
.mobile-menu-close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1; }
.mobile-menu-link { display: block; padding: 14px 20px; font-family: var(--mono); font-size: 18px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); text-decoration: none; border-left: 2px solid transparent; transition: color 0.2s, border-color 0.2s; }
.mobile-menu-link:hover { color: var(--text); }
.mobile-menu-link.active { color: var(--accent); border-left-color: var(--accent); }
.mobile-menu-link.logout { color: var(--red); margin-top: auto; border-top: 1px solid var(--border); }
@media (max-width: 768px) {
  .burger { display: flex; }
  .header-right { display: flex !important; }
  .nav-home { display: none !important; }
  .btn-logout { display: none !important; }
  .desktop-only { display: none !important; }
}
