/*
 * Table of Contents
 *
 * 1. Variables
 * 2. Base Styles
 * 3. Layout Components
 *    - Header
 *    - Sidebar
 *    - Main Content
 * 4. UI Components
 *    - Search
 *    - Navigation
 *    - Typography
 *    - Code Blocks
 *    - Tables
 *    - Cards
 *    - Alerts
 *    - Feature Grid
 *    - Screenshots
 *    - Settings Table
 * 5. Responsive Design
 * 6. Scrollbar Styling
 */

/* ==========================================================================
   1. Variables
   ========================================================================== */

   :root {
    /* Colors */
    --primary-color: #0783be;
    --primary-dark: #065a8c;
    --secondary-color: #4f46e5;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    
    /* Grayscale */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Layout */
    --sidebar-width: 280px;
    --header-height: 70px;
    
    /* Spacing */
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-xxl: 3rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition-fast: 0.2s;
    --transition-medium: 0.3s;
    --transition-slow: 0.5s;
}

/* ==========================================================================
   2. Base Styles
   ========================================================================== */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: #ffffff;
}

/* ==========================================================================
   3. Layout Components
   ========================================================================== */

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

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 var(--space-xl);
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    width: 100%;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.header-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.header-version {
    background: rgba(255, 255, 255, 0.2);
    padding: var(--space-sm) var(--space-lg);
    border-radius: 20px;
    font-size: 0.875rem;
    margin-left: auto;
}

/* Mobile Menu Toggle
   -------------------------------------------------------------------------- */

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: auto;
}

/* Sidebar
   -------------------------------------------------------------------------- */

.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: var(--gray-50);
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
    z-index: 999;
    transition: transform var(--transition-medium) ease;
}

.sidebar-content {
    padding: var(--space-xl) 0;
}

/* Main Content
   -------------------------------------------------------------------------- */

.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

.content-wrapper {
    max-width: 900px;
    padding: var(--space-xxl) var(--space-xl);
    margin: 0 auto;
}

.content-section {
    display: none;
    animation: fadeIn var(--transition-medium) ease-in-out;
}

.content-section.active {
    display: block;
}

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

/* ==========================================================================
   4. UI Components
   ========================================================================== */

/* Search
   -------------------------------------------------------------------------- */

.search-box {
    margin: 0 var(--space-lg) var(--space-xl);
    position: relative;
}

.search-input {
    width: 100%;
    padding: var(--space-md) var(--space-lg) var(--space-md) 2.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    background: white;
    transition: border-color var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(7, 131, 190, 0.1);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-result-item {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.search-result-item:hover {
    background: var(--gray-50);
}

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

.search-result-title {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.875rem;
    margin-bottom: var(--space-sm);
}

.search-result-section {
    font-size: 0.75rem;
    color: var(--primary-color);
    margin-bottom: var(--space-sm);
}

.search-result-snippet {
    font-size: 0.75rem;
    color: var(--gray-600);
    line-height: 1.4;
}

.search-highlight {
    background: rgba(7, 131, 190, 0.2);
    padding: 0.1rem 0.2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

/* Navigation
   -------------------------------------------------------------------------- */

.nav-section {
    margin-bottom: var(--space-xl);
}

.nav-section-title {
    padding: 0 var(--space-lg) var(--space-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
}

.nav-links {
    list-style: none;
}

.nav-link {
    display: block;
    padding: var(--space-md) var(--space-lg);
    color: var(--gray-700);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: var(--gray-100);
    color: var(--primary-color);
}

.nav-link.active {
    background: rgba(7, 131, 190, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.nav-link.sub-link {
    padding-left: 2.5rem;
    font-size: 0.8125rem;
    font-weight: 400;
}

/* Mobile Menu Fixes - Add these styles to your existing CSS */

/* Mobile Menu Toggle Button - Make it visible and functional */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: auto;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
  }
  
  .mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
  }
  
  /* Sidebar Mobile Behavior */
  @media (max-width: 1024px) {
    .sidebar {
      transform: translateX(-100%);
      transition: transform 0.3s ease;
      z-index: 1001; /* Higher than header */
      box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
  
    .sidebar.open {
      transform: translateX(0);
    }
  
    .main-content {
      margin-left: 0;
      transition: margin-left 0.3s ease;
    }
  
    .mobile-menu-toggle {
      display: block;
    }
  
    /* Add overlay when sidebar is open */
    .sidebar-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.5);
      z-index: 1000;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.3s ease, visibility 0.3s ease;
    }
  
    .sidebar-overlay.active {
      opacity: 1;
      /* visibility: visible; */
    }
  
    /* Ensure sidebar content is scrollable on mobile */
    .sidebar-content {
      padding: 1rem 0;
      height: 100%;
      overflow-y: auto;
    }
  
    /* Make nav sections more touch-friendly */
    .nav-link {
      padding: 1rem 1.5rem;
      font-size: 0.9rem;
      border-bottom: 1px solid var(--gray-100);
    }
  
    .nav-section-title {
      padding: 1rem 1.5rem 0.5rem;
      font-size: 0.8rem;
    }
  }
  
  @media (max-width: 768px) {
    .header {
      padding: 0 1rem;
    }
  
    .header-title {
      font-size: 1.1rem;
      display: none; /* Hide title on very small screens */
    }
  
    .header-version {
      display: none; /* Hide version on small screens */
    }
  
    .sidebar {
      width: 100%; /* Full width on small screens */
    }
  
    .nav-link {
      padding: 0.875rem 1rem;
      font-size: 0.875rem;
    }
  }
  

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: var(--space-xxl);
    line-height: 1.6;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: var(--space-xxl) 0 var(--space-lg);
    line-height: 1.3;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 2.5rem 0 var(--space-md);
    line-height: 1.4;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: var(--space-xl) 0 var(--space-md);
}

p {
    margin-bottom: var(--space-lg);
    color: var(--gray-700);
    line-height: 1.7;
}

/* Lists
   -------------------------------------------------------------------------- */

ul, ol {
    margin: var(--space-lg) 0;
    padding-left: var(--space-xl);
}

li {
    margin-bottom: var(--space-sm);
    color: var(--gray-700);
    line-height: 1.6;
}

/* Code Blocks
   -------------------------------------------------------------------------- */

.code-block {
    background: var(--gray-900);
    color: #f8f8f2;
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin: var(--space-lg) 0;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

.inline-code {
    background: var(--gray-100);
    color: var(--gray-800);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
}

/* Tables
   -------------------------------------------------------------------------- */

.table-wrapper {
    overflow-x: auto;
    margin: var(--space-xl) 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th {
    background: var(--gray-50);
    padding: var(--space-lg);
    text-align: left;
    font-weight: 600;
    color: var(--gray-800);
    border-bottom: 1px solid var(--gray-200);
}

td {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
}

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

/* Cards
   -------------------------------------------------------------------------- */

.card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    margin: var(--space-xl) 0;
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.card-icon.primary { background: var(--primary-color); }
.card-icon.success { background: var(--success-color); }
.card-icon.warning { background: var(--warning-color); }
.card-icon.danger { background: var(--danger-color); }

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

/* Alerts
   -------------------------------------------------------------------------- */

.alert {
    padding: var(--space-lg) var(--space-lg);
    border-radius: var(--radius-md);
    margin: var(--space-lg) 0;
    border-left: 4px solid;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-left-color: #3b82f6;
    color: #1e40af;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-left-color: var(--success-color);
    color: #065f46;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: var(--warning-color);
    color: #92400e;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: var(--danger-color);
    color: #991b1b;
}

/* Feature Grid
   -------------------------------------------------------------------------- */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
    margin: var(--space-xl) 0;
}

.feature-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    margin-bottom: var(--space-md);
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
}

.feature-description {
    color: var(--gray-600);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Screenshots
   -------------------------------------------------------------------------- */

.screenshot {
    width: 100%;
    max-width: 800px;
    height: 400px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin: var(--space-xl) 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.screenshot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: var(--gray-200);
    border-bottom: 1px solid var(--gray-300);
}

.screenshot::after {
    content: '● ● ●';
    position: absolute;
    top: 8px;
    left: 15px;
    color: var(--gray-400);
    font-size: 12px;
}

/* Settings Table
   -------------------------------------------------------------------------- */

.settings-table {
    margin: var(--space-xl) 0;
}

.setting-row {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    overflow: hidden;
}

.setting-header {
    background: var(--gray-50);
    padding: var(--space-lg) var(--space-lg);
    border-bottom: 1px solid var(--gray-200);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color var(--transition-fast);
}

.setting-header:hover {
    background: var(--gray-100);
}

.setting-name {
    font-weight: 600;
    color: var(--gray-900);
}

.setting-type {
    background: var(--primary-color);
    color: white;
    padding: var(--space-sm) var(--space-md);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.setting-content {
    padding: var(--space-lg);
    display: none;
}

.setting-content.active {
    display: block;
}

.setting-description {
    color: var(--gray-700);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.setting-options {
    background: var(--gray-50);
    padding: var(--space-lg);
    border-radius: var(--radius-sm);
    margin: var(--space-md) 0;
}

.setting-options h5 {
    margin: 0 0 var(--space-sm);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-800);
}

.setting-options ul {
    margin: 0;
    padding-left: var(--space-lg);
}

.setting-options li {
    margin-bottom: var(--space-sm);
    font-size: 0.875rem;
}

/* ==========================================================================
   5. Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .content-wrapper {
        padding: var(--space-xl) var(--space-md);
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 var(--space-md);
    }

    .header-title {
        font-size: 1.25rem;
    }

    .section-title {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

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

    .content-wrapper {
        padding: var(--space-lg) var(--space-md);
    }
}

/* ==========================================================================
   6. Scrollbar Styling
   ========================================================================== */

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--gray-100);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: var(--gray-100);
}

.search-results::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}
.screenshot img{
    width: inherit;
}
.screenshots img{
    max-width: 70%;
    max-height: 40%;
}

#email-notifications, #admin-table,#thank-you-messages,#user-roles,#troubleshooting,#faq,#changelog{
    margin: inherit;
}
