:root {
    --primary: #3B82F6;
    --primary-hover: #2563EB;
    --secondary: #6B7280;
    --success: #10B981;
    --danger: #EF4444;
    --bg-light: #F9FAFB;
    --bg-white: #FFFFFF;
    --text-dark: #111827;
    --text-medium: #4B5563;
    --text-light: #9CA3AF;
    --border: #E5E7EB;
    --border-hover: #D1D5DB;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-light);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
    position: relative;
}

/* Subtle Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background-color: rgb(245, 247, 250);
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(59, 130, 246, 0.02) 35px, rgba(59, 130, 246, 0.02) 70px),
        repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(59, 130, 246, 0.016) 35px, rgba(59, 130, 246, 0.016) 70px);
    pointer-events: none;
}

body.with-pattern::before {
    display: block;
}

.app-container {
    min-height: 100vh;
    background: transparent;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.modern-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-icon {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.modern-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

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

.btn-new-quote {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-new-quote:hover {
    background: var(--primary-hover);
}

.btn-new-quote svg {
    width: 18px;
    height: 18px;
}

.btn-settings {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: transparent;
    color: var(--text-medium);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-settings:hover {
    background: var(--bg-light);
    border-color: var(--border-hover);
}

.btn-settings svg {
    width: 18px;
    height: 18px;
}

/* Step Indicator Horizontal */
.step-indicator-container {
    background: var(--bg-white);
    padding: 2rem 2rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.step-indicator-horizontal {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-light);
    border: 2px solid var(--border);
    color: var(--text-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.step-item.active .step-circle {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.step-item.completed .step-circle {
    background: var(--bg-light);
    border-color: var(--primary);
    color: var(--primary);
}

.step-label {
    font-size: 0.8125rem;
    color: var(--text-medium);
    text-align: center;
    white-space: nowrap;
    font-weight: 500;
}

.step-item.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

.step-line {
    width: 30px;
    height: 2px;
    background: var(--border);
    margin: 0 0.25rem;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 19px;
}

/* Main Content */
main {
    flex: 1;
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.step {
    display: none;
}

.step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.step-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.step-subtitle {
    color: var(--text-medium);
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.product-card {
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-white);
}

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

.product-card.selected {
    border-color: var(--primary);
    background: #EFF6FF;
    box-shadow: var(--shadow-md);
}

.product-card h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.product-card p {
    font-size: 0.875rem;
    color: var(--text-medium);
    line-height: 1.5;
}

/* Options List */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin-top: 2rem;
}

.option-item {
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-white);
}

.option-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.option-item.selected {
    border-color: var(--primary);
    background: #EFF6FF;
}

.option-item h4 {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.option-item p {
    font-size: 0.875rem;
    color: var(--text-medium);
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
    background: var(--bg-white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input.error,
.form-group textarea.error,
.form-group select.error {
    border-color: var(--danger);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.error-message {
    display: block;
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 1.2rem;
}

.dimension-info {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-medium);
    border: 1px solid var(--border);
}

.calculated-values {
    background: #EFF6FF;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-top: 1.5rem;
    border: 1px solid #BFDBFE;
}

/* Accessories */
.accessories-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
}

.accessory-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
    cursor: pointer;
}

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

.accessory-item.selected {
    background: #EFF6FF;
    border-color: var(--primary);
}

.accessory-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-light);
}

.accessory-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.accessory-info {
    flex: 1;
}

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

.accessory-info p {
    font-size: 0.875rem;
    color: var(--text-medium);
}

.accessory-price {
    font-weight: 600;
    color: var(--primary);
    font-size: 1rem;
}

.incompatibility-warning {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #FEF3C7;
    border: 1px solid #F59E0B;
    border-radius: var(--border-radius);
    color: #92400E;
    font-size: 0.875rem;
    display: none;
}

.incompatibility-warning.show {
    display: block;
}

/* Summary */
.summary {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.summary h3 {
    font-size: 1.125rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

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

.summary-label {
    color: var(--text-medium);
    font-weight: 500;
}

.summary-value {
    color: var(--text-dark);
    font-weight: 600;
}

.price-breakdown {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
}

.price-breakdown h3 {
    font-size: 1.125rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

.price-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.price-label {
    color: var(--text-medium);
}

.price-value {
    font-weight: 600;
    color: var(--text-dark);
}

.price-total {
    border-top: 2px solid var(--border);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    font-size: 1.25rem;
}

.price-total .price-value {
    color: var(--primary);
    font-size: 1.5rem;
}

/* Navigation */
.navigation {
    padding: 1.5rem 2rem;
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    margin-left: auto;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--text-medium);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--border-hover);
}

.btn-accent {
    background: #F59E0B;
    color: white;
}

.btn-accent:hover {
    background: #D97706;
}

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

.btn-success:hover {
    background: #059669;
}

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

/* Admin Link */
.admin-link {
    padding: 1rem 2rem;
    text-align: center;
    background: var(--bg-light);
    border-top: 1px solid var(--border);
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-link:hover {
    color: var(--primary-hover);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.modal-content h2 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.modal-content p {
    color: var(--text-medium);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-medium);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
}

.close:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

#importResult {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    font-size: 0.9375rem;
}

#importResult.success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #10B981;
}

#importResult.error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #EF4444;
}

/* Loading */
.loading {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    align-items: center;
    justify-content: center;
}

.loading.show {
    display: flex;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .modern-header {
        padding: 1rem;
    }

    .modern-header h1 {
        font-size: 1.125rem;
    }

    .header-right {
        width: 100%;
        justify-content: flex-end;
    }

    .btn-new-quote, .btn-settings {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }

    .btn-settings span {
        display: none;
    }

    .step-indicator-horizontal {
        justify-content: flex-start;
        padding: 0;
    }

    .step-circle {
        width: 36px;
        height: 36px;
        font-size: 0.8125rem;
    }

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

    .step-line {
        width: 40px;
        margin-top: 17px;
    }

    main {
        padding: 2rem 1rem;
    }

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

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

    .navigation {
        padding: 1rem;
    }
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 1rem;
}

.login-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
}

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

.login-icon {
    width: 64px;
    height: 64px;
    color: var(--primary);
    margin: 0 auto 1rem;
}

.login-header h1 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-medium);
    font-size: 0.9375rem;
}

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

.error-message-box {
    background: #FEE2E2;
    color: #991B1B;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    display: none;
}

.btn-block {
    width: 100%;
}

.login-footer {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-medium);
}

/* Settings Layout */
.settings-layout {
    display: flex;
    min-height: calc(100vh - 73px);
}

.settings-sidebar {
    width: 280px;
    background: var(--bg-light);
    border-right: 1px solid var(--border);
    padding: 1.5rem 0;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.settings-menu {
    display: flex;
    flex-direction: column;
}

.settings-menu-item {
    background: none;
    border: none;
    padding: 0.875rem 1.5rem;
    text-align: left;
    font-size: 0.9375rem;
    color: var(--text-medium);
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.settings-menu-item:hover {
    background: var(--bg-white);
    color: var(--text-dark);
}

.settings-menu-item.active {
    background: var(--bg-white);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

.settings-content {
    flex: 1;
    padding: 2.5rem;
    overflow-y: auto;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.settings-section {
    max-width: 800px;
}

.settings-section h2 {
    font-size: 1.75rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-medium);
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--text-dark);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 3000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

/* Users List */
.users-list {
    margin-top: 1.5rem;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    margin-bottom: 0.75rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-role {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.user-role.admin {
    background: #DBEAFE;
    color: #1E40AF;
}

.user-role.user {
    background: #E5E7EB;
    color: #4B5563;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Catalog Tabs */
.catalog-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.tab-button {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    color: var(--text-medium);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-button:hover {
    color: var(--text-dark);
}

.tab-button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.catalog-content {
    min-height: 200px;
}

.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.catalog-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
}

.catalog-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.catalog-item {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.catalog-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.catalog-item-info {
    flex: 1;
}

.catalog-item-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.catalog-item-info p {
    color: var(--text-medium);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.catalog-item-info small {
    color: var(--text-light);
    font-size: 0.8125rem;
}

.catalog-item-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Import/Export Box */
.import-export-box {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.import-export-box h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.import-export-box input[type="file"] {
    display: block;
    margin: 1rem 0;
}

/* Coefficients List */
.coefficients-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.coefficient-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
}

.coefficient-item span {
    font-weight: 500;
}

.coefficient-item input {
    width: 100px;
    text-align: right;
}

/* Radio & Checkbox Groups */
.radio-group {
    display: flex;
    gap: 1.5rem;
}

.radio-group label,
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* About Info */
.about-info {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
}

.about-info p {
    margin-bottom: 0.75rem;
}

/* Responsive Settings */
@media (max-width: 768px) {
    .settings-layout {
        flex-direction: column;
    }
    
    .settings-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    
    .settings-content {
        padding: 1.5rem;
    }
    
    .toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
}

/* Dashboard Styles */
.dashboard-content {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

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

.dashboard-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.dashboard-subtitle {
    color: var(--text-medium);
    font-size: 0.938rem;
}

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

.metric-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.2s;
}

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

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.metric-content {
    flex: 1;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-medium);
    margin-bottom: 0.25rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.recent-quotes-section {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.section-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
}

.quotes-table {
    min-height: 200px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

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

.quotes-table thead {
    background: var(--bg-light);
}

.quotes-table th {
    padding: 0.75rem 1.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-medium);
    border-bottom: 1px solid var(--border);
}

.quotes-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-dark);
    font-size: 0.938rem;
}

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

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

.btn-icon {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-medium);
    border-radius: var(--border-radius-sm);
    transition: all 0.2s;
}

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

.loading {
    padding: 3rem;
    text-align: center;
    color: var(--text-medium);
}

.empty-state {
    padding: 3rem;
    text-align: center;
}

.empty-state svg {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--text-medium);
    margin-bottom: 1.5rem;
}

.error-state {
    padding: 3rem;
    text-align: center;
}

.error-state svg {
    margin-bottom: 1rem;
}

.error-state p {
    color: var(--text-medium);
}

.app-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-title svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.header-title h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .dashboard-content {
        padding: 1.5rem;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .quotes-table {
        overflow-x: auto;
    }
    
    .quotes-table table {
        min-width: 600px;
    }
    
    .app-header {
        padding: 1rem;
    }
    
    .header-actions {
        width: 100%;
    }
    
    .header-actions button {
        flex: 1;
    }
}
/* Profile Page Styles */
.profile-content {
    flex: 1;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.profile-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 2rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.profile-info h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.role-admin {
    background: #FEF3C7;
    color: #92400E;
}

.role-user {
    background: #DBEAFE;
    color: #1E40AF;
}

.profile-form {
    margin-bottom: 2rem;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.form-section small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.profile-danger-zone {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.profile-danger-zone h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--danger);
}

.profile-danger-zone p {
    color: var(--text-medium);
    margin-bottom: 1rem;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: #DC2626;
}

.btn-danger svg {
    width: 16px;
    height: 16px;
}

.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    font-weight: 500;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.notification-success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #6EE7B7;
}

.notification-error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FCA5A5;
}

.notification-info {
    background: #DBEAFE;
    color: #1E40AF;
    border: 1px solid #93C5FD;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Standardized Button Styles */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--border-radius);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--text-medium);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--border-hover);
}

.btn-primary svg,
.btn-secondary svg {
    width: 16px;
    height: 16px;
}

/* App Header unified */
.app-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-title h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.header-title svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Dimension Form Layout */
.dimension-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.dim-limits {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Glazing Grid Layout */
.glazing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.glazing-card {
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-white);
}

.glazing-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.glazing-card.selected {
    border-color: var(--primary);
    background: #EFF6FF;
}

.glazing-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.glazing-card .description {
    font-size: 0.875rem;
    color: var(--text-medium);
    margin-bottom: 0.75rem;
}

.glazing-card .price-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.glazing-card .price-primary {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
}

.glazing-card .price-secondary {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Accessories with Quantities */
.accessories-container {
    margin-top: 2rem;
}

.accessory-category {
    margin-bottom: 2rem;
}

.accessory-category-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.accessory-item-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    margin-bottom: 0.75rem;
    background: var(--bg-white);
}

.accessory-item-new.disabled {
    opacity: 0.5;
    pointer-events: none;
    background: var(--bg-light);
}

.accessory-details {
    flex: 1;
}

.accessory-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-dark);
}

.accessory-price {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.125rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--text-medium);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.qty-btn:disabled:hover {
    background: var(--bg-white);
    color: var(--text-medium);
    border-color: var(--border);
}

.qty-display {
    min-width: 32px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.accessory-total {
    padding: 1rem;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: var(--border-radius);
    text-align: right;
}

.accessory-total-label {
    font-size: 0.875rem;
    color: var(--text-medium);
    margin-right: 1rem;
}

.accessory-total-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

/* Finishes Grid with Groups */
.finish-groups {
    margin-top: 2rem;
}

.finish-group {
    margin-bottom: 2rem;
}

.finish-group-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.finish-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.finish-card {
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-white);
}

.finish-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.finish-card.selected {
    border-color: var(--primary);
    background: #EFF6FF;
}

.finish-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.finish-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.finish-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    padding: 0.25rem 0.5rem;
    background: #EFF6FF;
    border-radius: var(--border-radius-sm);
}

.finish-description {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Client Form */
.client-form {
    max-width: 700px;
    margin-top: 2rem;
}

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

/* Summary Section */
.summary {
    margin-top: 2rem;
}

.summary-section {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.summary-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.summary-item {
    margin-bottom: 0.75rem;
}

.summary-label {
    font-size: 0.875rem;
    color: var(--text-medium);
    margin-bottom: 0.25rem;
}

.summary-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.summary-accessories {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
}

.summary-accessories li {
    font-size: 0.9375rem;
    color: var(--text-dark);
    padding: 0.25rem 0;
}

.price-breakdown {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.price-breakdown-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.price-line {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    font-size: 0.9375rem;
}

.price-line-label {
    color: var(--text-medium);
}

.price-line-value {
    font-weight: 600;
    color: var(--primary);
}

.price-total {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    margin-top: 0.75rem;
    border-top: 2px solid var(--border);
    font-size: 1.25rem;
    font-weight: 700;
}

.price-total-label {
    color: var(--text-dark);
}

.price-total-value {
    color: var(--primary);
}

/* Items List */
.items-list {
    margin-bottom: 2rem;
}

.items-list-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.current-item-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.item-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s;
}

.item-card:hover {
    box-shadow: var(--shadow-md);
}

.item-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.item-card-header h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.item-card-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--text-medium);
}

.btn-icon:hover {
    background: var(--bg-light);
    border-color: var(--border-hover);
}

.btn-icon-danger:hover {
    background: #FEE2E2;
    border-color: var(--danger);
}

.btn-icon-danger:hover svg {
    color: var(--danger);
}

.item-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.item-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9375rem;
}

.item-info-label {
    color: var(--text-medium);
    font-weight: 500;
}

.item-info-value {
    color: var(--text-dark);
    font-weight: 600;
    text-align: right;
}

.item-price {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-align: right;
}

.items-total {
    background: linear-gradient(135deg, var(--primary) 0%, #2563EB 100%);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.items-total-label {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
}

.items-total-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-in;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 600px;
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-dark);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
    
    .header-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .header-actions button {
        flex: 1;
        justify-content: center;
    }
    
    .dimension-form,
    .summary-grid,
    .glazing-grid,
    .finish-grid {
        grid-template-columns: 1fr;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* Super Admin Dashboard Styles */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.container header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.container header h1 {
    font-size: 1.75rem;
    color: var(--text-dark);
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.stat-card h3 {
    font-size: 0.875rem;
    color: var(--text-medium);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.section {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-buttons button {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.filter-buttons button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.table-container {
    overflow-x: auto;
    border-radius: var(--border-radius);
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table-container thead {
    background: var(--bg-light);
}

.table-container th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border);
}

.table-container td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
}

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

.table-container button {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    margin-right: 0.25rem;
}

/* Stat Card Colors & Icons */
.stat-card {
    position: relative;
    overflow: hidden;
    background: white;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.12;
    z-index: 0;
}

.stat-card > * {
    position: relative;
    z-index: 1;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.stat-blue::before { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.stat-green::before { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.stat-orange::before { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.stat-red::before { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.stat-purple::before { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); }
.stat-indigo::before { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.stat-teal::before { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.stat-cyan::before { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.stat-lime::before { background: linear-gradient(135deg, #30cfd0 0%, #330867 100%); }
.stat-amber::before { background: linear-gradient(135deg, #fddb92 0%, #d1fdff 100%); }
.stat-pink::before { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.stat-rose::before { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); }

.stat-card h3 {
    color: var(--text-dark) !important;
    font-weight: 600;
}

.stat-card .stat-value {
    color: var(--text-dark) !important;
    font-weight: 700;
}

.stat-amount {
    font-size: 1.3rem !important;
    font-weight: 700;
}

.stat-amount::after {
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-large {
    max-width: 700px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-medium);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--danger);
}

.form-group {
    margin-bottom: 1.25rem;
}

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group input:disabled {
    background: var(--bg-light);
    cursor: not-allowed;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Form Steps */
.form-steps {
    margin-bottom: 2rem;
}

.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--text-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.step-item.active .step-number {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.step-label {
    font-size: 0.875rem;
    color: var(--text-medium);
    font-weight: 500;
}

.step-item.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

.step-line {
    width: 80px;
    height: 2px;
    background: var(--border);
    margin: 0 1rem;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.form-step h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.step-description {
    color: var(--text-medium);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

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

.settings-form {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.settings-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    font-family: inherit;
    resize: vertical;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#pageInfo {
    font-weight: 500;
    color: var(--text-dark);
}

/* Hamburger Button */
.hamburger-btn {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    padding: 0.625rem 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
    position: relative;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: all 0.2s;
}

.hamburger-btn:hover {
    background: var(--bg-light);
    border-color: var(--border-hover);
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 1.25rem;
    height: 1rem;
}

.hamburger-icon span {
    width: 100%;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-btn:hover .hamburger-icon span {
    background: var(--primary);
}

.hamburger-text {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.hamburger-btn:hover .hamburger-text {
    color: var(--primary);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: var(--bg-white);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.sidebar.active {
    right: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, var(--primary) 0%, #0056b3 100%);
    color: white;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.75rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: transform 0.2s ease;
}

.close-btn:hover {
    transform: rotate(90deg);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-size: 1rem;
    color: var(--text-dark);
    position: relative;
}

.nav-item:hover {
    background: rgba(0, 123, 255, 0.05);
}

.nav-item.active {
    background: rgba(0, 123, 255, 0.1);
    border-left: 4px solid var(--primary);
    font-weight: 600;
}

.nav-icon {
    font-size: 1.5rem;
}

.nav-text {
    flex: 1;
}

.sidebar-content {
    padding: 1.5rem;
}

.sidebar-section {
    display: none;
}

.sidebar-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.sidebar-section-content {
    position: fixed;
    top: 0;
    right: 0;
    width: 600px;
    max-width: 90vw;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    padding: 2rem;
    z-index: 2000;
}

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

.sidebar-section h3 {
    margin: 0 0 1.5rem 0;
    color: var(--text-dark);
    font-size: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary);
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .container header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .container header nav {
        flex-direction: column;
        width: 100%;
    }
    
    .container header nav button {
        width: 100%;
    }
    
    .filter-buttons {
        flex-direction: column;
    }
    
    .filter-buttons button {
        width: 100%;
    }
    
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
}

/* Modern Login Page Styles */
.modern-login-page {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.modern-login-container {
    display: flex;
    min-height: 100vh;
    background: #f5f7fa;
}

.login-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: white;
    position: relative;
}

.login-content {
    width: 100%;
    max-width: 450px;
}

.login-logo {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.login-logo svg {
    width: 28px;
    height: 28px;
    color: white;
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    font-size: 1rem;
    color: #718096;
    margin-bottom: 2rem;
}

.modern-login-form {
    margin-bottom: 2rem;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #a0aec0;
    pointer-events: none;
}

.input-group input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-group input::placeholder {
    color: #a0aec0;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #a0aec0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: var(--primary);
}

.modern-error-message {
    display: none;
    padding: 0.875rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.btn-modern-primary {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, #2563EB 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}

.btn-modern-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
}

.btn-modern-primary:active {
    transform: translateY(0);
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #4a5568;
}

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

.forgot-password {
    font-size: 0.875rem;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: #2563EB;
    text-decoration: underline;
}

.login-help {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.login-help > p {
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 1rem;
    font-weight: 500;
}

.test-accounts {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.test-accounts span {
    font-size: 0.8125rem;
    color: #4a5568;
    padding: 0.625rem 1rem;
    background: #f7fafc;
    border-radius: var(--border-radius-sm);
    border: 1px solid #e2e8f0;
}

.test-accounts strong {
    color: var(--primary);
    font-weight: 600;
}

.login-right {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.login-visual {
    position: relative;
    z-index: 1;
    max-width: 500px;
}

.visual-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.visual-content > p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(10px);
}

.feature-icon {
    font-size: 1.5rem;
}

.visual-gradient {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

@media (max-width: 968px) {
    .modern-login-container {
        flex-direction: column;
    }
    
    .login-right {
        min-height: 300px;
    }
    
    .visual-content h2 {
        font-size: 2rem;
    }
    
    .feature-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .feature-item {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 640px) {
    .login-left {
        padding: 1.5rem;
    }
    
    .login-content {
        max-width: 100%;
    }
    
    .login-title {
        font-size: 1.75rem;
    }
    
    .login-right {
        padding: 2rem;
    }
    
    .visual-content h2 {
        font-size: 1.5rem;
    }
    
    .visual-content > p {
        font-size: 1rem;
    }
    
    .feature-list {
        grid-template-columns: 1fr;
    }
    
    .login-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Pattern for dashboard and admin pages */
body.with-pattern::before {
    display: block;
}

.metric-emoji {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Modern header for dashboard */
.modern-header {
    background: white;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
