/* ============================================================
   INVARIANCE VAULT — Enterprise Design System
   Aesthetic: Refined utilitarian. Clean geometry. Confident type.
   ============================================================ */

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

/* ============== THEME TOKENS ============== */
:root, [data-theme="light"] {
  --bg-root: #f4f5f7;
  --bg-surface: #ffffff;
  --bg-surface-raised: #ffffff;
  --bg-surface-hover: #f8f9fb;
  --bg-surface-active: #f0f1f5;
  --bg-input: #f4f5f7;
  --bg-sidebar: #1a1d23;
  --bg-sidebar-hover: rgba(255,255,255,0.06);
  --bg-sidebar-active: rgba(255,255,255,0.10);

  --border-primary: #e2e4e9;
  --border-secondary: #eff0f3;
  --border-focus: #3366ff;

  --text-primary: #111318;
  --text-secondary: #60646c;
  --text-tertiary: #9ea2ab;
  --text-inverse: #ffffff;
  --text-sidebar: rgba(255,255,255,0.72);
  --text-sidebar-dim: rgba(255,255,255,0.38);

  --accent: #3366ff;
  --accent-hover: #2952cc;
  --accent-subtle: rgba(51,102,255,0.08);
  --accent-text: #3366ff;
  --danger: #e5484d;
  --danger-hover: #cd2b31;
  --danger-subtle: rgba(229,72,77,0.08);
  --success: #30a46c;
  --success-subtle: rgba(48,164,108,0.08);
  --warning: #f5a623;
  --warning-subtle: rgba(245,166,35,0.08);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-overlay: 0 16px 48px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.06);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', monospace;

  --toast-success-bg: #edf9f0;
  --toast-success-border: #b1e5c2;
  --toast-success-text: #1a7f42;
  --toast-error-bg: #fef0f0;
  --toast-error-border: #f5c2c3;
  --toast-error-text: #c62828;
  --toast-warning-bg: #fef8ec;
  --toast-warning-border: #f5dfa7;
  --toast-warning-text: #8d6108;
}

[data-theme="dark"] {
  --bg-root: #0e1015;
  --bg-surface: #16181d;
  --bg-surface-raised: #1c1f26;
  --bg-surface-hover: #1e2028;
  --bg-surface-active: #23262f;
  --bg-input: #1c1f26;
  --bg-sidebar: #111318;
  --bg-sidebar-hover: rgba(255,255,255,0.05);
  --bg-sidebar-active: rgba(255,255,255,0.08);

  --border-primary: #2a2d35;
  --border-secondary: #1f2229;
  --border-focus: #4d88ff;

  --text-primary: #edeef0;
  --text-secondary: #8b8f98;
  --text-tertiary: #5c5f69;
  --text-inverse: #111318;
  --text-sidebar: rgba(255,255,255,0.72);
  --text-sidebar-dim: rgba(255,255,255,0.32);

  --accent: #4d88ff;
  --accent-hover: #6b9eff;
  --accent-subtle: rgba(77,136,255,0.10);
  --accent-text: #6b9eff;
  --danger: #e5484d;
  --danger-hover: #f27073;
  --danger-subtle: rgba(229,72,77,0.12);
  --success: #3dd68c;
  --success-subtle: rgba(61,214,140,0.10);
  --warning: #f5a623;
  --warning-subtle: rgba(245,166,35,0.12);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.24);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.32);
  --shadow-overlay: 0 16px 48px rgba(0,0,0,0.48);

  --toast-success-bg: #112a1b;
  --toast-success-border: #1a4a2c;
  --toast-success-text: #3dd68c;
  --toast-error-bg: #2d1215;
  --toast-error-border: #4a1c1f;
  --toast-error-text: #f27073;
  --toast-warning-bg: #2a2010;
  --toast-warning-border: #4a3818;
  --toast-warning-text: #f5c462;
}

/* ============== BASE ============== */
body {
  font-family: var(--font-sans);
  background: var(--bg-root);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
}

.no-select { user-select: none; -webkit-user-select: none; }
::selection { background: var(--accent); color: white; }

/* ============== SVG ICON SYSTEM ============== */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 22px; height: 22px; }
.icon-xl { width: 40px; height: 40px; }

/* ============== LAYOUT ============== */
.app { display: flex; min-height: 100vh; }

/* ============== SIDEBAR ============== */
.sidebar {
  width: 252px;
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,0.06);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-brand-row { display: flex; align-items: center; gap: 10px; }
.sidebar-brand-icon {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
}
.sidebar-brand-icon svg { width: 18px; height: 18px; stroke: white; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-brand h1 { font-size: 15px; font-weight: 600; color: white; letter-spacing: -0.3px; }
.sidebar-brand small { display: block; font-size: 11px; color: var(--text-sidebar-dim); margin-top: 2px; margin-left: 42px; font-weight: 400; }

.sidebar-section { padding: 16px 12px 8px; }
.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-sidebar-dim);
  padding: 0 8px;
  margin-bottom: 4px;
}

.sidebar-nav { flex: 1; padding: 8px 12px; display: flex; flex-direction: column; gap: 1px; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-sidebar);
  cursor: pointer; transition: all 0.15s ease;
  font-size: 13px; font-weight: 450; font-family: var(--font-sans);
  border: none; background: none; width: 100%; text-align: left;
}
.nav-item:hover { background: var(--bg-sidebar-hover); color: white; }
.nav-item.active { background: var(--bg-sidebar-active); color: white; }
.nav-item .icon { opacity: 0.55; }
.nav-item.active .icon, .nav-item:hover .icon { opacity: 1; }

.sidebar-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 8px 20px; }

.sidebar-footer { padding: 12px; border-top: 1px solid rgba(255,255,255,0.06); }

.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  margin-bottom: 4px;
}
.user-avatar {
  width: 30px; height: 30px; border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: white; flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 500; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--text-sidebar-dim); text-transform: capitalize; }

/* ============== THEME TOGGLE ============== */
.theme-toggle {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--text-sidebar); cursor: pointer;
  font-size: 13px; font-weight: 450; font-family: var(--font-sans);
  border: none; background: none; width: 100%; text-align: left;
  transition: all 0.15s;
}
.theme-toggle:hover { background: var(--bg-sidebar-hover); color: white; }
.theme-toggle .icon { opacity: 0.55; }
.theme-toggle:hover .icon { opacity: 1; }

/* ============== MAIN CONTENT ============== */
.main {
  flex: 1; padding: 32px 40px; overflow-y: auto; max-height: 100vh;
  min-width: 0;
}

/* ============== PAGE HEADER ============== */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.page-header h2 {
  font-size: 20px; font-weight: 700; letter-spacing: -0.4px; color: var(--text-primary);
}
.page-header-actions { display: flex; gap: 8px; }

/* ============== BUTTONS ============== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 550; font-family: var(--font-sans);
  border: 1px solid transparent; cursor: pointer;
  transition: all 0.15s ease; white-space: nowrap; line-height: 1;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-hover); border-color: var(--danger-hover); }

.btn-ghost { background: transparent; color: var(--text-secondary); border-color: var(--border-primary); }
.btn-ghost:hover { color: var(--text-primary); border-color: var(--text-tertiary); background: var(--bg-surface-hover); }

.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-icon { padding: 6px; }
.btn-icon .icon { width: 15px; height: 15px; }

/* ============== BADGES ============== */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 8px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px;
}
.badge-api_key { background: var(--accent-subtle); color: var(--accent-text); }
.badge-login { background: rgba(139,92,246,0.10); color: #8b5cf6; }
.badge-ssh_key { background: rgba(236,72,153,0.10); color: #ec4899; }
.badge-database { background: rgba(245,158,11,0.10); color: #f59e0b; }
.badge-token { background: var(--warning-subtle); color: var(--warning); }
.badge-certificate { background: var(--success-subtle); color: var(--success); }
.badge-config { background: rgba(6,182,212,0.10); color: #06b6d4; }
.badge-other { background: var(--bg-surface-active); color: var(--text-tertiary); }
.badge-owner { background: rgba(245,158,11,0.10); color: #f59e0b; }
.badge-admin { background: rgba(139,92,246,0.10); color: #8b5cf6; }
.badge-member { background: var(--bg-surface-active); color: var(--text-tertiary); }
.badge-client { background: rgba(52,199,89,0.10); color: #34c759; }

/* ============== CARDS ============== */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* ============== CLIENT APP ============== */
.client-app { max-width: 800px; margin: 0 auto; padding: 24px; }
.client-app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0 20px; border-bottom: 1px solid var(--border); margin-bottom: 24px;
}
.client-app-brand { display: flex; align-items: center; gap: 10px; }
.client-app-powered {
  font-size: 11px; color: var(--text-tertiary); display: flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 99px; background: var(--bg-surface); border: 1px solid var(--border);
}
.client-app-vault { margin-bottom: 32px; }
.client-app-vault-title { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 16px; }
.client-app-section-title {
  font-size: 12px; font-weight: 600; color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: 0.5px; margin: 16px 0 8px;
}
.client-app-card {
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; margin-bottom: 8px; transition: border-color 0.15s;
}
.client-app-card:hover { border-color: var(--accent); }
.client-copy-btn {
  padding: 3px 10px; font-size: 11px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg-surface-hover);
  color: var(--text-secondary); cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.client-copy-btn:hover { border-color: var(--accent); color: var(--accent-text); }
.client-secret-btn {
  width: 100%; margin-top: 10px; padding: 10px; font-size: 13px; font-weight: 600;
  border-radius: 8px; border: 1px dashed var(--border); background: transparent;
  color: var(--text-secondary); cursor: pointer; font-family: inherit;
  transition: all 0.15s; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.client-secret-btn:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-subtle); }
.client-countdown { text-align: center; margin-top: 10px; font-size: 13px; }

/* Client category grid */
.client-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.client-cat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.client-cat-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.client-cat-card-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  font-size: 24px;
}
.client-cat-card-icon .icon { width: 24px; height: 24px; }
.client-cat-card-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.client-cat-card-name { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.client-cat-card-count { font-size: 13px; color: var(--text-tertiary); margin-bottom: 8px; }
.client-cat-card-preview { font-size: 11px; color: var(--text-tertiary); line-height: 1.4; max-height: 32px; overflow: hidden; }

/* ============== VAULT GRID ============== */
.vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.vault-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  padding: 24px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}
.vault-card:hover {
  border-color: var(--accent);
  background: var(--bg-surface-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.vault-card-icon {
  width: 48px; height: 48px;
  background: var(--accent-subtle);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.vault-card-icon svg { width: 24px; height: 24px; stroke: var(--accent-text); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vault-card-name { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.vault-card-count { font-size: 13px; color: var(--text-tertiary); }
.vault-card-desc { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; max-height: 32px; overflow: hidden; }
.vault-card-perm {
  font-size: 11px; padding: 2px 8px; border-radius: var(--radius-full);
  background: var(--accent-subtle); color: var(--accent-text);
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
  margin-top: 4px;
}
.vault-card-actions {
  position: absolute; top: 8px; right: 8px;
  display: flex; gap: 2px; opacity: 0;
  transition: opacity 0.15s;
}
.vault-card:hover .vault-card-actions { opacity: 1; }

/* ============== SECRET ROWS ============== */
.secret-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-secondary);
  transition: background 0.12s ease;
}
.secret-row:last-child { border-bottom: none; }
.secret-row:hover { background: var(--bg-surface-hover); }

.secret-favicon { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.secret-info { flex: 1; min-width: 0; }
.secret-name { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 1px; }
.secret-meta { font-size: 12px; color: var(--text-tertiary); }
.secret-fields { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0 2px; }
.secret-field { font-size: 12px; color: var(--text-secondary); }
.secret-field-label { color: var(--text-tertiary); font-weight: 500; }
.secret-value-display {
  font-family: var(--font-mono); font-size: 12px; color: var(--text-tertiary);
  letter-spacing: 3px; flex-shrink: 0; margin: 0 8px;
}
.secret-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* ============== VAULT TABS ============== */
.vault-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.vault-tab {
  padding: 6px 14px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 500; font-family: var(--font-sans);
  border: 1px solid var(--border-primary); background: var(--bg-surface);
  color: var(--text-secondary); cursor: pointer; transition: all 0.15s ease;
}
.vault-tab:hover { border-color: var(--accent); color: var(--accent-text); }
.vault-tab.active { background: var(--accent); color: white; border-color: var(--accent); }
.vault-tab .vault-count { opacity: 0.6; font-size: 11px; margin-left: 2px; }

/* ============== FORMS ============== */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.form-hint { font-size: 11px; color: var(--text-tertiary); margin-top: 4px; font-weight: 400; text-transform: none; letter-spacing: 0; }

.form-input, .form-select, .form-textarea {
  width: 100%; padding: 9px 12px;
  background: var(--bg-input); border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-size: 13px; font-family: var(--font-sans);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}
.form-textarea { min-height: 80px; resize: vertical; }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-tertiary); }

/* ============== MODAL ============== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.15s ease;
}
.modal {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  width: 90%; max-width: 480px;
  box-shadow: var(--shadow-overlay);
  animation: modalIn 0.2s ease;
}
.modal-header {
  padding: 20px 24px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.2px; }
.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px; border-top: 1px solid var(--border-secondary);
  display: flex; justify-content: flex-end; gap: 8px;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* ============== TOAST NOTIFICATIONS ============== */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
  max-width: 380px;
}

.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  border: 1px solid transparent;
  pointer-events: auto;
  animation: toastIn 0.3s ease;
  line-height: 1.4;
}
.toast-success { background: var(--toast-success-bg); color: var(--toast-success-text); border-color: var(--toast-success-border); }
.toast-error { background: var(--toast-error-bg); color: var(--toast-error-text); border-color: var(--toast-error-border); }
.toast-warning { background: var(--toast-warning-bg); color: var(--toast-warning-text); border-color: var(--toast-warning-border); }

.toast-icon { width: 18px; height: 18px; flex-shrink: 0; }
.toast-icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============== LOGIN PAGE ============== */
.login-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 20px;
  background: var(--bg-root);
}
.login-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%; max-width: 400px;
  box-shadow: var(--shadow-lg);
}
.login-brand { display: flex; flex-direction: column; align-items: center; margin-bottom: 32px; }
.login-brand-icon {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  background: var(--accent); display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.login-brand-icon svg { width: 26px; height: 26px; stroke: white; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.login-brand h1 { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; }
.login-brand p { color: var(--text-tertiary); font-size: 14px; margin-top: 4px; }
.login-card .btn-primary { width: 100%; justify-content: center; padding: 10px; }

/* ============== EMPTY STATE ============== */
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text-tertiary);
}
.empty-icon {
  width: 52px; height: 52px; margin: 0 auto 16px;
  background: var(--bg-surface-active); border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
}
.empty-icon .icon { width: 24px; height: 24px; color: var(--text-tertiary); }
.empty-state h3 { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.empty-state p { font-size: 13px; }

/* ============== AUDIT LOG ============== */
.log-row {
  display: grid;
  grid-template-columns: 140px 140px 120px 1fr;
  gap: 12px; align-items: start;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border-secondary);
  font-size: 12px;
}
.log-row:hover { background: var(--bg-surface-hover); }
.log-time { color: var(--text-tertiary); font-family: var(--font-mono); font-size: 11px; }
.log-action { font-weight: 600; color: var(--text-primary); }
.log-user { color: var(--accent-text); }
.log-details { color: var(--text-tertiary); word-break: break-all; }

/* ============== SHARE PAGE ============== */
.share-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 20px; background: var(--bg-root);
}
.share-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 40px; width: 100%; max-width: 480px;
  box-shadow: var(--shadow-lg); text-align: center;
}
.share-card h1 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.share-meta { color: var(--text-secondary); font-size: 14px; margin-bottom: 24px; }
.share-warning {
  background: var(--warning-subtle); border: 1px solid rgba(245,166,35,0.2);
  border-radius: var(--radius-md); padding: 14px; font-size: 13px; color: var(--warning);
  margin-bottom: 20px; text-align: left; line-height: 1.6;
}
.copy-feedback {
  padding: 14px; border-radius: var(--radius-md);
  font-size: 13px; line-height: 1.6;
}

/* ============== COUNTDOWN ============== */
.countdown-bar { width: 100%; height: 4px; background: var(--border-primary); border-radius: 2px; margin: 16px 0; overflow: hidden; }
.countdown-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 1s linear; }
.countdown-fill.danger { background: var(--danger); }
.countdown-text { font-size: 28px; font-weight: 700; font-family: var(--font-mono); margin: 8px 0; }

/* ============== RESPONSIVE ============== */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { padding: 20px 16px; }
  .log-row { grid-template-columns: 1fr; gap: 4px; }
}
