/* Orkestrait.ai — Enterprise Corporate Design System */

/* ── Google Font Import ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables (Design Tokens) ── */
:root {
  /* Colors from Enterprise Color System */
  --white: #FFFFFF;
  --off-white: #F5F5F5;
  --warm-beige: #F3EDE7;
  --divider-grey: #EAEAEA;
  --deep-navy: #111827;
  --controlled-blue: #1D4ED8;
  --controlled-blue-hover: #1E40AF;
  
  /* Semantic Colors */
  --danger-red: #DC2626;
  --danger-red-hover: #B91C1C;
  --warning-amber: #D97706;
  --success-green: #059669;
  --edit-grey: #6B7280;
  --edit-grey-hover: #4B5563;
  
  /* Neutral Scale */
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 0.9375rem; /* 15px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  
  /* Spacing Scale */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  
  /* Layout */
  --sidebar-width: 260px;
  --topbar-height: 64px;
  --content-max-width: 1400px;
}

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

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

html, body {
  height: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-relaxed);
  color: var(--gray-800);
  background-color: var(--white);
  letter-spacing: -0.01em;
}

a {
  color: var(--controlled-blue);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--controlled-blue-hover);
}

/* ── Layout ── */
.app-wrapper {
  display: flex;
  height: 100vh;
  flex-direction: column;
  background-color: var(--white);
}

/* Top Bar */
.topbar {
  height: var(--topbar-height);
  background-color: var(--off-white);
  border-bottom: 1px solid var(--divider-grey);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--space-8);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.topbar-brand {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--deep-navy);
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--deep-navy) 0%, var(--controlled-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.topbar-user {
  font-size: var(--font-size-sm);
  color: var(--gray-500);
  font-weight: var(--font-weight-medium);
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--deep-navy);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: background-color 0.15s ease;
}

.sidebar-toggle:hover {
  background-color: var(--off-white);
}

/* Main Layout */
.main-wrapper {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--warm-beige);
  border-right: 1px solid var(--divider-grey);
  overflow-y: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-nav {
  padding: var(--space-6) var(--space-4);
  flex: 1;
}

.nav-section-title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  padding: var(--space-3) var(--space-4);
  margin-top: var(--space-6);
}

.nav-section-title:first-child {
  margin-top: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-1) 0;
  border-radius: var(--radius-lg);
  color: var(--gray-700);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  transition: all 0.15s ease;
}

.nav-item:hover {
  background-color: var(--white);
  color: var(--deep-navy);
}

.nav-item.active {
  background-color: var(--white);
  color: var(--controlled-blue);
  font-weight: var(--font-weight-semibold);
  box-shadow: var(--shadow-sm);
}

/* Main Content */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-8);
  background-color: var(--off-white);
  max-width: calc(var(--content-max-width) - var(--sidebar-width));
}

.main-content > .alert:first-child {
  margin-bottom: var(--space-6);
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--deep-navy);
  letter-spacing: -0.02em;
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }
h5 { font-size: var(--font-size-base); }
h6 { font-size: var(--font-size-sm); }

/* ── Cards ── */
.card {
  background-color: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--divider-grey);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--warm-beige);
}

.card-header {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-5);
  color: var(--deep-navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: -0.01em;
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--warm-beige);
}

.card-body {
  color: var(--gray-700);
  background-color: var(--off-white);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.card-body p {
  margin-bottom: var(--space-4);
}

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

/* Stat Cards */
.stat-card {
  background: linear-gradient(135deg, var(--warm-beige) 0%, var(--off-white) 100%);
  border-radius: var(--radius-xl);
  border: 1px solid var(--divider-grey);
  padding: var(--space-6);
  text-align: center;
  transition: all 0.15s ease;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--warm-beige);
}

.stat-card-value {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--controlled-blue);
  margin: var(--space-3) 0;
  letter-spacing: -0.02em;
}

.stat-card-label {
  font-size: var(--font-size-sm);
  color: var(--gray-500);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}

/* ── Tables ── */
.data-table-container {
  overflow-x: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--divider-grey);
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background-color: var(--white);
  font-size: var(--font-size-sm);
}

.data-table thead {
  background-color: var(--off-white);
}

.data-table th {
  padding: var(--space-4) var(--space-5);
  text-align: left;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  border-bottom: 1px solid var(--divider-grey);
  border-right: 1px solid var(--divider-grey);
  white-space: nowrap;
}

.data-table th:last-child {
  border-right: none;
}

.data-table td {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--divider-grey);
  border-right: 1px solid var(--divider-grey);
  color: var(--gray-700);
  vertical-align: middle;
}

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

.data-table tbody tr:hover {
  background-color: var(--warm-beige);
}

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

.data-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--radius-xl);
}

.data-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius-xl);
}

.data-table tbody tr:nth-child(even) {
  background-color: var(--gray-50);
}

.data-table tbody tr:nth-child(even):hover {
  background-color: var(--warm-beige);
}

/* ── Forms ── */
.form-group {
  margin-bottom: var(--space-5);
  background-color: var(--white);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--warm-beige);
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  color: var(--gray-700);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--divider-grey);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  font-family: inherit;
  color: var(--gray-800);
  background-color: var(--off-white);
  transition: all 0.15s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--gray-400);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--controlled-blue);
  background-color: var(--white);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

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

.form-error {
  color: var(--danger-red);
  font-size: var(--font-size-xs);
  margin-top: var(--space-2);
  font-weight: var(--font-weight-medium);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-2);
}

.form-section {
  margin-bottom: var(--space-8);
}

.form-section-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--deep-navy);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--divider-grey);
}

.form-hint {
  font-size: var(--font-size-xs);
  color: var(--gray-500);
  margin-top: var(--space-2);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border: none;
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  line-height: 1.5;
}

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

/* Primary - Controlled Blue */
.btn-primary {
  background-color: var(--controlled-blue);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--controlled-blue-hover);
  color: var(--white);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Secondary - Light styling */
.btn-secondary {
  background-color: var(--white);
  color: var(--gray-700);
  border: 1px solid var(--divider-grey);
}

.btn-secondary:hover {
  background-color: var(--off-white);
  color: var(--deep-navy);
  border-color: var(--gray-300);
}

/* Danger - Red for delete */
.btn-danger {
  background-color: var(--danger-red);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-danger:hover {
  background-color: var(--danger-red-hover);
  color: var(--white);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Edit - Greyish */
.btn-edit {
  background-color: var(--edit-grey);
  color: var(--white);
}

.btn-edit:hover {
  background-color: var(--edit-grey-hover);
  color: var(--white);
}

/* Ghost - Minimal */
.btn-ghost {
  background-color: transparent;
  color: var(--gray-600);
}

.btn-ghost:hover {
  background-color: var(--off-white);
  color: var(--deep-navy);
}

/* Button Sizes */
.btn-sm {
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-xs);
}

.btn-lg {
  padding: var(--space-4) var(--space-6);
  font-size: var(--font-size-base);
}

/* Button Group */
.btn-group {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.btn-group-right {
  justify-content: flex-end;
}

/* ── Alerts/Flash ── */
.alert {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.alert::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background-size: contain;
  background-repeat: no-repeat;
}

.alert-success {
  background-color: #ECFDF5;
  color: var(--success-green);
  border: 1px solid #A7F3D0;
}

.alert-success::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23059669'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
}

.alert-error {
  background-color: #FEF2F2;
  color: var(--danger-red);
  border: 1px solid #FECACA;
}

.alert-error::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23DC2626'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 18L18 6M6 6l12 12'/%3E%3C/svg%3E");
}

.alert-warning {
  background-color: #FFFBEB;
  color: var(--warning-amber);
  border: 1px solid #FDE68A;
}

.alert-warning::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23D97706'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z'/%3E%3C/svg%3E");
}

.alert-info {
  background-color: #EFF6FF;
  color: var(--controlled-blue);
  border: 1px solid #BFDBFE;
}

.alert-info::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231D4ED8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z'/%3E%3C/svg%3E");
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: 9999px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  line-height: 1.25;
}

.badge-open {
  background-color: #EFF6FF;
  color: var(--controlled-blue);
}

.badge-closed {
  background-color: #ECFDF5;
  color: var(--success-green);
}

.badge-pending {
  background-color: #FFFBEB;
  color: var(--warning-amber);
}

.badge-active {
  background-color: #ECFDF5;
  color: var(--success-green);
}

.badge-inactive {
  background-color: var(--gray-100);
  color: var(--gray-600);
}

.badge-verified {
  background-color: #ECFDF5;
  color: var(--success-green);
}

.badge-unverified {
  background-color: #FFFBEB;
  color: var(--warning-amber);
}

/* ── Pagination ── */
.pagination {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-6);
  justify-content: center;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-3);
  border: 1px solid var(--divider-grey);
  border-radius: var(--radius-lg);
  color: var(--gray-600);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all 0.15s ease;
  background-color: var(--white);
}

.page-link:hover {
  background-color: var(--off-white);
  color: var(--deep-navy);
  border-color: var(--gray-300);
}

.page-link.active {
  background-color: var(--controlled-blue);
  color: var(--white);
  border-color: var(--controlled-blue);
}

.page-link.disabled {
  color: var(--gray-300);
  cursor: not-allowed;
  background-color: var(--white);
}

/* ── Ticket Thread ── */
.ticket-reply {
  background: linear-gradient(135deg, var(--white) 0%, var(--off-white) 100%);
  border: 1px solid var(--warm-beige);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.reply-admin {
  border-left: 3px solid var(--controlled-blue);
  background: linear-gradient(135deg, #EFF6FF 0%, var(--white) 100%);
}

.reply-customer {
  border-left: 3px solid var(--warm-beige);
  background: linear-gradient(135deg, var(--warm-beige) 0%, var(--white) 100%);
}

.reply-meta {
  font-size: var(--font-size-xs);
  color: var(--gray-500);
  margin-bottom: var(--space-3);
  font-weight: var(--font-weight-medium);
}

.reply-author {
  font-weight: var(--font-weight-semibold);
  color: var(--deep-navy);
}

.reply-message {
  color: var(--gray-700);
  line-height: var(--line-height-relaxed);
}

/* ── Empty States ── */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  color: var(--gray-500);
  background: linear-gradient(135deg, var(--off-white) 0%, var(--warm-beige) 100%);
  border-radius: var(--radius-xl);
  border: 1px dashed var(--divider-grey);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: var(--space-4);
  opacity: 0.5;
}

.empty-state-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--deep-navy);
  margin-bottom: var(--space-2);
}

.empty-state-text {
  font-size: var(--font-size-sm);
  max-width: 400px;
  margin: 0 auto var(--space-6);
}

/* ── Utility ── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

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

.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

.text-gray-500 { color: var(--gray-500); }
.text-gray-600 { color: var(--gray-600); }
.text-gray-700 { color: var(--gray-700); }
.text-navy { color: var(--deep-navy); }
.text-blue { color: var(--controlled-blue); }
.text-red { color: var(--danger-red); }

.mt-1 { margin-top: var(--space-2); }
.mt-2 { margin-top: var(--space-4); }
.mt-3 { margin-top: var(--space-6); }
.mt-4 { margin-top: var(--space-8); }

.mb-1 { margin-bottom: var(--space-2); }
.mb-2 { margin-bottom: var(--space-4); }
.mb-3 { margin-bottom: var(--space-6); }
.mb-4 { margin-bottom: var(--space-8); }

.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }
.d-block { display: block; }
.d-inline-block { display: inline-block; }
.d-none { display: none; }

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

.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }

.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }

.gap-1 { gap: var(--space-2); }
.gap-2 { gap: var(--space-4); }
.gap-3 { gap: var(--space-6); }

.w-full { width: 100%; }
.h-full { height: 100%; }

/* ── Join Page ── */
.join-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--warm-beige) 0%, var(--white) 100%);
  padding: var(--space-6);
}

.join-card {
  background-color: var(--white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  padding: var(--space-10);
  max-width: 500px;
  width: 100%;
  border: 1px solid var(--divider-grey);
}

.join-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-2);
  color: var(--deep-navy);
  text-align: center;
  letter-spacing: -0.02em;
}

.join-subtitle {
  font-size: var(--font-size-sm);
  color: var(--gray-500);
  margin-bottom: var(--space-8);
  text-align: center;
}

/* ── Login Page ── */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--warm-beige) 0%, var(--white) 100%);
  padding: var(--space-6);
}

.login-card {
  background-color: var(--white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  padding: var(--space-10);
  max-width: 420px;
  width: 100%;
  border: 1px solid var(--divider-grey);
}

.login-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-6);
  color: var(--deep-navy);
  text-align: center;
  letter-spacing: -0.02em;
}

.login-link {
  text-align: center;
  margin-top: var(--space-6);
  font-size: var(--font-size-sm);
  color: var(--gray-500);
}

.login-link a {
  color: var(--controlled-blue);
  font-weight: var(--font-weight-medium);
}

/* ── Verification Banner ── */
.verification-banner {
  background-color: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}

.verification-banner-text {
  color: var(--warning-amber);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.verification-banner a {
  color: var(--warning-amber);
  font-weight: var(--font-weight-semibold);
  text-decoration: underline;
}

/* ── Page Header ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--divider-grey);
}

.page-header h1 {
  margin: 0;
}

.page-actions {
  display: flex;
  gap: var(--space-3);
}

/* ── Divider ── */
.divider {
  height: 1px;
  background-color: var(--divider-grey);
  margin: var(--space-6) 0;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .main-content {
    padding: var(--space-6);
  }
  
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .topbar {
    padding: 0 var(--space-4);
  }
  
  .sidebar {
    position: fixed;
    left: 0;
    top: var(--topbar-height);
    height: calc(100vh - var(--topbar-height));
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

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

  .sidebar-toggle {
    display: block;
  }

  .main-content {
    padding: var(--space-4);
    max-width: 100%;
  }

  .stat-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  
  .card {
    padding: var(--space-4);
  }
  
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
  
  .data-table th,
  .data-table td {
    padding: var(--space-3);
  }

  .btn {
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-xs);
  }
  
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
  
  .page-actions {
    width: 100%;
  }
  
  .page-actions .btn {
    flex: 1;
  }
  
  .join-card,
  .login-card {
    padding: var(--space-6);
  }
}

@media (max-width: 480px) {
  .topbar-brand {
    font-size: var(--font-size-base);
  }
  
  .topbar-user {
    display: none;
  }
  
  .btn-group {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-group .btn {
    width: 100%;
  }
}
