/**
 * ecommerco.ai — Luxury platform theme
 * Black + Yellow (#f7c11e). Use this file on every page for same style.
 */
:root {
  /* Unified official black + yellow palette */
  --bg: #07090d;
  --surface: #0d1118;
  --surface2: #121826;
  --surface-card: #111722;
  --border: #293041;
  --text: #f0f4fb;
  --text-muted: #9ca5b5;
  --accent: #f5c12b;
  --accent-dim: rgba(245, 193, 43, 0.16);
  --btn-primary: #f7c11e;
  --success: #22c55e;
  --warning: #f7c11e;
  --danger: #ef4444;
  --link: #f7c11e;
  --input-bg: #0c1018;
  --radius: 8px;
  --radius-sm: 6px;
  --sidebar-width: 240px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(1100px 500px at 22% -10%, rgba(245, 193, 43, 0.09), transparent 60%),
    radial-gradient(900px 460px at 88% -18%, rgba(245, 193, 43, 0.05), transparent 62%),
    linear-gradient(180deg, #090c12 0%, var(--bg) 62%);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

/* Pro layout: sidebar + main (optional, add .layout-pro to body) */
.layout-pro { display: flex; min-height: 100vh; }
.layout-pro .sidebar {
  width: var(--sidebar-width); flex-shrink: 0; background: var(--surface);
  border-right: 1px solid var(--border); padding: 1rem 0;
}
.layout-pro .sidebar .search { margin: 0 0.75rem 1rem; padding: 0.5rem 0.75rem; background: var(--input-bg); border-radius: var(--radius-sm); color: var(--text-muted); font-size: 0.9rem; border: 1px solid var(--border); width: calc(100% - 1.5rem); }
.layout-pro .sidebar nav { display: flex; flex-direction: column; gap: 0.25rem; }
.layout-pro .sidebar nav a { padding: 0.5rem 1rem; color: var(--text); text-decoration: none; border-radius: 0; border-left: 3px solid transparent; }
.layout-pro .sidebar nav a:hover { background: var(--surface2); color: var(--text); }
.layout-pro .sidebar nav a.active { background: var(--surface2); border-left-color: var(--accent); color: var(--accent); }
.layout-pro .main { flex: 1; padding: 1.5rem; overflow: auto; }
.layout-pro .card { background: var(--surface-card); }

.container { max-width: 1400px; margin: 0 auto; padding: 1.5rem; }

/* Header */
header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.24);
}
header h1 { font-size: 1.4rem; font-weight: 700; color: var(--accent); }
header .meta { color: var(--text-muted); font-size: 0.85rem; }
header .logo { height: 40px; width: auto; object-fit: contain; }

.live-dot {
  width: 8px; height: 8px; background: var(--accent); border-radius: 50%;
  animation: ecommerco-pulse 1.5s infinite; display: inline-block; margin-right: 6px;
}
@keyframes ecommerco-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Nav */
nav {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem;
  padding: 0.75rem; background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border);
}
nav a {
  color: var(--text-muted); text-decoration: none; padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm); font-size: 0.9rem;
}
nav a:hover { background: #1d1d1d; color: var(--accent); }

/* Cards & sections */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.card {
  background: linear-gradient(180deg, #111722 0%, #0f141f 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.22);
}
.card h3 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.5rem; }
.card .value { font-size: 1.5rem; font-weight: 700; color: var(--accent); font-family: 'JetBrains Mono', monospace; }
.card .sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }

section {
  background: linear-gradient(180deg, #0f141f 0%, #0d1118 100%); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.section-title {
  font-size: 1rem; font-weight: 600; color: var(--accent); margin-bottom: 1rem;
  padding-bottom: 0.5rem; border-bottom: 1px solid var(--border);
}
section h2 { font-size: 1.2rem; font-weight: 600; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); color: var(--accent); }
section h3 { font-size: 1rem; margin: 1rem 0 0.5rem; color: var(--text-muted); }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); }
th { background: var(--surface2); color: var(--text-muted); font-weight: 500; }
tr:hover td { background: #1b1b1b; }

/* Badges */
.badge { display: inline-block; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.8rem; font-weight: 500; }
.badge-success { background: rgba(34, 197, 94, 0.2); color: var(--success); }
.badge-warning { background: var(--accent-dim); color: var(--warning); }
.badge-danger { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.badge-muted { background: var(--surface2); color: var(--text-muted); }

/* Buttons */
.btn {
  display: inline-block; padding: 0.5rem 1rem; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 500; text-decoration: none; border: none; cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: var(--btn-primary); color: #121212; }
.btn-primary:hover { background: #ffd24d; }
.btn-accent { background: var(--accent); color: #000; }
.btn-accent:hover { background: #ffd24d; box-shadow: 0 0 0 2px rgba(245, 193, 43, 0.2); }
.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #222; border-color: #3a3a3a; }

/* Inputs */
input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea, select {
  width: 100%; padding: 0.5rem 0.75rem; background: var(--input-bg); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.9rem;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(247, 193, 30, 0.12); }

/* Links */
a { color: var(--link); }
a:hover { color: #ffd24d; }

/* Utility */
.mono { font-family: 'JetBrains Mono', monospace; }
.summary { color: var(--text-muted); font-size: 0.95rem; }
.chart-wrap, .radar-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem;
}
.chart-wrap { height: 220px; }
.radar-wrap { height: 280px; }

/* Alerts / alarms */
.alarm-box {
  background: var(--surface); border: 1px solid var(--danger); border-left: 4px solid var(--danger);
  border-radius: var(--radius-sm); padding: 0.75rem 1rem; margin-bottom: 0.5rem; font-size: 0.8rem;
}
.alarm-box .ip { color: var(--accent); font-family: 'JetBrains Mono', monospace; font-weight: 600; }
.alarm-box .msg { color: var(--text-muted); margin-top: 0.25rem; }
.alarm-count { display: inline-block; background: var(--danger); color: #fff; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.8rem; font-weight: 600; margin-left: 0.5rem; }

/* Footer */
footer {
  text-align: center; color: var(--text-muted); font-size: 0.8rem;
  margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border);
}

/* Layout */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 768px) { .two-col { grid-template-columns: 1fr; } }

/* Print */
@media print {
  body { background: #fff; color: #111; }
  .container { max-width: none; }
  header, section, .card { border-color: #ddd; background: #f9f9f9; }
  nav { display: none; }
  header h1, .section-title, section h2 { color: #333; }
  .card .value { color: #333; }
}
