/* ama Console Brand Layer — l288.com / New-API v1.0.0-rc.37
   Keep this file separate from the bundled app CSS so upgrades remain reversible. */
:root,
html[data-theme-preset] {
  --radius: 0.875rem;
  --background: #FAFBFC;
  --foreground: #0F172A;
  --card: #FFFFFF;
  --card-foreground: #0F172A;
  --popover: #FFFFFF;
  --popover-foreground: #0F172A;
  --primary: #16A34A;
  --primary-foreground: #FFFFFF;
  --secondary: #ECFDF5;
  --secondary-foreground: #166534;
  --muted: #F1F5F9;
  --muted-foreground: #64748B;
  --accent: #F0FDF4;
  --accent-foreground: #166534;
  --success: #16A34A;
  --success-foreground: #FFFFFF;
  --info: #0891B2;
  --info-foreground: #FFFFFF;
  --warning: #D97706;
  --warning-foreground: #FFFFFF;
  --border: #E2E8F0;
  --input: #CBD5E1;
  --ring: #22C55E;
  --chart-1: #16A34A;
  --chart-2: #06B6D4;
  --chart-3: #2563EB;
  --chart-4: #8B5CF6;
  --chart-5: #F59E0B;
  --sidebar: #FFFFFF;
  --sidebar-foreground: #334155;
  --sidebar-primary: #16A34A;
  --sidebar-primary-foreground: #FFFFFF;
  --sidebar-accent: #F0FDF4;
  --sidebar-accent-foreground: #166534;
  --sidebar-border: #E2E8F0;
  --sidebar-ring: #22C55E;
  --table-row: #FFFFFF;
  --table-header: #0F172A;
  --skeleton-base: #F1F5F9;
  --skeleton-highlight: #FFFFFF;
  --font-body: var(--font-sans);
}

html.dark,
html.dark[data-theme-preset] {
  --background: #07131A;
  --foreground: #E2F8EE;
  --card: #0C2024;
  --card-foreground: #E2F8EE;
  --popover: #0C2024;
  --popover-foreground: #E2F8EE;
  --primary: #34D399;
  --primary-foreground: #052016;
  --secondary: #12352F;
  --secondary-foreground: #A7F3D0;
  --muted: #10252B;
  --muted-foreground: #94A3B8;
  --accent: #12352F;
  --accent-foreground: #A7F3D0;
  --border: #214047;
  --input: #31535A;
  --ring: #34D399;
  --sidebar: #091B21;
  --sidebar-foreground: #D1FAE5;
  --sidebar-primary: #34D399;
  --sidebar-primary-foreground: #052016;
  --sidebar-accent: #12352F;
  --sidebar-accent-foreground: #A7F3D0;
  --sidebar-border: #214047;
  --sidebar-ring: #34D399;
  --table-row: #0C2024;
  --table-header: #E2F8EE;
  --skeleton-base: #10252B;
  --skeleton-highlight: #17343A;
}

html, body {
  background: var(--background);
  color: var(--foreground);
}

/* Consistent ama surfaces: quiet borders, soft depth, restrained green accent. */
button, [role="button"], a, input, textarea, select {
  transition-duration: 180ms;
}

button:not([data-slot="icon"]):not(.size-icon),
[role="button"]:not([data-slot="icon"]) {
  border-radius: var(--radius);
}

header, nav {
  border-color: var(--border) !important;
}

/* Primary actions keep the same green-to-cyan signal as the public landing page. */
.bg-primary,
button.bg-primary,
[class*="bg-primary"] {
  background-image: linear-gradient(135deg, #16A34A 0%, #059669 58%, #0891B2 140%);
}

.bg-primary:hover,
button.bg-primary:hover,
[class*="bg-primary"]:hover {
  filter: brightness(1.04) saturate(1.04);
}

/* Cards and data panels */
.rounded-lg, .rounded-xl, .rounded-2xl {
  border-color: var(--border);
}

.shadow-sm, .shadow, .shadow-md, .shadow-lg {
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.dark .shadow-sm, .dark .shadow, .dark .shadow-md, .dark .shadow-lg {
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.20);
}

/* Active navigation has a soft ama-green wash instead of saturated blue. */
a[aria-current="page"],
[data-state="active"],
[data-active="true"] {
  color: var(--primary);
}

/* Brand mark / logo presentation without changing the source asset. */
img[alt*="logo" i], img[alt="ama"], img[alt="New API"] {
  object-fit: contain;
}

/* Keep the console usable on narrow screens. */
@media (max-width: 640px) {
  :root { --radius: 0.75rem; }
}
