/* ==========================================================================
   1. VARIABLES & BASE STYLES
   ========================================================================== */

/* 1.1 Non-Themed Root Variables */
:root {
  /* Variables that NEVER change between themes go here */
  --transition-speed: 0.3s;

  /* Accent colors can stay if they are consistent */
  --color-success: #4caf50;
  --color-warning: #ff9800;
  --color-info: #2196f3;
  --color-contact: #9c27b0;
  --accent-primary: #e44d26;
  /* Updated to match your orange theme */
  --accent-primary-hover: #ff6b47;
  /* Brighter hover state */
}

/* 1.2 Dark Mode Theme (Default) */
[data-theme="dark"] {
  --bg-primary: #1c1c1c;
  --bg-secondary: #2a2a2a;
  --bg-tertiary: #222;
  --bg-gradient-start: #2a2a2a;
  --bg-gradient-end: #1a1a1a;
  --text-primary: #e0e0e0;
  --text-secondary: #ccc;
  --text-heading: #fff;
  --text-disabled: #555;
  --border-primary: #444;
  --border-secondary: #383838;
  --accent-primary-transparent: rgba(255, 0, 0, 0.3);
  --accent-border: rgba(255, 0, 0, 0.5);
  --accent-glow: rgba(255, 0, 0, 0.5);
  --shadow-color: rgba(0, 0, 0, 0.3);
  --shadow-strong-color: rgba(0, 0, 0, 0.4);
  --shadow-text-color: rgba(0, 0, 0, 0.7);
  --card-border-light-trans: rgba(255, 255, 255, 0.1);
  --card-bg-trans: rgba(42, 42, 42, 0.7);
  --spinner-base: rgba(255, 0, 0, 0.2);
  --spinner-top: var(--accent-primary);
  --card-sheen-gradient: linear-gradient(135deg,
      rgba(255, 255, 255, 0.05),
      rgba(255, 255, 255, 0));
  --bg-overlay-dark: rgba(0, 0, 0, 0.8);
  --element-bg-hover: #3a3a3a;
  --color-success-bg: rgba(76, 175, 80, 0.15);
  --color-warning-bg: rgba(255, 152, 0, 0.15);
  --color-danger-bg: rgba(244, 67, 54, 0.15);
  --color-danger: #f44336;
  --color-open-source: #8b4513;
}

/* 1.3 Light Mode Theme */
[data-theme="light"] {
  --bg-primary: #f4f4f4;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e0e0e0;
  --bg-gradient-start: #ffffff;
  --bg-gradient-end: #f0f0f0;
  --text-primary: #333333;
  --text-secondary: #555555;
  --text-heading: #111111;
  --text-disabled: #aaaaaa;
  --border-primary: #cccccc;
  --border-secondary: #dddddd;
  --accent-primary-transparent: rgba(255, 0, 0, 0.15);
  --accent-border: rgba(255, 0, 0, 0.4);
  --accent-glow: rgba(255, 0, 0, 0.3);
  --shadow-color: rgba(0, 0, 0, 0.1);
  --shadow-strong-color: rgba(0, 0, 0, 0.15);
  --shadow-text-color: rgba(0, 0, 0, 0.2);
  --card-border-light-trans: rgba(0, 0, 0, 0.1);
  --card-bg-trans: rgba(255, 255, 255, 0.8);
  --spinner-base: rgba(255, 0, 0, 0.15);
  --spinner-top: var(--accent-primary);
  /* Already defined in :root, but good to have here for consistency */
  --card-sheen-gradient: linear-gradient(135deg,
      rgba(0, 0, 0, 0.03),
      rgba(0, 0, 0, 0));
  --bg-overlay-dark: rgba(244, 244, 244, 0.85);
  --element-bg-hover: #e8e8e8;
  --color-success-bg: rgba(76, 175, 80, 0.1);
  --color-warning-bg: rgba(255, 152, 0, 0.1);
  --color-danger-bg: rgba(244, 67, 54, 0.1);
  --color-danger: #d32f2f;
  --color-open-source: #795548;
}

/* 1.2 Base Element Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    sans-serif;
  line-height: 1.6;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition:
    background-color var(--transition-speed) ease,
    color var(--transition-speed) ease;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-speed) ease;
}

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

h1,
h2,
h3 {
  color: var(--text-heading);
  font-weight: 700;
  margin-bottom: 0.5em;
  font-weight: 700;
}

/* --- 3. LAYOUT & HEADER STYLES --- */

/* Old --vertical-nav-width kept for backward compatibility */
:root {
  --vertical-nav-width: var(--sidebar-expanded-w, 240px);
}


.app-header {
  display: flex;
  justify-content: flex-end;
  /* Align items to the right */
  align-items: center;
  padding: 1rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-primary);
}

.header-left {
  display: none;
  /* Hide the old header-left */
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.icon-button:hover {
  color: var(--text-heading);
  background-color: var(--element-bg-hover);
}

.mobile-menu-toggle {
  display: none;
  /* Hidden on desktop */
  z-index: 1001;
}

/* Mobile-only elements - hidden on desktop */
.mobile-logo-link,
.mobile-pricing-btn,
.mobile-search-container {
  display: none;
}

/* Hide on mobile utility class */
.hide-on-mobile {
  display: flex;
}

/* ============================================
   MOBILE HEADER STYLES
   ============================================ */
@media (max-width: 768px) {
  .app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 4.5rem 0.75rem 0;
    /* Changed right padding to leave space for fixed menu toggle */
  }

  /* Hide desktop elements on mobile */
  .header-right,
  .hide-on-mobile {
    display: none !important;
  }

  /* Show mobile elements */
  .mobile-menu-toggle {
    display: flex;
    order: 4;
    flex-shrink: 0;
    margin-left: 0.25rem;
  }

  .mobile-logo-link {
    display: flex;
    order: 1;
    align-items: center;
    justify-content: center;
    margin-right: 0.25rem;
    padding-left: 0.25rem;
    text-decoration: none;
    flex-shrink: 0;
  }

  .mobile-logo {
    height: 28px;
    max-width: 80px;
    width: auto;
    object-fit: contain;
    /* Ensure logo fits */
  }

  .mobile-search-container {
    display: flex;
    flex: 1 1 auto;
    order: 2;
    max-width: 100%;
    min-width: 0;
    margin: 0 0.25rem;
    overflow: hidden;
  }

  .mobile-search-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .mobile-search-placeholder {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-header-login {
    display: flex;
    order: 3;
    align-items: center;
    justify-content: center;
    margin: 0 0.25rem;
    color: var(--text-secondary);
  }
}

/* Hide mobile-only login/logout icon on desktop */
.mobile-header-login {
  display: none;
}

/* Sidebar Login Text (for logged out state) - replaces button */
.logo-container {
  /* Updated to support row layout with text col */
  align-items: center;
}

.logo-link-img {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-text-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: 0.5rem;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease 0.05s;
}

.vertical-nav:hover .logo-text-col,
.vertical-nav.expanded .logo-text-col {
  opacity: 1;
}

.app-name-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-heading);
  text-decoration: none;
  line-height: 1.2;
}

.sidebar-login-text {
  font-size: 0.75rem;
  color: var(--accent-primary);
  text-decoration: none;
  margin-top: 2px;
  font-weight: 500;
  transition: color 0.15s;
}

.sidebar-login-text:hover {
  text-decoration: underline;
  color: var(--accent-primary-hover);
}

/* Collapsed: hide text col */
.vertical-nav:not(:hover):not(.expanded) .logo-text-col {
  display: none;
}


.notes-container {
  padding: 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--border-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition:
    background 0.3s ease,
    border-color 0.3s ease;
}

.main-content {
  background: linear-gradient(135deg,
      var(--bg-gradient-start),
      var(--bg-gradient-end));
  padding: 0.8rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-primary);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
  flex-grow: 1;
}

/* --- 5. DASHBOARD-SPECIFIC STYLES --- */

.dashboard-header {
  margin-bottom: 2rem;
  text-align: center;
}

.dashboard-header h2 {
  font-size: 2rem;
  font-weight: 800;
}

.dashboard-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* Stat Cards */
.stat-cards-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: linear-gradient(135deg,
      var(--bg-gradient-start),
      var(--bg-gradient-end));
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}

.stat-card .material-symbols-outlined {
  font-size: 2rem;
  color: var(--accent-primary);
  padding: 0.75rem;
  border-radius: 50%;
  background-color: rgba(0, 123, 255, 0.1);
  flex-shrink: 0;
}

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

.stat-info .stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.2;
}

.stat-info .stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Desktop profile page stat card overrides */
@media (min-width: 769px) {
  .profile-container .stat-cards-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .profile-container .stat-card {
    display: flex;
    flex-direction: row !important;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
  }

  .profile-container .stat-card .material-symbols-outlined {
    font-size: 1.75rem;
    padding: 0.6rem;
  }

  .profile-container .stat-info .stat-number {
    font-size: 1.4rem;
  }

  .profile-container .stat-info .stat-label {
    font-size: 0.75rem;
  }
}

/* Profile Quick Action Cards (Desktop) */
.profile-action-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.profile-stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: linear-gradient(135deg,
      var(--bg-gradient-start),
      var(--bg-gradient-end));
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.profile-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-color: var(--accent-primary);
}

.profile-stat-card .material-symbols-outlined {
  font-size: 2rem;
  color: var(--accent-primary);
  padding: 0.6rem;
  background: rgba(228, 77, 38, 0.1);
  border-radius: 50%;
}

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

.profile-stat-card .stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.2;
}

.profile-stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Profile Quick Action Buttons (Mobile) - Hide on desktop */
.profile-quick-actions {
  display: none;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.profile-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-primary);
  border-radius: 20px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

[data-theme="light"] .profile-action-btn {
  background: rgba(0, 0, 0, 0.03);
}

.profile-action-btn:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  transform: translateY(-1px);
}

.profile-action-btn .material-symbols-outlined {
  font-size: 1.1rem;
}

.profile-action-btn .action-count {
  background: var(--accent-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  min-width: 1.5rem;
  text-align: center;
}

@media (max-width: 768px) {

  /* Hide desktop cards on mobile */
  .profile-action-cards {
    display: none;
  }

  /* Show mobile buttons */
  .profile-quick-actions {
    display: flex;
    flex-wrap: wrap;
  }

  .profile-action-btn {
    flex: 1;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    min-width: fit-content;
  }

  .profile-action-btn .material-symbols-outlined {
    font-size: 1rem;
  }
}

/* Action Cards */
.action-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.action-card {
  background: linear-gradient(135deg,
      var(--bg-gradient-start),
      var(--bg-gradient-end));
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.action-card:hover {
  transform: translateY(-5px);
  /* Lift the card on hover */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: var(--text-heading);
}

[data-theme="dark"] .action-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.action-card .material-symbols-outlined {
  font-size: 3rem;
  color: var(--accent-primary);
  margin-bottom: 1rem;
}

.action-card h3 {
  font-size: 1.25rem;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
}

.action-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.action-card.action-card-highlight {
  /* Use the main background color as the base, which is a subtle grey/dark grey */
  background-color: var(--bg-primary);

  /* Use the main accent color for the border to make it pop */
  border: 1px solid var(--accent-primary);
}

/* Make the icon and title use the accent color as well */
.action-card.action-card-highlight .material-symbols-outlined,
.action-card.action-card-highlight h3 {
  color: var(--accent-primary);
}

/* Add a special hover effect for the highlight card */
.action-card.action-card-highlight:hover {
  /* Use a semi-transparent version of the accent color for the background */
  background-color: rgba(255,
      0,
      0,
      0.1);
  /* This is a transparent version of your #ff0000 accent */
  transform: translateY(-5px);
  /* Keep the lift effect */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  /* Keep the shadow effect */
}

[data-theme="dark"] .action-card.action-card-highlight:hover {
  background-color: rgba(255,
      0,
      0,
      0.15);
  /* A slightly more opaque version for dark mode */
}

@media (max-width: 768px) {
  .stat-cards-container {
    /* Override the grid layout for mobile */
    display: flex;
    /* Use flexbox for a horizontal layout */
    overflow-x: auto;
    /* This is the key: enables horizontal scrolling */
    padding-bottom: 1rem;
    /* Add some padding for the scrollbar to sit in */

    /* Hide the scrollbar for a cleaner look (optional but recommended) */
    scrollbar-width: none;
    /* For Firefox */
    -ms-overflow-style: none;
    /* For Internet Explorer & Edge */
  }

  /* Webkit-specific rule to hide the scrollbar */
  .stat-cards-container::-webkit-scrollbar {
    display: none;
  }

  /* Ensure each card has a fixed minimum width on mobile */
  .stat-cards-container .stat-card {
    flex: 0 0 220px;
    /* Do not grow, do not shrink, base width of 220px */
  }
}

/* --- 6. FORM & UPLOAD PAGE STYLES --- */

.upload-form .form-group {
  margin-bottom: 1.5rem;
}

.upload-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-heading);
}

.upload-form input[type="text"],
.upload-form textarea,
.upload-form select {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: "Inter", sans-serif;
  background-color: var(--color-background);
  /* Use background color for subtle contrast */
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  color: var(--text-heading);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.upload-form input:focus,
.upload-form textarea:focus,
.upload-form select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
  /* A glow effect */
}

.upload-form textarea {
  resize: vertical;
  /* Allow users to resize vertically only */
}

.form-hint {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

/* Custom file input styling could be added later for a more futuristic look */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: "Inter", sans-serif;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    transform 0.1s ease;
}

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

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

.btn-primary:hover {
  background-color: var(--accent-primary-hover);
  color: #ffffff;
  text-decoration: none;
}

/* --- 7. ALERT & MESSAGE STYLES --- */

.form-messages {
  margin-bottom: 1.5rem;
}

.alert {
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 500;
}

.alert-success {
  background-color: #d1e7dd;
  color: #0f5132;
  border-color: #badbcc;
}

.alert-error {
  background-color: #f8d7da;
  color: #842029;
  border-color: #f5c2c7;
}

/* Dark mode alerts */
[data-theme="dark"] .alert-success {
  background-color: #0f5132;
  color: #d1e7dd;
  border-color: #198754;
}

[data-theme="dark"] .alert-error {
  background-color: #842029;
  color: #f8d7da;
  border-color: #dc3545;
}

/* --- 8. NOTES & DOCUMENTS PAGE STYLES --- */

.filter-bar {
  background-color: var(--bg-primary);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  border: 1px solid var(--border-primary);
}

/* This targets the <a> tag with the .btn-clear-filters class */
.filter-bar .btn-clear-filters {
  /* --- Basic Button Shape & Alignment --- */
  display: inline-flex;
  /* Use flex to center content vertically and allow icons later */
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.8rem;
  /* Generous padding for a good click area */
  border-radius: 8px;
  /* Rounded corners to match your aesthetic */
  text-decoration: none;
  /* Remove the default link underline */
  font-weight: 500;
  /* A medium font weight */
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  /* Smooth transition for hover effects */

  /* --- "Outline" Button Style --- */
  background-color: transparent;
  /* No background fill */
  border: 1px solid var(--border-primary);
  /* A simple border */
  color: var(--color-text-secondary);
  /* Muted text color for a secondary action */
}

/* --- Hover & Focus State --- */
/* This provides visual feedback when the user interacts with the button */
.filter-bar .btn-clear-filters:hover,
.filter-bar .btn-clear-filters:focus {
  background-color: rgba(0,
      0,
      0,
      0.04);
  /* Very subtle background color on hover */
  color: var(--text-heading);
  /* Make text slightly darker */
  border-color: #b0b0b0;
  /* Slightly darken the border */
  transform: translateY(-1px);
  /* Subtle lift effect */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  /* A faint shadow to lift it off the page */
}

/* --- Dark Mode Specific Hover State --- */
[data-theme="dark"] .filter-bar .btn-clear-filters:hover,
[data-theme="dark"] .filter-bar .btn-clear-filters:focus {
  background-color: rgba(255,
      255,
      255,
      0.08);
  /* Use a light, transparent color for dark mode hover */
  color: #fff;
  /* Brighter text on hover */
  border-color: #777;
  /* A lighter border for dark mode */
}

/* Show the filter form on desktop */
.filter-form-container {
  display: block;
}

#mobile-filter-toggle {
  display: none;
}

.filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.filter-form input[type="text"],
.filter-form select {
  flex-grow: 1;
  /* Allow fields to grow and fill space */
  min-width: 150px;
  background-color: var(--bg-secondary);
  /* White/dark surface */
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  color: var(--text-heading);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.filter-form .btn-primary {
  flex-grow: 0;
  align-items: center;
  justify-content: center;
}

/* Document Card Styling */
.document-list {
  display: grid;
  gap: 1.5rem;
}

/* This makes the card behave like a link */
.clickable {
  display: flex;
  /* or block, depending on your card's original display property */
  text-decoration: none;
  color: inherit;
  /* Inherits text color from parent, so it doesn't turn blue */
  transition:
    transform 0.2s ease-in-out,
    box-shadow 0.2s ease-in-out;
}

/* Adds a subtle lift effect on hover to show it's clickable */
.clickable:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* Prevent the expand button on mobile from triggering the card link */
.document-card-mobile .expand-toggle {
  position: relative;
  z-index: 2;
  /* Puts the button "on top" of the card link */
}

.document-card {
  background: linear-gradient(135deg,
      var(--bg-gradient-start),
      var(--bg-gradient-end));
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  gap: 0.8rem;
  transition: box-shadow 0.2s ease;
}

.document-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .document-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border-color: var(--accent-primary);
}

.document-card-mobile {
  display: none;
}

.doc-icon {
  flex-shrink: 0;
}

.doc-icon .material-symbols-outlined {
  font-size: 2rem;
  color: var(--accent-primary);
}

.doc-details {
  flex-grow: 1;
}

.doc-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.doc-description {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  /* Limit to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.doc-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.doc-meta .material-symbols-outlined {
  font-size: 1rem;
}

/* Purchase Status Badge */
.purchase-status {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.purchase-status-completed {
  background: rgba(76, 175, 80, 0.15);
  color: #4caf50;
}

.purchase-status-pending {
  background: rgba(255, 152, 0, 0.15);
  color: #ff9800;
}

.purchase-status-failed {
  background: rgba(244, 67, 54, 0.15);
  color: #f44336;
}

.doc-actions {
  flex-shrink: 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
}

.doc-actions .file-size {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.doc-actions .btn {
  padding: 0.6rem 1rem;
}

.doc-actions .btn .material-symbols-outlined {
  font-size: 1.2rem;
}

.doc-info-bar {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 1rem;
}

/* No Results Card */
.no-results-card {
  background-color: var(--bg-primary);
  border: 2px dashed var(--border-primary);
  border-radius: 12px;
  padding: 3rem;
  text-align: center;
  color: var(--text-secondary);
}

.no-results-card .material-symbols-outlined {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.no-results-card h3 {
  color: var(--text-heading);
}

/* --- 9. PROFILE PAGE STYLES --- */

.my-uploads-section {
  margin-top: 3rem;
}

.my-uploads-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-primary);
  padding-bottom: 0.75rem;
}

/* Re-style document card actions for this page */
.my-uploads-section .doc-actions {
  flex-direction: row;
  /* Horizontal buttons */
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
}

/* New button styles for secondary/danger actions */
.btn-secondary {
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-primary);
}

.btn-secondary:hover {
  background-color: var(--bg-primary);
  color: var(--text-heading);
  text-decoration: none;
  border-color: var(--text-secondary);
}

.btn-danger {
  background-color: transparent;
  color: #dc3545;
  /* A standard danger red */
  border: 1px solid #dc3545;
}

.btn-danger:hover {
  background-color: #dc3545;
  color: #ffffff;
  text-decoration: none;
}

/* --- 10. AUTHENTICATION PAGE STYLES --- */

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

.auth-container {
  max-width: 450px;
  width: 100%;
  padding: 2rem;
}

.auth-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  margin-bottom: 2rem;
}

.auth-logo h1 {
  font-size: 1.8rem;
  color: var(--text-heading);
  margin: 0;
}

.auth-logo .material-symbols-outlined {
  font-size: 2.5rem;
  color: var(--accent-primary);
}

.auth-card {
  background: linear-gradient(135deg,
      var(--bg-gradient-start),
      var(--bg-gradient-end));
  padding: 2rem 2.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-primary);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .auth-card {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"] {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: "Inter", sans-serif;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  color: var(--text-heading);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.auth-card input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
  /* A glow effect */
}

.auth-card input::placeholder {
  color: var(--text-secondary);
}

.auth-card .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-card .form-group label {
  font-weight: 600;
  color: var(--text-heading);
}

.auth-card .form-group .form-hint {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-card .form-group .form-hint a {
  color: var(--accent-primary);
  text-decoration: none;
}

.auth-card .form-group .form-hint a:hover {
  color: var(--accent-primary-hover);
  text-decoration: underline;
}

.auth-card .form-group .form-hint a:focus {
  outline: none;
  color: var(--accent-primary-hover);
}

.auth-card .form-group .form-hint a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.auth-card .form-group .form-hint a:focus:not(:focus-visible) {
  outline: none;
}

.auth-card .form-group .form-hint a:focus:not(:focus-visible) {
  outline: none;
}

.auth-card .form-group .form-hint a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.auth-card .form-group .form-hint a:focus:not(:focus-visible) {
  outline: none;
}

.auth-card .form-group .form-hint a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.auth-card .form-group .form-hint a:focus:not(:focus-visible) {
  outline: none;
}

.auth-card .form-group .form-hint a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.auth-card .form-group .form-hint a:focus:not(:focus-visible) {
  outline: none;
}

.auth-card .form-group .form-hint a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.auth-card .form-group .form-hint a:focus:not(:focus-visible) {
  outline: none;
}

.auth-card .form-group .form-hint a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.auth-card .form-group .form-hint a:focus:not(:focus-visible) {
  outline: none;
}

.auth-card .form-group .form-hint a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.auth-card .form-group .form-hint a:focus:not(:focus-visible) {
  outline: none;
}

.auth-card .form-group .form-hint a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.auth-card .form-group .form-hint a:focus:not(:focus-visible) {
  outline: none;
}

.auth-card .form-group .form-hint a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.auth-card .form-group .form-hint a:focus:not(:focus-visible) {
  outline: none;
}

.auth-card .form-group .form-hint a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.auth-card .form-group .form-hint a:focus:not(:focus-visible) {
  outline: none;
}

.auth-card .form-group .form-hint a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.auth-card .form-group .form-hint a:focus:not(:focus-visible) {
  outline: none;
}

.auth-card .form-group .form-hint a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.auth-card .form-group .form-hint a:focus:not(:focus-visible) {
  outline: none;
}

.auth-card .form-group .form-hint a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.auth-card .form-group .form-hint a:focus:not(:focus-visible) {
  outline: none;
}

.auth-card .form-group .form-hint a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.auth-card .form-group .form-hint a:focus:not(:focus-visible) {
  outline: none;
}

.auth-card h2 {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.auth-card p {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.auth-form .btn {
  width: 100%;
  justify-content: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
  font-size: 1.1rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

/* --- PASSWORD RESET STYLES --- */

.email-simulation {
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: var(--bg-primary);
  border-radius: 8px;
  border: 1px solid var(--border-primary);
}

.email-simulation h4 {
  margin-bottom: 0.5rem;
}

.email-simulation p {
  font-size: 0.9rem;
  text-align: left;
  margin-bottom: 1rem;
}

.reset-link-box {
  width: 100%;
  padding: 0.75rem;
  font-family: monospace;
  font-size: 0.9rem;
  background-color: var(--bg-secondary);
  color: var(--text-heading);
  border: 1px solid var(--border-primary);
  border-radius: 4px;
  resize: none;
  word-break: break-all;
}

/* --- 4. FOOTER STYLES --- */

.app-footer {
  text-align: center;
  padding: 2rem 0;
  margin-top: 2rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/*
=====================================================================
  11. MOBILE RESPONSIVE STYLES (MEDIA QUERIES)
=====================================================================
*/

/* Apply these styles on screens 768px or smaller */
@media (max-width: 768px) {

  /* --- General Layout on Mobile --- */
  .main-content-wrapper {
    margin-left: 0;
    padding: 0 0.2rem;
    overflow-x: hidden;
    /* Prevent horizontal scrolling */
  }

  .main-content {
    padding: 0.5rem;
    /* Reduce padding inside main cards */
  }

  /* --- Mobile Header & Navigation --- */
  .vertical-nav {
    width: 300px;
    transform: translateX(-100%);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  }

  .vertical-nav.is-open {
    transform: translateX(0);
  }

  /* When menu is open, move the toggle button to the top-right corner */
  .vertical-nav.is-open+.main-content-wrapper .mobile-menu-toggle {
    position: fixed;
    top: 0;
    right: 0;
    padding: 1rem;
    /* Increase tap area and give some space from the edge */
  }

  .mobile-menu-toggle {
    display: flex;
    transition: transform 0.3s ease;
  }

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

  /* Hide the Desktop Card on Mobile */
  .notes-container .document-card,
  .document-list .document-card {
    display: none;
  }

  /* --- Mobile Document List View --- */
  /* Show and Style the REVISED Mobile Card */
  .document-card-mobile {
    display: flex;
    /* Use flexbox for the main layout: icon on left, details on right */
    align-items: flex-start;
    /* Align icon and text to the top */
    gap: 1rem;
    /* Space between icon and details */
    padding: 1rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    text-decoration: none;
    /* Since the whole card is a link */
    color: inherit;
  }

  /* Style the large icon on the left */
  .document-card-mobile .doc-icon .material-symbols-outlined {
    font-size: 2.5rem;
    /* ~40px */
    color: var(--accent-primary);
    /* Use a theme color */
    margin-top: -2px;
    /* Small adjustment for better visual alignment */
  }

  /* This is the main container for all the text content */
  .document-card-mobile .doc-details {
    flex: 1;
    /* Allow this section to take up the remaining space */
    display: flex;
    flex-direction: column;
    /* Stack title, meta, and info vertically */
    gap: 0.75rem;
    /* Space between the text sections */
  }

  /* Style the document title */
  .document-card-mobile .doc-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    color: var(--text-heading);
  }

  /* This styles BOTH the metadata and the info bar sections */
  .document-card-mobile .doc-meta,
  .document-card-mobile .doc-info-bar {
    display: flex;
    flex-wrap: wrap;
    /* Allows items to wrap onto a new line on very small screens */
    gap: 0.5rem 1rem;
    /* 0.5rem vertical gap, 1rem horizontal gap */
    font-size: 0.8rem;
    color: var(--text-secondary);
  }

  /* This styles each individual item (e.g., "Department", "File Size") */
  .document-card-mobile .doc-meta span,
  .document-card-mobile .doc-info-bar span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    /* Space between the small icon and its text */
  }

  /* Style the small icons within the metadata */
  .document-card-mobile .doc-meta .material-symbols-outlined,
  .document-card-mobile .doc-info-bar .material-symbols-outlined {
    font-size: 1rem;
    /* 16px */
  }

  /* Keep the download button as a small icon button */
  .doc-actions {
    flex-shrink: 0;
    display: flex;
    /* Make buttons align nicely */
    gap: 0.5rem;
  }

  .doc-actions .btn.btn-primary {
    background: none;
    padding: 0.5rem;
    border-radius: 50%;
    min-width: 0;
    color: var(--accent-primary);
  }

  .doc-actions .btn.btn-primary:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--accent-primary-hover);
  }

  [data-theme="dark"] .doc-actions .btn.btn-primary:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  .doc-actions .btn .download-text {
    display: none;
  }

  /* Hide the main filter form by default on mobile */
  .filter-form-container {
    display: none;
  }

  /* When active, show it with a nice slide-down effect */
  .filter-form-container.active {
    display: block;
    margin-top: 1rem;
    /* Add some space between button and form */
    animation: slideDown 0.5s ease-out;
  }

  /* The button to show the filters */
  #mobile-filter-toggle {
    display: flex;
    /* This makes it visible on mobile */
    width: 100%;
    justify-content: center;
  }

  /* A simple animation for the slide down effect */
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* --- Mobile Styles for Profile Page Document List --- */
  .profile-container .document-card {
    flex-direction: row;
    /* Arrange items in a row */
    flex-wrap: wrap;
    /* Allow content to wrap if needed */
    align-items: center;
    padding: 1rem;
  }

  .profile-container .doc-details {
    flex-grow: 1;
    /* Allow title to take up space */
  }

  .profile-container .doc-actions {
    flex-direction: row;
    /* Place edit/delete buttons side-by-side */
    gap: 0.75rem;
  }

  /* Hide the meta info by default on mobile to save space */
  .profile-container .doc-meta {
    display: none;
  }

  .input-with-button-container {
    display: flex;
    align-items: center;
    gap: 10px;
    /* Space between the dropdown and the button */
  }

  .input-with-button-container select {
    flex-grow: 1;
    /* Makes the select box take up available space */
  }

  .btn-add-new {
    padding: 5px 10px;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    cursor: pointer;
    white-space: nowrap;
    /* Prevents the text from wrapping */
    border-radius: 4px;
  }

  .btn-add-new:hover {
    background-color: #e0e0e0;
  }

  .add-new-container {
    display: flex;
    /* This will be toggled by JS, but we style it here */
    gap: 10px;
  }

  .add-new-container input[type="text"] {
    flex-grow: 1;
  }

  /* --- Filter Bar on Mobile --- */
  .filter-form {
    flex-direction: column;
    /* Stack filter inputs vertically */
    align-items: stretch;
    /* Make them all full width */
  }

  .filter-form input[type="text"],
  .filter-form select {
    width: 100%;
    /* Ensure inputs take full width */
  }

  .filter-buttons {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    width: 100%;
  }

  .filter-buttons .btn-primary {
    flex-grow: 1;
    /* Make the Apply Filters button take up available space */
    margin: 0;
    /* Remove any default margin */
    padding: 0 0.75rem;
    /* Increase vertical padding for better tap area */
  }

  /* Ensure both the button and the link grow to fill the space */
  .filter-buttons .btn,
  .filter-buttons .btn-clear-filters {
    flex-grow: 1;
    justify-content: center;
    /* Centers content for flex items */
    text-align: center;
    /* Good fallback for block-level links */
  }
}

/* ====================================================== */
/*  12. LOGIN PAGE STYLES                                 */
/* ====================================================== */

/* --- Main Container: Centers the card on the page --- */
.login-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 75vh;
  /* Ensures it's centered even on tall screens */
  padding: 2rem 1rem;
  width: 100%;
}

/* --- The Login Card itself --- */
.login-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 16px;
  /* Softer, more modern corners */
  padding: 2.5rem 3rem;
  max-width: 450px;
  width: 100%;
  text-align: center;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.04);

  /* A subtle fade-in animation when the page loads */
  animation: fadeIn 0.6s ease-out;
}

/* --- Dark Mode Specifics for the Card --- */
[data-theme="dark"] .login-card {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
}

/* --- Logo at the top of the card --- */
.login-logo {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.5rem auto;
  /* Center the logo and add space below */
}

/* --- Main "Welcome" Heading --- */
.login-card h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.75rem;
}

/* --- Descriptive Paragraph Text --- */
.login-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2.5rem;
  /* Creates a clear separation before the button */
}

/* --- The Google Sign-in Button (The Star of the Show) --- */
.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  /* Bolder text for the main action */
  border-radius: 8px;
  border: 1px solid var(--border-primary);
  background-color: var(--bg-secondary);
  color: var(--text-heading);
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  gap: 12px;
  /* Space between the icon and the text */
}

.btn-google:hover {
  transform: translateY(-2px);
  /* Subtle lift effect */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background-color: var(--color-surface-hover);
  border: 1px solid var(--color-border-hover);
}

[data-theme="dark"] .btn-google:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* The Google "G" logo inside the button */
.btn-google img {
  width: 20px;
  height: 20px;
}

/* --- Small footer note --- */
.login-footer-note {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.login-footer-note a {
  color: var(--accent-primary);
  text-decoration: none;
}

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

/* --- Email disclaimer (smaller print) --- */
.login-email-disclaimer {
  font-size: 0.7rem;
  color: var(--text-secondary);
  opacity: 0.7;
  margin-top: 0.75rem;
  margin-bottom: 0;
  line-height: 1.5;
}

/* --- Keyframe animation for the fade-in effect --- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Mobile Responsiveness for the Login Page --- */
@media (max-width: 768px) {
  .login-card {
    padding: 2rem 1.5rem;
    /* Reduce padding on smaller screens */
  }

  .login-card h2 {
    font-size: 1.5rem;
  }
}

/* ====================================================== */
/*  13. CHAT PAGE SPECIFIC LAYOUT                         */
/*  These styles only apply when the body has the         */
/*  .body-no-scroll class, which is added on chat.php.    */
/* ====================================================== */

/* When on the chat page, disable the main page scroll */
body.body-no-scroll {
  overflow: hidden;
}

/* Make the app container fill the screen height */
body.body-no-scroll .app-container {
  height: calc(var(--vh, 1vh) * 100);
  display: flex;
  flex-direction: column;
}

/* Make the main content area take all available vertical space */
body.body-no-scroll .main-content {
  flex-grow: 1;
  display: flex;
  /* This is key for children to fill height */
  flex-direction: column;
  padding: 0;
  /* Remove padding to allow chat window to go edge-to-edge */
}

/* Target the direct child of main-content (our .chat-page-container) */
body.body-no-scroll .main-content>.chat-page-container {
  flex-grow: 1;
  /* Allow the chat page container to fill the main content area */
}

body.body-no-scroll .chat-fab {
  display: none;
}

/* --- Floating Action Button for Chat --- */
.chat-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background-color: var(--accent-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  z-index: 1000;
}

.chat-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  color: white;
}

.chat-fab .material-symbols-outlined {
  font-size: 2rem;
}

/* ====================================================== */
/*  15. LOADING SPINNER                                   */
/* ====================================================== */

#loading-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 0;
  width: 100%;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-primary);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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



/* 17. SCROLLBAR STYLES */

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary-hover);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-primary) var(--bg-primary);
}

/* --- 18. MY LIBRARY PAGE --- */
.library-container {
  width: 100%;
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.page-header {
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-primary);
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg,
      var(--text-heading),
      var(--accent-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.library-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(10px);
}

.library-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
      var(--accent-primary),
      var(--accent-primary-hover));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.library-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--accent-border);
}

.library-card:hover::before {
  opacity: 1;
}

.library-card .card-icon {
  color: #fff;
  padding: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.library-card .card-icon::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 70%);
  transform: scale(0);
  transition: transform 0.6s ease;
}

.library-card:hover .card-icon::before {
  transform: scale(1);
}

.library-card .card-icon .material-symbols-outlined {
  font-size: 32px;
  position: relative;
  z-index: 1;
}

.library-card .card-content {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.library-card .card-content h4 {
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: var(--text-heading);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.library-card .card-content p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 2rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.library-card .card-footer {
  padding: 1.5rem 2rem;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.library-card .view-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg,
      var(--accent-primary),
      var(--accent-primary-hover));
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(228, 77, 38, 0.3);
  position: relative;
  overflow: hidden;
}

.library-card .view-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.2),
      transparent);
  transition: left 0.5s ease;
}

.library-card .view-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(228, 77, 38, 0.4);
}

.library-card .view-button:hover::before {
  left: 100%;
}

.access-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  backdrop-filter: blur(5px);
  border: 1px solid transparent;
}

.access-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: block;
}

.access-badge.free {
  background: var(--color-success-bg);
  color: var(--color-success);
  border-color: rgba(76, 175, 80, 0.2);
}

.access-badge.free::before {
  background: var(--color-success);
}

.access-badge.paid {
  background: var(--color-warning-bg);
  color: var(--color-warning);
  border-color: rgba(255, 152, 0, 0.2);
}

.access-badge.paid::before {
  background: var(--color-warning);
}

.empty-library {
  text-align: center;
  padding: 5rem 2rem;
  background: var(--bg-secondary);
  border-radius: 24px;
  border: 2px dashed var(--border-primary);
  max-width: 600px;
  margin: 3rem auto;
  position: relative;
  overflow: hidden;
}

.empty-library::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle,
      var(--accent-primary-transparent) 0%,
      transparent 70%);
  opacity: 0.3;
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(0.8);
    opacity: 0.1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.3;
  }
}

.empty-library .material-symbols-outlined {
  font-size: 80px;
  color: var(--text-secondary);
  opacity: 0.7;
  position: relative;
  z-index: 1;
}

.empty-library h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-top: 2rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.empty-library p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto 2.5rem;
  position: relative;
  z-index: 1;
}

.empty-library .browse-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg,
      var(--accent-primary),
      var(--accent-primary-hover));
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(228, 77, 38, 0.3);
  position: relative;
  z-index: 1;
}

.empty-library .browse-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 30px rgba(228, 77, 38, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
  .library-container {
    padding: 0 1rem;
    margin: 1.5rem auto;
  }

  .page-header {
    margin-bottom: 2rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .page-header p {
    font-size: 1rem;
  }

  .library-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
  }

  .library-card .card-content {
    padding: 1.5rem;
  }

  .library-card .card-footer {
    padding: 1.25rem 1.5rem;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .library-card .view-button {
    justify-content: center;
  }

  .empty-library {
    padding: 3rem 1.5rem;
    margin: 2rem auto;
  }

  .empty-library h2 {
    font-size: 1.75rem;
  }
}

/* --- Styles for the Notes Filter Bar --- */

.document-card-mobile {
  overflow-x: hidden;
}

.doc-details {
  word-wrap: break-word;
}

@media (max-width: 768px) {
  .notes-container .document-card {
    display: none;
  }

  /* ==========================================
     PROFILE PAGE MOBILE FIXES
     ========================================== */

  /* Profile container - prevent horizontal overflow */
  .profile-container {
    overflow-x: hidden;
    max-width: 100%;
  }

  /* Stat cards - compact vertical on mobile */
  .profile-container .stat-cards-container {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem !important;
    overflow-x: visible !important;
    padding-bottom: 0 !important;
    margin-bottom: 1rem !important;
  }

  .profile-container .stat-card {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
    padding: 0.5rem !important;
    gap: 0.25rem !important;
  }

  .profile-container .stat-card .material-symbols-outlined {
    font-size: 1.25rem !important;
    padding: 0.4rem !important;
  }

  .profile-container .stat-info .stat-number {
    font-size: 1rem;
  }

  .profile-container .stat-info .stat-label {
    font-size: 0.6rem;
    line-height: 1.2;
  }

  /* Action cards - smaller on mobile */
  .profile-container .action-cards-container {
    grid-template-columns: 1fr;
  }

  .profile-container .action-card {
    padding: 1rem;
  }

  .profile-container .action-card .material-symbols-outlined {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }

  .profile-container .action-card h3 {
    font-size: 1rem;
  }

  .profile-container .action-card p {
    font-size: 0.8rem;
  }

  /* Document cards - horizontal, no overflow */
  .profile-container .document-card,
  .my-uploads-section .document-card {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    overflow: hidden;
  }

  .profile-container .doc-icon,
  .my-uploads-section .doc-icon {
    flex-shrink: 0;
  }

  .profile-container .doc-icon .material-symbols-outlined,
  .my-uploads-section .doc-icon .material-symbols-outlined {
    font-size: 1.25rem;
  }

  .profile-container .doc-details,
  .my-uploads-section .doc-details {
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }

  .profile-container .doc-title,
  .my-uploads-section .doc-title {
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0;
  }

  .profile-container .doc-meta,
  .my-uploads-section .doc-meta {
    display: none !important;
  }

  .profile-container .doc-actions,
  .my-uploads-section .doc-actions {
    display: flex;
    flex-direction: row;
    gap: 0.25rem;
    flex-shrink: 0;
  }

  .profile-container .doc-actions .btn,
  .my-uploads-section .doc-actions .btn {
    padding: 0.35rem;
    min-width: auto;
  }

  .profile-container .doc-actions .btn .material-symbols-outlined,
  .my-uploads-section .doc-actions .btn .material-symbols-outlined {
    font-size: 1rem;
  }

  /* Page header - smaller text */
  .profile-container .page-header h1 {
    font-size: 1.25rem;
  }

  .profile-container .page-header p {
    font-size: 0.8rem;
  }

  .my-uploads-section h2 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .my-uploads-section {
    margin-top: 1rem;
  }
}

@media (min-width: 769px) {
  .document-card-mobile {
    display: none;
  }
}

.filter-form {
  display: flex;
  flex-wrap: wrap;
  /* Allows rows to stack on smaller screens */
  gap: 1rem;
  /* Adds space between rows */
}

.filter-row {
  display: flex;
  flex-grow: 1;
  /* Allows the row to grow */
  gap: 1rem;
  /* Adds space between items in a row */
}

.filter-row.full-width {
  width: 100%;
  /* Makes the container take the full width */
}

/* This targets the Choices.js container that will be created */
.filter-row.full-width .choices {
  width: 100%;
}

.filter-row.multi-column {
  flex-wrap: wrap;
  /* Allows filter items to wrap on smaller screens */
}

.filter-row.multi-column>* {
  flex: 1 1 180px;
  /* Allows items to grow, but have a base width */
}

/* Ensure filter buttons align nicely */
.filter-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Make filter button match clear button size */
.filter-buttons .btn.btn-primary {
  padding: 0.6rem 1.8rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ============================================
   CLEAN SIDEBAR — OneSignal-inspired
   ============================================ */

/* Variables */
:root {
  --sidebar-collapsed-w: 64px;
  --sidebar-expanded-w: 240px;
}

/* Sidebar Container — collapsed by default */
.vertical-nav {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: var(--sidebar-collapsed-w);
  background: var(--bg-secondary, #1e293b);
  border-right: 1px solid var(--border-primary, rgba(148, 163, 184, 0.12));
  z-index: 1000;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}

/* Light theme adjustments */
[data-theme="light"] .vertical-nav {
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
}

/* Expand on hover */
.vertical-nav:hover,
.vertical-nav.expanded {
  width: var(--sidebar-expanded-w);
}

/* Remove scrollbar from sidebar */
.vertical-nav::-webkit-scrollbar {
  display: none;
}

.vertical-nav {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Loading state */
.vertical-nav.sidebar-loading {
  opacity: 0;
  pointer-events: none;
}

/* Logo / Branding */
.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border-primary, rgba(148, 163, 184, 0.12));
  min-height: 56px;
  flex-shrink: 0;
  overflow: hidden;
  white-space: nowrap;
}

[data-theme="light"] .logo-container {
  border-bottom: 1px solid #e5e7eb;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  overflow: hidden;
  white-space: nowrap;
}

.logo {
  height: 28px;
  width: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.app-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-heading);
  opacity: 0;
  transition: opacity 0.2s ease 0.05s;
  white-space: nowrap;
}

.vertical-nav:hover .app-name,
.vertical-nav.expanded .app-name {
  opacity: 1;
}

/* User profile card */
.sidebar-user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-primary, rgba(148, 163, 184, 0.12));
  flex-shrink: 0;
  overflow: hidden;
  white-space: nowrap;
  margin: 0;
  background: transparent;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  flex-direction: row;
}

[data-theme="light"] .sidebar-user-profile {
  border-bottom: 1px solid #e5e7eb;
  background: transparent;
}

.user-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-primary);
  box-shadow: none;
  transition: none;
}

.user-avatar:hover {
  transform: none;
  box-shadow: none;
}

.user-avatar-placeholder {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: 50%;
}

.user-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border: 2px solid var(--bg-secondary, #1e293b);
  border-radius: 50%;
}

[data-theme="light"] .user-status-dot {
  border-color: #fff;
}

.user-info {
  opacity: 0;
  transition: opacity 0.2s ease 0.05s;
  overflow: hidden;
  white-space: nowrap;
  text-align: left;
  min-width: 0;
  width: auto;
}

.vertical-nav:hover .user-info,
.vertical-nav.expanded .user-info {
  opacity: 1;
}

.user-name {
  display: block;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hide quick actions in collapsed, show on hover */
.user-quick-actions {
  display: none;
}

.vertical-nav:hover .user-quick-actions,
.vertical-nav.expanded .user-quick-actions {
  display: flex;
  gap: 0.35rem;
  margin-left: auto;
  flex-shrink: 0;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  border-radius: 6px;
  background: transparent;
  border: 1px solid var(--border-primary, rgba(148, 163, 184, 0.15));
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  flex-direction: row;
}

.quick-action-btn:hover {
  background: rgba(59, 130, 246, 0.08);
  color: var(--text-heading);
}

[data-theme="light"] .quick-action-btn {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .quick-action-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

.quick-action-btn .material-symbols-outlined {
  font-size: 1rem;
}

.quick-action-btn .action-label {
  display: none;
}

.quick-action-btn.quick-action-upload {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

.quick-action-btn.quick-action-upload:hover {
  background: var(--accent-primary-hover);
  border-color: var(--accent-primary-hover);
  color: #fff;
}

/* Main navigation */
.main-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.5rem 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.main-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 0.5rem;
}

/* Section titles */
.nav-section {
  margin-bottom: 0.25rem;
}

.nav-section-title {
  display: block;
  padding: 0.5rem 0.5rem 0.25rem;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.2s ease 0.05s;
}

.vertical-nav:hover .nav-section-title,
.vertical-nav.expanded .nav-section-title {
  opacity: 0.6;
}

/* Nav links */
.main-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 6px;
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.82rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}

.main-nav a .material-symbols-outlined {
  font-size: 20px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

/* Collapsed: hide text, show only icons */
.vertical-nav:not(:hover):not(.expanded) .main-nav a {
  justify-content: center;
  padding: 0.5rem;
  font-size: 0;
  /* hides bare text nodes */
  gap: 0;
}

.vertical-nav:not(:hover):not(.expanded) .main-nav a .material-symbols-outlined {
  font-size: 20px;
  /* restore icon size */
}

/* Collapsed: hide section titles completely */
.vertical-nav:not(:hover):not(.expanded) .nav-section-title {
  display: none;
}

/* Collapsed: hide user profile text and quick actions */
.vertical-nav:not(:hover):not(.expanded) .sidebar-user-profile {
  justify-content: center;
  padding: 0.75rem 0.5rem;
}

.vertical-nav:not(:hover):not(.expanded) .user-info,
.vertical-nav:not(:hover):not(.expanded) .user-quick-actions {
  display: none;
}

/* Collapsed: hide logo text */
.vertical-nav:not(:hover):not(.expanded) .logo-container {
  justify-content: center;
  padding: 1rem 0.5rem;
}

.vertical-nav:not(:hover):not(.expanded) .app-name {
  display: none;
}

/* Hover item */
.main-nav a:hover {
  background: rgba(59, 130, 246, 0.08);
  color: var(--text-heading);
}

[data-theme="light"] .main-nav a:hover {
  background: rgba(59, 130, 246, 0.06);
}

/* Active item */
.main-nav li.active a {
  background: var(--accent-primary);
  color: #fff;
  font-weight: 600;
}

.main-nav li.active a .material-symbols-outlined {
  color: #fff;
}

[data-theme="light"] .main-nav li.active a {
  background: var(--accent-primary);
  color: #fff;
}

/* Nav badges */
.nav-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-badge-new {
  background: #10b981;
  color: white;
}

/* Hide badges when collapsed */
.vertical-nav:not(:hover):not(.expanded) .nav-badge {
  display: none;
}

/* Nav dividers */
.main-nav .nav-divider {
  margin: 0.5rem 0;
}

.main-nav .nav-divider hr {
  border: none;
  border-top: 1px solid var(--border-primary);
}

/* Footer section */
.nav-section-footer {
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-primary);
}

.nav-section-footer a {
  font-size: 0.78rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

.nav-section-footer a:hover {
  opacity: 1;
  color: var(--accent-primary);
}

.nav-section-footer .external-link-icon {
  font-size: 0.78rem;
  margin-left: auto;
  opacity: 0.5;
}

/* Collapsed: hide footer text */
.vertical-nav:not(:hover):not(.expanded) .nav-section-footer a>*:not(.material-symbols-outlined) {
  display: none;
}

.vertical-nav:not(:hover):not(.expanded) .nav-section-footer a {
  justify-content: center;
}

/* Main content margin */
.main-content-wrapper {
  margin-left: var(--sidebar-collapsed-w);
  transition: margin-left 0.25s cubic-bezier(.4, 0, .2, 1);
}

.vertical-nav:hover~.main-content-wrapper,
.vertical-nav.expanded~.main-content-wrapper {
  margin-left: var(--sidebar-expanded-w);
}

/* Tooltips for collapsed icons */
.vertical-nav:not(:hover):not(.expanded) .main-nav a::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
  border: 1px solid var(--border-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  z-index: 9999;
  pointer-events: none;
}

.vertical-nav:not(:hover):not(.expanded) .main-nav a:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Toggle button — hidden entirely */
.sidebar-toggle,
#sidebar-toggle {
  display: none !important;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .vertical-nav {
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(.4, 0, .2, 1);
  }

  .vertical-nav.is-open,
  .vertical-nav.active {
    transform: translateX(0);
  }

  /* Show text on mobile */
  /* Show text on mobile */
  .vertical-nav .app-name,
  .vertical-nav .app-name-link,
  .vertical-nav .user-info,
  .vertical-nav .nav-section-title {
    opacity: 1 !important;
    display: block !important;
  }

  .vertical-nav .logo-text-col {
    display: flex !important;
    opacity: 1 !important;
    align-items: flex-start !important;
    padding-left: 0 !important;
  }

  /* Force logo container alignment */
  .vertical-nav .logo-container {
    justify-content: flex-start !important;
    padding-left: 1rem !important;
  }

  .vertical-nav .sidebar-login-text {
    display: block !important;
  }

  /* Mobile sidebar profile: clean two-row layout */
  .vertical-nav .sidebar-user-profile {
    flex-wrap: wrap;
    padding: 1rem !important;
    gap: 0.5rem !important;
    justify-content: flex-start !important;
  }

  .vertical-nav .user-quick-actions {
    display: flex !important;
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    gap: 0.5rem;
  }

  .vertical-nav .main-nav a {
    justify-content: flex-start !important;
    font-size: 0.82rem !important;
    gap: 0.75rem !important;
  }

  .vertical-nav.is-open::after,
  .vertical-nav.active::after {
    content: "";
    position: fixed;
    top: 0;
    left: 260px;
    width: calc(100vw - 260px);
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: -1;
  }

  .main-content-wrapper {
    margin-left: 0 !important;
  }

  .sidebar-toggle,
  #sidebar-toggle {
    display: none !important;
  }

  .mobile-menu-toggle,
  #mobile-menu-toggle {
    display: flex !important;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10001;
    background: var(--bg-primary, #fff);
    border: none;
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }

  .mobile-menu-toggle .material-symbols-outlined {
    font-size: 24px;
  }

  .vertical-nav .main-nav {
    padding-bottom: 90px;
  }
}

/* Desktop: hide mobile hamburger */
@media (min-width: 769px) {

  .mobile-menu-toggle,
  #mobile-menu-toggle {
    display: none !important;
  }
}

/* ==========================================================================
   AI HUB PAGE STYLES
   ========================================================================== */

.ai-hub-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.ai-hub-card-link {
  text-decoration: none;
  color: inherit;
  /* Inherit text color from body */
  display: block;
  /* Make the anchor tag a block element */
}

.ai-hub-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  transition:
    transform 0.2s ease-in-out,
    box-shadow 0.2s ease-in-out;
}

.ai-hub-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px var(--shadow-color);
}

.ai-hub-card .card-icon {
  background-color: var(--accent-primary-transparent);
  color: var(--accent-primary);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.ai-hub-card .card-icon .material-symbols-outlined {
  font-size: 32px;
}

.ai-hub-card h2 {
  font-size: 1.5rem;
  color: var(--text-heading);
  margin-bottom: 0.75rem;
}

.ai-hub-card p {
  font-size: 1rem;
  color: var(--text-secondary);
  flex-grow: 1;
  /* Pushes the button to the bottom */
  margin-bottom: 1.5rem;
}

.ai-hub-card .button {
  margin-top: auto;
  /* Aligns button to the bottom */
  width: 80%;
  padding: 0.75rem 1rem;
}

/* Styles for the disabled "Coming Soon" card */
.ai-hub-card.coming-soon {
  opacity: 0.6;
  cursor: not-allowed;
}

.ai-hub-card.coming-soon:hover {
  transform: none;
  /* Disable hover effect */
  box-shadow: none;
}

.button-disabled {
  background-color: var(--bg-tertiary);
  color: var(--text-disabled);
  cursor: not-allowed;
  border: 1px solid var(--border-primary);
}

/* ===================================================== */
/*  19. PRICING PAGE STYLES - MODERN UPDATE              */
/* ===================================================== */

/* Page Header */
.page-header {
  text-align: center;
  margin-bottom: 3rem;
  animation: fadeInDown 0.6s ease;
}

.page-header h1 {
  font-size: 2.5rem;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.page-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* Premium Benefits Section */
.benefits-section {
  background: linear-gradient(135deg,
      var(--bg-secondary) 0%,
      var(--bg-tertiary) 100%);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 3rem;
  border: 1px solid var(--border-primary);
  animation: fadeIn 0.8s ease;
}

.benefits-title {
  text-align: center;
  font-size: 1.8rem;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.benefits-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1rem;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  animation: slideInUp 0.6s ease backwards;
}

.benefit-item:nth-child(1) {
  animation-delay: 0.1s;
}

.benefit-item:nth-child(2) {
  animation-delay: 0.2s;
}

.benefit-item:nth-child(3) {
  animation-delay: 0.3s;
}

.benefit-item:nth-child(4) {
  animation-delay: 0.4s;
}

.benefit-icon {
  width: 48px;
  height: 48px;
  background: rgba(228, 77, 38, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.benefit-content h3 {
  font-size: 1.1rem;
  color: var(--text-heading);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.benefit-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Pricing Container */
.pricing-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Pricing Card */
.pricing-card {
  background-color: var(--bg-secondary);
  border: 2px solid var(--border-primary);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: scaleIn 0.5s ease backwards;
  overflow: hidden;
}

.pricing-card:nth-child(1) {
  animation-delay: 0.2s;
}

.pricing-card:nth-child(2) {
  animation-delay: 0.3s;
}

.pricing-card:nth-child(3) {
  animation-delay: 0.4s;
}

.pricing-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg,
      var(--accent-primary),
      var(--accent-primary-hover));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pricing-card:hover::before {
  opacity: 1;
}

.pricing-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--accent-primary);
  box-shadow: 0 20px 60px var(--accent-glow);
}

.pricing-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.pricing-card .price {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-heading);
  margin: 1.5rem 0;
  line-height: 1;
}

.pricing-card .price::before {
  content: "KSH ";
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-primary);
  vertical-align: super;
}

.pricing-card .description {
  color: var(--text-secondary);
  flex-grow: 1;
  margin: 1.5rem 0;
  line-height: 1.6;
}

.pricing-card .button {
  margin-top: 1.5rem;
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(135deg,
      var(--accent-primary),
      var(--accent-primary-hover));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.pricing-card .button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.pricing-card .button:hover::before {
  width: 300px;
  height: 300px;
}

.pricing-card .button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--accent-glow);
}

.pricing-card .button:active {
  transform: translateY(0);
}

/* Spinner Container */
.spinner-container {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 0;
}

.spinner-container .spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--spinner-base);
  border-top-color: var(--spinner-top);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay:not(.hidden) {
  opacity: 1;
}

/* Modal Content */
.modal-content {
  background-color: var(--bg-secondary);
  border: 2px solid var(--border-primary);
  padding: 2.5rem;
  border-radius: 24px;
  width: 90%;
  max-width: 450px;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 60px var(--shadow-strong-color);
}

.modal-overlay:not(.hidden) .modal-content {
  transform: scale(1);
}

.modal-content h2 {
  font-size: 1.8rem;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
  text-align: center;
}

.modal-content>p {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  background: var(--accent-primary);
  color: white;
  transform: rotate(90deg);
}

/* Form Group */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-heading);
}

.form-group input {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--border-primary);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(228, 77, 38, 0.1);
}

.form-group small {
  display: block;
  margin-top: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Modal Feedback */
.modal-feedback {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  text-align: center;
  font-weight: 500;
}

.modal-feedback.error {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid var(--color-danger);
}

.modal-feedback.success {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid var(--color-success);
}

/* Confirm Payment Button */
#confirm-payment-btn {
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(135deg,
      var(--accent-primary),
      var(--accent-primary-hover));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

#confirm-payment-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--accent-glow);
}

#confirm-payment-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Small Spinner */
.spinner-small {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Hidden Class */
.hidden {
  display: none !important;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .page-header h1 {
    font-size: 2rem;
  }

  .benefits-section {
    padding: 1.5rem;
  }

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

  .pricing-container {
    grid-template-columns: 1fr;
  }

  .pricing-card .price {
    font-size: 2.5rem;
  }

  .modal-content {
    padding: 2rem 1.5rem;
  }
}

/* Prevent flicker during load */
.vertical-nav.sidebar-loading {
  transition: none !important;
}

@media (max-width: 768px) {
  .vertical-nav.sidebar-loading {
    transform: translateX(-100%) !important;
  }
}

@media (max-width: 768px) {
  .vertical-nav {
    width: 280px !important;
    transform: translateX(-100%);
    transition: transform 0.3s ease !important;
  }

  .vertical-nav.is-open {
    transform: translateX(0) !important;
  }

  /* Make sure the nav content is visible */
  .vertical-nav .main-nav {
    overflow-y: auto !important;
    overflow-x: visible !important;
    height: auto !important;
    max-height: calc(100vh - 120px) !important;
  }
}

/* ==========================================================================
   GLOBAL SEARCH STYLES
   ========================================================================== */
/* --- Search Button in Header --- */
.header-search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-secondary);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  font-size: 0.9rem;
}

.header-search-btn:hover {
  background-color: var(--element-bg-hover);
  border-color: var(--border-primary);
  color: var(--text-primary);
}

.header-search-btn .search-shortcut {
  font-size: 0.75rem;
  font-family: monospace;
  background-color: var(--bg-tertiary);
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid var(--border-primary);
}

/* Hide keyboard shortcut on mobile */
@media (max-width: 768px) {
  .header-search-btn .search-shortcut {
    display: none;
  }
}

/* --- Search Dialog --- */
body.search-dialog-open {
  overflow: hidden;
}

.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.search-dialog {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  width: 90%;
  max-width: 650px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  box-shadow: 0 10px 30px var(--shadow-strong-color);
  z-index: 1001;
  display: none;
  flex-direction: column;
  opacity: 0;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-secondary);
}

.search-icon-input {
  color: var(--text-secondary);
  margin-right: 12px;
  font-size: 1.2rem;
}

#search-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 1rem;
}

#search-input::placeholder {
  color: var(--text-secondary);
}

.search-results-container {
  max-height: 420px;
  overflow-y: auto;
  padding: 12px;
}

.search-results-group {
  margin-bottom: 20px;
}

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

.search-group-header {
  margin-bottom: 8px;
  padding: 0 8px;
}

.search-group-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-group-title i {
  font-size: 0.85rem;
}

.result-count {
  background-color: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  margin-left: auto;
}

.search-group-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-result-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  text-decoration: none;
  color: var(--text-primary);
  gap: 12px;
  position: relative;
}

.search-result-item:hover {
  background-color: var(--element-bg-hover);
}

.search-item-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.3rem;
  background-color: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-secondary);
}

.search-item-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.search-item-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.search-item-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-heading);
  line-height: 1.3;
}

.search-item-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.search-item-arrow {
  color: var(--text-secondary);
  font-size: 0.85rem;
  opacity: 0;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}

.search-result-item:hover .search-item-arrow {
  opacity: 1;
  transform: translateX(2px);
}

.search-no-results {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.search-no-results p {
  margin: 0;
}

.search-footer {
  padding: 10px 20px;
  border-top: 1px solid var(--border-secondary);
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   QUICK NAVIGATION TABS
   ========================================================================== */

/* Mobile quick nav slot - outside the content card */
#mobile-quick-nav-slot {
  padding: 0 2rem;
}

/* Quick Nav Wrapper with Scroll Indicator */
.quick-nav-wrapper {
  display: none;
  /* Hidden on desktop */
}

@media (max-width: 768px) {
  .quick-nav-wrapper {
    display: flex;
    position: relative;
    align-items: center;
    padding: 0 0.5rem;
  }

  .quick-nav-scroll-indicator {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    background: linear-gradient(to left, var(--bg-primary) 70%, transparent);
    color: var(--accent-primary);
    animation: pulse-right 1.5s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
  }

  .quick-nav-scroll-indicator .material-symbols-outlined {
    font-size: 1.25rem;
  }

  @keyframes pulse-right {

    0%,
    100% {
      transform: translateX(0);
      opacity: 1;
    }

    50% {
      transform: translateX(4px);
      opacity: 0.7;
    }
  }
}

.quick-nav-tabs {
  display: none;
  /* Hidden on desktop by default */
  gap: 0.5rem;
  padding: 0.25rem 0;
  margin-bottom: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .quick-nav-tabs {
    display: flex;
    /* Show only on mobile */
  }
}

.quick-nav-tabs::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

.quick-nav-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 50px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.quick-nav-tab .material-symbols-outlined {
  font-size: 1.25rem;
}

.quick-nav-tab:hover {
  background: var(--element-bg-hover);
  color: var(--text-heading);
  border-color: var(--border-secondary);
  transform: translateY(-2px);
}

.quick-nav-tab.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(228, 77, 38, 0.3);
}

.quick-nav-tab.active .material-symbols-outlined {
  color: #ffffff;
}

/* Mobile adjustments for tabs */
@media (max-width: 768px) {
  .quick-nav-tab {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }

  .quick-nav-tab .material-symbols-outlined {
    font-size: 1.1rem;
  }
}

/* ============================================
   MOBILE BOTTOM NAVIGATION
   ============================================ */
.mobile-bottom-nav {
  display: none;
  /* Hidden on desktop */
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--glass-bg, rgba(26, 26, 26, 0.85));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    padding: 0.5rem 0;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
    align-items: center;
    transition: transform 0.3s ease;
  }

  .mobile-bottom-nav.hidden {
    transform: translateY(100%);
  }

  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 12px;
  }

  .bottom-nav-item .material-symbols-outlined {
    font-size: 1.5rem;
    transition: all 0.2s ease;
  }

  .bottom-nav-item:hover,
  .bottom-nav-item:focus {
    color: var(--text-heading);
    background: var(--accent-primary-transparent, rgba(228, 77, 38, 0.1));
  }

  .bottom-nav-item.active {
    color: var(--accent-primary);
  }

  .bottom-nav-item.active .material-symbols-outlined {
    font-variation-settings: "FILL" 1;
  }

  /* Hide chat FAB on mobile - replaced by bottom nav */
  .chat-fab {
    display: none !important;
  }

  /* Add padding to main content so it doesn't get hidden behind bottom nav */
  .main-content {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  }
}

/* ============================================
   MARKETPLACE STYLES
   ============================================ */

/* Hero Section */
.mp-hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 50%, #1a2d4a 100%);
  border-radius: 16px;
  padding: 3rem 2rem;
  margin-bottom: 2rem;
  color: white;
  text-align: center;
}

.mp-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.mp-hero-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.mp-hero-content h1 .gradient-text {
  background: linear-gradient(to right, #fff, #ffd700);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mp-hero-content p {
  font-size: 1.1rem;
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.mp-hero-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

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

.mp-stat-number {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
}

.mp-stat-label {
  font-size: 0.85rem;
  opacity: 0.85;
}

.mp-stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.3);
}

/* Categories Section */
.mp-categories-section {
  margin-bottom: 2.5rem;
}

.mp-categories-section .section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-heading);
}

.mp-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.mp-category-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  position: relative;
}

.mp-category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow-color);
  border-color: var(--category-color, var(--accent-primary));
}

.mp-category-icon {
  width: 56px;
  height: 56px;
  background: var(--category-color, var(--accent-primary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.mp-category-icon .material-symbols-outlined {
  font-size: 1.75rem;
  color: white;
}

.mp-category-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-heading);
}

.mp-category-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex-grow: 1;
}

.mp-category-arrow {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.mp-category-card:hover .mp-category-arrow {
  background: var(--category-color, var(--accent-primary));
  color: white;
}

/* Trust Section */
.mp-trust-section {
  margin-bottom: 2.5rem;
}

.mp-trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.mp-trust-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-primary);
}

.mp-trust-item .material-symbols-outlined {
  font-size: 1.5rem;
  color: var(--accent-primary);
}

.mp-trust-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-heading);
}

.mp-trust-item p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Featured Services Section */
.mp-featured-section {
  margin-bottom: 2.5rem;
}

.mp-featured-section .section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-heading);
}

.mp-featured-section .section-title .material-symbols-outlined {
  color: #ffc107;
}

.mp-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.mp-service-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.mp-service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow-color);
  border-color: var(--accent-primary);
}

.mp-service-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  margin-bottom: 1rem;
  width: fit-content;
}

.mp-service-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-heading);
}

.mp-service-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex-grow: 1;
  margin-bottom: 1rem;
}

.mp-service-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-primary);
}

.mp-service-price {
  display: flex;
  flex-direction: column;
}

.mp-price-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.mp-price-amount {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.mp-service-time {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.mp-service-time .material-symbols-outlined {
  font-size: 1rem;
}

/* Category Services Section */
.mp-category-section {
  margin-bottom: 2.5rem;
}

.mp-category-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--category-color, var(--accent-primary));
}

.mp-category-header .material-symbols-outlined {
  font-size: 1.5rem;
  color: var(--category-color, var(--accent-primary));
}

.mp-category-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0;
}

.mp-services-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mp-service-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.mp-service-row:hover {
  background: var(--element-bg-hover);
  border-color: var(--accent-primary);
}

.mp-service-info h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-heading);
}

.mp-service-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.mp-service-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mp-service-price-compact {
  text-align: right;
}

.mp-price-small {
  display: block;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.mp-price-main {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.mp-service-chevron {
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.mp-service-row:hover .mp-service-chevron {
  transform: translateX(4px);
  color: var(--accent-primary);
}

/* Bundle Section */
.mp-bundles-section {
  margin-bottom: 2.5rem;
}

.mp-bundles-section .section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-heading);
}

.mp-bundles-section .section-title .material-symbols-outlined {
  color: var(--accent-primary);
}

.mp-bundles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.mp-bundle-card {
  position: relative;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 16px;
  text-align: center;
}

.mp-bundle-card.mp-bundle-popular {
  border: 2px solid var(--accent-primary);
  box-shadow: 0 0 20px var(--accent-glow);
}

.mp-bundle-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-primary);
  color: white;
  padding: 0.25rem 1rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.mp-bundle-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-heading);
}

.mp-bundle-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.mp-bundle-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  text-align: left;
}

.mp-bundle-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.mp-bundle-list .material-symbols-outlined {
  font-size: 1.1rem;
  color: #10b981;
}

.mp-bundle-pricing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.mp-bundle-original {
  font-size: 1rem;
  color: var(--text-secondary);
  text-decoration: line-through;
}

.mp-bundle-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.mp-bundle-btn {
  width: 100%;
}

/* CTA Section */
.mp-cta-section {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border-primary);
}

.mp-cta-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-heading);
}

.mp-cta-content p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.mp-cta-content .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Service Detail Page */
.mp-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.mp-breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}

.mp-breadcrumb a:hover {
  color: var(--accent-primary);
}

.mp-breadcrumb .material-symbols-outlined {
  font-size: 1rem;
  color: var(--text-secondary);
}

.mp-breadcrumb .current {
  color: var(--text-primary);
  font-weight: 500;
}

.mp-service-detail {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 2rem;
  align-items: start;
}

.mp-service-main {
  padding: 2rem;
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border-primary);
}

.mp-service-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  color: white;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.mp-service-category-badge .material-symbols-outlined {
  font-size: 1rem;
}

.mp-service-main h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-heading);
}

.mp-service-description {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.mp-whats-included {
  margin-bottom: 2rem;
}

.mp-whats-included h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-heading);
}

.mp-whats-included h3 .material-symbols-outlined {
  color: #10b981;
}

.mp-included-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mp-included-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border-radius: 8px;
}

.mp-included-item .material-symbols-outlined {
  font-size: 1.25rem;
  color: #10b981;
}

.mp-trust-badges {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.mp-trust-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border-radius: 2rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.mp-trust-badge .material-symbols-outlined {
  font-size: 1rem;
  color: var(--accent-primary);
}

/* Pricing Sidebar */
.mp-service-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 100px;
}

.mp-pricing-card {
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border-primary);
}

/* Subscriber Discount Badge */
.mp-subscriber-discount-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 8px;
  margin-bottom: 1rem;
  animation: pulse-badge 2s ease-in-out infinite;
}

.mp-subscriber-discount-badge .material-symbols-outlined {
  font-size: 1rem;
}

/* Original price strikethrough */
.mp-original-price {
  text-decoration: line-through;
  color: var(--text-secondary);
  opacity: 0.7;
  margin-right: 0.5rem;
  font-size: 0.9em;
}

/* Order summary discount line */
.mp-summary-discount {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #059669;
  margin: 0.5rem 0;
}

.mp-discount-amount {
  font-weight: 600;
}

.mp-pricing-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-heading);
}

.mp-pricing-option {
  display: block;
  cursor: pointer;
  margin-bottom: 0.75rem;
}

.mp-pricing-option input {
  display: none;
}

.mp-pricing-option-content {
  padding: 1rem;
  border: 2px solid var(--border-primary);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.mp-pricing-option input:checked+.mp-pricing-option-content {
  border-color: var(--accent-primary);
  background: var(--accent-primary-transparent);
}

.mp-pricing-option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.mp-option-title {
  font-weight: 600;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.mp-option-title .material-symbols-outlined {
  font-size: 1rem;
  color: #ffc107;
}

.mp-option-time {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.mp-option-time .material-symbols-outlined {
  font-size: 0.9rem;
}

.mp-option-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.mp-order-btn {
  width: 100%;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.mp-secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.mp-secure-note .material-symbols-outlined {
  font-size: 0.9rem;
}

/* How It Works */
.mp-how-it-works {
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border-primary);
}

.mp-how-it-works h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-heading);
}

.mp-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.mp-step:last-child {
  margin-bottom: 0;
}

.mp-step-number {
  width: 28px;
  height: 28px;
  background: var(--accent-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
}

.mp-step strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text-heading);
}

.mp-step p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Related Services */
.mp-related-section {
  margin-top: 3rem;
}

.mp-related-section h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-heading);
}

.mp-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Request Form Page */
.mp-request-page {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 2rem;
  align-items: start;
}

.mp-request-main {
  padding: 2rem;
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border-primary);
}

.mp-request-main h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-heading);
}

.mp-error-alert {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--color-danger-bg);
  border: 1px solid var(--color-danger);
  border-radius: 8px;
  color: var(--color-danger);
  margin-bottom: 1.5rem;
}

.mp-order-summary-card {
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.mp-order-summary-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-heading);
}

.mp-order-summary-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

.mp-form-section {
  margin-bottom: 1.5rem;
}

.mp-form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-heading);
}

.mp-required {
  color: var(--color-danger);
}

.mp-optional {
  font-weight: 400;
  color: var(--text-secondary);
}

.mp-speed-option {
  display: block;
  cursor: pointer;
  margin-bottom: 0.75rem;
}

.mp-speed-option input {
  display: none;
}

.mp-speed-content {
  padding: 1rem;
  border: 2px solid var(--border-primary);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.mp-speed-option input:checked+.mp-speed-content {
  border-color: var(--accent-primary);
  background: var(--accent-primary-transparent);
}

.mp-speed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.mp-speed-title {
  font-weight: 600;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.mp-speed-title .material-symbols-outlined {
  font-size: 1rem;
  color: #ffc107;
}

.mp-speed-time {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.mp-speed-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.mp-phone-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  overflow: hidden;
}

.mp-phone-prefix {
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  font-weight: 500;
  color: var(--text-secondary);
}

.mp-phone-input input {
  flex: 1;
  padding: 0.75rem;
  border: none;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.mp-phone-input input:focus {
  outline: none;
}

.mp-form-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.mp-request-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  background: var(--bg-primary);
  color: var(--text-primary);
  resize: vertical;
}

.mp-submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  padding: 1rem;
}

.mp-form-disclaimer {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 1rem;
}

/* Request Sidebar */
.mp-request-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mp-summary-card {
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border-primary);
}

.mp-summary-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-heading);
}

.mp-summary-service {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.mp-summary-price {
  color: var(--text-secondary);
}

.mp-summary-card hr {
  border: none;
  border-top: 1px solid var(--border-primary);
  margin: 1rem 0;
}

.mp-summary-total {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-heading);
}

.mp-guarantee-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--color-success-bg);
  border-radius: 12px;
}

.mp-guarantee-card .material-symbols-outlined {
  font-size: 1.5rem;
  color: #10b981;
}

.mp-guarantee-card strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text-heading);
}

.mp-guarantee-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Success Page */
.mp-request-success {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border-primary);
  max-width: 600px;
  margin: 0 auto;
}

.mp-success-icon {
  margin-bottom: 1.5rem;
}

.mp-success-icon .material-symbols-outlined {
  font-size: 4rem;
  color: #10b981;
}

.mp-request-success h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-heading);
}

.mp-request-success>p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.mp-success-details {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.mp-success-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mp-success-item .material-symbols-outlined {
  font-size: 1.5rem;
  color: var(--accent-primary);
}

.mp-success-item strong {
  display: block;
  font-size: 1.1rem;
  color: var(--text-heading);
}

.mp-success-item span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.mp-success-next {
  text-align: left;
  padding: 1.5rem;
  background: var(--bg-tertiary);
  border-radius: 12px;
  margin-bottom: 2rem;
}

.mp-success-next h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-heading);
}

.mp-success-next ol {
  padding-left: 1.5rem;
  margin: 0;
}

.mp-success-next li {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.mp-success-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .mp-hero {
    padding: 2rem 1.5rem;
  }

  .mp-hero-content h1 {
    font-size: 1.75rem;
  }

  .mp-hero-stats {
    gap: 1rem;
  }

  .mp-stat-number {
    font-size: 1.35rem;
  }

  .mp-stat-divider {
    display: none;
  }

  .mp-service-detail,
  .mp-request-page {
    grid-template-columns: 1fr;
  }

  .mp-service-sidebar,
  .mp-request-sidebar {
    position: static;
  }

  .mp-service-main {
    padding: 1.5rem;
  }

  .mp-service-main h1 {
    font-size: 1.5rem;
  }

  .mp-trust-badges {
    flex-direction: column;
  }

  .mp-success-details {
    flex-direction: column;
    gap: 1rem;
  }

  .mp-success-actions {
    flex-direction: column;
  }
}