/* ============================================================================
   CENRIXA ENTERPRISE - LIGHT MODERN MINIMAL THEME
   Complete CSS for project management and collaboration platform
   ============================================================================ */

/* CSS Variables for Light Theme with Cenrixa Branding */
:root {
    /* Cenrixa Brand Colors */
    --cenrixa-purple: #6366f1;
    --cenrixa-blue: #3b82f6;
    --cenrixa-teal: #06b6d4;
    --cenrixa-green: #10b981;
    --cenrixa-navy: #1a2744;
    --cenrixa-gradient: linear-gradient(135deg, #6366f1 0%, #3b82f6 25%, #06b6d4 75%, #10b981 100%);

    /* Color Palette - Light Theme */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f3f5;
    --bg-quaternary: #e9ecef;
    --bg-hover: #e9ecef;
    --bg-active: #dee2e6;

    /* Borders */
    --border-primary: #dee2e6;
    --border-secondary: #e9ecef;
    --border-muted: #ced4da;

    /* Text Colors */
    --text-primary: #1a2744;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    --text-inverse: #ffffff;
    
    /* Accent Colors - Updated for Cenrixa */
    --accent-primary: #10b981;
    --accent-secondary: #6366f1;
    --accent-tertiary: #06b6d4;
    --accent-danger: #ef4444;
    --accent-warning: #f59e0b;
    --accent-info: #3b82f6;
    
    /* Status Colors */
    --status-success: #2ea043;
    --status-warning: #fb8500;
    --status-error: #f85149;
    --status-info: #58a6ff;
    
    /* Priority Colors */
    --priority-low: #6c757d;
    --priority-medium: #0dcaf0;
    --priority-high: #fd7e14;
    --priority-urgent: #dc3545;
    
    /* Gradients - Updated for Cenrixa */
    --gradient-primary: var(--cenrixa-gradient);
    --gradient-secondary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #f59e0b 100%);
    
    /* Shadows - Light theme */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    
    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    
    /* Layout */
    --sidebar-width: 280px;
    --header-height: 80px;
    --max-width: 1400px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: var(--transition-base);
}

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

code {
    font-family: var(--font-mono);
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.875em;
}

pre {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Layout Components */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--space-md);
}

/* Header Styles */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    height: var(--header-height);
}

/* Top Navigation Bar */
.top-nav {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-lg);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.nav-toggle {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    display: none; /* Hidden by default on desktop */
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    font-size: 1.25rem;
}

.nav-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo img {
    width: 192px !important;
    min-width: 192px;
    height: auto !important;
}

.nav-center {
    flex: 1;
    max-width: 600px;
    margin: 0 var(--space-xl);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

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

.nav-action-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    position: relative;
    transition: var(--transition-base);
}

.nav-action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.search-container {
    position: relative;
    width: 100%;
}

.search-input {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input i {
    position: absolute;
    left: var(--space-md);
    color: var(--text-muted);
}

.search-input input {
    width: 100%;
    padding: var(--space-sm) var(--space-md) var(--space-sm) 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.search-input input:focus {
    outline: none;
    border-color: var(--accent-secondary);
    background: var(--bg-secondary);
}

/* Sidebar Toggle States */
body.sidebar-collapsed .sidebar {
    width: 0;
    overflow: hidden;
    padding: 0;
}

body.sidebar-collapsed .main-content {
    margin-left: 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 var(--space-lg);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--cenrixa-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--cenrixa-gradient);
    mask: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzYiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCAzNiAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTI4IDhIMjBDMTguODk1NCA4IDE4IDguODk1NDMgMTggMTBWMThDMTggMTkuMTA0NiAxOC44OTU0IDIwIDIwIDIwSDI4QzI5LjEwNDYgMjAgMzAgMTkuMTA0NiAzMCAxOFYxMEMzMCA4Ljg5NTQzIDI5LjEwNDYgOCAyOCA4WiIgZmlsbD0iIzYzNjZmMSIvPgo8cGF0aCBkPSJNMTYgMTZIOEM2Ljg5NTQzIDE2IDYgMTYuODk1NCA2IDE4VjI2QzYgMjcuMTA0NiA2Ljg5NTQzIDI4IDggMjhIMTZDMTcuMTA0NiAyOCAxOCAyNy4xMDQ2IDE4IDI2VjE4QzE4IDE2Ljg5NTQgMTcuMTA0NiAxNiAxNiAxNloiIGZpbGw9IiMxMGI5ODEiLz4KPHN2Zz4K");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
}

/* Cenrixa Logo SVG Icon */
.cenrixa-logo {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cenrixa-logo svg {
    width: 28px;
    height: 28px;
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    font-weight: 500;
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    text-decoration: none;
}

.nav-link.active {
    background: var(--accent-secondary);
    color: white;
}

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
}

.user-menu:hover {
    background: var(--bg-hover);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--accent-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    padding: var(--space-sm);
    display: none;
    z-index: 1000;
}

.user-dropdown a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
}

.user-dropdown a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    text-decoration: none;
}

.user-dropdown hr {
    border: none;
    border-top: 1px solid var(--border-primary);
    margin: var(--space-sm) 0;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.5;
    min-height: 36px;
}

.btn:focus {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--accent-secondary);
    color: white;
    border-color: var(--accent-secondary);
}

.btn-primary:hover {
    background: #1562d6;
    border-color: #1562d6;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: white;
}

.btn-success {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.btn-success:hover {
    background: #2ea043;
    border-color: #2ea043;
    text-decoration: none;
    color: white;
}

.btn-danger {
    background: var(--accent-danger);
    color: white;
    border-color: var(--accent-danger);
}

.btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    text-decoration: none;
    color: white;
}

.btn-warning {
    background: var(--accent-warning);
    color: white;
    border-color: var(--accent-warning);
}

.btn-warning:hover {
    background: #ea7c00;
    border-color: #ea7c00;
    text-decoration: none;
    color: white;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-primary);
}

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

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}

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

.btn-sm {
    padding: 6px var(--space-md);
    font-size: 0.75rem;
    min-height: 28px;
}

.btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
    min-height: 44px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

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

/* Form Styles */
/* Modern Form Styles */
.form-group {
    margin-bottom: var(--space-lg);
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    letter-spacing: -0.01em;
}

/* ============================================
   UNIVERSAL FORM FIELD STYLING
   Modern, clean design for all inputs
   ============================================ */

/* Base styling for ALL text inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
textarea,
.form-control,
.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
    line-height: 1.5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="tel"]:hover,
input[type="url"]:hover,
input[type="search"]:hover,
input[type="date"]:hover,
input[type="time"]:hover,
input[type="datetime-local"]:hover,
textarea:hover,
.form-control:hover,
.form-input:hover,
.form-textarea:hover {
    border-color: var(--border-secondary);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus,
textarea:focus,
.form-control:focus,
.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* ============================================
   UNIVERSAL SELECT DROPDOWN STYLING
   Applies to ALL select elements globally
   Uses !important to override any inline styles
   ============================================ */

select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    background-color: var(--bg-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px !important;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
    line-height: 1.5;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select:hover {
    border-color: var(--border-secondary);
}

select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 15l-6-6-6 6'/%3E%3C/svg%3E") !important;
}

/* Ensure select maintains styling even with inline overrides */
select.form-control,
.form-select,
.filter-select,
.status-select,
.priority-select,
.select-input {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px !important;
    padding-right: 2.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

/* Modern Input Group */
.input-group {
    display: flex;
    align-items: stretch;
    position: relative;
}

.input-group .form-input {
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    border-right: none;
}

.input-group .form-input:focus {
    z-index: 1;
}

.input-suffix {
    background: var(--bg-tertiary);
    border: 1.5px solid var(--border-secondary);
    border-left: none;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    padding: 0.875rem 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-weight: 500;
}

/* Modern Custom Checkbox */
.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    cursor: pointer;
    position: relative;
}

.form-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin: 0;
    border: 2px solid var(--border-muted);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    flex-shrink: 0;
}

.form-checkbox input[type="checkbox"]:hover {
    border-color: var(--accent-secondary);
    background: rgba(99, 102, 241, 0.05);
}

.form-checkbox input[type="checkbox"]:checked {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

.form-checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.form-checkbox input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.form-checkbox-label {
    color: var(--text-primary);
    font-size: 0.9375rem;
    line-height: 1.5;
    user-select: none;
}

/* Modern Custom Radio */
.form-radio {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    cursor: pointer;
    position: relative;
}

.form-radio input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin: 0;
    border: 2px solid var(--border-muted);
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    flex-shrink: 0;
}

.form-radio input[type="radio"]:hover {
    border-color: var(--accent-secondary);
    background: rgba(99, 102, 241, 0.05);
}

.form-radio input[type="radio"]:checked {
    border-color: var(--accent-secondary);
    background: var(--bg-secondary);
}

.form-radio input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    background: var(--accent-secondary);
    border-radius: var(--radius-full);
    transform: translate(-50%, -50%);
}

.form-radio input[type="radio"]:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.form-radio-label {
    color: var(--text-primary);
    font-size: 0.9375rem;
    line-height: 1.5;
    user-select: none;
}

/* Floating Label Style */
.form-floating {
    position: relative;
}

.form-floating .form-input,
.form-floating .form-textarea,
.form-floating .form-select {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

.form-floating .form-label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    padding: 0 0.25rem;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.9375rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    pointer-events: none;
    transition: all var(--transition-fast);
    z-index: 1;
}

.form-floating .form-textarea ~ .form-label {
    top: 1.125rem;
    transform: none;
}

.form-floating .form-input:focus ~ .form-label,
.form-floating .form-input:not(:placeholder-shown) ~ .form-label,
.form-floating .form-textarea:focus ~ .form-label,
.form-floating .form-textarea:not(:placeholder-shown) ~ .form-label,
.form-floating .form-select:focus ~ .form-label,
.form-floating .form-select:not([value=""]) ~ .form-label {
    top: 0.5rem;
    transform: none;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-secondary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Form Help Text */
.form-help {
    display: block;
    margin-top: var(--space-xs);
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Form Validation States */
.form-input.is-invalid,
.form-textarea.is-invalid,
.form-select.is-invalid {
    border-color: var(--accent-danger);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='15' y1='9' x2='9' y2='15'/%3E%3Cline x1='9' y1='9' x2='15' y2='15'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 18px;
    padding-right: 3rem;
}

.form-input.is-invalid:focus,
.form-textarea.is-invalid:focus,
.form-select.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12), var(--shadow-sm);
}

.form-input.is-valid,
.form-textarea.is-valid,
.form-select.is-valid {
    border-color: var(--status-success);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232ea043' stroke-width='2.5'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 18px;
    padding-right: 3rem;
}

.form-input.is-valid:focus,
.form-textarea.is-valid:focus,
.form-select.is-valid:focus {
    box-shadow: 0 0 0 4px rgba(46, 160, 67, 0.12), var(--shadow-sm);
}

.form-error {
    display: block;
    margin-top: var(--space-xs);
    font-size: 0.8125rem;
    color: var(--accent-danger);
    font-weight: 500;
}

/* Input with Icon */
.form-input-icon {
    position: relative;
}

.form-input-icon .form-input {
    padding-left: 2.75rem;
}

.form-input-icon .icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--transition-fast);
}

.form-input-icon .form-input:focus + .icon,
.form-input-icon .form-input:focus ~ .icon {
    color: var(--accent-secondary);
}

/* Card Styles */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-muted);
}

.card-header {
    border-bottom: 1px solid var(--border-primary);
    padding-bottom: var(--space-md);
    margin-bottom: var(--space-lg);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.card-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

.card-footer {
    border-top: 1px solid var(--border-primary);
    padding-top: var(--space-md);
    margin-top: var(--space-lg);
}

/* Table Styles */
.table-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-primary);
    background: var(--bg-secondary);
}

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

.table th,
.table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-primary);
    vertical-align: middle;
}

.table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.table tbody tr {
    transition: var(--transition-base);
}

.table tbody tr:hover {
    background: var(--bg-hover);
}

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

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px var(--space-sm);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

.badge-success {
    background: rgba(46, 160, 67, 0.15);
    color: var(--status-success);
    border: 1px solid rgba(46, 160, 67, 0.3);
}

.badge-warning {
    background: rgba(251, 133, 0, 0.15);
    color: var(--status-warning);
    border: 1px solid rgba(251, 133, 0, 0.3);
}

.badge-danger {
    background: rgba(248, 81, 73, 0.15);
    color: var(--status-error);
    border: 1px solid rgba(248, 81, 73, 0.3);
}

.badge-info {
    background: rgba(88, 166, 255, 0.15);
    color: var(--status-info);
    border: 1px solid rgba(88, 166, 255, 0.3);
}

.badge-secondary {
    background: rgba(139, 148, 158, 0.15);
    color: var(--text-secondary);
    border: 1px solid rgba(139, 148, 158, 0.3);
}

/* Priority Badges */
.priority {
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-low {
    background: rgba(108, 117, 125, 0.15);
    color: var(--priority-low);
}

.priority-medium {
    background: rgba(13, 202, 240, 0.15);
    color: var(--priority-medium);
}

.priority-high {
    background: rgba(253, 126, 20, 0.15);
    color: var(--priority-high);
}

.priority-urgent {
    background: rgba(220, 53, 69, 0.15);
    color: var(--priority-urgent);
}

/* Status Badges */
.status {
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-to_do {
    background: rgba(108, 117, 125, 0.15);
    color: #6c757d;
}

.status-in_progress {
    background: rgba(253, 126, 20, 0.15);
    color: #fd7e14;
}

.status-review {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.status-completed {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.status-cancelled {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - var(--header-height));
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-primary);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
}

.sidebar-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-tertiary);
}

.sidebar-header h3 {
    margin: 0 0 var(--space-xs) 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.plan-badge {
    background: var(--accent-secondary);
    color: white;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-md) 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-base);
    font-weight: 500;
    position: relative;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    text-decoration: none;
}

.nav-item.active {
    background: var(--accent-secondary);
    color: white;
    border-right: 3px solid #1562d6;
}

.nav-item .icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.notification-badge {
    background: var(--accent-danger);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    margin-left: auto;
    min-width: 18px;
    text-align: center;
}

.nav-divider {
    height: 1px;
    background: var(--border-primary);
    margin: var(--space-md) var(--space-lg);
}

.sidebar-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--border-primary);
    background: var(--bg-tertiary);
}

.encryption-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 500;
}

/* Sidebar Search */
.sidebar-search {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    margin: var(--space-sm) var(--space-md);
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

.sidebar-search:focus-within {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.sidebar-search i {
    color: var(--text-muted);
    font-size: 0.875rem;
    flex-shrink: 0;
}

.sidebar-search input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.875rem;
    outline: none;
    min-width: 0;
}

.sidebar-search input::placeholder {
    color: var(--text-muted);
}

.search-clear {
    display: none;
    padding: 2px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
}

.search-clear:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.sidebar-search.has-value .search-clear {
    display: flex;
}

/* Navigation Groups */
.nav-group {
    margin-bottom: var(--space-xs);
}

.nav-group-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-sm) var(--space-lg);
    background: transparent;
    border: none;
    color: var(--accent-tertiary);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: var(--transition-base);
    text-align: left;
}

.nav-group-header:hover {
    color: #0891b2;
    background: rgba(6, 182, 212, 0.08);
}

.nav-group-chevron {
    transition: transform 0.2s ease;
    font-size: 0.75rem;
}

.nav-group.collapsed .nav-group-chevron {
    transform: rotate(-90deg);
}

.nav-group.collapsed .nav-group-items {
    display: none;
}

.nav-group-items {
    display: block;
}

/* Favorites Section */
.nav-group-favorites {
    border-bottom: 1px solid var(--border-primary);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
}

.nav-group-favorites .nav-group-header {
    color: var(--accent-warning);
    cursor: default;
}

.nav-group-favorites .nav-group-header:hover {
    background: transparent;
}

.nav-group-favorites .nav-item {
    background: rgba(245, 158, 11, 0.05);
}

.nav-group-favorites .nav-item:hover {
    background: rgba(245, 158, 11, 0.1);
}

.nav-group-favorites .nav-item .nav-item-star {
    opacity: 1;
    color: var(--accent-warning);
}

/* Nav Item Star Button */
.nav-item {
    position: relative;
}

.nav-item-star {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-left: auto;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    opacity: 0;
    transition: var(--transition-base);
    flex-shrink: 0;
}

.nav-item:hover .nav-item-star {
    opacity: 1;
}

.nav-item-star:hover {
    color: var(--accent-warning);
    background: rgba(245, 158, 11, 0.1);
}

.nav-item-star.is-favorite {
    opacity: 1;
    color: var(--accent-warning);
}

.nav-item-star.is-favorite i::before {
    content: "\e9d9"; /* filled star icon */
}

/* Count badge positioning with star */
.nav-item .count-badge,
.nav-item .notification-badge {
    margin-left: auto;
    margin-right: var(--space-xs);
}

.nav-item:has(.count-badge) .nav-item-star,
.nav-item:has(.notification-badge) .nav-item-star {
    margin-left: 0;
}

/* Nav No Results */
.nav-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl) var(--space-lg);
    color: var(--text-muted);
    text-align: center;
    gap: var(--space-sm);
}

.nav-no-results i {
    font-size: 1.5rem;
    opacity: 0.5;
}

.nav-no-results span {
    font-size: 0.875rem;
}

/* Search highlighting */
.nav-item.search-hidden {
    display: none !important;
}

.nav-group.search-hidden {
    display: none !important;
}

.nav-item-label mark {
    background: rgba(245, 158, 11, 0.3);
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

/* Collapsed sidebar tooltips */
body.sidebar-collapsed .nav-item[data-nav-label]:hover::after {
    content: attr(data-nav-label);
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-primary);
    z-index: 1000;
    pointer-events: none;
}

body.sidebar-collapsed .sidebar-search,
body.sidebar-collapsed .nav-group-header span,
body.sidebar-collapsed .nav-item-label,
body.sidebar-collapsed .nav-item-star,
body.sidebar-collapsed .nav-group-favorites {
    display: none;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: var(--space-xl);
    overflow-y: auto;
    min-height: calc(100vh - var(--header-height));
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-primary);
}

.page-header .header-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.header-content h1 {
    margin-bottom: var(--space-xs);
    font-size: 1.75rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

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

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    transition: var(--transition-base);
}

.stat-card:hover {
    border-color: var(--border-muted);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card.security {
    border-left: 4px solid var(--accent-primary);
}

.stat-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    line-height: 1;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--space-lg);
}

/* Widget Styles */
.widget-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-base);
}

.widget-card:hover {
    border-color: var(--border-muted);
    box-shadow: var(--shadow-md);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-tertiary);
}

.widget-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.widget-action {
    color: var(--accent-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-base);
}

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

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-md);
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

.empty-state p {
    margin-bottom: var(--space-lg);
    font-size: 0.875rem;
}

/* Task List */
.task-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.task-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    cursor: pointer;
}

.task-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-muted);
}

.task-item.completed {
    opacity: 0.6;
}

.task-item.completed .task-title {
    text-decoration: line-through;
}

.task-checkbox {
    flex-shrink: 0;
    margin-top: 2px;
}

.task-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.task-content {
    flex: 1;
    min-width: 0;
}

.task-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    line-height: 1.4;
}

.task-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.project-badge {
    background: var(--accent-secondary);
    color: white;
    padding: 2px var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.due-date {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.due-date.overdue {
    color: var(--accent-danger);
    font-weight: 600;
}

.due-date.due-soon {
    color: var(--accent-warning);
    font-weight: 600;
}

/* Project List */
.project-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.project-item {
    padding: var(--space-md);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

.project-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-muted);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

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

.project-color {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.project-name a {
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
}

.project-name a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

.project-progress {
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 0.875rem;
}

.project-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

/* Landing Page Styles */
.hero-section {
    padding: var(--space-2xl) 0;
    text-align: center;
    background: var(--gradient-primary);
    color: white;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: none;
    margin: 0;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: var(--space-lg);
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: var(--space-2xl);
    opacity: 0.9;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: var(--space-lg);
    justify-content: center;
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-2xl);
    flex-wrap: wrap;
}

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

.stat-item strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.stat-item span {
    font-size: 0.875rem;
    opacity: 0.8;
}

.features-section {
    padding: var(--space-2xl) 0;
    background: var(--bg-secondary);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--space-2xl);
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-2xl);
}

.feature-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
    transition: var(--transition-base);
}

.feature-card:hover {
    border-color: var(--accent-secondary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--space-lg);
    display: block;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Pricing Section */
.pricing-section {
    padding: var(--space-2xl) 0;
    background: var(--bg-primary);
}

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

.pricing-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    text-align: center;
    transition: var(--transition-base);
    position: relative;
}

.pricing-card.featured {
    border-color: var(--accent-secondary);
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

.pricing-card.featured::before {
    content: 'Most Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-secondary);
    color: white;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-card:hover {
    border-color: var(--accent-secondary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-4px);
}

.plan-header {
    margin-bottom: var(--space-2xl);
}

.plan-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.currency {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
}

.period {
    font-size: 1rem;
    color: var(--text-secondary);
}

.plan-features {
    list-style: none;
    margin-bottom: var(--space-2xl);
    text-align: left;
}

.plan-features li {
    padding: var(--space-sm) 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.plan-features li::before {
    content: '✓';
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Authentication Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    background: var(--gradient-primary);
}

.auth-card {
    background: white;
    border: none;
    border-radius: var(--radius-xl);
    padding: var(--space-lg) var(--space-xl);
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-xl);
}

.auth-card h1 {
    color: #1a1a2e;
}

.auth-card p,
.auth-card label {
    color: #4a4a68;
}

.auth-card .form-group label {
    color: #1a1a2e;
    font-weight: 500;
}

/* Modern Auth Card Form Inputs */
.auth-card .form-input,
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"],
.auth-card input[type="tel"],
.auth-card input[type="number"],
.auth-card textarea,
.auth-card select {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    color: #1a1a2e;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    width: 100%;
}

.auth-card .form-input:hover,
.auth-card input[type="email"]:hover,
.auth-card input[type="password"]:hover,
.auth-card input[type="text"]:hover,
.auth-card input[type="tel"]:hover,
.auth-card input[type="number"]:hover,
.auth-card textarea:hover,
.auth-card select:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}

.auth-card .form-input:focus,
.auth-card input:focus,
.auth-card textarea:focus,
.auth-card select:focus {
    border-color: var(--accent-secondary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12), 0 1px 2px rgba(0, 0, 0, 0.04);
    outline: none;
}

.auth-card .form-input::placeholder,
.auth-card input::placeholder,
.auth-card textarea::placeholder {
    color: #9ca3af;
    opacity: 0.8;
}

.auth-card .form-group {
    margin-bottom: var(--space-lg);
}

.auth-card .form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    letter-spacing: 0.01em;
}

/* Modern Auth Checkbox */
.auth-card .checkbox-label,
.auth-form .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #4a4a68;
}

.auth-card .checkbox-label input[type="checkbox"],
.auth-form .checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid #d1d5db;
    border-radius: 5px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.auth-card .checkbox-label input[type="checkbox"]:hover,
.auth-form .checkbox-label input[type="checkbox"]:hover {
    border-color: var(--accent-secondary);
    background: rgba(99, 102, 241, 0.05);
}

.auth-card .checkbox-label input[type="checkbox"]:checked,
.auth-form .checkbox-label input[type="checkbox"]:checked {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

.auth-card .checkbox-label input[type="checkbox"]:checked::after,
.auth-form .checkbox-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.auth-card .checkbox-label input[type="checkbox"]:focus,
.auth-form .checkbox-label input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

/* Modern Auth Select */
.auth-card select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 18px;
    padding-right: 3rem;
}

.auth-card .btn-primary {
    padding: 10px 20px;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 8px;
    background: var(--cenrixa-gradient);
    border: none;
    transition: all 0.2s ease;
}

.auth-card .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.btn-full {
    width: 100%;
}

.auth-card .checkbox-label {
    color: #4a4a68;
}

.auth-card .forgot-link {
    color: var(--accent-secondary);
}

.auth-card .auth-footer {
    border-top: 1px solid #e0e0e0;
}

.auth-card .auth-footer p {
    color: #6b7280;
}

.auth-card .alert-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.auth-card.large {
    max-width: 600px;
}

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

.auth-header h1 {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    color: #1a1a2e;
}

.auth-header p {
    color: #6b7280;
    margin: 0;
    font-size: 0.875rem;
}

.auth-header .logo,
.auth-header img.logo {
    width: 320px;
    height: auto;
    display: block;
    margin: 0 auto var(--space-lg);
}

.auth-features {
    color: white;
    padding: var(--space-xl);
    max-width: 280px;
}

.auth-features h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    color: white;
}

.auth-features .feature-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.auth-features .feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.auth-features .feature-item i {
    font-size: 1.25rem;
    opacity: 0.8;
}

@media (max-width: 900px) {
    .auth-container {
        flex-direction: column;
    }

    .auth-features {
        max-width: 480px;
        padding: var(--space-lg);
    }

    .auth-features .feature-list {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}

.auth-form {
    margin-bottom: var(--space-md);
}

.auth-footer {
    text-align: center;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-primary);
}

.auth-footer p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--accent-secondary);
    font-weight: 500;
}

/* Auth Security Section */
.auth-security {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.auth-security h3 {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #9ca3af;
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.security-features {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.6875rem;
    color: #9ca3af;
}

.security-item i {
    color: var(--accent-primary);
    font-size: 0.875rem;
}

@media (max-width: 480px) {
    .security-features {
        flex-direction: column;
        gap: var(--space-sm);
    }
}

/* Plan Selector */
.plan-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin: var(--space-lg) 0;
}

.plan-option {
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
}

.plan-option:hover {
    border-color: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.plan-option.selected {
    border-color: var(--accent-secondary);
    background: rgba(31, 111, 235, 0.1);
}

.plan-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.plan-content {
    pointer-events: none;
}

.plan-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.plan-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-secondary);
    margin-bottom: var(--space-sm);
}

.plan-features {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.terms-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: var(--space-lg);
    line-height: 1.5;
}

/* Alerts */
.alert {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid;
    margin-bottom: var(--space-lg);
    font-size: 0.875rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: var(--status-success);
}

.alert-danger {
    background: rgba(248, 81, 73, 0.1);
    border-color: rgba(248, 81, 73, 0.3);
    color: var(--status-error);
}

.alert-warning {
    background: rgba(251, 133, 0, 0.1);
    border-color: rgba(251, 133, 0, 0.3);
    color: var(--status-warning);
}

.alert-info {
    background: rgba(88, 166, 255, 0.1);
    border-color: rgba(88, 166, 255, 0.3);
    color: var(--status-info);
}

/* Welcome Banner */
.welcome-banner {
    background: var(--gradient-primary);
    color: white;
    padding: var(--space-2xl);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-2xl);
    text-align: center;
}

.welcome-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.welcome-content p {
    margin-bottom: var(--space-lg);
    opacity: 0.9;
}

.welcome-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* Admin Overview */
.admin-overview {
    margin-top: var(--space-2xl);
    padding-top: var(--space-2xl);
    border-top: 1px solid var(--border-primary);
}

.admin-overview h2 {
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
    padding: var(--space-2xl) 0;
    margin-top: auto;
}

/* App footer for logged-in users - offset for sidebar */
.app-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
    padding: var(--space-md) var(--space-lg);
    margin-left: var(--sidebar-width);
}

/* Public footer for non-logged-in users */
.public-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
    padding: var(--space-2xl) 0;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-2xl);
}

.footer-section h4 {
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.footer-section a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: var(--space-sm);
    transition: var(--transition-base);
    font-size: 0.875rem;
}

.footer-section a:hover {
    color: var(--accent-secondary);
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    margin-top: var(--space-lg);
    border-top: 1px solid var(--border-primary);
    color: var(--text-muted);
    font-size: 0.75rem;
}

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

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

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }
.mt-6 { margin-top: var(--space-2xl); }

.p-0 { padding: 0; }
.p-1 { padding: var(--space-xs); }
.p-2 { padding: var(--space-sm); }
.p-3 { padding: var(--space-md); }
.p-4 { padding: var(--space-lg); }
.p-5 { padding: var(--space-xl); }
.p-6 { padding: var(--space-2xl); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }

.gap-1 { gap: var(--space-xs); }
.gap-2 { gap: var(--space-sm); }
.gap-3 { gap: var(--space-md); }
.gap-4 { gap: var(--space-lg); }
.gap-5 { gap: var(--space-xl); }
.gap-6 { gap: var(--space-2xl); }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.col-span-1 { grid-column: span 1 / span 1; }
.col-span-2 { grid-column: span 2 / span 2; }
.col-span-3 { grid-column: span 3 / span 3; }
.col-span-4 { grid-column: span 4 / span 4; }
.col-span-5 { grid-column: span 5 / span 5; }
.col-span-6 { grid-column: span 6 / span 6; }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }

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

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-normal { font-weight: 400; }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

.rounded { border-radius: var(--radius-md); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

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

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    border-radius: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-secondary);
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 240px;
    }
    
    .container {
        padding: 0 var(--space-md);
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 280px;
    }

    /* Show mobile menu toggle */
    .nav-toggle {
        display: flex;
    }

    /* Top nav adjustments for mobile */
    .top-nav {
        padding: 0 var(--space-md);
    }

    .nav-center {
        display: none; /* Hide search on mobile in header */
    }

    .nav-right .user-name {
        display: none; /* Hide username on mobile */
    }

    .nav-logo img {
        width: 140px !important;
        min-width: 140px;
    }

    .header-content {
        flex-direction: column;
        gap: var(--space-md);
        padding: var(--space-md);
    }

    .header-nav {
        justify-content: center;
        flex-wrap: wrap;
    }

    .dashboard-container {
        flex-direction: column;
    }

    /* Mobile sidebar as slide-in overlay */
    .sidebar {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: var(--sidebar-width);
        height: calc(100vh - var(--header-height));
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 100;
        border-right: 1px solid var(--border-primary);
        overflow-y: auto;
    }

    /* Show sidebar when open */
    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    /* Mobile overlay backdrop */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    body.sidebar-open .sidebar-overlay {
        display: block;
        opacity: 1;
    }

    /* Override collapsed state on mobile - use sidebar-open instead */
    body.sidebar-collapsed .sidebar {
        width: var(--sidebar-width);
        overflow: visible;
        padding: 0;
        transform: translateX(-100%);
    }

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

    .main-content {
        margin-left: 0;
        padding: var(--space-md);
    }

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

    .header-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: var(--space-md);
    }

    .stat-card {
        padding: var(--space-md);
        flex-direction: column;
        text-align: center;
    }

    .stat-icon {
        font-size: 1.5rem;
        width: 48px;
        height: 48px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--space-md);
    }

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

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

    .pricing-card.featured {
        transform: none;
    }

    .plan-selector {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .auth-card {
        margin: var(--space-md);
    }

    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: var(--space-lg);
    }

    .task-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }

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

    .project-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }

    /* User dropdown adjustments for mobile */
    .user-dropdown {
        right: -10px;
        min-width: 280px;
    }

    /* Notifications panel mobile */
    .notifications-panel {
        width: 100%;
        right: 0;
        max-width: none;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    /* Buttons full width on mobile */
    .btn-lg {
        width: 100%;
    }

    /* Cards adjustments */
    .card {
        padding: var(--space-md);
    }

    .widget-card {
        padding: var(--space-md);
    }

    /* Table responsive wrapper */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        min-width: 600px;
    }

    /* App footer mobile - remove sidebar offset */
    .app-footer {
        margin-left: 0;
        padding: var(--space-sm) var(--space-md);
    }

    .app-footer .footer-container {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }

    .app-footer .footer-left,
    .app-footer .footer-right {
        justify-content: center;
        flex-wrap: wrap;
    }

    .app-footer .footer-separator {
        display: none;
    }

    .app-footer .footer-left {
        flex-direction: column;
        gap: var(--space-xs);
    }

    .app-footer .footer-links {
        display: flex;
        gap: var(--space-md);
        justify-content: center;
    }

    /* Public footer mobile */
    .public-footer .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-lg);
    }

    .public-footer .footer-section {
        text-align: center;
    }

    .public-footer .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-sm);
    }

    .public-footer .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    /* Modal mobile fullscreen */
    .modal-content {
        width: 95%;
        max-width: none;
        max-height: 90vh;
        margin: var(--space-md);
    }

    /* Quick create modal mobile */
    .quick-create-options {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-sm);
    }

    .quick-create-option {
        flex-direction: column;
        padding: var(--space-md);
        text-align: center;
    }

    /* Dropdown menus on mobile */
    .dropdown-menu {
        position: fixed;
        left: var(--space-md);
        right: var(--space-md);
        bottom: var(--space-md);
        top: auto;
        max-height: 60vh;
        overflow-y: auto;
        border-radius: var(--radius-lg);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-sm);
    }

    .main-content {
        padding: var(--space-sm);
    }

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

    .hero-title {
        font-size: 1.75rem;
    }

    .auth-card {
        padding: var(--space-md);
        margin: var(--space-sm);
    }

    .btn-lg {
        padding: var(--space-md) var(--space-lg);
        font-size: 0.875rem;
    }

    .table {
        font-size: 0.75rem;
    }

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

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

    .widget-content {
        padding: var(--space-sm);
    }

    .task-item {
        padding: var(--space-sm);
    }

    .project-item {
        padding: var(--space-sm);
    }

    /* Small Mobile Form Styles */
    .form-group {
        margin-bottom: var(--space-md);
    }

    .form-label {
        font-size: 0.75rem;
    }

    .form-input,
    .form-textarea,
    .form-select {
        padding: 0.625rem 0.75rem;
        font-size: 1rem;
        border-radius: var(--radius-md);
    }

    .form-help {
        font-size: 0.75rem;
    }

    .settings-form {
        padding: var(--space-md);
    }

    .settings-form .form-group {
        margin-bottom: var(--space-md);
    }

    .settings-form .checkbox-group {
        padding: var(--space-md);
    }

    .input-group {
        flex-direction: column;
    }

    .input-group .form-input {
        border-radius: var(--radius-md);
        border-right: 1.5px solid var(--border-secondary);
    }

    .input-suffix {
        border-radius: var(--radius-md);
        border-left: 1.5px solid var(--border-secondary);
        border-top: none;
        margin-top: -1px;
    }

    /* Smaller top nav on extra small screens */
    .top-nav {
        height: 60px;
        padding: 0 var(--space-sm);
    }

    .nav-logo img {
        width: 120px !important;
        min-width: 120px;
    }

    /* Page header adjustments */
    .page-header h1,
    .header-content h1 {
        font-size: 1.25rem;
    }

    .page-header .subtitle {
        font-size: 0.75rem;
    }

    /* Button group stacking */
    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-group .btn {
        width: 100%;
    }

    /* Quick create on small mobile */
    .quick-create-options {
        grid-template-columns: 1fr;
    }

    /* Modal takes more space */
    .modal-content {
        width: 100%;
        margin: var(--space-sm);
        border-radius: var(--radius-md);
    }

    /* User dropdown full width */
    .user-dropdown {
        position: fixed;
        left: var(--space-sm);
        right: var(--space-sm);
        top: 60px;
        width: auto;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }

    /* Sidebar adjustment for smaller header */
    .sidebar {
        top: 60px;
        height: calc(100vh - 60px);
    }

    /* Sidebar overlay adjustment */
    .sidebar-overlay {
        top: 60px;
    }
}

/* Print Styles */
@media print {
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .sidebar,
    .header,
    .footer,
    .btn,
    .nav-item {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    .page-header {
        border-bottom: 2px solid black !important;
    }
    
    .card,
    .widget-card {
        border: 1px solid black !important;
        break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .table {
        border-collapse: collapse;
    }
    
    .table th,
    .table td {
        border: 1px solid black !important;
    }
}

/* Dark theme toggle support */
@media (prefers-color-scheme: light) {
    /* Keep dark theme as default - users can override if needed */
}

/* Focus management for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
*:focus {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 2px;
}

button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 2px;
}

/* Currency Selector */
.currency-selector {
    position: relative;
    display: inline-block;
    margin-bottom: var(--space-lg);
}

.currency-selector select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: var(--space-sm) var(--space-lg) var(--space-sm) var(--space-md);
    font-size: 0.875rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a2744' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.currency-selector select:focus {
    outline: none;
    border-color: var(--accent-secondary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.currency-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: var(--space-md);
    font-style: italic;
}

/* Admin Panel Styles */
.admin-layout {
    display: flex;
    min-height: calc(100vh - var(--header-height));
    background: var(--bg-primary);
}

.admin-sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-primary);
    position: fixed;
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    z-index: 50;
}

.admin-sidebar-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-tertiary);
}

.admin-sidebar-header h3 {
    margin: 0 0 var(--space-xs) 0;
    color: var(--text-primary);
    font-size: 1.125rem;
}

.admin-badge {
    background: var(--cenrixa-gradient);
    color: white;
    padding: 4px var(--space-sm);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-nav {
    padding: var(--space-lg) 0;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-base);
    font-weight: 500;
    border-left: 3px solid transparent;
}

.admin-nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    text-decoration: none;
}

.admin-nav-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-secondary);
    border-left-color: var(--accent-secondary);
}

.admin-nav-item .icon {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.admin-main {
    flex: 1;
    margin-left: 280px;
    padding: var(--space-xl);
    min-height: calc(100vh - var(--header-height));
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-primary);
}

.admin-header h1 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.75rem;
}

.admin-header-actions {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

/* Admin Stats Grid */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.admin-stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.admin-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--cenrixa-gradient);
}

.admin-stat-card:hover {
    border-color: var(--border-muted);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.admin-stat-card .stat-icon {
    font-size: 2.5rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    flex-shrink: 0;
}

.admin-stat-card .stat-content {
    flex: 1;
}

.admin-stat-card .stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    line-height: 1;
}

.admin-stat-card .stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-xs);
}

.admin-stat-card .stat-change {
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Admin Content Grid */
.admin-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--space-lg);
}

.admin-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-base);
}

.admin-panel:hover {
    border-color: var(--border-muted);
    box-shadow: var(--shadow-md);
}

.panel-header {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
    padding: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-count {
    background: var(--accent-secondary);
    color: white;
    padding: 4px var(--space-sm);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.panel-content {
    padding: var(--space-lg);
    max-height: 400px;
    overflow-y: auto;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: var(--space-xl);
}

/* Trial Items */
.trial-item {
    padding: var(--space-md);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    transition: var(--transition-base);
}

.trial-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-muted);
}

.trial-company {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.trial-email {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: var(--space-xs);
}

.trial-date {
    color: var(--accent-warning);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Revenue Items */
.revenue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    transition: var(--transition-base);
}

.revenue-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-muted);
}

.plan-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.plan-name {
    font-weight: 600;
    color: var(--text-primary);
    text-transform: capitalize;
}

.plan-subs {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.plan-revenue {
    font-weight: 700;
    color: var(--accent-primary);
    font-size: 1.125rem;
}

/* Usage Stats */
.usage-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-primary);
}

.usage-stat:last-child {
    border-bottom: none;
}

.usage-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.usage-value {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.125rem;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition-base);
    text-align: center;
    justify-content: center;
}

.action-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
    text-decoration: none;
    transform: translateY(-1px);
}

.action-btn .icon {
    font-size: 1rem;
}

/* Data Tables for Admin */
.admin-table-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-xl);
}

.admin-table-header {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
    padding: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-table-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.admin-table-actions {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-primary);
    vertical-align: middle;
}

.admin-table th {
    background: var(--bg-quaternary);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table tbody tr {
    transition: var(--transition-base);
}

.admin-table tbody tr:hover {
    background: var(--bg-hover);
}

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

/* Action buttons in tables */
.table-actions {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.table-action-btn {
    padding: 6px var(--space-sm);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: var(--transition-base);
    white-space: nowrap;
}

.table-action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    text-decoration: none;
}

.table-action-btn.danger:hover {
    background: var(--accent-danger);
    border-color: var(--accent-danger);
    color: white;
}

.table-action-btn.primary:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    color: white;
}

/* Search and Filter Bar */
.admin-filters {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    display: flex;
    gap: var(--space-md);
    align-items: center;
    flex-wrap: wrap;
}

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

.filter-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.filter-input {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.875rem;
    min-width: 200px;
}

.filter-select {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
}

/* Admin Container */
.admin-container {
    display: flex;
    min-height: calc(100vh - var(--header-height));
    background: var(--bg-primary);
}

/* Admin Header Content */
.admin-header-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.admin-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

/* Admin Sidebar Footer */
.admin-sidebar-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--border-primary);
    margin-top: auto;
}

/* Navigation Badge */
.nav-badge {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 2px var(--space-sm);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: auto;
}

.admin-nav-item.active .nav-badge {
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-secondary);
}

/* Admin Stats Grid (Alternative) */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.admin-stats .stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: var(--transition-base);
}

.admin-stats .stat-card:hover {
    border-color: var(--border-muted);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.admin-stats .stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.admin-stats .stat-card .stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.admin-stats .stat-card.active {
    border-left: 3px solid var(--accent-primary);
}

.admin-stats .stat-card.trial {
    border-left: 3px solid var(--accent-warning);
}

.admin-stats .stat-card.suspended {
    border-left: 3px solid var(--accent-danger);
}

.admin-stats .stat-card.pending {
    border-left: 3px solid var(--accent-info);
}

/* Admin Metrics Grid (Dashboard) */
.admin-metrics,
.billing-metrics,
.analytics-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

/* Admin Charts Grid */
.admin-charts,
.billing-charts,
.analytics-charts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

/* Admin Tables Grid */
.admin-tables,
.billing-tables {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

/* Metric Card Styling */
.metric-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--cenrixa-gradient);
}

.metric-card.primary::before {
    background: var(--accent-primary);
}

.metric-card:hover {
    border-color: var(--border-muted);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

.metric-header h3 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-icon {
    font-size: 1.25rem;
    color: var(--accent-secondary);
    opacity: 0.7;
}

.metric-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: var(--space-sm);
}

.metric-change {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.metric-change.positive {
    color: var(--accent-primary);
}

.metric-change.negative {
    color: var(--accent-danger);
}

.metric-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

/* Chart Container Styling */
.chart-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-base);
}

.chart-container:hover {
    border-color: var(--border-muted);
    box-shadow: var(--shadow-md);
}

.chart-container.large {
    grid-column: span 2;
}

.chart-header {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
    padding: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chart-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

.chart-controls select {
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.75rem;
    cursor: pointer;
}

.chart-toggle {
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
}

.chart-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.chart-toggle.active {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    color: white;
}

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

.chart-legend {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--border-primary);
    background: var(--bg-tertiary);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
}

.legend-item:not(:last-child) {
    border-bottom: 1px solid var(--border-primary);
    padding-bottom: var(--space-md);
    margin-bottom: var(--space-sm);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.legend-color.plan-starter {
    background: #95a5a6;
}

.legend-color.plan-business {
    background: #3498db;
}

.legend-color.plan-enterprise {
    background: #e74c3c;
}

.legend-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.legend-label strong {
    font-size: 0.875rem;
    color: var(--text-primary);
}

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

/* Table Container Styling */
.table-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-base);
}

.table-container:hover {
    border-color: var(--border-muted);
    box-shadow: var(--shadow-md);
}

.table-header {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
    padding: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.table-content {
    max-height: 400px;
    overflow-y: auto;
}

.table-total {
    background: var(--bg-tertiary);
    font-weight: 600;
}

.table-total td {
    border-top: 2px solid var(--border-primary);
}

/* Financial Summary Grid */
.financial-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.summary-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.summary-card h3 {
    margin: 0 0 var(--space-md) 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.payment-methods,
.billing-settings {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.payment-method {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.payment-method i {
    font-size: 1.25rem;
    color: var(--accent-secondary);
}

.method-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.method-info strong {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.method-info span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.status-active {
    background: var(--accent-primary);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-primary);
}

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

.setting-item strong {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.setting-item span {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Analytics Navigation */
.analytics-nav {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-sm);
}

.analytics-tab {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
}

.analytics-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.analytics-tab.active {
    background: var(--accent-secondary);
    color: white;
}

.analytics-tab i {
    font-size: 1rem;
}

/* Date Range Picker */
.date-range-picker {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.date-range-picker input[type="date"] {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.date-range-picker span {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Admin Layout Responsive - Metrics */
@media (max-width: 1400px) {
    .admin-metrics,
    .billing-metrics,
    .analytics-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .financial-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1200px) {
    .admin-charts,
    .billing-charts,
    .analytics-charts {
        grid-template-columns: 1fr;
    }

    .admin-tables,
    .billing-tables {
        grid-template-columns: 1fr;
    }

    .chart-container.large {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .admin-metrics,
    .billing-metrics,
    .analytics-metrics {
        grid-template-columns: 1fr;
    }

    .analytics-nav {
        flex-wrap: wrap;
    }

    .analytics-tab {
        flex: 1 1 auto;
        justify-content: center;
    }

    .date-range-picker {
        flex-wrap: wrap;
    }

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

/* Search Group in Filters */
.search-group {
    flex: 1;
    min-width: 250px;
}

.search-group input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.search-group input:focus {
    outline: none;
    border-color: var(--accent-secondary);
}

/* Filter Group Styling */
.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.filter-group select {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--accent-secondary);
}

/* Responsive Admin Layout */
@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-base);
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
        padding: var(--space-lg);
    }
    
    .admin-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .admin-content-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }
    
    .admin-header-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .admin-stat-card .stat-icon {
        margin-bottom: var(--space-md);
    }
    
    .admin-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        justify-content: space-between;
    }
    
    .filter-input {
        min-width: auto;
        flex: 1;
    }
    
    .admin-table-header {
        flex-direction: column;
        gap: var(--space-md);
        align-items: stretch;
    }
    
    .admin-table-actions {
        justify-content: center;
    }
    
    .table-actions {
        flex-direction: column;
        gap: var(--space-xs);
    }
    
    .table-action-btn {
        text-align: center;
        min-width: 80px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-primary: #ffffff;
        --border-secondary: #ffffff;
        --text-secondary: #ffffff;
    }
}
/* ============================================================================
   MODERN ADMIN STYLING ENHANCEMENTS
   ============================================================================ */

/* Glass morphism effects */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(26, 39, 68, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modern card styles */
.card-modern {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-secondary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Gradient backgrounds */
.bg-gradient-purple {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.bg-gradient-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
}

.bg-gradient-green {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.bg-gradient-cenrixa {
    background: var(--cenrixa-gradient);
}

/* Modern stat cards */
.stat-card-modern {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    border: 1px solid var(--border-secondary);
    position: relative;
    overflow: hidden;
}

.stat-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--cenrixa-gradient);
}

.stat-card-modern .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.stat-card-modern .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

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

/* Modern form inputs */
.form-control-modern {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.form-control-modern:focus {
    outline: none;
    background: var(--bg-secondary);
    border-color: var(--accent-secondary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Modern buttons */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-modern-primary {
    background: var(--cenrixa-gradient);
    color: white;
}

.btn-modern-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.btn-modern-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-modern-secondary:hover {
    background: var(--bg-quaternary);
}

/* Modern table styles */
.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.table-modern th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.table-modern td {
    padding: 1rem;
    background: var(--bg-secondary);
}

.table-modern tr td:first-child {
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.table-modern tr td:last-child {
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.table-modern tbody tr {
    transition: transform 0.15s ease;
}

.table-modern tbody tr:hover {
    transform: scale(1.01);
}

.table-modern tbody tr:hover td {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Modern badges */
.badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

/* Modern modal */
.modal-modern {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.modal-modern.active {
    opacity: 1;
    visibility: visible;
}

.modal-modern .modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.2s ease;
}

.modal-modern.active .modal-content {
    transform: scale(1) translateY(0);
}

/* Modern sidebar */
.sidebar-modern {
    background: linear-gradient(180deg, #1a2744 0%, #0f172a 100%);
    color: white;
}

.sidebar-modern .nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
    margin: 0.25rem 0;
}

.sidebar-modern .nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-modern .nav-item.active {
    background: var(--cenrixa-gradient);
    color: white;
}

/* Admin page header modern */
.page-header-modern {
    background: linear-gradient(135deg, var(--cenrixa-purple), var(--cenrixa-blue));
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    color: white;
}

.page-header-modern h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.page-header-modern p {
    opacity: 0.9;
    margin-bottom: 0;
    color: white;
}

/* Shimmer loading effect */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, 
        var(--bg-tertiary) 25%, 
        var(--bg-quaternary) 50%, 
        var(--bg-tertiary) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

/* Smooth scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--border-primary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Focus visible styles */
:focus-visible {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   Compact Admin User Table Styles
   ============================================ */

/* Reduce table cell padding for compact rows */
.admin-table.compact th,
.admin-table.compact td {
    padding: var(--space-sm) var(--space-md);
}

/* User info - compact layout */
.user-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

.user-details {
    min-width: 0;
    line-height: 1.3;
}

.user-name {
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-title {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Company info - compact */
.company-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.company-name {
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.plan-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.plan-badge.plan-free {
    background: rgba(107, 114, 128, 0.15);
    color: var(--text-secondary);
}

.plan-badge.plan-starter,
.plan-badge.plan-basic {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.plan-badge.plan-professional,
.plan-badge.plan-pro {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.plan-badge.plan-enterprise {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

/* Activity stats - compact inline */
.activity-stats {
    display: flex;
    gap: var(--space-sm);
    font-size: 0.75rem;
}

.activity-stats .stat-item {
    display: flex;
    align-items: baseline;
    gap: 3px;
    white-space: nowrap;
}

.activity-stats .stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

.activity-stats .stat-label {
    color: var(--text-muted);
    font-size: 0.7rem;
}

/* Action buttons - compact */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-base);
    padding: 0;
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-icon i {
    font-size: 0.875rem;
}

/* Role badges - compact */
.role-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.role-badge.role-admin {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.role-badge.role-manager {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.role-badge.role-user {
    background: rgba(107, 114, 128, 0.15);
    color: var(--text-secondary);
}

/* Status badges - compact */
.status-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.status-badge.status-active {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.status-badge.status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.status-badge.status-suspended {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

/* Dropdown menu - compact */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 160px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    padding: var(--space-xs) 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    padding: 6px var(--space-md);
    border: none;
    background: none;
    color: var(--text-primary);
    font-size: 0.8125rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-base);
}

.dropdown-item:hover {
    background: var(--bg-hover);
}

.dropdown-item.danger {
    color: var(--accent-danger);
}

.dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.dropdown-item i {
    font-size: 0.875rem;
    width: 16px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-primary);
    margin: var(--space-xs) 0;
}

/* Override dropdown-menu hidden state inside user-dropdown */
.user-dropdown .dropdown-menu {
    display: block;
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    min-width: auto;
    padding: 0;
}

/* User Plan Badge in Dropdown */
.user-plan-badge {
    display: inline-block;
    margin-top: var(--space-xs);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-plan-badge.plan-starter {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.user-plan-badge.plan-business,
.user-plan-badge.plan-professional {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
}

.user-plan-badge.plan-enterprise {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
}

/* Usage Mini Stats in Dropdown */
.dropdown-usage {
    padding: var(--space-sm) var(--space-md);
    border-top: 1px solid var(--border-primary);
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-tertiary);
}

.usage-mini-item {
    margin-bottom: var(--space-xs);
}

.usage-mini-item:last-child {
    margin-bottom: 0;
}

.usage-mini-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.usage-mini-value {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.usage-mini-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.usage-mini-fill {
    height: 100%;
    background: var(--accent-primary);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.usage-mini-fill.high {
    background: var(--accent-danger);
}

/* Upgrade Button in Dropdown */
.dropdown-item-upgrade {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.2);
    margin: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
}

.dropdown-item-upgrade:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    border-color: rgba(59, 130, 246, 0.3);
}

.dropdown-item-upgrade .upgrade-badge {
    margin-left: auto;
    padding: 2px 6px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.inline-form {
    display: contents;
}

/* Compact text helper */
.text-muted {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* ============================================================================
   SETTINGS PAGE STYLES
   ============================================================================ */

/* Settings Navigation - Tab Bar */
.settings-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-sm);
}

.settings-tab {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
    white-space: nowrap;
}

.settings-tab i {
    font-size: 1rem;
    opacity: 0.7;
    transition: var(--transition-base);
}

.settings-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-secondary);
}

.settings-tab:hover i {
    opacity: 1;
}

.settings-tab.active {
    background: var(--accent-secondary);
    color: white;
    border-color: var(--accent-secondary);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.settings-tab.active i {
    opacity: 1;
}

/* Settings Content Container */
.settings-content {
    animation: settingsFadeIn 0.25s ease-out;
}

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

/* Settings Section Card */
.settings-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.settings-section:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-muted);
}

/* Section Header */
.section-header {
    padding: var(--space-lg) var(--space-xl);
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border-bottom: 1px solid var(--border-primary);
}

.section-header h2 {
    margin: 0 0 var(--space-xs) 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.section-header p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Settings Form - Modern Styling */
.settings-form {
    padding: var(--space-xl);
}

.settings-form .form-group {
    margin-bottom: var(--space-xl);
    position: relative;
}

.settings-form .form-group:last-child {
    margin-bottom: 0;
}

.settings-form label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.settings-form input[type="text"],
.settings-form input[type="email"],
.settings-form input[type="password"],
.settings-form input[type="number"],
.settings-form input[type="url"],
.settings-form input[type="tel"],
.settings-form input[type="date"],
.settings-form textarea,
.settings-form select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-secondary);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: var(--font-sans);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    line-height: 1.5;
}

.settings-form input[type="text"]:hover,
.settings-form input[type="email"]:hover,
.settings-form input[type="password"]:hover,
.settings-form input[type="number"]:hover,
.settings-form input[type="url"]:hover,
.settings-form input[type="tel"]:hover,
.settings-form input[type="date"]:hover,
.settings-form textarea:hover,
.settings-form select:hover {
    border-color: var(--border-muted);
}

.settings-form input[type="text"]:focus,
.settings-form input[type="email"]:focus,
.settings-form input[type="password"]:focus,
.settings-form input[type="number"]:focus,
.settings-form input[type="url"]:focus,
.settings-form input[type="tel"]:focus,
.settings-form input[type="date"]:focus,
.settings-form textarea:focus,
.settings-form select:focus {
    outline: none;
    border-color: var(--accent-secondary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12), var(--shadow-sm);
    background: var(--bg-secondary);
}

.settings-form input::placeholder,
.settings-form textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.settings-form textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.settings-form select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 18px;
    padding-right: 3rem;
}

.settings-form select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 15l-6-6-6 6'/%3E%3C/svg%3E");
}

/* Form Row - Two Column Layout */
.settings-form .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.settings-form .form-row .form-group {
    margin-bottom: 0;
}

/* Form Help Text */
.settings-form .form-help,
.settings-form small.form-help {
    display: block;
    margin-top: var(--space-xs);
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Modern Checkbox Group */
.settings-form .checkbox-group {
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--border-secondary);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.settings-form .checkbox-group:hover {
    border-color: var(--border-muted);
}

.settings-form .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.settings-form .checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    cursor: pointer;
    border: 2px solid var(--border-muted);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    transition: all var(--transition-fast);
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
}

.settings-form .checkbox-label input[type="checkbox"]:hover {
    border-color: var(--accent-secondary);
    background: rgba(99, 102, 241, 0.05);
}

.settings-form .checkbox-label input[type="checkbox"]:checked {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

.settings-form .checkbox-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.settings-form .checkbox-label input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.settings-form .checkbox-group .form-help {
    margin-top: var(--space-sm);
    margin-left: calc(20px + var(--space-md));
}

/* Form Actions */
.settings-form .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
    padding-top: var(--space-xl);
    margin-top: var(--space-lg);
    border-top: 1px solid var(--border-primary);
}

/* Sub-sections within settings (e.g., S3 settings, Price IDs) */
.settings-form h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: var(--space-xl) 0 var(--space-md) 0;
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-secondary);
}

.settings-form h3:first-child {
    margin-top: 0;
}

/* Alert Boxes in Settings */
.settings-section .alert {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    line-height: 1.5;
}

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

.settings-section .alert-info {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--accent-info);
}

.settings-section .alert-info a {
    color: var(--accent-info);
    font-weight: 500;
}

.settings-section .alert-success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--accent-primary);
}

.settings-section .alert-warning {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--accent-warning);
}

/* Readonly/Code Display Boxes */
.settings-form input[readonly] {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: default;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
}

/* AI Capabilities Grid */
.settings-section .capabilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-sm);
}

.settings-section .capability-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.settings-section .capability-item span:first-child {
    color: var(--accent-primary);
}

/* Webhook Events Code Block */
.settings-section .code-block {
    background: var(--bg-tertiary);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--text-secondary);
    border: 1px solid var(--border-secondary);
}

/* Settings Page Responsive */
@media (max-width: 1024px) {
    .settings-nav {
        gap: var(--space-xs);
        padding: var(--space-sm);
    }

    .settings-tab {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.8125rem;
    }

    .settings-form {
        padding: var(--space-lg);
    }

    .settings-form .form-row {
        grid-template-columns: 1fr;
    }

    .section-header {
        padding: var(--space-md) var(--space-lg);
    }
}

@media (max-width: 768px) {
    .settings-nav {
        flex-direction: column;
    }

    .settings-tab {
        justify-content: flex-start;
        width: 100%;
    }

    /* Mobile Form Styles */
    .settings-form {
        padding: var(--space-lg);
    }

    .settings-form .form-row {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .settings-form input[type="text"],
    .settings-form input[type="email"],
    .settings-form input[type="password"],
    .settings-form input[type="number"],
    .settings-form input[type="url"],
    .settings-form input[type="tel"],
    .settings-form input[type="date"],
    .settings-form textarea,
    .settings-form select {
        padding: 0.75rem 0.875rem;
        font-size: 1rem; /* Better touch targets */
    }

    .settings-form .form-actions {
        flex-direction: column-reverse;
        gap: var(--space-sm);
    }

    .settings-form .form-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1rem;
    }

    /* Mobile Base Form Styles */
    .form-row {
        grid-template-columns: 1fr;
    }

    .form-input,
    .form-textarea,
    .form-select {
        padding: 0.75rem 0.875rem;
        font-size: 1rem;
    }

    .form-floating .form-label {
        font-size: 0.875rem;
    }

    .form-floating .form-input:focus ~ .form-label,
    .form-floating .form-input:not(:placeholder-shown) ~ .form-label {
        font-size: 0.6875rem;
    }

    /* Better touch target for checkboxes and radios */
    .form-checkbox input[type="checkbox"],
    .form-radio input[type="radio"] {
        width: 22px;
        height: 22px;
        min-width: 22px;
    }

    .form-checkbox input[type="checkbox"]:checked::after {
        left: 6px;
        top: 3px;
    }

    .form-radio input[type="radio"]:checked::after {
        width: 11px;
        height: 11px;
    }

    .settings-form .checkbox-label input[type="checkbox"] {
        width: 22px;
        height: 22px;
        min-width: 22px;
    }

    .settings-form .checkbox-label input[type="checkbox"]:checked::after {
        left: 6px;
        top: 3px;
    }
}

/* Settings Page - Optgroup Styling for Select */
.settings-form select optgroup {
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.settings-form select option {
    font-weight: 400;
    padding: var(--space-sm);
}

/* ================================================
   Admin Logs Page Styles
   ================================================ */

/* Log Statistics Grid */
.log-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.log-stats .stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    transition: var(--transition-base);
}

.log-stats .stat-card:hover {
    border-color: var(--border-muted);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.log-stats .stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.log-stats .stat-card .stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Log Filters */
.log-filters {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
}

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

.filter-row {
    display: flex;
    gap: var(--space-lg);
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-row .filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    flex: 1;
    min-width: 150px;
}

.filter-row .filter-group label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.filter-row .filter-group select,
.filter-row .filter-group input {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.875rem;
    width: 100%;
}

.filter-row .filter-group select:focus,
.filter-row .filter-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filter-row .search-group {
    flex: 2;
}

.filter-actions {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-end;
    flex-shrink: 0;
}

/* Logs Table */
.logs-table-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-xl);
}

.logs-table {
    width: 100%;
    border-collapse: collapse;
}

.logs-table thead {
    background: var(--bg-tertiary);
}

.logs-table th {
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-primary);
}

.logs-table td {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-secondary);
    font-size: 0.875rem;
    color: var(--text-primary);
    vertical-align: middle;
}

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

.logs-table .log-entry {
    cursor: pointer;
    transition: var(--transition-base);
}

.logs-table .log-entry:hover {
    background: var(--bg-tertiary);
}

/* Log Entry Elements */
.log-time {
    font-weight: 500;
    color: var(--text-primary);
}

.log-time-detail {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-info strong {
    font-weight: 500;
}

.user-info small {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.company-name {
    font-weight: 500;
}

.ip-address {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Action Badges */
.action-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.action-badge.action-login,
.action-badge.action-logout {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-success);
}

.action-badge.action-create,
.action-badge.action-created {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-secondary);
}

.action-badge.action-update,
.action-badge.action-updated {
    background: rgba(251, 191, 36, 0.15);
    color: var(--accent-warning);
}

.action-badge.action-delete,
.action-badge.action-deleted {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-danger);
}

.action-badge.action-view,
.action-badge.action-viewed {
    background: rgba(156, 163, 175, 0.15);
    color: var(--text-secondary);
}

/* Entity Info */
.entity-info {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.entity-type {
    font-weight: 500;
    text-transform: capitalize;
}

.entity-id {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* Log Details Expandable Row */
.log-details {
    background: var(--bg-tertiary);
}

.log-details td {
    padding: 0 !important;
}

.log-details-content {
    padding: var(--space-lg);
}

.details-section {
    margin-bottom: var(--space-lg);
}

.details-section:last-child {
    margin-bottom: 0;
}

.details-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-primary);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item strong {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.detail-item span {
    font-size: 0.875rem;
    color: var(--text-primary);
    word-break: break-all;
}

/* Data Changes */
.data-changes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.old-values,
.new-values {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

.old-values strong,
.new-values strong {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.old-values pre,
.new-values pre {
    margin: 0;
    padding: var(--space-sm);
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    overflow-x: auto;
    color: var(--text-primary);
}

/* Logs Page Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-lg) 0;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Button Icon */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-base);
}

.btn-icon:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Logs Page Responsive */
@media (max-width: 1200px) {
    .log-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .details-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .data-changes {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .log-stats {
        grid-template-columns: 1fr;
    }

    .filter-row {
        flex-direction: column;
        gap: var(--space-md);
    }

    .filter-row .filter-group {
        min-width: 100%;
    }

    .filter-actions {
        width: 100%;
        flex-direction: column;
    }

    .filter-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .logs-table-container {
        overflow-x: auto;
    }

    .logs-table {
        min-width: 900px;
    }

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

    .pagination {
        flex-direction: column;
    }
}
