:root {
  --primary:   #1a6ef5;
  --primary-h: #1558cc;
  --accent:    #0ea5e9;
  --navy:      #0d1b2a;
  --navy-dark: #132135;
  --surface:   #ffffff;
  --surface-2: #f4f7fb;
  --border:    #e2e8f0;
  --text:      #1e293b;
  --muted:     #64748b;
  --danger:    #ef4444;
  --success:   #22c55e;
  --radius:    10px;
  --shadow:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
}

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

body {
  background: var(--surface-2);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Navbar ── */
.navbar {
  background: var(--navy);
  border-bottom: none;
  padding: .75rem 0;
  box-shadow: 0 2px 20px rgba(0,0,0,.35);
}
.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff !important;
  letter-spacing: -.3px;
  display: flex;
  align-items: center;
  gap: 0;
}
.navbar-brand .navbar-symbol {
  height: 1.4rem;
  width: auto;
  opacity: .9;
  margin-right: .4rem;
}
.navbar-brand .brand-accent { color: var(--accent); }
.navbar .nav-link { color: rgba(255,255,255,.8) !important; font-size: .875rem; }
.navbar .nav-link:hover { color: var(--accent) !important; }
.lang-sw a { color: rgba(255,255,255,.6); text-decoration: none; font-size: .8rem; }
.lang-sw a.active { color: #fff; font-weight: 600; }
.lang-sw a:hover { color: var(--accent); }
.lang-sw .sep { color: rgba(255,255,255,.25); }

/* ── Navbar dropdown (dark style) ── */
.navbar .dropdown-menu {
  background: var(--navy-dark);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: .5rem;
  margin-top: .5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
}
.navbar .dropdown-item {
  color: rgba(255,255,255,.75);
  font-size: .875rem;
  font-weight: 500;
  border-radius: 6px;
  padding: .45rem .85rem;
  transition: background .15s, color .15s;
}
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
  background: rgba(255,255,255,.08);
  color: var(--accent);
}
.navbar .dropdown-divider { border-color: rgba(255,255,255,.1); margin: .35rem .5rem; }
.navbar .dropdown-toggle { color: rgba(255,255,255,.8) !important; }
.navbar .dropdown-toggle:hover { color: var(--accent) !important; }
.navbar .btn-outline-secondary {
  color: rgba(255,255,255,.8) !important;
  border-color: rgba(255,255,255,.25) !important;
  background: transparent !important;
}
.navbar .btn-outline-secondary:hover {
  color: var(--accent) !important;
  border-color: var(--accent) !important;
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  padding: 1rem 1.25rem;
}

/* ── Workspace card on dashboard ── */
.ws-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.25rem;
  transition: box-shadow .15s, border-color .15s;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.ws-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.ws-card .ws-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
}
.ws-card .ws-name:hover { color: var(--primary); }
.ws-meta { font-size: .8rem; color: var(--muted); }

/* ── Quota bar ── */
.quota-bar {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-top: .25rem;
}
.quota-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 99px;
  transition: width .3s;
}
.quota-fill.warn  { background: #f59e0b; }
.quota-fill.full  { background: var(--danger); }

/* ── File list ── */
.file-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.file-row:last-child { border-bottom: none; }
.file-row:hover { background: var(--surface-2); }

.file-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: #f1f5f9;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}
.file-name  { font-weight: 500; font-size: .9rem; word-break: break-all; }
.file-meta  { font-size: .78rem; color: var(--muted); }
.file-actions { margin-left: auto; display: flex; gap: .5rem; flex-shrink: 0; }

/* ── Section tabs ── */
.section-tab {
  padding: .5rem 1.25rem;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  transition: all .15s;
}
.section-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.section-tab:not(.active):hover {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}

/* ── Drop zone ── */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.drop-zone.dragover,
.drop-zone:hover {
  border-color: var(--primary);
  background: #eef2ff;
  color: var(--primary);
}
.drop-zone .drop-icon { font-size: 2rem; margin-bottom: .5rem; }

/* ── Card drop overlay (file browser) ── */
.card-droppable { position: relative; }
.card-droppable .drop-overlay {
  display: none;
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  border: 2px dashed var(--primary);
  background: rgba(99,102,241,.07);
  z-index: 10;
  pointer-events: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: .5rem;
  color: var(--primary);
  font-weight: 600;
  font-size: .95rem;
}
.card-droppable.drag-over .drop-overlay { display: flex; }

/* ── Buttons ── */
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--primary-h);
  border-color: var(--primary-h);
}
.btn-sm { font-size: .78rem; padding: .3rem .65rem; }

/* ── Badge ── */
.badge-public  { background: #dcfce7; color: #15803d; font-size: .72rem; padding: 2px 8px; border-radius: 99px; }
.badge-private { background: #f1f5f9; color: #475569; font-size: .72rem; padding: 2px 8px; border-radius: 99px; }
.badge-expired { background: #fee2e2; color: #b91c1c; font-size: .72rem; padding: 2px 8px; border-radius: 99px; }

/* ── Auth page ── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.auth-box {
  width: 100%;
  max-width: 420px;
}
.auth-logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.5px;
  text-align: center;
  margin-bottom: 1.5rem;
}

/* ── Alert ── */
.alert { border-radius: var(--radius); font-size: .875rem; }

/* ── Upload progress ── */
.upload-progress { display: none; }
.upload-progress.active { display: block; }

/* ── Expire chip ── */
.expire-chip {
  font-size: .75rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.expire-chip.soon { color: #f59e0b; }
.expire-chip.very-soon { color: var(--danger); }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}
.empty-state svg { opacity: .3; margin-bottom: 1rem; }

/* ── Modal tweaks ── */
.modal-content { border-radius: calc(var(--radius) + 2px); border: none; box-shadow: var(--shadow-md); }
.modal-header  { border-bottom: 1px solid var(--border); }
.modal-footer  { border-top: 1px solid var(--border); }

/* ── Form ── */
.form-control, .form-select {
  border-radius: 8px;
  border-color: var(--border);
  font-size: .875rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.form-label { font-weight: 500; font-size: .85rem; }

/* ── Tooltip hint ── */
.copy-link { cursor: pointer; }
