 * {
    box-sizing: border-box;
    margin: 0;
  }

  body {
    font-family: -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #f8fafc;
    color: #1e293b;
    padding: 24px 20px;
    line-height: 1.5;
  }

  .container {
    max-width: 1000px;
    margin: 0 auto;
  }

  header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
  }

  h1 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
  }

  nav a {
    color: #475569;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
  }

  nav a:hover {
    background: #e2e8f0;
    color: #0f172a;
  }

  nav a.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
    border: 1px solid #e2e8f0;
  }

  .cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
  }

  .card {
    background: #ffffff;
    padding: 20px 18px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: box-shadow 0.2s;
  }

  .card:hover {
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.04);
  }

  .card .label {
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 8px;
  }

  .card .value {
    font-size: 30px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
  }

  .card .value.small {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
  }

  .card .value.accent {
    color: #2563eb;
  }

  .panel {
    background: #ffffff;
    padding: 22px 24px;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    margin-bottom: 24px;
  }

  .panel h2 {
    font-size: 17px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
  }

  pre {
    background: #f8fafc;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid #e9eef3;
    overflow-x: auto;
    font-size: 14px;
    color: #1e293b;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    line-height: 1.6;
    margin: 0 0 16px 0;
  }

  pre:last-child {
    margin-bottom: 0;
  }

  .panel p {
    margin: 12px 0;
    color: #334155;
    font-size: 15px;
  }

  .panel p strong {
    font-weight: 600;
    color: #0f172a;
  }

  .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    padding: 10px 22px;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s, transform 0.1s;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .btn:hover {
    background: #1d4ed8;
  }

  .btn:active {
    transform: scale(0.97);
  }

  .btn.secondary {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  }

  .btn.secondary:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
  }

  .btn.small {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 10px;
  }

  .btn.danger {
    background: #dc2626;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.2);
  }

  .btn.danger:hover {
    background: #b91c1c;
  }

  .inline-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
  }

  .inline-form input {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
  }

  input[type=text],
  input[type=number],
  textarea {
    width: 100%;
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    margin-bottom: 14px;
    font-family: inherit;
    transition: border 0.15s, box-shadow 0.15s;
  }

  input[type=text]:focus,
  input[type=number]:focus,
  textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  }

  label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    margin-bottom: 6px;
  }

  table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
  }

  th,
  td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid #e9eef3;
    font-size: 14px;
  }

  th {
    color: #64748b;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }

  tr:last-child td {
    border-bottom: none;
  }

  code {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 13px;
    color: #0f172a;
    font-family: 'SF Mono', 'Fira Code', monospace;
  }

  .badge {
    padding: 4px 12px;
    border-radius: 24px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
    letter-spacing: 0.01em;
  }

  .badge.on {
    background: #dcfce7;
    color: #166534;
  }

  .badge.off {
    background: #fee2e2;
    color: #991b1b;
  }

  .alert {
    padding: 14px 18px;
    border-radius: 14px;
    margin-bottom: 18px;
    font-size: 14px;
    border: 1px solid transparent;
  }

  .alert.success {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
  }

  .alert.error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
  }

  a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
  }

  a:hover {
    text-decoration: underline;
  }

  hr {
    border: none;
    border-top: 1px solid #e9eef3;
    margin: 20px 0;
  }

  .btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
  }

  .text-muted {
    color: #64748b;
    font-size: 14px;
  }

  .mt-2 { margin-top: 8px; }
  .mb-2 { margin-bottom: 8px; }