:root {
    --bg: #050816;
    --bg-card: #0b1020;
    --bg-card-soft: #141a30;
    --accent: #4f46e5;
    --accent-soft: rgba(79, 70, 229, 0.12);
    --accent-danger: #f97373;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --border-subtle: rgba(148, 163, 184, 0.4);
    --radius-lg: 18px;
    --radius-pill: 999px;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.8);
  }
  
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  
  html,
  body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-main);
    background: radial-gradient(circle at top, #111827, #020617 55%);
  }
  
  body {
    display: flex;
    justify-content: center;
    align-items: stretch;
  }
  
  .page {
    max-width: 960px;
    width: 100%;
    padding: 24px 16px 32px;
    display: flex;
    flex-direction: column;
  }
  
  .header {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
    padding-top: 10px; 
  }
  
  .brand {
    display: flex;
    align-items: center;
    justify-content: space-between; 
    gap: 12px;                      
    width: 100%;
    max-width: 960px;
  }

@media (max-width: 600px) {
  .brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-logos {
    align-self: flex-end;
  }

  .card {
    margin-top: 4px;          
  }
}

  .brand-strip {
    margin-top: 16px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: radial-gradient(circle at left, rgba(79, 70, 229, 0.25), transparent 55%);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
  }
  
  .brand-strip-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  
  .brand-strip-heading {
    font-weight: 600;
  }
  
  .brand-strip-subheading {
    color: var(--text-muted);
  }
  
  .brand-strip-right {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .pill {
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    background-color: rgba(15, 23, 42, 0.9);
  }
  
  .pill-primary {
    border-color: rgba(96, 165, 250, 0.9);
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    color: #f9fafb;
  }
  
  .pill-secondary {
    color: #e5e7eb;
  }
  
  
  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-pill);
    background: radial-gradient(circle at 30% 30%, #4f46e5, #111827);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  
  .brand-text {
    display: flex;
    flex-direction: column;
  }
  
  .brand-title {
    font-weight: 600;
    font-size: 18px;
  }
  
  .brand-subtitle {
    font-size: 12px;
    color: var(--text-muted);
  }

  .brand-logos {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .logo-main {
    height: 26px;
    width: auto;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
  }
  
  .logo-secondary {
    height: 24px;
    width: auto;
    opacity: 0.85;
  }
  
  
  .main {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  
  .card {
    background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.18), transparent 55%),
    linear-gradient(145deg, var(--bg-card), var(--bg-card-soft));
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: var(--shadow-soft);
    padding: 22px 18px 24px;
    backdrop-filter: blur(18px);
  }
  
  @media (min-width: 720px) {
    .card {
      padding: 26px 30px 28px;
    }
  }
  
  .card-header h1 {
    margin: 0 0 6px;
    font-size: 24px;
    letter-spacing: 0.01em;
  }
  
  .unit-subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
  }
  
  .serial-input-row {
    margin-top: 18px;
  }
  
  .serial-input-row label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: #e5e7eb;
  }
  
  .serial-input-group {
    display: flex;
    gap: 8px;
  }
  
  .serial-input-group input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background-color: rgba(15, 23, 42, 0.9);
    color: var(--text-main);
    font-size: 14px;
  }
  
  .serial-input-group input::placeholder {
    color: var(--text-muted);
  }
  
  .hint {
    margin: 6px 0 0;
    font-size: 11px;
    color: var(--text-muted);
  }
  
  .unit-details {
    margin-top: 20px;
    padding: 12px 12px;
    border-radius: 16px;
    background-color: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.3);
  }
  
  .details-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
  }
  
  .details-row + .details-row {
    border-top: 1px dashed rgba(55, 65, 81, 0.7);
  }
  
  .detail-label {
    color: var(--text-muted);
  }
  
  .detail-value {
    font-weight: 500;
  }
  
  .status-pill {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background-color: var(--accent-soft);
    color: #c7d2fe;
    font-size: 11px;
  }
  
  .actions {
    margin-top: 22px;
  }
  
  .actions h2 {
    margin: 0 0 4px;
    font-size: 16px;
  }
  
  .section-subtitle {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--text-muted);
  }
  
  .actions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
  }
  
  @media (min-width: 640px) {
    .actions-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }
  
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.16s ease-out;
    transform: translateY(0);
  }
  
  .btn-primary {
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
  }
  
  .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(79, 70, 229, 0.55);
  }
  
  .btn-secondary {
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.5);
  }
  
  .btn-secondary:hover {
    border-color: #a5b4fc;
    background-color: #020617;
  }
  
  .btn-danger {
    background: linear-gradient(135deg, #f97373, #ef4444);
    color: #fff7ed;
    box-shadow: 0 10px 24px rgba(248, 113, 113, 0.5);
  }
  
  .btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(248, 113, 113, 0.7);
  }
  
  .btn-outline {
    background: transparent;
    color: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.7);
  }
  
  .btn-outline:hover {
    border-color: #a5b4fc;
    background-color: rgba(15, 23, 42, 0.8);
  }
  
  .error-section {
    margin-top: 18px;
    padding: 12px 12px;
    border-radius: 14px;
    background-color: rgba(127, 29, 29, 0.18);
    border: 1px solid rgba(248, 113, 113, 0.7);
    font-size: 13px;
  }
  
  .error-section h2 {
    margin-top: 0;
  }
  
  .error-section ul {
    padding-left: 18px;
    margin: 6px 0 0;
  }
  
  .hidden {
    display: none !important;
  }
  
  .footer {
    margin-top: 18px;
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }
  
  .footer-separator {
    opacity: 0.6;
  }
  