/* ============================================================
   CredVault – Dark Professional Theme
   Design system: slate/navy tones with indigo accent
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --bg-body:       #0f172a;
  --bg-sidebar:    #020617;
  --bg-card:       #1e293b;
  --bg-input:      #0f172a;
  --border:        #334155;
  --border-focus:  #6366f1;
  --primary:       #6366f1;
  --primary-h:     #4f46e5;
  --danger:        #ef4444;
  --danger-h:      #dc2626;
  --success:       #10b981;
  --warning:       #f59e0b;
  --info:          #3b82f6;
  --text-1:        #f8fafc;
  --text-2:        #cbd5e1;
  --text-muted:    #94a3b8;
  --radius:        0.5rem;
  --radius-lg:     0.75rem;
  --shadow:        0 8px 32px rgba(0, 0, 0, 0.5);
  --trans:         0.15s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-body);
  color: var(--text-2);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
h1, h2, h3, h4 { font-family: 'Manrope', system-ui, sans-serif; color: var(--text-1); }
.hidden { display: none !important; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* ============================================================
   LOGIN
   ============================================================ */
#loginScreen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 1rem;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
  animation: fadeSlideUp 0.4s ease;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.login-logo i { font-size: 2rem; color: var(--primary); }
.login-logo h1 { font-size: 1.75rem; font-weight: 800; color: var(--text-1); }
.login-sub { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 2rem; }

/* ---------- Form ---------- */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 0.5rem;
}
.req { color: var(--danger); }
.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.625rem 0.875rem;
  color: var(--text-1);
  font-size: 0.875rem;
  transition: border-color var(--trans), box-shadow var(--trans);
  outline: none;
}
.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.form-control::placeholder { color: var(--text-muted); opacity: 0.7; }
.form-control:disabled { opacity: 0.55; cursor: not-allowed; }
textarea.form-control { resize: vertical; min-height: 5rem; }
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.375rem; display: block; }

/* ---------- Alerts ---------- */
.alert { padding: 0.65rem 1rem; border-radius: var(--radius); font-size: 0.8125rem; margin-bottom: 1rem; }
.alert-error { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); color: #fca5a5; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background var(--trans), color var(--trans), border-color var(--trans), box-shadow var(--trans);
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover { background: var(--primary-h); box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4); }
.btn-secondary { background: rgba(99, 102, 241, 0.12); color: var(--primary); border-color: rgba(99, 102, 241, 0.25); }
.btn-secondary:hover { background: rgba(99, 102, 241, 0.2); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--border); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-1); }
.btn-danger-outline { background: transparent; color: var(--danger); border-color: rgba(239, 68, 68, 0.35); }
.btn-danger-outline:hover { background: rgba(239, 68, 68, 0.1); }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: var(--danger-h); }
.btn-full { width: 100%; justify-content: center; padding: 0.7rem 1rem; font-size: 0.9375rem; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.75rem; gap: 0.3rem; }

/* Icon button */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius);
  color: var(--text-muted);
  transition: color var(--trans), background var(--trans);
  cursor: pointer;
  font-size: 0.875rem;
  flex-shrink: 0;
}
.icon-btn:hover { color: var(--text-1); background: rgba(255, 255, 255, 0.07); }
.icon-btn.active-icon { color: var(--success); }
.icon-btn.edit-icon:hover { color: var(--primary); }
.icon-btn.del-icon:hover { color: var(--danger); }
.copy-hint { opacity: 0; transition: opacity var(--trans); }
tr:hover .copy-hint { opacity: 1; }

/* ============================================================
   APP LAYOUT
   ============================================================ */
#appLayout {
  display: grid;
  grid-template-columns: 256px 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  background: var(--bg-sidebar);
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 50;
  transition: transform 0.25s ease;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-logo i { font-size: 1.5rem; color: var(--primary); }
.sidebar-logo span { font-family: 'Manrope', sans-serif; font-size: 1.125rem; font-weight: 800; color: var(--text-1); }
.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--trans), background var(--trans), border-color var(--trans);
  border-left: 2px solid transparent;
}
.nav-item:hover { color: var(--text-1); background: rgba(255, 255, 255, 0.05); }
.nav-item.active { color: var(--primary); background: rgba(99, 102, 241, 0.1); border-left-color: var(--primary); }
.nav-item i { width: 1rem; text-align: center; font-size: 0.875rem; }
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 0.875rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.user-badge { display: flex; align-items: center; gap: 0.625rem; flex: 1; min-width: 0; }
.user-avatar {
  width: 2rem;
  height: 2rem;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.user-details { min-width: 0; flex: 1; }
.user-name { font-size: 0.8125rem; font-weight: 600; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.user-role-badge { font-size: 0.6875rem; color: var(--text-muted); display: block; }
.logout-btn { color: var(--text-muted); }
.logout-btn:hover { color: var(--danger); background: rgba(239, 68, 68, 0.1); }

/* ============================================================
   MAIN WRAPPER + TOPBAR
   ============================================================ */
.main-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  min-width: 0;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 60px;
  min-height: 60px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-body);
  gap: 1rem;
  flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 0.75rem; }
.topbar-right { display: flex; align-items: center; gap: 0.75rem; }
.page-title { font-size: 1.125rem; font-weight: 700; color: var(--text-1); }
#menuBtn { display: none; }
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.75rem;
}
.page { animation: fadeIn 0.2s ease; }

/* ============================================================
   STATS GRID
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color var(--trans), box-shadow var(--trans);
}
.stat-card:hover { border-color: rgba(99, 102, 241, 0.4); box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.1); }
.stat-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}
.icon-blue   { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.icon-indigo { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.icon-purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.stat-body { min-width: 0; }
.stat-value { font-size: 1.875rem; font-weight: 800; color: var(--text-1); font-family: 'Manrope', sans-serif; line-height: 1.1; }
.stat-label { font-size: 0.6875rem; color: var(--text-muted); margin-top: 0.2rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }

/* ============================================================
   DASHBOARD BOTTOM
   ============================================================ */
.dash-bottom {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1rem;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 0.875rem; font-weight: 700; color: var(--text-1); }
.card-body { padding: 1rem 1.25rem; }

/* Service Breakdown */
.bd-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.45rem 0; }
.bd-bar-wrap { flex: 1; height: 5px; background: rgba(255, 255, 255, 0.06); border-radius: 9999px; overflow: hidden; }
.bd-bar { height: 100%; background: var(--primary); border-radius: 9999px; transition: width 0.6s ease; min-width: 4px; }
.bd-count { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; width: 1.5rem; text-align: right; flex-shrink: 0; }
.empty-hint { font-size: 0.8125rem; color: var(--text-muted); }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.data-table thead tr { background: rgba(15, 23, 42, 0.5); }
.data-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table tr:not(thead tr) { border-bottom: 1px solid rgba(51, 65, 85, 0.4); transition: background 0.1s; }
.data-table tr:not(thead tr):hover { background: rgba(255, 255, 255, 0.03); }
.td { padding: 0.75rem 1rem; color: var(--text-2); vertical-align: middle; }
.empty-cell { padding: 3rem 1rem; text-align: center; color: var(--text-muted); font-size: 0.875rem; }

/* Password display */
.pwd-dots { font-family: 'JetBrains Mono', monospace; color: var(--text-muted); letter-spacing: 0.15em; font-size: 1rem; }
.pwd-reveal {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.secret-name-val { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--text-muted); }
.notes-td { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted { color: var(--text-muted); }
.actions-td { white-space: nowrap; }
.td-inline { display: inline-flex; align-items: center; gap: 0.3rem; }

/* ============================================================
   SERVICE BADGES
   ============================================================ */
.svc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
  vertical-align: middle;
}
.svc-aws   { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.svc-azure { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.svc-gcp   { background: rgba(129, 140, 248, 0.15); color: #818cf8; }
.svc-do    { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.svc-o365  { background: rgba(251, 146, 60, 0.15); color: #fb923c; }
.svc-zt    { background: rgba(192, 132, 252, 0.15); color: #c084fc; }
.svc-other { background: rgba(148, 163, 184, 0.1); color: var(--text-muted); }

/* ============================================================
   TOOLBAR (Credentials page)
   ============================================================ */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.toolbar-left { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.45rem 0.875rem;
  min-width: 240px;
  transition: border-color var(--trans), box-shadow var(--trans);
}
.search-box:focus-within { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1); }
.search-box i { color: var(--text-muted); font-size: 0.8rem; flex-shrink: 0; }
.search-input { background: none; border: none; outline: none; color: var(--text-1); font-size: 0.8125rem; width: 100%; }
.search-input::placeholder { color: var(--text-muted); opacity: 0.7; }
.filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.45rem 0.875rem;
  color: var(--text-2);
  font-size: 0.8125rem;
  outline: none;
  cursor: pointer;
  transition: border-color var(--trans);
}
.filter-select:focus { border-color: var(--border-focus); }
.cred-subtitle { font-size: 0.8125rem; color: var(--text-muted); white-space: nowrap; }

/* ============================================================
   CUSTOMERS GRID
   ============================================================ */
.customers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1rem;
}
.cust-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color var(--trans), box-shadow var(--trans);
}
.cust-card:hover { border-color: rgba(99, 102, 241, 0.3); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2); }
.cust-avatar {
  width: 2.75rem;
  height: 2.75rem;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  font-family: 'Manrope', sans-serif;
}
.cust-body { flex: 1; min-width: 0; }
.cust-name { font-size: 0.9375rem; font-weight: 600; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cust-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; display: flex; align-items: center; gap: 0.375rem; }
.cust-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.empty-full {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 5rem 2rem;
  text-align: center;
  color: var(--text-muted);
}
.empty-icon { font-size: 3.5rem; opacity: 0.2; }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.15s ease;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow);
  animation: scaleIn 0.2s ease;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-sm { max-width: 420px; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 1;
}
.modal-header h3 { font-size: 1rem; font-weight: 700; }
.modal-header-danger { border-bottom-color: rgba(239, 68, 68, 0.25); }
.modal-header-danger h3 { color: #fca5a5; }
.modal-body { padding: 1.5rem; }
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: var(--bg-card);
}
.del-body { text-align: center; }
.del-icon-wrap { margin-bottom: 1.25rem; }
.del-icon-wrap i { font-size: 2.75rem; color: var(--warning); }
.del-msg { font-size: 0.9375rem; color: var(--text-1); margin-bottom: 0.5rem; line-height: 1.5; }
.del-sub { font-size: 0.8125rem; color: var(--text-muted); }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  color: var(--text-1);
  box-shadow: var(--shadow);
  max-width: 320px;
  transform: translateX(calc(100% + 2rem));
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: all;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast-success { border-left: 3px solid var(--success); }
.toast-success i { color: var(--success); }
.toast-error { border-left: 3px solid var(--danger); }
.toast-error i { color: var(--danger); }
.toast-info { border-left: 3px solid var(--info); }
.toast-info i { color: var(--info); }

/* ============================================================
   SIDEBAR OVERLAY (mobile)
   ============================================================ */
#sidebarOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 40;
}
#sidebarOverlay.active { display: block; }

/* ---- Password input with show/hide toggle ---- */
.pwd-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pwd-input-wrap .form-control {
  padding-right: 2.75rem;
}
.pwd-toggle-btn {
  position: absolute;
  right: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--trans);
}
.pwd-toggle-btn:hover { color: var(--text-1); }

/* Key Vault badge in label */
.kv-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.6875rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 9999px;
  padding: 0.1rem 0.5rem;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* URL link in credentials table */
.url-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 500;
  transition: color var(--trans);
  white-space: nowrap;
}
.url-link:hover { color: #818cf8; text-decoration: underline; }

/* Role badges (users table) */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
}
.role-admin { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.role-user  { background: rgba(148, 163, 184, 0.1);  color: var(--text-muted); }

/* User cell in table */
.user-cell { display: flex; align-items: center; gap: 0.6rem; }
.user-avatar-sm {
  width: 1.75rem;
  height: 1.75rem;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.you-badge {
  font-size: 0.625rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-radius: 9999px;
  padding: 0.1rem 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.muted-date { color: var(--text-muted); font-size: 0.75rem; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn      { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn     { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }
@keyframes fadeSlideUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .dash-bottom { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  #appLayout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: 0; top: 0;
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4); }
  #menuBtn { display: inline-flex; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 540px) {
  .stats-grid { grid-template-columns: 1fr; }
  .main-content { padding: 1rem; }
  .cust-card { flex-wrap: wrap; }
  .cust-actions { width: 100%; justify-content: flex-end; }
  .toolbar-left { flex-direction: column; align-items: stretch; }
  .search-box { min-width: 100%; }
}
