/* ==========================================================================
   fileshare — style.css
   Professional, trust-inspiring design for an E2E encrypted file sharing app.
   Mobile-first, CSS custom properties for theming, low specificity.
   ========================================================================== */

/* ---------- Reset & Base ---------- */

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

:root {
  /* Colors */
  --color-bg: #ffffff;
  --color-bg-alt: #f7f8fa;
  --color-bg-dark: #1a1e2e;
  --color-bg-darker: #141724;
  --color-text: #1a1e2e;
  --color-text-muted: #6b7280;
  --color-text-inverse: #f0f1f4;
  --color-border: #e2e5ea;
  --color-border-light: #eef0f3;

  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-light: #dbeafe;

  --color-danger: #dc2626;
  --color-danger-hover: #b91c1c;
  --color-danger-light: #fef2f2;

  --color-success: #16a34a;
  --color-success-light: #f0fdf4;

  --color-warning: #d97706;
  --color-warning-light: #fffbeb;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono',
    'Cascadia Code', Consolas, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* Layout */
  --max-width: 800px;
  --max-width-narrow: 480px;
  --header-height: 56px;
  --radius: 6px;
  --radius-lg: 8px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);

  /* Transitions */
  --transition: 150ms ease;
}

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  line-height: 1.3;
  font-weight: 600;
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }

p + p { margin-top: var(--space-4); }

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.text-muted {
  color: var(--color-text-muted);
}

.text-sm {
  font-size: var(--text-sm);
}

.text-xs {
  font-size: var(--text-xs);
}

.text-danger {
  color: var(--color-danger);
}

/* ---------- Header / Nav ---------- */

.site-header {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 var(--space-6);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .brand {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text-inverse);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-left: auto;
}

.site-header nav a {
  color: rgba(240, 241, 244, 0.75);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color var(--transition);
}

.site-header nav a:hover,
.site-header nav a.active {
  color: var(--color-text-inverse);
  text-decoration: none;
}

.site-header .btn-logout {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(240, 241, 244, 0.85);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: var(--text-sm);
  transition: border-color var(--transition), color var(--transition);
}

.site-header .btn-logout:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--color-text-inverse);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text-inverse);
  font-size: var(--text-xl);
  cursor: pointer;
  padding: var(--space-2);
  margin-left: auto;
}

@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }

  .site-header nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-bg-dark);
    flex-direction: column;
    padding: var(--space-4) var(--space-6);
    gap: var(--space-3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .site-header nav.open {
    display: flex;
  }

  .site-header nav a {
    width: 100%;
    padding: var(--space-2) 0;
  }
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
}

.container-narrow {
  max-width: var(--max-width-narrow);
}

main {
  flex: 1;
}

.page-title {
  margin-bottom: var(--space-8);
}

.page-title h1 {
  margin-bottom: var(--space-2);
}

.page-title p {
  color: var(--color-text-muted);
}

/* ---------- Cards & Sections ---------- */

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.card + .card {
  margin-top: var(--space-6);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.card-header h2 {
  font-size: var(--text-lg);
}

section + section {
  margin-top: var(--space-8);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-sm);
  font-weight: 500;
  font-family: var(--font-sans);
  line-height: 1.5;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
    color var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
  background: var(--color-primary-hover);
}

.btn-secondary {
  background: var(--color-bg);
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-bg-alt);
  border-color: var(--color-text-muted);
}

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

.btn-danger:hover:not(:disabled) {
  background: var(--color-danger-hover);
}

.btn-ghost {
  background: none;
  color: var(--color-text-muted);
  padding: var(--space-1) var(--space-3);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--color-text);
  background: var(--color-bg-alt);
}

.btn-sm {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
}

.btn-lg {
  padding: var(--space-3) var(--space-8);
  font-size: var(--text-base);
}

.btn-block {
  display: flex;
  width: 100%;
}

/* ---------- Forms ---------- */

.form-group {
  margin-bottom: var(--space-5);
}

.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-base);
  font-family: var(--font-sans);
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
  background: var(--color-bg-alt);
  cursor: not-allowed;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.form-error {
  font-size: var(--text-xs);
  color: var(--color-danger);
  margin-top: var(--space-1);
}

/* Radio and checkbox groups */
.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.radio-option:hover,
.checkbox-option:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--color-primary);
}

.radio-option .option-label {
  font-weight: 500;
  font-size: var(--text-sm);
}

.radio-option .option-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.radio-option .option-price {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* Inline form row */
.form-row {
  display: flex;
  gap: var(--space-4);
}

.form-row .form-group {
  flex: 1;
}

@media (max-width: 640px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

/* ---------- Drop Zone ---------- */

.drop-zone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-10);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
}

.drop-zone:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.drop-zone.drag-over {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  border-style: solid;
}

.drop-zone-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-3);
  color: var(--color-text-muted);
}

.drop-zone-text {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.drop-zone-text strong {
  color: var(--color-primary);
}

.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* File list (selected files before upload) */
.file-list {
  list-style: none;
  margin-top: var(--space-4);
}

.file-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
}

.file-list-item .file-name {
  font-weight: 500;
  word-break: break-all;
}

.file-list-item .file-size {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  flex-shrink: 0;
  margin-left: var(--space-4);
}

.file-list-item .file-remove {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: var(--space-1);
  font-size: var(--text-base);
  line-height: 1;
  margin-left: var(--space-2);
}

.file-list-item .file-remove:hover {
  color: var(--color-danger);
}

/* ---------- Progress Bar ---------- */

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--color-bg-alt);
  border-radius: 4px;
  overflow: hidden;
  margin: var(--space-4) 0;
}

.progress-bar-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 4px;
  transition: width 200ms ease;
  width: 0%;
}

.progress-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
}

/* ---------- Badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-2);
  font-size: var(--text-xs);
  font-weight: 500;
  border-radius: 9999px;
  line-height: 1.4;
}

.badge-verified {
  background: var(--color-success-light);
  color: var(--color-success);
}

.badge-unverified {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

.badge-expired {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

.badge-active {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.badge-pw {
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

/* ---------- Tables / File Lists ---------- */

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  padding: var(--space-3) var(--space-4);
  border-bottom: 2px solid var(--color-border);
}

.data-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border-light);
  font-size: var(--text-sm);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: var(--color-bg-alt);
}

/* Responsive table: stack on mobile */
@media (max-width: 640px) {
  .data-table thead {
    display: none;
  }

  .data-table tr {
    display: block;
    padding: var(--space-4);
    border-bottom: 1px solid var(--color-border);
  }

  .data-table td {
    display: flex;
    justify-content: space-between;
    padding: var(--space-1) 0;
    border-bottom: none;
  }

  .data-table td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: var(--text-xs);
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-right: var(--space-4);
  }
}

/* ---------- Expandable Rows (download log) ---------- */

.expandable-row {
  cursor: pointer;
}

.expand-content {
  display: none;
  background: var(--color-bg-alt);
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-border-light);
}

.expand-content.open {
  display: block;
}

.download-log {
  list-style: none;
}

.download-log li {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border-light);
}

.download-log li:last-child {
  border-bottom: none;
}

/* ---------- Fingerprint Display ---------- */

.fingerprint {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  letter-spacing: 0.05em;
  padding: var(--space-4) var(--space-6);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-align: center;
  word-break: break-all;
  user-select: all;
}

.fingerprint-sm {
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-3);
}

/* ---------- Share Link Display ---------- */

.share-link {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.share-link input {
  flex: 1;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-alt);
  color: var(--color-text);
}

.share-link input:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* ---------- Password Strength Indicator ---------- */

.password-strength {
  display: flex;
  gap: 3px;
  margin-top: var(--space-2);
  height: 4px;
}

.password-strength-bar {
  flex: 1;
  border-radius: 2px;
  background: var(--color-border);
  transition: background var(--transition);
}

.password-strength[data-strength="1"] .password-strength-bar:nth-child(1) {
  background: var(--color-danger);
}

.password-strength[data-strength="2"] .password-strength-bar:nth-child(-n+2) {
  background: var(--color-warning);
}

.password-strength[data-strength="3"] .password-strength-bar:nth-child(-n+3) {
  background: #eab308;
}

.password-strength[data-strength="4"] .password-strength-bar:nth-child(-n+4) {
  background: var(--color-success);
}

.password-strength-text {
  font-size: var(--text-xs);
  margin-top: var(--space-1);
}

/* ---------- Alerts / Inline Messages ---------- */

.alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.alert-info {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid #bfdbfe;
}

.alert-success {
  background: var(--color-success-light);
  color: var(--color-success);
  border: 1px solid #bbf7d0;
}

.alert-warning {
  background: var(--color-warning-light);
  color: var(--color-warning);
  border: 1px solid #fde68a;
}

.alert-error {
  background: var(--color-danger-light);
  color: var(--color-danger);
  border: 1px solid #fecaca;
}

/* ---------- Toast Notifications ---------- */

.toast-container {
  position: fixed;
  top: calc(var(--header-height) + var(--space-4));
  right: var(--space-4);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}

.toast {
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  box-shadow: var(--shadow-md);
  pointer-events: auto;
  animation: toast-in 200ms ease;
  max-width: 360px;
}

.toast-success {
  background: var(--color-success);
  color: #fff;
}

.toast-error {
  background: var(--color-danger);
  color: #fff;
}

.toast-info {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast-exit {
  animation: toast-out 200ms ease forwards;
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* ---------- Cost Estimate ---------- */

.cost-display {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4);
  text-align: center;
}

.cost-amount {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
}

.cost-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.cost-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-style: italic;
}

/* ---------- Recipient Selector ---------- */

.recipient-list {
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.recipient-list-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border-light);
  cursor: pointer;
  transition: background var(--transition);
}

.recipient-list-item:last-child {
  border-bottom: none;
}

.recipient-list-item:hover {
  background: var(--color-bg-alt);
}

.recipient-list-item input[type="checkbox"] {
  accent-color: var(--color-primary);
}

.recipient-list-item .recipient-name {
  font-weight: 500;
  font-size: var(--text-sm);
}

.recipient-list-item .recipient-email {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ---------- Empty State ---------- */

.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  color: var(--color-text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
  opacity: 0.4;
}

.empty-state p {
  margin-bottom: var(--space-6);
}

/* ---------- Token Display (one-time) ---------- */

.token-display {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  padding: var(--space-4);
  background: var(--color-bg-darker);
  color: #4ade80;
  border-radius: var(--radius);
  word-break: break-all;
  user-select: all;
}

.token-usage {
  color: var(--color-text-inverse);
  font-size: var(--text-xs);
}

/* ---------- Spinner ---------- */

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 600ms linear infinite;
}

.spinner-lg {
  width: 32px;
  height: 32px;
  border-width: 3px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Status / Loading States ---------- */

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12);
  gap: var(--space-4);
  color: var(--color-text-muted);
}

.status-message {
  text-align: center;
  padding: var(--space-8);
}

.status-message h2 {
  margin-bottom: var(--space-3);
}

.status-message p {
  color: var(--color-text-muted);
}

/* ---------- Login / Registration Pages ---------- */

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--color-bg-alt);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  margin: var(--space-8);
}

.auth-card .brand {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-2);
  color: var(--color-bg-dark);
}

.auth-card .tagline {
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-8);
}

/* ---------- Copy Button ---------- */

.btn-copy {
  position: relative;
}

.btn-copy .copy-feedback {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--text-xs);
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
  padding: 2px var(--space-2);
  border-radius: var(--radius);
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.btn-copy.copied .copy-feedback {
  opacity: 1;
}

/* ---------- Character Counter ---------- */

.char-counter {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: right;
  margin-top: var(--space-1);
}

.char-counter.over-limit {
  color: var(--color-danger);
}

/* ---------- Member / Recipient Cards ---------- */

.member-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
  margin-bottom: var(--space-3);
}

.member-card .member-info {
  flex: 1;
  min-width: 0;
}

.member-card .member-name {
  font-weight: 500;
}

.member-card .member-email {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.member-card .member-actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* ---------- Conditional Visibility ---------- */

.hidden {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ---------- Utility ---------- */

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: var(--space-2);
}

.gap-4 {
  gap: var(--space-4);
}

.mt-4 {
  margin-top: var(--space-4);
}

.mt-6 {
  margin-top: var(--space-6);
}

.mt-8 {
  margin-top: var(--space-8);
}

.mb-4 {
  margin-bottom: var(--space-4);
}

.mb-6 {
  margin-bottom: var(--space-6);
}

.w-full {
  width: 100%;
}

.text-center {
  text-align: center;
}

.font-medium {
  font-weight: 500;
}

.max-w-narrow {
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.mt-1 {
  margin-top: var(--space-1);
}

.mt-2 {
  margin-top: var(--space-2);
}

.mb-2 {
  margin-bottom: var(--space-2);
}

hr.border-top,
.border-top {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-6);
  margin-bottom: var(--space-6);
}

.word-break-all {
  word-break: break-all;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: var(--space-6);
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border-light);
}

.site-footer a {
  color: var(--color-text-muted);
}

.site-footer a:hover {
  color: var(--color-text);
}

/* ---------- Download Page ---------- */

.download-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--color-bg-alt);
}

.download-card {
  width: 100%;
  max-width: 480px;
  margin: var(--space-8);
}

.download-card .brand {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-bg-dark);
}

.status-icon-error {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-danger-light);
  color: var(--color-danger);
  font-size: var(--text-xl);
  font-weight: 700;
}

.status-icon-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-success-light);
  color: var(--color-success);
  font-size: var(--text-xl);
  font-weight: 700;
}
