/* ============================================================
   Family Documents — custom.css
   Mobile-first. PC is secondary.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --primary:        #1a1a2e;
  --primary-mid:    #16213e;
  --accent:         #0f6fd8;
  --accent-hover:   #0a5ab5;
  --accent-light:   rgba(15, 111, 216, 0.12);
  --surface:        #ffffff;
  --surface-2:      #f7f8fa;
  --surface-3:      #eef0f4;
  --border:         #dde1e9;
  --border-strong:  #c4c9d4;
  --text-primary:   #111827;
  --text-secondary: #4b5563;
  --text-muted:     #9ca3af;
  --danger:         #dc2626;
  --danger-light:   rgba(220,38,38,0.10);
  --success:        #16a34a;
  --success-light:  rgba(22,163,74,0.10);
  --warning:        #d97706;
  --warning-light:  rgba(217,119,6,0.10);

  --nav-height:     56px;
  --tree-width:     280px;
  --radius:         8px;
  --radius-lg:      12px;
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:      0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg:      0 8px 24px rgba(0,0,0,0.14);

  --font-main: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-main);
  color: var(--text-primary);
  background: var(--surface-2);
  margin: 0;
  padding-top: var(--nav-height);
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   NAVBAR
   ============================================================ */
.app-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--primary);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 8px;
  z-index: 1050;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.app-nav .nav-brand {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.01em;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-nav .nav-brand span {
  opacity: 0.5;
  font-weight: 300;
  margin-left: 4px;
  font-size: 0.85rem;
}

.nav-icon-btn {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  border: none;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.15s;
  flex-shrink: 0;
}
.nav-icon-btn:hover, .nav-icon-btn:focus {
  background: rgba(255,255,255,0.16);
  color: #fff;
  outline: none;
}
.nav-icon-btn.active {
  background: var(--accent);
  color: #fff;
}

/* ============================================================
   BROWSE LAYOUT
   ============================================================ */
.browse-layout {
  display: flex;
  min-height: calc(100vh - var(--nav-height));
}

/* Sidebar (desktop only) */
.folder-sidebar {
  width: var(--tree-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  flex-shrink: 0;
  overflow-y: auto;
  display: none; /* hidden on mobile */
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
}

@media (min-width: 768px) {
  .folder-sidebar { display: block; }
}

.folder-sidebar-inner {
  padding: 12px 8px;
}

/* Main content area */
.browse-main {
  flex: 1;
  min-width: 0;
  padding: 16px;
}

/* ============================================================
   FOLDER TREE
   ============================================================ */
.tree-root { list-style: none; padding: 0; margin: 0; }
.tree-item  { list-style: none; }

.tree-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: var(--radius);
  cursor: pointer;
  user-select: none;
  min-height: 36px;
  transition: background 0.1s;
  position: relative;
}
.tree-row:hover   { background: var(--surface-3); }
.tree-row.active  { background: var(--accent-light); color: var(--accent); }
.tree-row.active .tree-name { color: var(--accent); font-weight: 500; }

.tree-toggle {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 0.7rem;
  transition: transform 0.2s;
  border-radius: 4px;
}
.tree-toggle.open { transform: rotate(90deg); }
.tree-toggle.leaf { visibility: hidden; }

.tree-icon { color: var(--warning); font-size: 0.9rem; flex-shrink: 0; }
.tree-name {
  font-size: 0.875rem;
  color: var(--text-primary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tree-actions {
  display: none;
  gap: 2px;
  flex-shrink: 0;
}
.tree-row:hover .tree-actions { display: flex; }

.tree-action-btn {
  width: 24px; height: 24px;
  border: none; background: none;
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
}
.tree-action-btn:hover { background: var(--surface-3); color: var(--text-primary); }
.tree-action-btn.danger:hover { background: var(--danger-light); color: var(--danger); }

.tree-children {
  margin-left: 20px;
  border-left: 1px solid var(--border);
  margin-top: 2px;
  padding-left: 4px;
}
.tree-children.collapsed { display: none; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.doc-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  min-height: 28px;
}
.doc-breadcrumb .crumb {
  color: var(--text-muted);
  cursor: pointer;
}
.doc-breadcrumb .crumb:hover { color: var(--accent); text-decoration: underline; }
.doc-breadcrumb .crumb.active { color: var(--text-primary); font-weight: 500; cursor: default; }
.doc-breadcrumb .sep { color: var(--border-strong); }

/* ============================================================
   BROWSE HEADER
   ============================================================ */
.browse-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.browse-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   FILE LIST — cards on mobile, table on desktop
   ============================================================ */

/* Mobile card view */
.file-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: box-shadow 0.15s;
}
.file-card:hover { box-shadow: var(--shadow-md); }

.file-card-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  background: var(--surface-3);
}

.file-card-body { flex: 1; min-width: 0; }
.file-card-name {
  font-weight: 500;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  color: var(--text-primary);
}
.file-card-name:hover { color: var(--accent); }
.file-card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 3px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.file-card-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-card-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  flex-direction: column;
  align-items: flex-end;
}

/* Desktop table view */
.file-table-wrap { display: none; }

@media (min-width: 768px) {
  .file-cards-wrap  { display: none; }
  .file-table-wrap  { display: block; }
}

.file-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  font-size: 0.875rem;
}
.file-table th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.file-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.file-table tr:last-child td { border-bottom: none; }
.file-table tr:hover td { background: var(--surface-2); }
.file-table .col-icon { width: 40px; }
.file-table .col-actions { width: 160px; white-space: nowrap; }

/* ============================================================
   SUBFOLDER ROWS
   ============================================================ */
.folder-row-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, border-color 0.15s;
}
.folder-row-card:hover { box-shadow: var(--shadow-md); border-color: var(--accent); }
.folder-row-card .folder-icon { color: var(--warning); font-size: 1.1rem; flex-shrink: 0; }
.folder-row-card .folder-name { font-weight: 500; font-size: 0.9rem; flex: 1; }
.folder-row-card .folder-meta { font-size: 0.78rem; color: var(--text-muted); }
.folder-row-card .folder-actions { display: flex; gap: 4px; }

/* ============================================================
   CATEGORY PILL
   ============================================================ */
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s;
  flex-shrink: 0;
}
.btn-icon:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.btn-icon.danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-light); }
.btn-icon.success:hover { border-color: var(--success); color: var(--success); background: var(--success-light); }

/* Minimum touch targets on mobile */
@media (max-width: 767px) {
  .btn-icon { width: 44px; height: 44px; font-size: 1rem; }
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-family: var(--font-main);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: var(--font-main);
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-secondary:hover { border-color: var(--accent); background: var(--accent-light); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-family: var(--font-main);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-danger:hover { background: #b91c1c; }

/* ============================================================
   MODALS — slide up from bottom on mobile, center on desktop
   ============================================================ */
.modal-backdrop-custom {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1100;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal-backdrop-custom.open {
  display: flex;
  animation: fadeIn 0.2s ease;
}

@media (min-width: 576px) {
  .modal-backdrop-custom {
    align-items: center;
  }
}

.modal-box {
  background: var(--surface);
  width: 100%;
  max-width: 540px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.25s ease;
  box-shadow: var(--shadow-lg);
}

@media (min-width: 576px) {
  .modal-box {
    border-radius: var(--radius-lg);
    animation: scaleIn 0.2s ease;
  }
}

.modal-box-lg { max-width: 700px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.modal-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}
.modal-close {
  width: 32px; height: 32px;
  border: none; background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.modal-close:hover { background: var(--surface-3); color: var(--text-primary); }

.modal-body  { padding: 20px; }
.modal-footer {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  position: sticky;
  bottom: 0;
  background: var(--surface);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 5px;
}
.form-control {
  display: block;
  width: 100%;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-main);
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.form-control::placeholder { color: var(--text-muted); }

select.form-control { background-image: none; }

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-row {
  display: flex;
  gap: 12px;
}
.form-row .form-group { flex: 1; }

/* ============================================================
   UPLOAD ZONE
   ============================================================ */
.upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--surface);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-light);
}
.upload-zone-icon {
  font-size: 2rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.upload-zone-text { font-size: 0.9rem; color: var(--text-secondary); }
.upload-zone-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

.upload-progress {
  margin-top: 12px;
  display: none;
}
.progress-bar-wrap {
  background: var(--surface-3);
  border-radius: 100px;
  height: 6px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 100px;
  transition: width 0.3s;
  width: 0%;
}
.progress-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ============================================================
   TOAST
   ============================================================ */
#toastContainer {
  position: fixed;
  top: 70px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 320px;
}

.toast-item {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.25s ease;
}
.toast-item.success { background: #14532d; border-left: 3px solid var(--success); }
.toast-item.error   { background: #7f1d1d; border-left: 3px solid var(--danger); }
.toast-item.info    { background: var(--primary-mid); border-left: 3px solid var(--accent); }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.3;
}
.empty-state h4 { font-size: 1rem; font-weight: 500; margin: 0 0 6px; color: var(--text-secondary); }
.empty-state p  { font-size: 0.875rem; margin: 0; }

/* ============================================================
   VIEWER PAGE
   ============================================================ */
.viewer-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding-top: var(--nav-height);
}
.viewer-body {
  flex: 1;
  overflow: auto;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
}
.viewer-pdf iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.viewer-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.viewer-docx-content, .viewer-xlsx-content {
  background: var(--surface);
  width: 100%;
  max-width: 860px;
  padding: 32px;
  margin: 0 auto;
  min-height: 100%;
  font-size: 0.9rem;
  line-height: 1.7;
}
.viewer-xlsx-content table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.82rem;
}
.viewer-xlsx-content td, .viewer-xlsx-content th {
  border: 1px solid var(--border);
  padding: 6px 10px;
}
.viewer-xlsx-content th { background: var(--surface-2); font-weight: 600; }

/* ============================================================
   SHARE PAGE (public)
   ============================================================ */
.share-page {
  max-width: 600px;
  margin: 60px auto;
  padding: 0 16px;
}
.share-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.share-card-header {
  background: var(--primary);
  color: #fff;
  padding: 24px;
}
.share-card-header h2 { margin: 0 0 4px; font-size: 1.1rem; font-weight: 600; }
.share-card-header p  { margin: 0; font-size: 0.82rem; opacity: 0.65; }
.share-card-body { padding: 24px; }
.share-meta-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.share-meta-row .label { font-weight: 500; color: var(--text-primary); min-width: 90px; }

/* ============================================================
   ACTIVITY LOG
   ============================================================ */
.activity-list { display: flex; flex-direction: column; gap: 2px; }
.activity-item {
  display: flex;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  align-items: flex-start;
}
.activity-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  background: var(--surface-3);
  color: var(--text-muted);
}
.activity-body { flex: 1; min-width: 0; }
.activity-action { font-weight: 500; color: var(--text-primary); }
.activity-detail { color: var(--text-secondary); margin-top: 2px; }
.activity-time { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }

/* ============================================================
   SETTINGS
   ============================================================ */
.settings-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}
.settings-tab {
  padding: 10px 16px;
  border: none;
  background: none;
  font-family: var(--font-main);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.settings-tab:hover { color: var(--text-primary); }
.settings-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ============================================================
   OFF-CANVAS DRAWER (mobile folder tree)
   ============================================================ */
.offcanvas-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1080;
}
.offcanvas-overlay.open { display: block; animation: fadeIn 0.2s; }

.offcanvas-drawer {
  position: fixed;
  top: 0; left: -310px;
  width: 300px;
  height: 100%;
  background: var(--surface);
  z-index: 1090;
  box-shadow: var(--shadow-lg);
  transition: left 0.25s ease;
  overflow-y: auto;
  padding-top: var(--nav-height);
}
.offcanvas-drawer.open { left: 0; }

/* ============================================================
   TREE MODAL (folder picker)
   ============================================================ */
.tree-picker-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.875rem;
  min-height: 40px;
}
.tree-picker-item:hover { background: var(--surface-3); }
.tree-picker-item.selected { background: var(--accent-light); color: var(--accent); }
.tree-picker-item .tp-icon { color: var(--warning); flex-shrink: 0; }
.tree-picker-children { margin-left: 18px; border-left: 1px solid var(--border); padding-left: 6px; }

/* ============================================================
   SEARCH RESULTS IN MODAL
   ============================================================ */
.search-result-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.1s, border-color 0.1s;
}
.search-result-item:hover { background: var(--surface-2); border-color: var(--border); }
.search-result-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
.search-result-body { flex: 1; min-width: 0; }
.search-result-name { font-weight: 500; font-size: 0.875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result-path { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.search-result-meta { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================================
   PASSWORD GATE
   ============================================================ */
.password-gate {
  max-width: 360px;
  margin: 80px auto;
  padding: 0 16px;
}
.password-gate-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.password-gate-icon { font-size: 2.5rem; color: var(--warning); margin-bottom: 16px; }
.password-gate-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.password-gate-card p  { margin: 0 0 20px; color: var(--text-secondary); font-size: 0.875rem; }

/* ============================================================
   UTILITIES & MISC
   ============================================================ */
.text-muted   { color: var(--text-muted) !important; }
.text-danger  { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.text-accent  { color: var(--accent) !important; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }

.section-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 8px 4px;
  margin-top: 8px;
}

.lock-badge {
  font-size: 0.7rem;
  color: var(--warning);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.inactive-label {
  font-size: 0.7rem;
  background: var(--surface-3);
  color: var(--text-muted);
  padding: 1px 6px;
  border-radius: 20px;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes scaleIn {
  from { transform: scale(0.96); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
@keyframes slideInRight {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  z-index: 10;
}
