/* ============================================================
   GestActivos — Design System LIGHT
   Aesthetic: Clean Corporate / Precision
   Fonts: Syne (display) + DM Sans (body)
   ============================================================ */

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --bg:          #f0f2f7;
  --bg-card:     #ffffff;
  --bg-input:    #f5f6fa;
  --bg-hover:    #eef0f8;
  --bg-sidebar:  #1e1e3a;

  --accent:      #5b4fff;
  --accent-dim:  #5b4fff18;
  --accent-glow: 0 0 20px #5b4fff33;

  --success:     #16a34a;
  --warning:     #d97706;
  --danger:      #dc2626;
  --info:        #0284c7;

  --text:        #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted:  #9090aa;

  --border:      #e2e4ef;
  --border-focus:#5b4fff88;

  --radius:      10px;
  --radius-lg:   16px;
  --shadow:      0 4px 24px rgba(91,79,255,.08);
  --shadow-card: 0 2px 12px rgba(0,0,0,.06);

  --sidebar-w:   240px;
  --topbar-h:    58px;

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #3d2ecc; }

code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 12px;
}

/* ── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #c0c4e0; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── LAYOUT ──────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid #ffffff10;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform .3s ease;
}

.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  z-index: 90;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}

.main-content {
  flex: 1;
  padding: 24px;
  max-width: 1400px;
  width: 100%;
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px;
  border-bottom: 1px solid #ffffff12;
}

.brand-icon {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px #5b4fff44;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.5px;
  display: block;
  color: #ffffff;
}
.brand-ver { font-size: 10px; color: #8888aa; }

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
}

.nav-section { margin-bottom: 8px; }

.nav-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #6666aa;
  padding: 12px 10px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: #9090cc;
  font-size: 13.5px;
  font-weight: 500;
  transition: all .18s;
  margin-bottom: 2px;
}

.nav-item i { width: 18px; text-align: center; font-size: 14px; }

.nav-item:hover {
  background: #ffffff14;
  color: #ffffff;
}

.nav-item.active {
  background: #5b4fff22;
  color: #a394ff;
  border-left: 2px solid var(--accent);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid #ffffff10;
}

.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.user-info { flex: 1; overflow: hidden; }
.user-name  { font-size: 12px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #e0e0f0; }
.user-role  { font-size: 10px; color: #7070aa; text-transform: capitalize; }

.user-logout {
  color: #7070aa;
  font-size: 15px;
  transition: color .18s;
  flex-shrink: 0;
}
.user-logout:hover { color: #ef4444; }

/* ── TOPBAR ──────────────────────────────────────────────── */
.sidebar-toggle {
  display: none;
  background: none; border: none;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  padding: 6px;
}

.topbar-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.role-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: capitalize;
}
.role-administrador { background: #5b4fff18; color: var(--accent); border: 1px solid #5b4fff33; }
.role-compras       { background: #16a34a18; color: var(--success); border: 1px solid #16a34a33; }
.role-sistemas      { background: #0284c718; color: var(--info);    border: 1px solid #0284c733; }

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: #fafbff;
}

.card-header h3 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.card-header h3 i { color: var(--accent); }

.card-body { padding: 20px; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .18s;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary  { background: var(--accent); color: #fff; box-shadow: 0 2px 8px #5b4fff33; }
.btn-primary:hover  { background: #4a3eee; color: #fff; box-shadow: var(--accent-glow); transform: translateY(-1px); }

.btn-secondary { background: var(--bg-input); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-hover); color: var(--text); }

.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }

.btn-danger  { background: var(--danger); color: #fff; }
.btn-danger:hover  { background: #b91c1c; color: #fff; }

.btn-warning { background: var(--warning); color: #fff; }
.btn-info    { background: var(--info); color: #fff; }

.btn-full { width: 100%; justify-content: center; }

.btn-link { font-size: 12px; color: var(--accent); font-weight: 600; background: none; border: none; cursor: pointer; }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all .18s;
  text-decoration: none;
}
.btn-icon:hover      { background: var(--bg-hover); color: var(--text); }
.btn-icon-edit:hover { background: #fef3c7; color: var(--warning); border-color: var(--warning); }
.btn-icon-del:hover  { background: #fee2e2; color: var(--danger);  border-color: var(--danger); }

/* ── FORMS ───────────────────────────────────────────────── */
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.form-label.required::after { content: ' *'; color: var(--danger); }

.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 9px 13px;
  font-family: var(--font-body);
  font-size: 13.5px;
  transition: border-color .18s, box-shadow .18s;
  outline: none;
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  background: #fff;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input[readonly] { opacity: .6; cursor: not-allowed; }
.form-input-sm { font-size: 12px; padding: 6px 10px; }

textarea.form-input { resize: vertical; min-height: 80px; }
select.form-input { cursor: pointer; }

.form-group { margin-bottom: 16px; }
.form-group-full { grid-column: 1 / -1; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; display: block; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}

.form-section { margin-bottom: 24px; }
.form-section-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-dim);
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.input-icon { position: relative; }
.input-icon > i:first-child {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}
.input-icon .form-input { padding-left: 38px; }
.input-toggle-pw {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer; font-size: 14px;
  transition: color .18s;
}
.input-toggle-pw:hover { color: var(--text); }

/* Toggle switch */
.toggle-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.toggle-switch input { display: none; }
.toggle-track {
  width: 42px; height: 24px;
  background: #d1d5db;
  border: 1px solid var(--border);
  border-radius: 99px;
  position: relative;
  transition: background .2s;
  flex-shrink: 0;
}
.toggle-track::after {
  content: '';
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 3px; left: 3px;
  transition: transform .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.toggle-switch input:checked + .toggle-track { background: var(--success); border-color: var(--success); }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(18px); }
.toggle-label { font-size: 13px; color: var(--text); }

/* ── TABLE ───────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  background: #fafbff;
  white-space: nowrap;
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}
.data-table tbody tr:hover { background: #f5f6ff; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table .row-locked td { opacity: .65; }

.table-actions { display: flex; gap: 6px; align-items: center; }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.empty-state i { font-size: 36px; opacity: .3; color: var(--accent); }

/* ── ALERTS ──────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 13.5px;
  position: relative;
}
.alert i { margin-top: 2px; flex-shrink: 0; }
.alert-close {
  margin-left: auto;
  background: none; border: none;
  color: inherit; cursor: pointer;
  font-size: 18px; line-height: 1;
  opacity: .5; transition: opacity .18s;
  flex-shrink: 0;
}
.alert-close:hover { opacity: 1; }

.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning  { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-info     { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ── BADGES ──────────────────────────────────────────────── */
.badge {
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.badge-success { background:#dcfce7; color:#166534; border:1px solid #bbf7d0; padding:2px 10px; border-radius:999px; font-size:11px; font-weight:600; }
.badge-warning { background:#fef9c3; color:#854d0e; border:1px solid #fde047; padding:2px 10px; border-radius:999px; font-size:11px; font-weight:600; }
.badge-danger  { background:#fee2e2; color:#991b1b; border:1px solid #fca5a5; padding:2px 10px; border-radius:999px; font-size:11px; font-weight:600; }
.badge-locked  { background:#ede9fe; color:var(--accent); border:1px solid #c4b5fd; padding:3px 10px; border-radius:999px; font-size:11px; font-weight:600; display:inline-flex; align-items:center; gap:5px; }

.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.status-pill.status-lg { padding: 6px 16px; font-size: 14px; }

.code-badge {
  background: #ede9fe;
  border: 1px solid #c4b5fd;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--accent);
  font-weight: 600;
}

/* ── PAGE ACTIONS ────────────────────────────────────────── */
.page-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* ── FILTER CARD ─────────────────────────────────────────── */
.filter-card { border: 1px solid var(--border); }
.filter-card .card-body { padding: 14px 16px; }
.filter-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filter-form .filter-group { flex: 1; min-width: 160px; }
.filter-form .form-input { margin: 0; }

/* ── DASHBOARD ───────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform .18s, box-shadow .18s;
  box-shadow: var(--shadow-card);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.stat-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-dim);
  color: var(--accent);
  display: grid; place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.stat-total .stat-icon { background: var(--accent); color: #fff; box-shadow: 0 4px 12px #5b4fff33; }
.stat-value { font-family: var(--font-display); font-size: 28px; font-weight: 800; line-height: 1; color: var(--text); }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 20px;
  margin-bottom: 20px;
}

.quick-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.quick-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 18px;
  border-radius: var(--radius);
  font-size: 13px; font-weight: 600;
  transition: all .18s; cursor: pointer;
  text-decoration: none;
}
.quick-btn:hover { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.quick-btn i { color: var(--accent); }

/* Activity list */
.activity-list { display: flex; flex-direction: column; gap: 8px; }
.activity-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: background .18s;
  background: var(--bg-card);
}
.activity-item:hover { background: #f5f6ff; }
.activity-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px;
  white-space: nowrap; flex-shrink: 0;
}
.activity-entrada    { background:#dcfce7; color:#166534; }
.activity-salida     { background:#fee2e2; color:#991b1b; }
.activity-asignacion { background:#ede9fe; color:var(--accent); }
.activity-devolucion { background:#dbeafe; color:var(--info); }
.activity-reparacion { background:#fef9c3; color:#854d0e; }
.activity-baja       { background:#fee2e2; color:#991b1b; }
.activity-actualizacion { background:#f3f4f6; color:#6b7280; }
.activity-otro       { background:#f3f4f6; color:#6b7280; }

.activity-info { flex: 1; min-width: 0; }
.activity-info strong { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.activity-info small  { font-size: 11px; color: var(--text-muted); }
.activity-time { font-size: 10.5px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }

/* ── ASSET DETAIL ────────────────────────────────────────── */
.asset-detail-header {
  display: flex; align-items: center; gap: 20px;
  padding: 22px; margin-bottom: 20px;
  background: linear-gradient(135deg, #fafbff 0%, #f0f2ff 100%);
}
.asset-type-icon {
  width: 64px; height: 64px;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: var(--radius-lg);
  display: grid; place-items: center;
  font-size: 28px; flex-shrink: 0;
  border: 2px solid #c4b5fd;
}
.asset-header-info { flex: 1; }
.asset-code { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.asset-header-info h2 { font-family: var(--font-display); font-size: 22px; font-weight: 800; margin-bottom: 4px; color: var(--text); }
.asset-meta { display: flex; gap: 10px; font-size: 12px; color: var(--text-muted); }
.asset-meta span { background: var(--bg-input); padding: 2px 10px; border-radius: 6px; border: 1px solid var(--border); }
.asset-status-big { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex-shrink: 0; }
.status-quick-form select { min-width: 140px; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Data list */
.data-list { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 13px; align-items: baseline; }
.data-list dt { color: var(--text-muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
.data-list dd { color: var(--text); font-weight: 500; word-break: break-word; }

/* Timeline */
.timeline { display: flex; flex-direction: column; }
.timeline-item {
  display: flex; gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-top: 5px; flex-shrink: 0;
  background: #d1d5db;
}
.dot-entrada     { background: var(--success); box-shadow: 0 0 6px #16a34a44; }
.dot-salida      { background: var(--danger); }
.dot-asignacion  { background: var(--accent); box-shadow: 0 0 6px #5b4fff44; }
.dot-devolucion  { background: var(--info); }
.dot-reparacion  { background: var(--warning); }
.dot-baja        { background: var(--danger); }
.dot-actualizacion { background: #9ca3af; }
.dot-otro        { background: #9ca3af; }

.timeline-content { flex: 1; }
.timeline-type { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 2px; }
.timeline-desc { font-size: 13px; color: var(--text); }
.timeline-states { display: flex; align-items: center; gap: 6px; font-size: 11px; margin-top: 4px; }
.state-from { color: var(--text-muted); }
.state-to   { color: var(--accent); font-weight: 600; }
.timeline-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* Asset cell */
.asset-cell { display: flex; align-items: center; gap: 10px; }
.asset-icon { width: 32px; height: 32px; background: var(--accent-dim); color: var(--accent); border-radius: 8px; display: grid; place-items: center; font-size: 14px; flex-shrink: 0; }
.asset-cell strong { display: block; font-size: 13px; color: var(--text); }
.asset-cell small  { color: var(--text-muted); font-size: 11px; }

/* Doc list */
.doc-list { display: flex; flex-direction: column; gap: 8px; }
.doc-item { display: flex; align-items: center; gap: 12px; padding: 10px; background: var(--bg-input); border-radius: var(--radius); border: 1px solid var(--border); }
.doc-icon { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; font-size: 16px; flex-shrink: 0; }
.doc-entrada { background: #dcfce7; color: var(--success); }
.doc-salida  { background: #fee2e2; color: var(--danger); }
.doc-info    { flex: 1; }
.doc-info strong { display: block; font-size: 12px; color: var(--text); }
.doc-info small  { color: var(--text-muted); font-size: 11px; display: block; }
.doc-actions { display: flex; gap: 6px; }

.doc-type-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 2px 9px; border-radius: 999px; }
.doc-type-badge.doc-entrada { background:#dcfce7; color:var(--success); }
.doc-type-badge.doc-salida  { background:#fee2e2; color:var(--danger); }

/* ── ASSIGNMENT PREVIEW ──────────────────────────────────── */
.asset-assign-preview {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, #fafbff, #f0f2ff);
  border: 1px solid #c4b5fd;
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 24px;
}
.asset-icon-lg { width: 56px; height: 56px; background: var(--accent-dim); color: var(--accent); border-radius: var(--radius-lg); display: grid; place-items: center; font-size: 24px; flex-shrink: 0; }
.asset-assign-preview h3 { font-size: 17px; font-weight: 700; color: var(--text); }
.asset-assign-preview p  { color: var(--text-muted); font-size: 12px; }
.asset-code-sm { margin-bottom: 2px; }

/* ── USER CELL ───────────────────────────────────────────── */
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-avatar-sm {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid; place-items: center;
  flex-shrink: 0;
}

/* ── CATALOG GRID ────────────────────────────────────────── */
.catalog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ── UPLOAD ZONE ─────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 20px;
  text-align: center;
  transition: border-color .2s, background .2s;
  cursor: pointer;
  background: var(--bg-input);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.upload-icon { font-size: 36px; color: var(--accent); margin-bottom: 10px; display: block; }
.upload-btn { cursor: pointer; }
.upload-hint { font-size: 11px; color: var(--text-muted); margin-top: 8px; }
.file-preview {
  display: flex; align-items: center; gap: 8px;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 8px 14px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--success);
}

/* ── AUTH PAGE ───────────────────────────────────────────── */
.auth-page {
  background: linear-gradient(135deg, #eef0ff 0%, #f5f0ff 50%, #eff6ff 100%);
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
}
.auth-bg { position: fixed; inset: 0; pointer-events: none; }
.auth-grid {
  width: 100%; height: 100%;
  background-image:
    linear-gradient(#5b4fff0a 1px, transparent 1px),
    linear-gradient(90deg, #5b4fff0a 1px, transparent 1px);
  background-size: 48px 48px;
}

.auth-container { position: relative; z-index: 1; width: 100%; max-width: 420px; padding: 24px; }
.auth-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: 0 8px 48px rgba(91,79,255,.12);
}

.auth-brand { text-align: center; margin-bottom: 32px; }
.auth-icon {
  width: 56px; height: 56px;
  background: var(--accent);
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 24px; color: #fff;
  margin: 0 auto 16px;
  box-shadow: 0 8px 20px #5b4fff44;
}
.auth-brand h1 { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -1px; color: var(--text); }
.auth-brand p  { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

.auth-form .form-group { margin-bottom: 18px; }
.auth-hint { text-align: center; margin-top: 20px; color: var(--text-muted); font-size: 11.5px; }
.auth-hint code { background: var(--bg-input); padding: 1px 6px; border-radius: 4px; color: var(--accent); border: 1px solid var(--border); }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .detail-grid    { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .catalog-grid   { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
  .sidebar-toggle { display: block; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-grid  { grid-template-columns: 1fr; }
  .asset-detail-header { flex-direction: column; align-items: flex-start; }
  .asset-status-big { align-items: flex-start; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .main-content { padding: 14px; }
  .auth-card { padding: 28px 20px; }
}

/* ── UTILITIES ───────────────────────────────────────────── */
.text-muted   { color: var(--text-muted); }
.text-warning { color: var(--warning); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.form-card    { max-width: 900px; }