:root {
    --bg: #f3f5f8;
    --surface: #ffffff;
    --text: #1d2433;
    --muted: #5d6779;
    --accent: #2b5fd9;
    --accent-dark: #1e46a8;
    --border: #d9dee7;
    --header-bg: #1d2433;
    --header-text: #ffffff;
  }

  * { box-sizing: border-box; }

  body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
  }

  .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 24px;
    background: var(--header-bg);
    color: var(--header-text);
  }

  .header__brand {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .header__logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    background: #3a4358; 
    border-radius: 6px;
  }

  .header__title { margin: 0; font-size: 1.4rem; font-weight: 600; }
  .header__subtitle { margin: 2px 0 0; font-size: .85rem; color: #aab3c5; }

  .login {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    border: 1px solid #4a5570;
    border-radius: 999px;
    color: var(--header-text);
    text-decoration: none;
    font-size: .95rem;
  }
  .login:hover { background: #2b3550; }
  .login:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

  .login__icon {
    width: 36px;
    height: 36px;
    padding: 6px;
    border-radius: 50%;
    background: var(--accent);
  }

  .nav {
    display: flex;
    justify-content: flex-start;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
  }

  .nav a {
    padding: 14px 22px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 3px solid transparent;
  }
  .nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }
  .nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

  .main {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    align-content: start;
  }

  .panel {
    min-height: 200px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
  }

  .footer {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    padding: 20px 24px;
    background: var(--header-bg);
    color: #aab3c5;
    font-size: .9rem;
  }
  .footer__left   { text-align: left; }
  .footer__center { text-align: center; }
  .footer__right  { text-align: right; }

  @media (max-width: 640px) {
    .header { flex-direction: column; align-items: flex-start; }
    .nav { overflow-x: auto; }
    .footer { grid-template-columns: 1fr; }
    .footer__left, .footer__center, .footer__right { text-align: center; }
  }