/* ==========================================================================
   Risk Registers Design System
   Slate/Minimalist Aesthetic - Modern Professional SaaS
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
  /* Colors - Slate/Minimalist */
  --color-slate-50: #f8fafc;
  --color-slate-100: #f1f5f9;
  --color-slate-200: #e2e8f0;
  --color-slate-300: #cbd5e1;
  --color-slate-400: #94a3b8;
  --color-slate-500: #64748b;
  --color-slate-600: #475569;
  --color-slate-700: #334155;
  --color-slate-800: #1e293b;
  --color-slate-900: #0f172a;

  /* Primary - Blue accent */
  --color-blue-50: #eff6ff;
  --color-blue-100: #dbeafe;
  --color-blue-200: #bfdbfe;
  --color-blue-300: #93c5fd;
  --color-blue-400: #60a5fa;
  --color-blue-500: #3b82f6;
  --color-blue-600: #2563eb;
  --color-blue-700: #1d4ed8;

  /* Success - Green */
  --color-green-50: #f0fdf4;
  --color-green-100: #dcfce7;
  --color-green-500: #22c55e;
  --color-green-600: #16a34a;

  /* Warning - Amber */
  --color-amber-50: #fffbeb;
  --color-amber-100: #fef3c7;
  --color-amber-500: #f59e0b;
  --color-amber-600: #d97706;

  /* Danger - Red */
  --color-red-50: #fef2f2;
  --color-red-100: #fee2e2;
  --color-red-500: #ef4444;
  --color-red-600: #dc2626;

  /* Semantic Colors */
  --color-primary: var(--color-blue-500);
  --color-primary-hover: var(--color-blue-600);
  --color-primary-light: var(--color-blue-50);
  --color-success: var(--color-green-500);
  --color-success-light: var(--color-green-50);
  --color-warning: var(--color-amber-500);
  --color-warning-light: var(--color-amber-50);
  --color-danger: var(--color-red-500);
  --color-danger-light: var(--color-red-50);
  --color-text: var(--color-slate-700);
  --color-text-muted: var(--color-slate-500);
  --color-border: var(--color-slate-200);
  --color-surface: #ffffff;
  --color-background: var(--color-slate-50);

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --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.75;

  /* Spacing (8px base grid) */
  --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;
  --space-16: 4rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-normal: 200ms ease-out;
  --transition-slow: 300ms ease-out;
}

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

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

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-slate-800);
  margin-top: 0;
  margin-bottom: var(--space-4);
}

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

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

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

a:hover {
  color: var(--color-primary-hover);
}

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */
.navbar {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-4) var(--space-6);
  height: auto;
  min-height: 64px;
  display: flex;
  align-items: center;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-lg);
  color: var(--color-slate-800);
}

.navbar-brand:hover {
  color: var(--color-slate-800);
}

.navbar-text {
  color: var(--color-slate-600);
  font-size: var(--font-size-sm);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.navbar-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-slate-600);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.navbar-icon-btn:hover {
  background-color: var(--color-slate-50);
  border-color: var(--color-slate-300);
  color: var(--color-slate-700);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  line-height: 1.5;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-blue-100);
}

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

/* Primary Button - Subtle/Filled style */
.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: #ffffff;
}

.btn-primary:active {
  transform: scale(0.98);
}

/* Secondary Button */
.btn-secondary {
  background-color: var(--color-surface);
  color: var(--color-slate-700);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  background-color: var(--color-slate-50);
  border-color: var(--color-slate-300);
  color: var(--color-slate-800);
}

/* Outline Button */
.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-blue-200);
}

.btn-outline:hover {
  background-color: var(--color-primary-light);
  border-color: var(--color-blue-300);
  color: var(--color-primary);
}

/* Ghost/Danger variants */
.btn-ghost {
  background-color: transparent;
  color: var(--color-slate-600);
  border-color: transparent;
}

.btn-ghost:hover {
  background-color: var(--color-slate-100);
  color: var(--color-slate-700);
}

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

.btn-danger:hover {
  background-color: var(--color-red-600);
  border-color: var(--color-red-600);
  color: #ffffff;
}

.btn-success {
  background-color: var(--color-success);
  color: #ffffff;
  border-color: var(--color-success);
}

.btn-success:hover {
  background-color: var(--color-green-600);
  border-color: var(--color-green-600);
  color: #ffffff;
}

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

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

.btn-block {
  width: 100%;
}

/* Icon Button (circular) */
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-full);
}

.btn-icon-sm {
  width: 28px;
  height: 28px;
}

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

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

.form-control {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-slate-100);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  background-color: var(--color-surface);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-blue-100);
}

.form-control::placeholder {
  color: var(--color-slate-400);
}

.form-control:disabled {
  background-color: var(--color-slate-100);
  cursor: not-allowed;
}

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

/* Select */
.form-select {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-slate-100);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-10);
}

.form-select:focus {
  outline: none;
  background-color: var(--color-surface);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-blue-100);
}

/* File Input */
.form-file {
  display: block;
  width: 100%;
  padding: var(--space-3);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  background-color: var(--color-slate-100);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.form-file:hover {
  border-color: var(--color-primary);
  background-color: var(--color-primary-light);
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  background-color: var(--color-slate-50);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-header:first-child {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-body {
  padding: var(--space-5);
}

.card-footer {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--color-border);
  background-color: var(--color-slate-50);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.table-container {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.table thead {
  background-color: var(--color-slate-50);
}

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

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

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

.table tbody tr {
  transition: background-color var(--transition-fast);
}

.table tbody tr:hover {
  background-color: var(--color-slate-50);
}

/* Striped variant (optional) */
.table-striped tbody tr:nth-of-type(odd) {
  background-color: var(--color-slate-50);
}

.table-striped tbody tr:nth-of-type(odd):hover {
  background-color: var(--color-slate-100);
}

/* Table Actions */
.table-actions {
  display: flex;
  gap: var(--space-2);
}

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.5);
  z-index: 1040;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.modal-dialog {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.modal-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-slate-800);
  margin: 0;
}

.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--color-slate-400);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background-color: var(--color-slate-100);
  color: var(--color-slate-600);
}

.modal-body {
  padding: var(--space-5);
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--color-border);
  background-color: var(--color-slate-50);
}

/* --------------------------------------------------------------------------
   Alerts
   -------------------------------------------------------------------------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  border-left: 3px solid transparent;
}

.alert-success {
  background-color: var(--color-success-light);
  border-left-color: var(--color-success);
  color: var(--color-green-600);
}

.alert-danger {
  background-color: var(--color-danger-light);
  border-left-color: var(--color-danger);
  color: var(--color-red-600);
}

.alert-warning {
  background-color: var(--color-warning-light);
  border-left-color: var(--color-warning);
  color: var(--color-amber-600);
}

.alert-info {
  background-color: var(--color-blue-50);
  border-left-color: var(--color-primary);
  color: var(--color-blue-600);
}

.alert-dismissible {
  padding-right: var(--space-10);
}

.alert-dismissible .close {
  position: absolute;
  top: 50%;
  right: var(--space-3);
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: inherit;
  opacity: 0.5;
  cursor: pointer;
  padding: var(--space-1);
  transition: opacity var(--transition-fast);
}

.alert-dismissible .close:hover {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Badges & Risk Indicators
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-2);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-full);
}

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

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

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

/* Risk Level Indicators */
.risk-low {
  color: var(--color-green-600);
  background-color: var(--color-success-light);
}

.risk-medium {
  color: var(--color-amber-600);
  background-color: var(--color-warning-light);
}

.risk-high {
  color: var(--color-red-600);
  background-color: var(--color-danger-light);
}

/* Progress Bar */
.progress {
  display: flex;
  height: 8px;
  background-color: var(--color-slate-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: #ffffff;
  transition: width var(--transition-slow);
}

.progress-bar-success {
  background-color: var(--color-success);
}

.progress-bar-warning {
  background-color: var(--color-warning);
}

.progress-bar-danger {
  background-color: var(--color-danger);
}

.progress-bar-primary {
  background: linear-gradient(90deg, var(--color-blue-400), var(--color-blue-500));
}

/* --------------------------------------------------------------------------
   Empty State
   -------------------------------------------------------------------------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-6);
  text-align: center;
}

.empty-state-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-4);
  color: var(--color-slate-300);
}

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

.empty-state-description {
  font-size: var(--font-size-sm);
  color: var(--color-slate-500);
  margin-bottom: var(--space-5);
  max-width: 320px;
}

/* --------------------------------------------------------------------------
   Login/Signup Pages
   -------------------------------------------------------------------------- */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-6);
  background: linear-gradient(135deg, var(--color-slate-50) 0%, var(--color-slate-100) 100%);
}

.auth-card {
  background-color: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--space-10);
  width: 100%;
  max-width: 420px;
}

.auth-logo {
  display: block;
  margin: 0 auto var(--space-6);
  max-width: 200px;
  height: auto;
}

.auth-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  text-align: center;
  color: var(--color-slate-800);
  margin-bottom: var(--space-2);
}

.auth-subtitle {
  font-size: var(--font-size-sm);
  text-align: center;
  color: var(--color-slate-500);
  margin-bottom: var(--space-6);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.auth-footer {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--color-slate-500);
}

.auth-footer a {
  color: var(--color-primary);
  font-weight: var(--font-weight-medium);
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Recaptcha styling */
.g-recaptcha {
  transform-origin: left top;
}

.auth-error {
  padding: var(--space-3);
  background-color: var(--color-danger-light);
  border-radius: var(--radius-md);
  color: var(--color-red-600);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-4);
}

/* --------------------------------------------------------------------------
   Dashboard Specific
   -------------------------------------------------------------------------- */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.dashboard-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-slate-800);
  margin: 0;
}

.dashboard-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.dashboard-content {
  padding: var(--space-6);
}

/* Data Table Card */
.data-table-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.data-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  background-color: var(--color-slate-50);
  border-bottom: 1px solid var(--color-border);
}

.data-table-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-slate-700);
  margin: 0;
}

.data-table-wrapper {
  overflow-x: auto;
}

/* Row Selection */
.row-selected {
  background-color: var(--color-blue-50) !important;
  border-left: 3px solid var(--color-primary);
}

/* --------------------------------------------------------------------------
   Pricing Page — Apple-style Minimal
   -------------------------------------------------------------------------- */

.pricing {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 24px 120px;
}

.pricing-hero {
  text-align: center;
  margin-bottom: 64px;
}

.pricing-hero h1 {
  font-size: 36px;
  font-weight: 700;
  color: var(--color-slate-900);
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}

.pricing-hero p {
  font-size: 17px;
  color: var(--color-slate-500);
  margin-bottom: 20px;
}

.current-plan {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--color-slate-500);
}

.current-plan a {
  color: var(--color-blue-500);
  font-weight: 500;
}

.current-plan a:hover {
  color: var(--color-blue-600);
}

.usage-badge {
  display: inline-flex;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-amber-600);
  background: var(--color-amber-50);
  border-radius: 4px;
}

.current-plan-divider {
  color: var(--color-slate-300);
}

/* ── Plans Grid ── */

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 80px;
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  background: var(--color-surface);
  border-radius: 18px;
  border: 1px solid var(--color-border);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.plan:hover {
  border-color: var(--color-slate-300);
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.plan-featured {
  border-color: var(--color-blue-200);
  border-width: 1.5px;
  box-shadow: 0 2px 12px rgba(59,130,246,0.06);
}

.plan-featured:hover {
  border-color: var(--color-blue-300);
  box-shadow: 0 4px 24px rgba(59,130,246,0.1);
}

.plan-current {
  border-color: var(--color-green-300);
}

.plan-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-blue-500);
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}

.plan-top {
  text-align: center;
  padding-bottom: 16px;
}

.plan-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-slate-800);
  margin-bottom: 8px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.plan-amount {
  font-size: 40px;
  font-weight: 700;
  color: var(--color-slate-900);
  letter-spacing: -0.03em;
}

.plan-amount-free {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-slate-600);
}

.plan-period {
  font-size: 15px;
  color: var(--color-slate-500);
}

.plan-tagline {
  text-align: center;
  font-size: 13px;
  color: var(--color-slate-400);
  margin: 0 0 20px;
}

/* ── Features ── */

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  flex: 1;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 14px;
  color: var(--color-slate-600);
  border-bottom: 1px solid var(--color-slate-100);
}

.plan-features li:last-child {
  border-bottom: none;
}

.plan-features li strong {
  color: var(--color-slate-800);
}

.check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-green-600);
  background: var(--color-green-50);
  border-radius: 50%;
}

/* ── CTA ── */

.plan-action {
  margin-top: auto;
}

.btn-plan {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 11px 20px;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-plan-primary {
  background: var(--color-blue-500);
  color: #fff;
  border-color: var(--color-blue-500);
}

.btn-plan-primary:hover {
  background: var(--color-blue-600);
  border-color: var(--color-blue-600);
  color: #fff;
}

.btn-plan-secondary {
  background: transparent;
  color: var(--color-blue-500);
  border-color: var(--color-border);
}

.btn-plan-secondary:hover {
  background: var(--color-slate-50);
  border-color: var(--color-slate-300);
}

.btn-plan-current {
  background: var(--color-green-50);
  color: var(--color-green-700);
  border-color: var(--color-green-200);
  cursor: default;
}

.btn-plan-disabled {
  background: var(--color-slate-50);
  color: var(--color-slate-400);
  border-color: var(--color-border);
  cursor: not-allowed;
}

/* ── Comparison Table ── */

.compare {
  margin-bottom: 80px;
}

.compare h2 {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--color-slate-800);
  margin-bottom: 32px;
}

.compare table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.compare thead th {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-slate-600);
  border-bottom: 1.5px solid var(--color-border);
  text-align: left;
}

.compare thead th:first-child { padding-left: 0; }
.compare thead th:not(:first-child) { text-align: center; }

.compare td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--color-slate-100);
  color: var(--color-slate-600);
}

.compare td:first-child {
  font-weight: 500;
  color: var(--color-slate-700);
  padding-left: 0;
}

.compare td:not(:first-child) {
  text-align: center;
}

.compare .section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-slate-400);
  padding: 8px 0 !important;
  background: transparent;
}

.compare .yes {
  color: var(--color-green-600);
  font-weight: 600;
}

.compare .no {
  color: var(--color-slate-400);
}

/* ── FAQ ── */

.faq {
  max-width: 640px;
  margin: 0 auto;
}

.faq h2 {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--color-slate-800);
  margin-bottom: 32px;
}

.faq-list {
  display: flex;
  flex-direction: column;
}

.faq-list details {
  border-bottom: 1px solid var(--color-border);
}

.faq-list details:first-child {
  border-top: 1px solid var(--color-border);
}

.faq-list summary {
  display: flex;
  align-items: center;
  padding: 18px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-slate-800);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color 0.15s;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: '+';
  margin-left: auto;
  font-size: 18px;
  font-weight: 300;
  color: var(--color-slate-400);
  transition: transform 0.2s;
}

.faq-list details[open] summary::after {
  content: '−';
}

.faq-list summary:hover {
  color: var(--color-slate-900);
}

.faq-list p {
  padding: 0 0 18px;
  margin: 0;
  font-size: 14px;
  color: var(--color-slate-500);
  line-height: 1.6;
}

/* ── Responsive ── */

@media (max-width: 640px) {
  .pricing { padding: 48px 16px 80px; }
  .pricing-hero h1 { font-size: 28px; }
  .plans { grid-template-columns: 1fr; }
  .plan-features li { padding: 6px 0; font-size: 13px; }
  .compare table { font-size: 13px; }
  .compare td { padding: 9px 12px; }
}

.pricing-hero {
  text-align: center;
  margin-bottom: 64px;
}

.pricing-hero h1 {
  font-size: 36px;
  font-weight: 700;
  color: var(--color-slate-900);
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}

.pricing-hero p {
  font-size: 17px;
  color: var(--color-slate-500);
  margin-bottom: 20px;
}

.current-plan {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--color-slate-500);
}

.current-plan a {
  color: var(--color-blue-500);
  font-weight: 500;
}

.current-plan a:hover {
  color: var(--color-blue-600);
}

.usage-badge {
  display: inline-flex;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-amber-600);
  background: var(--color-amber-50);
  border-radius: 4px;
}

.current-plan-divider {
  color: var(--color-slate-300);
}

/* ── Plans Grid ── */

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 80px;
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  background: var(--color-surface);
  border-radius: 18px;
  border: 1px solid var(--color-border);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.plan:hover {
  border-color: var(--color-slate-300);
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.plan-featured {
  border-color: var(--color-blue-200);
  border-width: 1.5px;
  box-shadow: 0 2px 12px rgba(59,130,246,0.06);
}

.plan-featured:hover {
  border-color: var(--color-blue-300);
  box-shadow: 0 4px 24px rgba(59,130,246,0.1);
}

.plan-current {
  border-color: var(--color-green-300);
}

.plan-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-blue-500);
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}

.plan-top {
  text-align: center;
  padding-bottom: 16px;
}

.plan-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-slate-800);
  margin-bottom: 8px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.plan-amount {
  font-size: 40px;
  font-weight: 700;
  color: var(--color-slate-900);
  letter-spacing: -0.03em;
}

.plan-amount-free {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-slate-600);
}

.plan-period {
  font-size: 15px;
  color: var(--color-slate-500);
}

.plan-tagline {
  text-align: center;
  font-size: 13px;
  color: var(--color-slate-400);
  margin: 0 0 20px;
}

/* ── Features ── */

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  flex: 1;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 14px;
  color: var(--color-slate-600);
  border-bottom: 1px solid var(--color-slate-100);
}

.plan-features li:last-child {
  border-bottom: none;
}

.plan-features li strong {
  color: var(--color-slate-800);
}

.check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-green-600);
  background: var(--color-green-50);
  border-radius: 50%;
}

/* ── CTA ── */

.plan-action {
  margin-top: auto;
}

.btn-plan {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 11px 20px;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-plan-primary {
  background: var(--color-blue-500);
  color: #fff;
  border-color: var(--color-blue-500);
}

.btn-plan-primary:hover {
  background: var(--color-blue-600);
  border-color: var(--color-blue-600);
  color: #fff;
}

.btn-plan-secondary {
  background: transparent;
  color: var(--color-blue-500);
  border-color: var(--color-border);
}

.btn-plan-secondary:hover {
  background: var(--color-slate-50);
  border-color: var(--color-slate-300);
}

.btn-plan-current {
  background: var(--color-green-50);
  color: var(--color-green-700);
  border-color: var(--color-green-200);
  cursor: default;
}

.btn-plan-disabled {
  background: var(--color-slate-50);
  color: var(--color-slate-400);
  border-color: var(--color-border);
  cursor: not-allowed;
}

/* ── Comparison Table ── */

.compare {
  margin-bottom: 80px;
}

.compare h2 {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--color-slate-800);
  margin-bottom: 32px;
}

.compare table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.compare thead th {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-slate-600);
  border-bottom: 1.5px solid var(--color-border);
  text-align: left;
}

.compare thead th:first-child { padding-left: 0; }
.compare thead th:not(:first-child) { text-align: center; }

.compare td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--color-slate-100);
  color: var(--color-slate-600);
}

.compare td:first-child {
  font-weight: 500;
  color: var(--color-slate-700);
  padding-left: 0;
}

.compare td:not(:first-child) {
  text-align: center;
}

.compare .section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-slate-400);
  padding: 8px 0 !important;
  background: transparent;
}

.compare .yes {
  color: var(--color-green-600);
  font-weight: 600;
}

.compare .no {
  color: var(--color-slate-400);
}

/* ── FAQ ── */

.faq {
  max-width: 640px;
  margin: 0 auto;
}

.faq h2 {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--color-slate-800);
  margin-bottom: 32px;
}

.faq-list {
  display: flex;
  flex-direction: column;
}

.faq-list details {
  border-bottom: 1px solid var(--color-border);
}

.faq-list details:first-child {
  border-top: 1px solid var(--color-border);
}

.faq-list summary {
  display: flex;
  align-items: center;
  padding: 18px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-slate-800);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color 0.15s;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: '+';
  margin-left: auto;
  font-size: 18px;
  font-weight: 300;
  color: var(--color-slate-400);
  transition: transform 0.2s;
}

.faq-list details[open] summary::after {
  content: '−';
}

.faq-list summary:hover {
  color: var(--color-slate-900);
}

.faq-list p {
  padding: 0 0 18px;
  margin: 0;
  font-size: 14px;
  color: var(--color-slate-500);
  line-height: 1.6;
}

/* ── Responsive ── */

@media (max-width: 640px) {
  .pricing { padding: 48px 16px 80px; }
  .pricing-hero h1 { font-size: 28px; }
  .plans { grid-template-columns: 1fr; }
  .plan-features li { padding: 6px 0; font-size: 13px; }
  .compare table { font-size: 13px; }
  .compare td { padding: 9px 12px; }
}

.pricing-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.pricing-header-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: linear-gradient(135deg, var(--color-blue-50), var(--color-blue-100));
  border: 1px solid var(--color-blue-200);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

.pricing-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: var(--font-weight-bold);
  color: var(--color-slate-900);
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
}

.pricing-header-sub {
  font-size: var(--font-size-lg);
  color: var(--color-slate-500);
  max-width: 520px;
  margin: 0 auto var(--space-6);
}

/* ── Current Plan Banner ── */

.current-plan-banner {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: linear-gradient(135deg, var(--color-blue-50), #fff);
  border: 1px solid var(--color-blue-200);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  color: var(--color-blue-700);
  box-shadow: var(--shadow-sm);
}

.current-plan-banner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--color-blue-100);
  color: var(--color-primary);
}

.current-plan-banner-icon i {
  width: 14px;
  height: 14px;
}

.current-plan-banner-text {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.current-plan-usage {
  display: inline-flex;
  padding: 1px 8px;
  background: var(--color-amber-100);
  color: var(--color-amber-700);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}

.current-plan-cta {
  margin-left: var(--space-2);
}

/* ── Grid ── */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
  align-items: start;
  margin-bottom: var(--space-16);
}

/* ── Card ── */

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.12), 0 8px 16px -6px rgba(0, 0, 0, 0.06);
}

/* Featured card (Professional) */

.pricing-card-featured {
  border-color: var(--color-blue-300);
  box-shadow: 0 0 0 1px var(--color-blue-300), 0 8px 24px -6px rgba(59, 130, 246, 0.15);
  transform: scale(1.03);
  z-index: 1;
}

.pricing-card-featured:hover {
  transform: scale(1.03) translateY(-4px);
  box-shadow: 0 0 0 1px var(--color-blue-400), 0 24px 48px -12px rgba(59, 130, 246, 0.2);
}

/* Current plan card */

.pricing-card-current {
  border-color: var(--color-green-400);
  box-shadow: 0 0 0 1px var(--color-green-400);
}

/* ── Ribbon ── */

.pricing-card-ribbon {
  position: absolute;
  top: 16px;
  right: -32px;
  padding: 4px 36px;
  background: linear-gradient(135deg, var(--color-blue-500), var(--color-blue-600));
  color: #fff;
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transform: rotate(45deg);
  z-index: 2;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

/* ── Card Top ── */

.pricing-card-top {
  padding: var(--space-8) var(--space-6) var(--space-5);
  text-align: center;
}

.pricing-card-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  margin-bottom: var(--space-4);
}

.pricing-card-icon-wrapper i {
  width: 24px;
  height: 24px;
}

.pricing-card-icon-free {
  background: linear-gradient(135deg, var(--color-slate-100), var(--color-slate-200));
  color: var(--color-slate-600);
}

.pricing-card-icon-professional {
  background: linear-gradient(135deg, var(--color-blue-50), var(--color-blue-100));
  color: var(--color-blue-600);
}

.pricing-card-icon-enterprise {
  background: linear-gradient(135deg, var(--color-amber-50), var(--color-amber-100));
  color: var(--color-amber-600);
}

.pricing-plan-name {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-slate-800);
  margin-bottom: var(--space-3);
}

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

.pricing-amount {
  font-size: 2.75rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-slate-900);
  letter-spacing: -0.03em;
}

.pricing-amount-free {
  color: var(--color-slate-600);
}

.pricing-period {
  font-size: var(--font-size-base);
  color: var(--color-slate-500);
  font-weight: var(--font-weight-normal);
}

.pricing-price-tag {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-slate-400);
  margin-bottom: var(--space-3);
}

.pricing-description {
  font-size: var(--font-size-sm);
  color: var(--color-slate-500);
  margin-bottom: 0;
  line-height: var(--line-height-relaxed);
}

/* ── Divider ── */

.pricing-card-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
  margin: 0 var(--space-6);
}

/* ── Card Body ── */

.pricing-card-body {
  flex: 1;
  padding: var(--space-5) var(--space-6);
}

.pricing-section-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-slate-400);
  margin-bottom: var(--space-3);
}

/* ── Features ── */

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pricing-feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  font-size: var(--font-size-sm);
  color: var(--color-slate-600);
  line-height: var(--line-height-normal);
}

.pricing-feature + .pricing-feature {
  border-top: 1px solid var(--color-slate-100);
}

.pricing-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  margin-top: 1px;
}

.pricing-feature-icon i {
  width: 12px;
  height: 12px;
}

.pricing-feature-check {
  background: var(--color-green-50);
  color: var(--color-green-600);
}

.pricing-feature-text strong {
  color: var(--color-slate-800);
}

/* ── Footer & CTA ── */

.pricing-card-footer {
  padding: var(--space-5) var(--space-6) var(--space-6);
}

.pricing-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: 12px 24px;
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  border-radius: 12px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.pricing-cta-primary {
  background: linear-gradient(135deg, var(--color-blue-500), var(--color-blue-600));
  color: #fff;
  border-color: var(--color-blue-500);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.pricing-cta-primary:hover {
  background: linear-gradient(135deg, var(--color-blue-600), var(--color-blue-700));
  border-color: var(--color-blue-600);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
  color: #fff;
}

.pricing-cta-secondary {
  background: var(--color-slate-50);
  color: var(--color-slate-700);
  border-color: var(--color-border);
}

.pricing-cta-secondary:hover {
  background: var(--color-slate-100);
  border-color: var(--color-slate-300);
  color: var(--color-slate-800);
}

.pricing-cta-outline {
  background: transparent;
  color: var(--color-slate-700);
  border-color: var(--color-border);
}

.pricing-cta-outline:hover {
  background: var(--color-slate-50);
  border-color: var(--color-blue-300);
  color: var(--color-blue-600);
}

.pricing-cta-current {
  background: var(--color-green-50);
  color: var(--color-green-700);
  border-color: var(--color-green-200);
  cursor: default;
  opacity: 0.85;
}

.pricing-cta-disabled {
  background: var(--color-slate-50);
  color: var(--color-slate-400);
  border-color: var(--color-border);
  cursor: not-allowed;
  opacity: 0.6;
}

/* ── Feature Comparison Table ── */

.pricing-feature-comparison {
  margin-bottom: var(--space-16);
}

.pricing-feature-comparison h2 {
  text-align: center;
  font-size: var(--font-size-2xl);
  color: var(--color-slate-800);
  margin-bottom: var(--space-8);
}

.comparison-table-wrapper {
  overflow-x: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.comparison-table thead {
  background: linear-gradient(135deg, var(--color-slate-50), #fff);
}

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

.comparison-table th:first-child {
  padding-left: var(--space-6);
}

.comparison-table .col-free {
  color: var(--color-slate-500);
}

.comparison-table .col-pro {
  color: var(--color-blue-600);
}

.comparison-table .col-enterprise {
  color: var(--color-amber-600);
}

.comparison-table td {
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--color-slate-100);
  color: var(--color-slate-600);
}

.comparison-table td:first-child {
  font-weight: var(--font-weight-medium);
  color: var(--color-slate-700);
  padding-left: var(--space-6);
}

.comparison-table td.muted {
  color: var(--color-slate-400);
}

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

.comparison-table tbody tr:hover td {
  background-color: var(--color-slate-50);
}

.comparison-section {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-slate-400);
  background: var(--color-slate-50);
  padding: var(--space-2) var(--space-6) !important;
}

.comparison-section td {
  background: var(--color-slate-50);
}

/* ── FAQ ── */

.pricing-faq-section {
  max-width: 720px;
  margin: 0 auto;
}

.pricing-faq-section h2 {
  text-align: center;
  font-size: var(--font-size-2xl);
  color: var(--color-slate-800);
  margin-bottom: var(--space-8);
}

.faq-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-surface);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.faq-item:hover {
  box-shadow: var(--shadow-sm);
}

.faq-item[open] {
  box-shadow: var(--shadow-sm);
}

.faq-question {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-slate-700);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color 0.15s ease;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::before {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 16px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-slate-400);
  background: var(--color-slate-100);
  border-radius: var(--radius-full);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.faq-item[open] .faq-question::before {
  content: '−';
  background: var(--color-blue-100);
  color: var(--color-blue-600);
}

.faq-question:hover {
  color: var(--color-slate-900);
}

.faq-answer {
  padding: 0 var(--space-5) var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--color-slate-500);
  line-height: var(--line-height-relaxed);
  margin: 0;
}

/* ── Responsive ── */

@media (max-width: 900px) {
  .pricing-card-featured {
    transform: none;
  }
  .pricing-card-featured:hover {
    transform: translateY(-4px);
  }
}

@media (max-width: 640px) {
  .pricing-container {
    padding: var(--space-6) var(--space-3) var(--space-12);
  }
  .pricing-card-top {
    padding: var(--space-6) var(--space-4) var(--space-4);
  }
  .pricing-card-body {
    padding: var(--space-4);
  }
  .pricing-card-footer {
    padding: var(--space-4);
  }
  .comparison-table th,
  .comparison-table td {
    padding: var(--space-2) var(--space-3);
  }
}

.main-content {
  flex: 1;
  padding: var(--space-6);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

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

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

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

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

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

.ml-1 { margin-left: var(--space-1); }
.ml-2 { margin-left: var(--space-2); }
.ml-3 { margin-left: var(--space-3); }
.ml-4 { margin-left: var(--space-4); }
.ml-auto { margin-left: auto; }

.mr-1 { margin-right: var(--space-1); }
.mr-2 { margin-right: var(--space-2); }
.mr-3 { margin-right: var(--space-3); }
.mr-4 { margin-right: var(--space-4); }
.mr-auto { margin-right: auto; }

.mx-1 { margin-left: var(--space-1); margin-right: var(--space-1); }
.mx-2 { margin-left: var(--space-2); margin-right: var(--space-2); }
.mx-3 { margin-left: var(--space-3); margin-right: var(--space-3); }
.mx-4 { margin-left: var(--space-4); margin-right: var(--space-4); }
.mx-auto { margin-left: auto; margin-right: auto; }

.my-1 { margin-top: var(--space-1); margin-bottom: var(--space-1); }
.my-2 { margin-top: var(--space-2); margin-bottom: var(--space-2); }
.my-3 { margin-top: var(--space-3); margin-bottom: var(--space-3); }
.my-4 { margin-top: var(--space-4); margin-bottom: var(--space-4); }
.my-5 { margin-top: var(--space-5); margin-bottom: var(--space-5); }
.my-6 { margin-top: var(--space-6); margin-bottom: var(--space-6); }

.py-1 { padding-top: var(--space-1); padding-bottom: var(--space-1); }
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.py-3 { padding-top: var(--space-3); padding-bottom: var(--space-3); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-5 { padding-top: var(--space-5); padding-bottom: var(--space-5); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }

.px-1 { padding-left: var(--space-1); padding-right: var(--space-1); }
.px-2 { padding-left: var(--space-2); padding-right: var(--space-2); }
.px-3 { padding-left: var(--space-3); padding-right: var(--space-3); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-5 { padding-left: var(--space-5); padding-right: var(--space-5); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }

.d-flex { display: flex; }
.d-block { display: block; }
.d-inline-flex { display: inline-flex; }
.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-end { justify-content: flex-end; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

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

.position-relative { position: relative; }
.position-absolute { position: absolute; }

.border { border: 1px solid var(--color-border); }
.border-0 { border: none; }
.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.bg-white { background-color: var(--color-surface); }
.bg-light { background-color: var(--color-slate-50); }

/* Tooltip */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-1) var(--space-2);
  background-color: var(--color-slate-800);
  color: #ffffff;
  font-size: var(--font-size-xs);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.tooltip:hover::after {
  opacity: 1;
}

/* Image styling */
.img-thumbnail {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

/* --------------------------------------------------------------------------
   Top Navigation (Redesigned)
   -------------------------------------------------------------------------- */
.top-nav {
  background: #0a1628;
  border-bottom: 1px solid #1e2d4a;
  padding: 0;
  height: auto;
  min-height: 56px;
  display: flex;
  align-items: center;
}
.top-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
}
.top-nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.top-nav-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #8896ab;
  cursor: pointer;
  border-radius: 4px;
  flex-shrink: 0;
  transition: background 0.15s;
}
.top-nav-back:hover {
  background: rgba(255,255,255,0.08);
}
.top-nav-greeting {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.top-nav-user {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-nav-sub {
  font-size: 11px;
  color: #5a6a82;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Tier badge in top nav */
.top-nav .tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border-radius: 4px;
  white-space: nowrap;
  background: #1e2d4a;
  color: #8ab4ff;
  border: none;
}
.top-nav .tier-badge i {
  width: 12px;
  height: 12px;
}

/* More dropdown */
.top-nav-more {
  position: relative;
}
.top-nav-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #8896ab;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s;
}
.top-nav-more-btn:hover {
  background: rgba(255,255,255,0.08);
}
.top-nav-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 170px;
  background: #fff;
  border: 1px solid #e2e6ee;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(10,22,40,0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.15s ease;
  z-index: 200;
  overflow: hidden;
}
.top-nav-dropdown-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.top-nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #2d3748;
  text-decoration: none;
  transition: background 0.1s;
}
.top-nav-dropdown-item:hover {
  background: #f4f6fa;
  color: #1a56db;
}
.top-nav-dropdown-danger {
  border-top: 1px solid #eef0f4;
  color: #d64045;
}
.top-nav-dropdown-danger:hover {
  background: #fef2f2;
  color: #b53135;
}

/* --------------------------------------------------------------------------
   Risk Register Content (Redesigned Mobile-First)
   -------------------------------------------------------------------------- */
.page-container {
  background: #f4f6fa;
  min-height: 100vh;
}
.main-content {
  flex: 1;
  padding: 0;
}

.rr-content {
  padding: 12px 16px 110px;
  max-width: 1200px;
  margin: 0 auto;
}
.rr-section-header {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6b7a93;
  margin-bottom: 10px;
  margin-top: 4px;
}

/* Success message */
.rr-message {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin: 8px 16px 0;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  background: #ecfdf5;
  border-left: 3px solid #10b981;
  color: #065f46;
  font-size: 13px;
  border-radius: 4px;
}
.rr-message-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #6b7a93;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}

/* Table wrap */
.rr-table-wrap {
  border: 1px solid #e2e6ee;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
}
.rr-table-scroll-hint {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 5px 10px;
  font-size: 11px;
  color: #8896ab;
  background: #f8f9fc;
  border-bottom: 1px solid #e2e6ee;
}
.rr-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.rr-table-scroll::-webkit-scrollbar {
  height: 6px;
}
.rr-table-scroll::-webkit-scrollbar-track {
  background: #eef0f4;
}
.rr-table-scroll::-webkit-scrollbar-thumb {
  background: #bcc3d0;
  border-radius: 3px;
}

/* Table */
.rr-table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  font-size: 12px;
}
.rr-table thead th {
  background: #f8f9fc;
  color: #4a556b;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 8px;
  text-align: left;
  border-bottom: 2px solid #e2e6ee;
  white-space: nowrap;
}
.rr-table thead th:first-child { padding-left: 12px; }
.rr-table thead th:last-child { padding-right: 12px; }

/* Risk rows with left-border indicators */
.rr-row {
  border-left: 4px solid transparent;
  cursor: pointer;
  transition: background 0.1s;
}
.rr-row:hover {
  background: #f8f9fc;
}
.rr-row td {
  padding: 10px 8px;
  border-bottom: 1px solid #eef0f4;
  vertical-align: middle;
}
.rr-row td:first-child { padding-left: 12px; }
.rr-row td:last-child { padding-right: 12px; }
.rr-row:last-child td { border-bottom: none; }

.rr-row-low    { border-left-color: #2a9d8f; }
.rr-row-medium { border-left-color: #e9b741; }
.rr-row-high   { border-left-color: #d64045; }

.rr-row-selected {
  background-color: #eef3fc !important;
}

.rr-cell-num { font-weight: 600; color: #1a1f36; white-space: nowrap; }
.rr-cell-owner { color: #4a556b; white-space: nowrap; }
.rr-cell-desc { color: #2d3748; max-width: 160px; }
.rr-desc-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
.rr-pic-link {
  display: inline-flex;
  align-items: center;
  color: #8896ab;
  margin-left: 4px;
  vertical-align: middle;
}
.rr-pic-link:hover { color: #1a56db; }
.rr-cell-pic { text-align: center; }
.rr-thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 3px;
}
.rr-no-pic { color: #bcc3d0; }

/* Probability badge */
.rr-prob-badge {
  display: inline-block;
  min-width: 28px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  border-radius: 3px;
  padding: 0 6px;
}
.rr-prob-low    { background: #d4edea; color: #1f7b6f; }
.rr-prob-medium { background: #f6eac9; color: #a17a1a; }
.rr-prob-high   { background: #f6d5d6; color: #b53135; }

.rr-cell-impact { font-size: 11px; color: #6b7a93; }

/* Rank bar */
.rr-rank {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 80px;
}
.rr-rank-bar {
  flex: 1;
  height: 5px;
  background: #eef0f4;
  border-radius: 3px;
  overflow: hidden;
}
.rr-rank-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}
.rr-rank-fill-low    { background: #2a9d8f; }
.rr-rank-fill-medium { background: #e9b741; }
.rr-rank-fill-high   { background: #d64045; }
.rr-rank-val { font-size: 11px; font-weight: 600; color: #4a556b; white-space: nowrap; }

.rr-cell-muted { color: #6b7a93; font-size: 11px; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Action buttons in table */
.rr-actions {
  display: flex;
  gap: 4px;
}
.rr-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #e2e6ee;
  background: #fff;
  color: #6b7a93;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.1s;
}
.rr-action-btn:hover {
  background: #f4f6fa;
  border-color: #bcc3d0;
  color: #2d3748;
}
.rr-action-btn-danger:hover {
  background: #fef2f2;
  border-color: #f6d5d6;
  color: #d64045;
}

/* Empty state (no risks at all) */
.rr-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}
.rr-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
  color: #bcc3d0;
}
.rr-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1f36;
  margin-bottom: 4px;
}
.rr-empty-desc {
  font-size: 13px;
  color: #6b7a93;
  margin-bottom: 16px;
  max-width: 280px;
}
.rr-empty .btn-primary {
  height: 44px;
  padding: 0 20px;
  font-size: 14px;
}

/* Empty state below rows */
.rr-empty-below {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  border-top: 1px solid #eef0f4;
  background: #fafbfc;
}
.rr-empty-below-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #eef0f4;
  border-radius: 50%;
  flex-shrink: 0;
  color: #8896ab;
}
.rr-empty-below-title {
  font-size: 13px;
  font-weight: 600;
  color: #2d3748;
  margin: 0;
}
.rr-empty-below-desc {
  font-size: 12px;
  color: #6b7a93;
  margin: 2px 0 0;
}
.rr-empty-below-desc strong { color: #1a56db; }

/* --------------------------------------------------------------------------
   Bottom Action Bar
   -------------------------------------------------------------------------- */
.rr-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e2e6ee;
  padding: 8px 16px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  display: flex;
  gap: 8px;
  z-index: 100;
  box-shadow: 0 -2px 12px rgba(10,22,40,0.08);
}
.rr-bottom-btn {
  flex: 1;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.rr-bottom-btn-secondary {
  background: #eef0f4;
  color: #2d3748;
}
.rr-bottom-btn-secondary:active { background: #dce0e8; }
.rr-bottom-btn-primary {
  background: #1a56db;
  color: #fff;
}
.rr-bottom-btn-primary:active { background: #1242b0; }

/* --------------------------------------------------------------------------
   Top Navigation (Redesigned)
   -------------------------------------------------------------------------- */
.top-nav {
  background: #0a1628;
  border-bottom: 1px solid #1e2d4a;
  padding: 0;
  height: auto;
  min-height: 56px;
  display: flex;
  align-items: center;
}
.top-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
}
.top-nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.top-nav-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #8896ab;
  cursor: pointer;
  border-radius: 4px;
  flex-shrink: 0;
  transition: background 0.15s;
}
.top-nav-back:hover {
  background: rgba(255,255,255,0.08);
}
.top-nav-greeting {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.top-nav-user {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-nav-sub {
  font-size: 11px;
  color: #5a6a82;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Tier badge in top nav */
.top-nav .tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border-radius: 4px;
  white-space: nowrap;
  background: #1e2d4a;
  color: #8ab4ff;
  border: none;
}
.top-nav .tier-badge i {
  width: 12px;
  height: 12px;
}

/* More dropdown */
.top-nav-more {
  position: relative;
}
.top-nav-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #8896ab;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s;
}
.top-nav-more-btn:hover {
  background: rgba(255,255,255,0.08);
}
.top-nav-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 170px;
  background: #fff;
  border: 1px solid #e2e6ee;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(10,22,40,0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.15s ease;
  z-index: 200;
  overflow: hidden;
}
.top-nav-dropdown-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.top-nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #2d3748;
  text-decoration: none;
  transition: background 0.1s;
}
.top-nav-dropdown-item:hover {
  background: #f4f6fa;
  color: #1a56db;
}
.top-nav-dropdown-danger {
  border-top: 1px solid #eef0f4;
  color: #d64045;
}
.top-nav-dropdown-danger:hover {
  background: #fef2f2;
  color: #b53135;
}

/* --------------------------------------------------------------------------
   Risk Register Content (Redesigned Mobile-First)
   -------------------------------------------------------------------------- */
.page-container {
  background: #f4f6fa;
  min-height: 100vh;
}
.main-content {
  flex: 1;
  padding: 0;
}

.rr-content {
  padding: 12px 16px 110px;
  max-width: 1200px;
  margin: 0 auto;
}
.rr-section-header {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6b7a93;
  margin-bottom: 10px;
  margin-top: 4px;
}

/* Success message */
.rr-message {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin: 8px 16px 0;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  background: #ecfdf5;
  border-left: 3px solid #10b981;
  color: #065f46;
  font-size: 13px;
  border-radius: 4px;
}
.rr-message-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #6b7a93;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}

/* Table wrap */
.rr-table-wrap {
  border: 1px solid #e2e6ee;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
}
.rr-table-scroll-hint {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 5px 10px;
  font-size: 11px;
  color: #8896ab;
  background: #f8f9fc;
  border-bottom: 1px solid #e2e6ee;
}
.rr-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.rr-table-scroll::-webkit-scrollbar {
  height: 6px;
}
.rr-table-scroll::-webkit-scrollbar-track {
  background: #eef0f4;
}
.rr-table-scroll::-webkit-scrollbar-thumb {
  background: #bcc3d0;
  border-radius: 3px;
}

/* Table */
.rr-table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  font-size: 12px;
}
.rr-table thead th {
  background: #f8f9fc;
  color: #4a556b;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 8px;
  text-align: left;
  border-bottom: 2px solid #e2e6ee;
  white-space: nowrap;
}
.rr-table thead th:first-child { padding-left: 12px; }
.rr-table thead th:last-child { padding-right: 12px; }

/* Risk rows with left-border indicators */
.rr-row {
  border-left: 4px solid transparent;
  cursor: pointer;
  transition: background 0.1s;
}
.rr-row:hover {
  background: #f8f9fc;
}
.rr-row td {
  padding: 10px 8px;
  border-bottom: 1px solid #eef0f4;
  vertical-align: middle;
}
.rr-row td:first-child { padding-left: 12px; }
.rr-row td:last-child { padding-right: 12px; }
.rr-row:last-child td { border-bottom: none; }

.rr-row-low    { border-left-color: #2a9d8f; }
.rr-row-medium { border-left-color: #e9b741; }
.rr-row-high   { border-left-color: #d64045; }

.rr-row-selected {
  background-color: #eef3fc !important;
}

.rr-cell-num { font-weight: 600; color: #1a1f36; white-space: nowrap; }
.rr-cell-owner { color: #4a556b; white-space: nowrap; }
.rr-cell-desc { color: #2d3748; max-width: 160px; }
.rr-desc-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
.rr-pic-link {
  display: inline-flex;
  align-items: center;
  color: #8896ab;
  margin-left: 4px;
  vertical-align: middle;
}
.rr-pic-link:hover { color: #1a56db; }
.rr-cell-pic { text-align: center; }
.rr-thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 3px;
}
.rr-no-pic { color: #bcc3d0; }

/* Probability badge */
.rr-prob-badge {
  display: inline-block;
  min-width: 28px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  border-radius: 3px;
  padding: 0 6px;
}
.rr-prob-low    { background: #d4edea; color: #1f7b6f; }
.rr-prob-medium { background: #f6eac9; color: #a17a1a; }
.rr-prob-high   { background: #f6d5d6; color: #b53135; }

.rr-cell-impact { font-size: 11px; color: #6b7a93; }

/* Rank bar */
.rr-rank {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 80px;
}
.rr-rank-bar {
  flex: 1;
  height: 5px;
  background: #eef0f4;
  border-radius: 3px;
  overflow: hidden;
}
.rr-rank-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}
.rr-rank-fill-low    { background: #2a9d8f; }
.rr-rank-fill-medium { background: #e9b741; }
.rr-rank-fill-high   { background: #d64045; }
.rr-rank-val { font-size: 11px; font-weight: 600; color: #4a556b; white-space: nowrap; }

.rr-cell-muted { color: #6b7a93; font-size: 11px; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Action buttons in table */
.rr-actions {
  display: flex;
  gap: 4px;
}
.rr-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #e2e6ee;
  background: #fff;
  color: #6b7a93;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.1s;
}
.rr-action-btn:hover {
  background: #f4f6fa;
  border-color: #bcc3d0;
  color: #2d3748;
}
.rr-action-btn-danger:hover {
  background: #fef2f2;
  border-color: #f6d5d6;
  color: #d64045;
}

/* Empty state (no risks at all) */
.rr-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}
.rr-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
  color: #bcc3d0;
}
.rr-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1f36;
  margin-bottom: 4px;
}
.rr-empty-desc {
  font-size: 13px;
  color: #6b7a93;
  margin-bottom: 16px;
  max-width: 280px;
}
.rr-empty .btn-primary {
  height: 44px;
  padding: 0 20px;
  font-size: 14px;
}

/* Empty state below rows */
.rr-empty-below {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  border-top: 1px solid #eef0f4;
  background: #fafbfc;
}
.rr-empty-below-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #eef0f4;
  border-radius: 50%;
  flex-shrink: 0;
  color: #8896ab;
}
.rr-empty-below-title {
  font-size: 13px;
  font-weight: 600;
  color: #2d3748;
  margin: 0;
}
.rr-empty-below-desc {
  font-size: 12px;
  color: #6b7a93;
  margin: 2px 0 0;
}
.rr-empty-below-desc strong { color: #1a56db; }

/* --------------------------------------------------------------------------
   Bottom Action Bar
   -------------------------------------------------------------------------- */
.rr-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e2e6ee;
  padding: 8px 16px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  display: flex;
  gap: 8px;
  z-index: 100;
  box-shadow: 0 -2px 12px rgba(10,22,40,0.08);
}
.rr-bottom-btn {
  flex: 1;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.rr-bottom-btn-secondary {
  background: #eef0f4;
  color: #2d3748;
}
.rr-bottom-btn-secondary:active { background: #dce0e8; }
.rr-bottom-btn-primary {
  background: #1a56db;
  color: #fff;
}
.rr-bottom-btn-primary:active { background: #1242b0; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --font-size-base: 0.9375rem;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .dashboard-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .data-table-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .table th,
  .table td {
    padding: var(--space-2) var(--space-3);
  }

  .auth-card {
    padding: var(--space-6);
  }
}

