/* ============================================================
   Guardian Mesh Corporate Portal — Stylesheet
   Light Professional Fintech Theme
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f7f4;
  --bg-card: #ffffff;
  --bg-card-hover: #fafaf8;
  --bg-input: #f4f3f0;

  --accent-cyan: #1a5632;
  --accent-green: #1a5632;
  --accent-green-rgb: 26, 86, 50;
  --accent-red: #c53030;
  --accent-gold: #b8860b;
  --accent-purple: #6b46c1;

  --text-primary: #1a1a1a;
  --text-secondary: #5a6370;
  --text-muted: #9ca3af;

  --border: #e5e4e0;
  --border-hover: #d1d0cc;
  --border-focus: #1a5632;

  --sidebar-width: 240px;
  --header-height: 60px;

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

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.1);

  --transition: 0.2s ease;
}

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

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
}

h1, h2, h3, .auth-title, .section-title {
  font-family: 'DM Serif Display', Georgia, 'Times New Roman', serif;
}

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

img, svg { display: block; }
ul, ol { list-style: none; }

/* ---------- Utility ---------- */
.hidden { display: none !important; }

.loading-placeholder {
  color: var(--text-muted);
  text-align: center;
  padding: 32px 16px;
  font-size: 0.9rem;
}

/* ============================================================
   AUTH SCREEN
   ============================================================ */
.auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background: var(--bg-secondary);
}

.auth-container {
  width: 100%;
  max-width: 420px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
}

.auth-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.company-info {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  box-shadow: var(--shadow-sm);
}

/* Auth tabs */
.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.auth-tab:hover {
  color: var(--text-primary);
}

.auth-tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* Auth form */
.auth-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
}

.auth-error {
  color: var(--accent-red);
  font-size: 0.85rem;
  text-align: center;
  margin-top: 14px;
  padding: 8px 12px;
  background: rgba(197,48,48,.06);
  border-radius: var(--radius-sm);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
  margin-bottom: 16px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(26,86,50,.1);
}

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

.form-stack {
  display: flex;
  flex-direction: column;
}

.form-inline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}

.form-inline-grid .form-group-full {
  grid-column: 1 / -1;
}

.select-input {
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.select-input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.search-input {
  padding: 7px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  width: 220px;
  transition: border-color var(--transition);
}

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

.search-input:focus {
  outline: none;
  border-color: var(--border-focus);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

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

.btn-primary {
  background: #1a5632;
  color: #ffffff;
  border-color: #1a5632;
}

.btn-primary:hover:not(:disabled) {
  background: #143f26;
  border-color: #143f26;
  box-shadow: 0 2px 8px rgba(26,86,50,.25);
}

.btn-ghost {
  background: #ffffff;
  color: var(--text-secondary);
  border-color: var(--border);
}

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

.btn-danger {
  background: rgba(197,48,48,.06);
  color: var(--accent-red);
  border-color: rgba(197,48,48,.2);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(197,48,48,.12);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-full {
  width: 100%;
}

/* Vote buttons */
.vote-btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.vote-btn {
  padding: 8px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.vote-btn-for {
  color: #1a5632;
  border-color: rgba(26,86,50,.3);
}

.vote-btn-for:hover,
.vote-btn-for.selected {
  background: rgba(26,86,50,.08);
  border-color: #1a5632;
}

.vote-btn-against {
  color: var(--accent-red);
  border-color: rgba(197,48,48,.3);
}

.vote-btn-against:hover,
.vote-btn-against.selected {
  background: rgba(197,48,48,.06);
  border-color: var(--accent-red);
}

.vote-btn-abstain {
  color: var(--text-secondary);
  border-color: rgba(90,99,112,.25);
}

.vote-btn-abstain:hover,
.vote-btn-abstain.selected {
  background: rgba(90,99,112,.06);
  border-color: var(--text-secondary);
}

.vote-btn.cast {
  opacity: 0.6;
  pointer-events: none;
}

/* Button spinner */
.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

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

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.header-title-group {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.header-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  font-family: 'DM Serif Display', Georgia, serif;
}

.header-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: #1a5632;
  background: rgba(26,86,50,.08);
  border: 1px solid rgba(26,86,50,.15);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.header-user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.header-user-id {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* Sidebar toggle (mobile) */
.sidebar-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 4px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.sidebar-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--transition);
}

/* Layout */
.app-layout {
  display: flex;
  flex: 1;
  min-height: calc(100vh - var(--header-height));
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 16px 0;
  overflow-y: auto;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(26,86,50,.04);
  text-decoration: none;
}

.nav-item.active {
  color: #1a5632;
  background: rgba(26,86,50,.08);
  font-weight: 600;
}

.nav-item.active .nav-icon {
  color: #1a5632;
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav-item:hover .nav-icon {
  color: var(--text-secondary);
}

/* Main content */
.main-content {
  flex: 1;
  padding: 28px 32px;
  overflow-x: hidden;
  min-width: 0;
  background: #ffffff;
}

/* ============================================================
   CONTENT SECTIONS
   ============================================================ */
.content-section {
  display: none;
}

.content-section.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-header {
  margin-bottom: 24px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 4px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

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

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-link {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-green);
}

.card-link:hover {
  text-decoration: underline;
}

.card-body {
  padding: 20px;
}

/* ============================================================
   STATS GRID
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stats-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 22px;
  height: 22px;
}

.stat-icon-cyan {
  background: rgba(26,86,50,.08);
  color: #1a5632;
}

.stat-icon-green {
  background: rgba(26,86,50,.08);
  color: #1a5632;
}

.stat-icon-purple {
  background: rgba(107,70,193,.08);
  color: var(--accent-purple);
}

.stat-icon-gold {
  background: rgba(184,134,11,.08);
  color: var(--accent-gold);
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table thead th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table thead th.num {
  text-align: right;
}

.data-table tbody td {
  padding: 11px 14px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}

.data-table tbody td.num {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
}

.data-table tbody tr:hover {
  background: var(--bg-secondary);
}

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

/* Cap table alternating rows */
.captable tbody tr:nth-child(even) {
  background: var(--bg-secondary);
}

.captable tbody tr:nth-child(even):hover {
  background: #f0efec;
}

.data-table tfoot td {
  padding: 11px 14px;
  font-weight: 700;
  border-top: 2px solid var(--border);
  color: var(--text-primary);
}

.data-table tfoot td.num {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
}

.table-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 28px 14px !important;
  font-style: italic;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-cyan {
  background: rgba(26,86,50,.08);
  color: #1a5632;
}

.badge-green, .badge-paid, .badge-approved {
  background: rgba(26,86,50,.08);
  color: #1a5632;
}

.badge-gold, .badge-pending, .badge-declared {
  background: rgba(184,134,11,.08);
  color: #96700a;
}

.badge-red, .badge-rejected {
  background: rgba(197,48,48,.06);
  color: var(--accent-red);
}

.badge-purple {
  background: rgba(107,70,193,.08);
  color: var(--accent-purple);
}

.badge-gray, .badge-cancelled {
  background: rgba(156,163,175,.1);
  color: var(--text-secondary);
}

/* ============================================================
   VOTING
   ============================================================ */
.vote-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 14px;
}

.vote-card:last-child {
  margin-bottom: 0;
}

.vote-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.vote-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.vote-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.6;
}

.vote-meta {
  display: flex;
  gap: 20px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.vote-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.vote-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.vote-cast-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Vote results bar */
.vote-results {
  margin-top: 14px;
}

.vote-result-bar-container {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-input);
  margin-bottom: 8px;
}

.vote-result-bar {
  height: 100%;
  transition: width 0.4s ease;
}

.vote-result-bar.for {
  background: #1a5632;
}

.vote-result-bar.against {
  background: var(--accent-red);
}

.vote-result-bar.abstain {
  background: var(--text-muted);
}

.vote-result-labels {
  display: flex;
  gap: 16px;
  font-size: 0.78rem;
}

.vote-result-label {
  display: flex;
  align-items: center;
  gap: 5px;
}

.vote-result-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.vote-result-dot.for { background: #1a5632; }
.vote-result-dot.against { background: var(--accent-red); }
.vote-result-dot.abstain { background: var(--text-muted); }

.vote-threshold {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.vote-threshold strong {
  color: var(--text-secondary);
}

/* ============================================================
   DOCUMENTS
   ============================================================ */
.document-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

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

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

.document-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: color var(--transition);
}

.document-title:hover {
  color: var(--accent-green);
}

.document-meta {
  display: flex;
  gap: 14px;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.document-actions {
  flex-shrink: 0;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  opacity: 0.3;
}

.empty-state-text {
  font-size: 0.9rem;
}

/* ============================================================
   MEETINGS
   ============================================================ */
.meeting-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: all var(--transition);
}

.meeting-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.meeting-card:last-child {
  margin-bottom: 0;
}

.meeting-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.meeting-details {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.meeting-detail {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Meeting detail modal */
.meeting-modal-info {
  margin-bottom: 20px;
}

.meeting-modal-row {
  display: flex;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.meeting-modal-row:last-child {
  border-bottom: none;
}

.meeting-modal-label {
  width: 120px;
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.meeting-modal-value {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.meeting-agenda {
  margin-top: 16px;
}

.meeting-agenda h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}

.meeting-agenda ol {
  list-style: decimal;
  padding-left: 24px;
}

.meeting-agenda li {
  padding: 4px 0;
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* ============================================================
   PROFILE
   ============================================================ */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.profile-grid .card:first-child {
  grid-column: 1 / -1;
}

.profile-info {
  display: flex;
  flex-direction: column;
}

.profile-row {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.profile-row:last-child {
  border-bottom: none;
}

.profile-label {
  width: 160px;
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.profile-value {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
}

/* ============================================================
   ANNOUNCEMENTS
   ============================================================ */
.announcement-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.announcement-card:last-child {
  margin-bottom: 0;
}

.announcement-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.announcement-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.announcement-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.announcement-content {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
}

.announcement-author {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(4px);
  padding: 24px;
  animation: fadeIn 0.15s ease;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  width: 100%;
  max-width: 540px;
  max-height: 85vh;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.modal-sm {
  max-width: 400px;
}

.modal-lg {
  max-width: 720px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

.doc-meta {
  flex: 1;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.doc-content {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.7;
  white-space: pre-wrap;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
}

.toast-success {
  border: 1px solid var(--border);
  border-left: 4px solid #1a5632;
  color: #1a5632;
}

.toast-error {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-red);
  color: var(--accent-red);
}

.toast-info {
  border: 1px solid var(--border);
  border-left: 4px solid #1a5632;
  color: #1a5632;
}

.toast-warning {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-gold);
  color: var(--accent-gold);
}

.toast-exit {
  animation: toastOut 0.25s ease forwards;
}

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

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

/* ============================================================
   TRANSFERS
   ============================================================ */
.transfer-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.transfer-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.transfer-status-dot.pending { background: var(--accent-gold); }
.transfer-status-dot.approved { background: #1a5632; }
.transfer-status-dot.rejected { background: var(--accent-red); }
.transfer-status-dot.cancelled { background: var(--text-muted); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .form-inline-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar-toggle {
    display: flex;
  }

  .sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    z-index: 90;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: var(--shadow-lg);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    padding: 20px 16px;
  }

  .header-title-group {
    flex-direction: column;
    gap: 0;
  }

  .header-badge {
    display: none;
  }

  .header-user {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid-2 {
    grid-template-columns: 1fr;
  }

  .vote-card-header {
    flex-direction: column;
  }

  .vote-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .data-table {
    font-size: 0.8rem;
  }

  .data-table thead th,
  .data-table tbody td,
  .data-table tfoot td {
    padding: 8px 10px;
  }

  .modal {
    max-width: 100%;
    max-height: 90vh;
  }

  .captable thead th:nth-child(3),
  .captable thead th:nth-child(4),
  .captable tbody td:nth-child(3),
  .captable tbody td:nth-child(4) {
    display: none;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .profile-label {
    width: auto;
  }

  .announcement-header {
    flex-direction: column;
  }

  .meeting-details {
    flex-direction: column;
    gap: 6px;
  }

  .toast-container {
    right: 12px;
    left: 12px;
    bottom: 12px;
  }

  .toast {
    min-width: auto;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .auth-form {
    padding: 20px 16px;
  }

  .vote-btn-group {
    flex-direction: column;
  }

  .vote-btn {
    width: 100%;
    text-align: center;
  }
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #d1d0cc;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #b8b7b3;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #d1d0cc transparent;
}
