/* theme.css
   Global theme for Asset Manager (updated colors)
   - Uses: Light blue (#E9F1FA), Bright blue (#00ABE4), White (#FFFFFF)
   - Variables for colors & spacing
   - Component styles: nav, buttons, cards, forms, tables, badges, toasts
   - Small utilities & responsive helpers
*/

/* -------------------------
   1. Design tokens / variables
   ------------------------- */
:root{
  /* Colors (updated per request) */
  --bg-1: #E9F1FA;                /* page top (light blue) */
  --bg-2: #00ABE4;                /* page bottom turned bright blue per request */
  --panel: #FFFFFF;               /* card / sheet background */
  --text: #0b1220;                /* primary text (dark for contrast) */
  --muted: #6b7280;               /* muted text */
  --border: #e6e9ef;              /* neutral border */
  --shadow-lg: 0 18px 40px rgba(10,12,15,0.08);
  --shadow-md: 0 8px 20px rgba(10,12,15,0.06);

  /* Primary accent (bright blue) */
  --accent: #00ABE4;              /* bright blue (main) */
  --accent-600: #008FBF;          /* slightly darker variant used for focus/hover */

  /* Semantic colors */
  --success: #059669;
  --danger: #ef4444;
  --warning: #f59e0b;

  /* Spacing & radius */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --gap-xs: 6px;
  --gap-sm: 12px;
  --gap: 18px;
  --gap-lg: 28px;

  /* Type */
  --font-sans: Inter, "Segoe UI", Roboto, system-ui, -apple-system, Arial;
  --text-size-base: 14px;
  --text-size-lg: 16px;
}

/* Respect user motion preference */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* -------------------------
   2. Base styles
   ------------------------- */
* { box-sizing: border-box; }
html,body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-size-base);
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}

/* layout container */
.container {
  max-width: 1100px;
  margin: 28px auto;
  padding: 18px;
}

/* headings */
h1,h2,h3,h4 { color: var(--text); margin: 0 0 8px 0; font-weight: 800; }
h1 { font-size: 24px; }
h2 { font-size: 20px; }

/* links */
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* small text */
.small { font-size: 13px; color: var(--muted); }

/* -------------------------
   3. Navigation / header
   ------------------------- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-sm);
  padding: 14px 22px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--accent), var(--accent-600));
  color: #fff;
  box-shadow: var(--shadow-md);
}

/* left cluster (back + title) */
.nav-left { display:flex; align-items:center; gap:14px; }

/* site badge */
.site-badge { display:flex; gap:12px; align-items:center; }
.site-logo {
  width:44px; height:44px; border-radius:10px;
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04));
  color: #fff; font-weight:800; font-size:16px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}
.site-title { font-weight:800; font-size:18px; color:#fff; }

/* back button (left) */
.back-btn {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  padding: 9px 12px;
  border-radius: 10px;
  font-weight:700;
  display:inline-flex;
  gap:10px;
  align-items:center;
  cursor:pointer;
}
.back-btn:hover { transform: translateX(-3px); background: rgba(255,255,255,0.14); }

/* -------------------------
   4. Cards
   ------------------------- */
.card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-lg);
  overflow: visible;
}

/* top-row inside card with title + actions */
.top-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 14px;
}

/* -------------------------
   5. Buttons
   ------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 800;
  text-align: center;
  transition: transform .12s ease, box-shadow .12s ease, opacity .08s;
}

/* primary button (bright blue) */
.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-600));
  color: #fff;
  box-shadow: 0 10px 26px rgba(0,171,228,0.12);
}
.btn-primary:hover { transform: translateY(-3px); }

/* secondary / ghost */
.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
}
.btn-danger {
  background: linear-gradient(90deg, var(--danger), #fb7185);
  color: #fff;
}

/* small action */
.btn-sm { padding: 6px 10px; font-size: 13px; }

/* disabled */
.btn[disabled], .btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* -------------------------
   6. Forms
   ------------------------- */
.form-grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
label { display:block; font-weight:700; color: #374151; margin-bottom:6px; font-size:13px; }
input, textarea, select {
  width:100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  transition: border-color .12s ease, box-shadow .12s ease, transform .06s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent-600);
  box-shadow: 0 8px 30px rgba(0,171,228,0.10);
  transform: translateY(-1px);
}
textarea { min-height: 120px; resize: vertical; }

/* helper text */
.helper { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* -------------------------
   7. Table styles
   ------------------------- */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border-radius: 10px;
  overflow: auto;
}
.table th, .table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f3f4f6;
  text-align: left;
  font-size: 14px;
  color: var(--text);
}
.table thead th {
  background: #fbfcfd;
  position: sticky;
  top: 0;
  font-weight: 700;
}
.table tbody tr:hover { background: #fbfbfc; }

/* table small text */
.table .muted { color: var(--muted); font-size: 13px; }

/* -------------------------
   8. Badges & status
   ------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
}
.badge.success { background: rgba(5,150,105,0.12); color: var(--success); border: 1px solid rgba(5,150,105,0.12); }
.badge.warn { background: rgba(245,158,11,0.12); color: var(--warning); }
.badge.danger { background: rgba(239,68,68,0.08); color: var(--danger); }
.badge.gray { background: rgba(11,11,13,0.04); color: #0b1220; }

/* -------------------------
   9. Toast / notifications
   ------------------------- */
.toast {
  position: fixed;
  right: 20px;
  bottom: 22px;
  min-width: 260px;
  padding: 12px 14px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(2,6,23,0.12);
  display: none;
  z-index: 9999;
  font-weight: 700;
  color: #fff;
}
.toast.success { background: linear-gradient(90deg, #16a34a, #059669); }
.toast.error { background: linear-gradient(90deg, #ef4444, #fb7185); }

/* -------------------------
   10. Utilities
   ------------------------- */
.hidden { display: none !important; }
.flex { display: flex; }
.center { display:flex; align-items:center; justify-content:center; }
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }
.mb-2 { margin-bottom: 12px; }
.p-1 { padding: 8px; }
.p-2 { padding: 14px; }

/* grid helpers */
.grid-3 { display:grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }

/* helpers for icons/labels */
.icon { width:20px; height:20px; display:inline-flex; align-items:center; justify-content:center; }

/* -------------------------
   11. Responsive tweaks
   ------------------------- */
@media (max-width: 860px) {
  .form-grid { grid-template-columns: 1fr; }
  .navbar { padding: 12px 16px; }
  .site-title { font-size: 16px; }
  h1 { font-size: 20px; }
}
