/* LeadOS Main Stylesheet
   Version: 1.1
   Modern SaaS Dashboard Design
*/
/* ==================================================
   IMPORTS & RESET
   ================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors */
    --primary: #262d37;
    --primary-dark: #1a2028;
    --primary-light: #35404e;
    --accent: #89ae43;
    --accent-dark: #6e8f36;
    --accent-light: #a2c45a;
    
    /* Neutral Colors */
    --white: #ffffff;
    --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;
    --black: #000000;
    
    /* Semantic Colors */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fed7aa;
    --error: #ef4444;
    --error-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Layout */
    --sidebar-width: 260px;
    --header-height: 64px;
    --bg-app: #f4f6f8;

    /* Extended semantic */
    --success-dark: #059669;
    --error-dark: #dc2626;
}

/* ==================================================
   GLOBAL STYLES
   ================================================== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-app);
    background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(137, 174, 67, 0.07), transparent);
    color: var(--gray-900);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
}

h1 { font-size: 1.875rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.125rem; margin-bottom: 0.5rem; }

/* ==================================================
   LAYOUT
   ================================================== */
.app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
    transition: transform var(--transition-base);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, var(--white) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-header p {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

.sidebar-nav {
    padding: 1.5rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.nav-item.active {
    background-color: rgba(137, 174, 67, 0.18);
    color: var(--white);
    box-shadow: inset 3px 0 0 var(--accent-light);
}

.nav-item.active::before {
    display: none;
}

.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-text {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.top-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    padding: 0 1.5rem;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.btn-mobile-menu {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--gray-700);
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.btn-mobile-menu:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.btn-mobile-menu svg {
    width: 1.25rem;
    height: 1.25rem;
}

.header-user-greeting {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-600);
    white-space: nowrap;
}

.header-user-greeting strong {
    color: var(--gray-900);
    font-weight: 600;
}

.btn-quick-action.btn-logout {
    background: var(--error);
}

.btn-quick-action.btn-logout:hover {
    background: var(--error-dark);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 90;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.sidebar-overlay.visible {
    display: block;
    opacity: 1;
}

body.sidebar-open {
    overflow: hidden;
}

.header-left {
    flex: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-title-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-main-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
    letter-spacing: -0.01em;
}

.page-subtitle {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin: 0;
}

.user-greeting {
    display: none;
}

/* User Badge (legacy — role shown only in admin contexts) */
.user-badge,
.founder-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.user-badge-role {
    opacity: 0.85;
    font-weight: 500;
}

.user-badge-role::before {
    content: "·";
    margin: 0 0.2rem;
}

.user-badge svg,
.founder-badge svg {
    width: 12px;
    height: 12px;
}

/* Version Badge */
.version-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--gray-600);
}

.version-badge svg {
    width: 12px;
    height: 12px;
}

/* Header Date */
.header-date {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}

.header-date svg {
    width: 12px;
    height: 12px;
    color: var(--gray-400);
}

/* Quick Action Button */
.btn-quick-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: var(--white);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
}

.btn-quick-action:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-quick-action svg {
    width: 14px;
    height: 14px;
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 2rem;
}

/* ==================================================
   FORM STYLES - Reusable CRM Form Components
   ================================================== */

/* Form Container */
.form-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 0 2rem 0;
}

/* Form Sections */
.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section-title::before {
    content: '';
    width: 3px;
    height: 18px;
    background: var(--accent);
    border-radius: 2px;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-field-full {
    grid-column: span 2;
}

/* Form Labels */
.form-field label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-field .required {
    color: var(--error);
    margin-left: 0.25rem;
}

.form-field .form-hint {
    font-size: 0.7rem;
    color: var(--gray-500);
}

/* Form Inputs */
.form-field input,
.form-field select,
.form-field textarea {
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    transition: all var(--transition-fast);
    background: var(--white);
    width: 100%;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(137, 174, 67, 0.1);
}

.form-field textarea {
    resize: vertical;
    min-height: 100px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

/* Form Buttons */
.btn-cancel {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-cancel:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-submit {
    background: var(--accent);
    color: var(--white);
    border: none;
    padding: 0.625rem 2rem;
}

.btn-submit:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* ==================================================
   FORM RESPONSIVE
   ================================================== */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-field-full {
        grid-column: span 1;
    }
    
    .form-container {
        padding: 0 0 1rem 0;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
/* ==================================================
   FOOTER
   ================================================== */
.app-footer {
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    padding: 1.5rem 2rem;
    margin-top: auto;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.footer-copyright {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin: 0;
}

/* ==================================================
   BUTTONS
   ================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    font-family: 'Inter', sans-serif;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--error);
    color: var(--white);
}

.btn-danger:hover {
    background: var(--error-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ==================================================
   FORMS
   ================================================== */
.form-container {
    max-width: 1000px;
    margin: 0 auto;
}

.form-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.form-header {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.form-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.form-header p {
    margin: 0.25rem 0 0;
    opacity: 0.8;
    font-size: 0.875rem;
}

.form-body {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

label .required {
    color: var(--error);
    margin-left: 0.25rem;
}

input, select, textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    transition: all var(--transition-fast);
    background: var(--white);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(137, 174, 67, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    display: block;
    font-size: 0.7rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* ==================================================
   DASHBOARD CARDS
   ================================================== */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
    border: 1px solid var(--gray-200);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    border-color: var(--gray-300);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.card-trend {
    font-size: 0.75rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.trend-up { color: var(--success); }
.trend-down { color: var(--error); }

/* ==================================================
   STATISTICS CARDS
   ================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border: 1px solid var(--gray-200);
    transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    border-color: var(--gray-300);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.stat-title {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

/* ==================================================
   QUICK ACTION CARDS
   ================================================== */
.dashboard-two-column {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.dashboard-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.section-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.section-link {
    font-size: 0.75rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.section-link:hover {
    color: var(--accent-dark);
}

.section-subtitle {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.quick-actions-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quick-action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.quick-action-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.quick-action-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quick-action-info {
    flex: 1;
}

.quick-action-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 0.25rem 0;
}

.quick-action-info p {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin: 0;
}

.quick-action-arrow {
    font-size: 1.125rem;
    color: var(--gray-400);
    transition: transform var(--transition-fast);
}

.quick-action-card:hover .quick-action-arrow {
    transform: translateX(4px);
    color: var(--accent);
}

/* ==================================================
   TABLES
   ================================================== */
.table-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
}

.table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.875rem;
    color: var(--gray-700);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Orders & Clients Tables */
.table-responsive-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    background: var(--white);
}

.orders-table, .clients-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.orders-table thead, .clients-table thead {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.orders-table th, .clients-table th {
    padding: 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
}

.orders-table td, .clients-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.875rem;
    color: var(--gray-700);
}

.orders-table tbody tr:hover, .clients-table tbody tr:hover {
    background: var(--gray-50);
}

.order-id-cell strong, .client-id-cell strong {
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--primary);
}

.monthly-fee-cell {
    font-weight: 600;
    color: var(--accent);
}

.email-link {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.email-link:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}

.settings-container .settings-card + .settings-card {
    margin-top: 1.5rem;
}

/* ==================================================
   COLLAPSED SIDEBAR STYLES
   ================================================== */
.sidebar-collapsed {
    width: 80px;
    overflow-x: hidden;
    transition: width var(--transition-base);
}

.sidebar-collapsed .sidebar-header h1 {
    font-size: 0;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
}

.sidebar-collapsed .sidebar-header h1::before {
    content: "L";
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--white) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-collapsed .sidebar-header {
    text-align: center;
    padding: 1.5rem 0.5rem;
    min-height: 5.75rem;
    box-sizing: border-box;
}

.sidebar-collapsed .sidebar-header h1 {
    min-height: 1.875rem;
    line-height: 1.875rem;
}

.sidebar-collapsed .sidebar-header p {
    visibility: hidden;
    opacity: 0;
    max-width: 0;
    height: 1.125rem;
    margin-top: 0.25rem;
    overflow: hidden;
    white-space: nowrap;
    pointer-events: none;
    transition: opacity var(--transition-base), max-width var(--transition-base);
}

.sidebar-collapsed .nav-text {
    display: inline;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity var(--transition-base), max-width var(--transition-base);
}

.sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 0.75rem 0;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-collapsed .nav-icon {
    margin-right: 0;
}

.sidebar-collapsed .nav-item.active::before {
    display: none;
}

/* Hover expansion for collapsed sidebar */
.sidebar-collapsed.sidebar-hover-expanded {
    width: var(--sidebar-width);
    box-shadow: var(--shadow-lg);
    transition: width var(--transition-base);
}

.sidebar-collapsed.sidebar-hover-expanded .sidebar-header h1 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--white) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-collapsed.sidebar-hover-expanded .sidebar-header h1::before {
    content: none;
}

.sidebar-collapsed.sidebar-hover-expanded .sidebar-header p {
    visibility: visible;
    opacity: 0.7;
    max-width: 12rem;
    height: auto;
    pointer-events: auto;
}

.sidebar-collapsed.sidebar-hover-expanded .nav-text {
    opacity: 1;
    max-width: 12rem;
}

.sidebar-collapsed.sidebar-hover-expanded .nav-item {
    justify-content: flex-start;
    padding: 0.75rem 1.5rem;
}

.sidebar-collapsed.sidebar-hover-expanded .nav-icon {
    margin-right: 12px;
}

/* Tooltip styles */
.sidebar-tooltip {
    position: fixed;
    background: var(--gray-900);
    color: var(--white);
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.sidebar-tooltip.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Main content adjustment for collapsed sidebar */
.sidebar-collapsed ~ .main-content {
    margin-left: 80px;
}

.sidebar-expanded ~ .main-content {
    margin-left: var(--sidebar-width);
}

/* Smooth transition for main content */
.main-content {
    transition: margin-left var(--transition-base);
}

/* Responsive: Keep mobile behaviour unchanged */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    /* Prevent hover expansion on mobile when closed */
    .sidebar-collapsed.sidebar-hover-expanded {
        width: var(--sidebar-width);
    }
    
    /* When sidebar is open on mobile, show full text */
    .sidebar.open .sidebar-header h1 {
        font-size: 1.5rem;
    }
    
    .sidebar.open .sidebar-header h1::before {
        content: none;
    }
    
    .sidebar.open .sidebar-header p {
        display: block;
    }
    
    .sidebar.open .nav-text {
        display: inline;
    }
    
    .sidebar.open .nav-item {
        justify-content: flex-start;
        padding: 0.75rem 1.5rem;
    }
    
    .sidebar.open .nav-icon {
        margin-right: 12px;
    }
    
    /* Hide tooltips on mobile */
    .sidebar-tooltip {
        display: none;
    }
}

/* ==================================================
   SEARCH & FILTERS
   ================================================== */
.filters-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.lead-pool-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.lead-pool-header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.lead-pool-view-note {
    margin: 0.35rem 0 0;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.pool-actions-cell {
    white-space: nowrap;
}

.won-order-banner {
    margin-bottom: 1.25rem;
}

.search-wrapper {
    flex: 2;
    min-width: 200px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.search-input {
    width: 100%;
    padding: 0.625rem 0.875rem 0.625rem 2.25rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(137, 174, 67, 0.1);
}

.filter-select {
    flex: 1;
    min-width: 150px;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    background: var(--white);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-filter {
    padding: 0.625rem 1.25rem;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-filter:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.btn-clear {
    padding: 0.625rem 1.25rem;
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
}

.btn-clear:hover {
    background: var(--gray-200);
}

.results-count {
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.results-count strong {
    color: var(--gray-900);
    font-weight: 600;
}

/* ==================================================
   STATUS BADGES
   ================================================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-active {
    background: var(--success-light);
    color: var(--success);
}

.status-awaiting {
    background: var(--warning-light);
    color: var(--warning);
}

.status-onboarding {
    background: var(--info-light);
    color: var(--info);
}

.status-cancelled {
    background: var(--error-light);
    color: var(--error);
}

.status-paused {
    background: var(--warning-light);
    color: var(--warning);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-active { background: var(--success-light); color: var(--success); }
.badge-paused { background: var(--warning-light); color: var(--warning); }
.badge-cancelled { background: var(--error-light); color: var(--error); }
.badge-awaiting { background: var(--info-light); color: var(--info); }

/* ==================================================
   SUCCESS PAGE
   ================================================== */
.success-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem 0;
}

.success-icon-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.success-animation {
    width: 80px;
    height: 80px;
}

.success-checkmark {
    width: 80px;
    height: 80px;
    display: block;
}

.success-circle {
    stroke: var(--success);
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-check {
    stroke: var(--success);
    stroke-width: 2;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}

.success-title {
    text-align: center;
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.success-subtitle {
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 2rem;
}

.success-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.success-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    transition: all var(--transition-base);
}

.success-card:hover {
    box-shadow: var(--shadow-lg);
}

.success-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 0;
}

.success-card .card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.order-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: var(--success-light);
    color: var(--success);
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.summary-details {
    padding: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.summary-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.summary-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-900);
}

.order-id-value {
    font-family: monospace;
    font-size: 1rem;
    background: var(--gray-100);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
}

.package-badge {
    background: var(--primary-light);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
}

.summary-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 1rem 0;
}

.steps-list {
    padding: 1.5rem;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.step-item:last-child {
    margin-bottom: 0;
}

.step-number {
    width: 32px;
    height: 32px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--gray-600);
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.step-description {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.step-status {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 2rem;
    flex-shrink: 0;
}

.step-status.pending {
    background: var(--warning-light);
    color: var(--warning);
}

.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==================================================
   SETTINGS PAGE
   ================================================== */
.settings-container {
    max-width: 800px;
    margin: 0 auto;
}

.settings-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.settings-card-header {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.settings-card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.settings-card-header p {
    font-size: 0.875rem;
    opacity: 0.8;
    margin: 0;
}

.settings-card-body {
    padding: 2rem;
}

.settings-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.settings-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.settings-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 1.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-section-title::before {
    content: '';
    width: 3px;
    height: 18px;
    background: var(--accent);
    border-radius: 2px;
}

.settings-section-content {
    padding-left: 0.5rem;
}

.settings-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.user-create-form select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    background: var(--white);
}

.user-management-table {
    margin-top: 0.5rem;
}

.table-row-link {
    cursor: pointer;
}

.table-row-link:hover {
    background: var(--gray-50, #f8fafc);
}

.table-row-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.table-row-link .row-link-primary {
    color: var(--primary);
    font-weight: 600;
}

.user-presence {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.user-presence.is-online {
    background: var(--success-light);
    color: #047857;
}

.user-presence-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.user-status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.user-email-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
    min-width: 200px;
}

.user-email-input {
    flex: 1 1 160px;
    min-width: 140px;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
}

.user-email-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(137, 174, 67, 0.15);
}

.user-management-table .table td:nth-child(3) {
    min-width: 240px;
}

.inline-form {
    display: inline;
}

.btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
}

.badge-founder {
    background: var(--primary-light, #e8edf2);
    color: var(--primary);
    margin-left: 0.5rem;
}

.status-disabled {
    background: var(--gray-200);
    color: var(--gray-600);
}

.status-suspended {
    background: var(--error-light);
    color: var(--error);
}

.text-muted {
    color: var(--gray-400);
    font-size: 0.8125rem;
}

.credential-box {
    margin-top: 0.75rem;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(137, 174, 67, 0.35);
    border-radius: var(--radius-md);
    display: grid;
    gap: 0.5rem;
}

.credential-box span {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 0.15rem;
}

.credential-box code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.875rem;
    color: var(--primary);
}

.user-mgmt-flash {
    margin-bottom: 1.5rem;
}

.info-card {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}

.info-card-icon {
    width: 40px;
    height: 40px;
    background: var(--white);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.info-card-content h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 0.25rem 0;
}

.info-card-content p {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.5;
}

/* ==================================================
   ALERTS & MESSAGES
   ================================================== */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid var(--success);
}

.form-field-error {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    color: var(--error);
    line-height: 1.4;
}

.form-field input.is-invalid,
.form-field select.is-invalid,
.form-field textarea.is-invalid {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.alert-error {
    background: var(--error-light);
    color: var(--error);
    border: 1px solid var(--error);
}

.alert-info {
    background: var(--info-light);
    color: var(--info);
    border: 1px solid var(--info);
}

.custom-notification {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    display: none;
    animation: slideDown 0.3s ease-out;
}

.notification-success {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid var(--success);
}

.notification-error {
    background: var(--error-light);
    color: var(--error);
    border: 1px solid var(--error);
}

.notification-info {
    background: var(--info-light);
    color: var(--info);
    border: 1px solid var(--info);
}

/* ==================================================
   EMPTY STATES
   ================================================== */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: var(--gray-50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

.empty-state-container {
    padding: 3rem 1rem;
}

.empty-state-card {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem 2rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}

.empty-state-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gray-50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state-icon {
    color: var(--gray-400);
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.empty-state-text {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

/* ==================================================
   PAGE HEADERS
   ================================================== */
.page-header-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.orders-page-title,
.clients-page-title,
.settings-page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 0.25rem 0;
}

.orders-page-subtitle,
.clients-page-subtitle,
.settings-page-subtitle {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin: 0;
}

/* ==================================================
   LOADING STATES
   ================================================== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================================================
   UTILITY CLASSES
   ================================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* ==================================================
   RESPONSIVE DESIGN
   ================================================== */
@media (max-width: 1024px) {
    .dashboard-two-column {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .dashboard-column:last-child {
        order: -1;
    }
    
    .success-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 260px;
    }

    .btn-mobile-menu {
        display: inline-flex;
    }

    .header-left {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        min-width: 0;
    }

    .page-title-section {
        min-width: 0;
    }

    .title-wrapper {
        flex-wrap: wrap;
    }
    
    .sidebar {
        transform: translateX(-100%);
        z-index: 100;
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .top-header {
        padding: 0 1rem;
        flex-direction: row;
        flex-wrap: wrap;
        height: auto;
        min-height: var(--header-height);
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
        gap: 0.75rem;
    }
    
    .header-left {
        flex: 1;
    }

    .header-right {
        width: auto;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .header-date,
    .version-badge {
        display: none;
    }
    
    .content-area {
        padding: 1rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-body {
        padding: 1.5rem;
    }
    
    .table th, .table td {
        padding: 0.75rem 1rem;
    }
    
    .orders-table th, .orders-table td,
    .clients-table th, .clients-table td {
        padding: 0.75rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .filters-form {
        flex-direction: column;
    }
    
    .search-wrapper,
    .filter-select,
    .btn-filter,
    .btn-clear {
        width: 100%;
    }
    
    .settings-card-header {
        padding: 1rem 1.5rem;
    }
    
    .settings-card-body {
        padding: 1.5rem;
    }
    
    .settings-actions {
        flex-direction: column;
    }
    
    .settings-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .info-card {
        flex-direction: column;
        text-align: center;
    }
    
    .info-card-icon {
        margin: 0 auto;
    }
    
    .success-actions {
        flex-direction: column;
    }
    
    .success-actions .btn {
        justify-content: center;
        width: 100%;
    }
    
    .step-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .step-status {
        align-self: flex-start;
    }
    
    .app-footer {
        padding: 1rem 1.5rem;
    }
    
    .footer-content {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .dashboard-grid {
        gap: 0.75rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .card-value {
        font-size: 1.5rem;
    }
    
    .card-icon {
        width: 32px;
        height: 32px;
    }
    
    .card-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .form-header {
        padding: 1rem 1.5rem;
    }
    
    .success-card {
        padding: 0;
    }
    
    .summary-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .orders-page-title,
    .clients-page-title {
        font-size: 1.25rem;
    }
    
    .stat-title {
        font-size: 0.7rem;
    }
    
    .stat-icon {
        width: 30px;
        height: 30px;
    }
    
    .stat-icon svg {
        width: 14px;
        height: 14px;
    }
    
    .stat-value {
        font-size: 1.125rem;
    }
    
    .quick-action-card {
        padding: 0.875rem;
    }
    
    .quick-action-icon {
        width: 40px;
        height: 40px;
    }
    
    .quick-action-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .empty-state-card {
        padding: 2rem 1rem;
    }
    
    .app-footer {
        padding: 1rem;
    }
}

/* ==================================================
   UI POLISH — v1.1
   ================================================== */
html {
    scroll-behavior: smooth;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.settings-card {
    border: 1px solid var(--gray-200);
}

.form-card {
    border: 1px solid var(--gray-200);
}

.orders-table tbody tr:hover,
.clients-table tbody tr:hover,
.table tbody tr:hover {
    background: var(--gray-50);
}

.orders-table tbody tr,
.clients-table tbody tr,
.table tbody tr {
    transition: background-color var(--transition-fast);
}