/* ==========================================================================
   FeastFlow - Multi-Restaurant SaaS Documentation Stylesheet
   Theme: Gourmet Flame & Dark Truffle (Restaurant Modern)
   ========================================================================== */

:root {
    --primary: #FF5B22;          /* Gourmet Flame Orange */
    --primary-dark: #E44813;     /* Deep Flame */
    --primary-light: #FFF4EF;    /* Saffron Mist */
    --primary-subtle: rgba(255, 91, 34, 0.08);
    --secondary: #F59E0B;        /* Saffron Amber */
    --success: #10B981;          /* Fresh Basil Mint */
    --danger: #EF4444;           /* Chilli Red */
    --warning: #F59E0B;
    --info: #0284C7;
    
    --dark: #0F131A;             /* Dark Truffle / Black Sesame */
    --dark-surface: #171C26;     /* Slate Caviar */
    --dark-border: #232B3A;
    --text-dark: #0F172A;
    --text-body: #334155;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    
    --bg-body: #F8FAFC;
    --bg-card: #FFFFFF;
    --border-color: #E2E8F0;
    --border-light: #F1F5F9;
    
    --sidebar-width: 300px;
    --header-height: 72px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-pill: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-body);
    background-color: var(--bg-body);
    line-height: 1.65;
    display: flex;
    min-height: 100vh;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Sidebar Navigation (Dark Truffle Theme)
   ========================================================================== */
.docs-sidebar {
    width: var(--sidebar-width);
    background: var(--dark);
    color: var(--text-light);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    z-index: 1000;
    border-right: 1px solid var(--dark-border);
    display: flex;
    flex-direction: column;
}

.docs-sidebar::-webkit-scrollbar {
    width: 6px;
}
.docs-sidebar::-webkit-scrollbar-thumb {
    background: var(--dark-border);
    border-radius: 4px;
}

.brand-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--dark-border);
    background: rgba(15, 19, 26, 0.95);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand-title {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.5px;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(255, 91, 34, 0.35);
}

.brand-title span {
    color: var(--primary);
}

.version-pill {
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--primary-subtle);
    color: var(--primary);
    border: 1px solid rgba(255, 91, 34, 0.3);
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.nav-container {
    padding: 20px 0 40px;
    flex: 1;
}

.menu-group {
    margin-bottom: 24px;
}

.menu-group-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    color: #64748B;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0 24px 8px;
}

.nav-link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 24px;
    color: #94A3B8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-link-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.nav-link-item.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(255, 91, 34, 0.15) 0%, rgba(255, 91, 34, 0) 100%);
    border-left-color: var(--primary);
    font-weight: 600;
}

.nav-link-item i {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
    color: #64748B;
    transition: color 0.2s;
}

.nav-link-item:hover i,
.nav-link-item.active i {
    color: var(--primary);
}

/* ==========================================================================
   Main Wrapper & Sticky Header
   ========================================================================== */
.main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.top-header {
    height: var(--header-height);
    background: #FFFFFF;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.02);
}

.search-container {
    position: relative;
    width: 340px;
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    font-size: 0.88rem;
    background: var(--bg-body);
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 91, 34, 0.12);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-pill);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: 0 2px 6px rgba(255, 91, 34, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(255, 91, 34, 0.4);
    transform: translateY(-1px);
    color: #fff;
}

.btn-outline {
    background: #fff;
    color: var(--text-body);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--bg-body);
    border-color: #CBD5E1;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-dark);
    cursor: pointer;
}

/* ==========================================================================
   Content Area & Typography
   ========================================================================== */
.content-area {
    padding: 48px 48px 100px;
    max-width: 1040px;
    margin: 0 auto;
    width: 100%;
}

.doc-section {
    margin-bottom: 72px;
    scroll-margin-top: 100px;
}

h1.page-title {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 12px;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

h1.page-title span {
    color: var(--primary);
}

.page-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 36px;
    max-width: 780px;
    line-height: 1.6;
}

h2 {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 48px 0 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border-color);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 12px;
}

h2 i {
    color: var(--primary);
    font-size: 1.5rem;
}

h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 32px 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

h3 i {
    color: var(--secondary);
    font-size: 1.1rem;
}

h4 {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

p {
    margin-bottom: 16px;
    color: var(--text-body);
}

/* ==========================================================================
   Alerts & Callouts
   ========================================================================== */
.alert {
    padding: 18px 22px;
    border-radius: var(--radius-md);
    margin: 24px 0;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    border-left: 5px solid;
    font-size: 0.94rem;
}

.alert i {
    font-size: 1.25rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.alert-info {
    background: #F0F9FF;
    border-left-color: #0284C7;
    color: #0369A1;
}
.alert-info i { color: #0284C7; }

.alert-success {
    background: #F0FDF4;
    border-left-color: #10B981;
    color: #15803D;
}
.alert-success i { color: #10B981; }

.alert-warning {
    background: #FFFBEB;
    border-left-color: #F59E0B;
    color: #B45309;
}
.alert-warning i { color: #F59E0B; }

.alert-danger {
    background: #FEF2F2;
    border-left-color: #EF4444;
    color: #B91C1C;
}
.alert-danger i { color: #EF4444; }

/* Critical PHP Memory Box */
.server-opt-box {
    background: #FFF8F5;
    border: 2px solid #FFD8C9;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 28px 0;
    box-shadow: 0 4px 12px rgba(255, 91, 34, 0.05);
}

.server-opt-box .opt-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.server-opt-box .opt-badge {
    background: var(--primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Feature Cards & Grids
   ========================================================================== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.feature-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 91, 34, 0.4);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.feature-icon-box {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border: 1px solid rgba(255, 91, 34, 0.2);
    border-radius: var(--radius-md);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 18px;
}

.feature-card h4 {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 0;
}

/* Step Installation Cards */
.step-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.step-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.step-num {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.step-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

/* ==========================================================================
   Code Blocks & Copy Button
   ========================================================================== */
.code-wrapper {
    position: relative;
    margin: 16px 0;
}

pre {
    background: #0F172A;
    color: #E2E8F0;
    padding: 18px 20px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 0.88rem;
    line-height: 1.6;
    border: 1px solid #1E293B;
}

code {
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    background: #F1F5F9;
    color: #D9480F;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
}

pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
}

.btn-copy {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.12);
    color: #E2E8F0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.btn-copy.copied {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}

/* ==========================================================================
   Tables
   ========================================================================== */
.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    text-align: left;
}

th {
    background: #F8FAFC;
    color: var(--text-dark);
    font-weight: 700;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
}

td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-body);
}

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

tr:hover td {
    background: #F8FAFC;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success {
    background: #DEF7EC;
    color: #03543F;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

/* Credentials Cards */
.cred-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.cred-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    box-shadow: var(--shadow-sm);
}

.cred-card h4 {
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    margin-bottom: 8px;
}

.cred-card p {
    margin-bottom: 4px;
    font-size: 0.88rem;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
    .content-area {
        padding: 36px 28px 80px;
    }
}

@media (max-width: 900px) {
    .docs-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    }
    
    .docs-sidebar.show {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .top-header {
        padding: 0 20px;
    }
    
    .search-container {
        width: 220px;
    }
}

@media (max-width: 600px) {
    .content-area {
        padding: 24px 16px 60px;
    }
    
    h1.page-title {
        font-size: 2rem;
    }
    
    .search-container {
        display: none;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
}
