/* =========================================
1. CORE VARIABLES & RESET
========================================= */
:root {
--primary: #0D9488;
--primary-dark: #0F766E;
--primary-light: #F0FDFA;
--secondary-green: #10B981;
--secondary-green-dark: #059669;
--accent: #1e293b;
--bg-body: #F8FAFB;
--bg-card: #FAFBFC;
--warning-bg: #FFF7ED;
--warning-text: #C2410C;
--warning-border: #FED7AA;
--success: #10B981;
--success-bg: #ECFDF5;
--error: #EF4444;
--error-bg: #FEF2F2;
--slate-800: #1E293B;
--slate-600: #475569;
--slate-400: #94a3b8;
--slate-200: #E2E8F0;
--border: #E2E8F0;
--radius-md: 6px;
--radius-lg: 12px;
--shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
--shadow-modal: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
--transition: all 0.2s ease-in-out;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { font-family: 'Inter', sans-serif; background-color: var(--bg-body); color: var(--slate-800); line-height: 1.5; font-size: 12.6px; }
h1, h2, h3, h4 { font-family: 'Poppins', sans-serif; font-weight: 600; color: var(--accent); }

.admin-action { display: inline-block; } 

/* =========================================
2. ALERTS & TRIAL BAR
========================================= */
.trial-warning-bar { background-color: var(--warning-bg); color: var(--warning-text); border-bottom: 1px solid var(--warning-border); text-align: center; padding: 0.5rem; font-size: 0.85rem; font-weight: 600; display: none; position: sticky; top: 0; z-index: 1000; }

.alert-toast { position: fixed; top: 20px; right: 20px; z-index: 3000; padding: 1rem 1.5rem; border-radius: var(--radius-md); box-shadow: var(--shadow-modal); color: white; animation: slideInRight 0.3s ease-out; display: none; }
.alert-success { background-color: var(--primary); }
.alert-error { background-color: var(--error); font-size: 0.85rem; }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* =========================================
3. SIDEBAR LAYOUT
========================================= */
.app-container { display: flex; min-height: 100vh; }
.sidebar { 
    width: 225px; 
    background: #F0FDF4; 
    border-right: 1px solid #16A34A; 
    padding: 0.9rem 0.7rem; 
    display: flex; 
    flex-direction: column; 
    flex-shrink: 0;
    max-height: 100vh;
    overflow-y: auto;
}
.sidebar-user-info {
    padding: 0.45rem;
    margin-bottom: 0.9rem;
    font-size: 0.68rem;
    color: #6B7280;
    border-bottom: 1px solid #E5E7EB;
}
.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.36rem;
}
.sidebar-logout {
    margin-top: auto;
    padding-top: 0.9rem;
    border-top: 1px solid #E5E7EB;
}
.main-content { 
    flex: 1; 
    padding: 1.8rem; 
    overflow-y: auto; 
    display: flex; 
    justify-content: center; 
    align-items: flex-start; 
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
    background-size: 200% 200%;
    animation: gradientShift 20s ease infinite;
    position: relative;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 75%, rgba(148, 163, 184, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 75% 25%, rgba(100, 116, 139, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.nav-btn { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 7px; 
    width: 90%; 
    margin: 0 auto 0.45rem auto; 
    padding: 0.54rem 0.72rem; 
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%); 
    border: 1px solid #E2E8F0; 
    border-radius: 7px; 
    text-align: center; 
    font-weight: 600; 
    font-size: 0.72rem; 
    color: #475569; 
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    box-shadow: 0 2px 4px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04); 
    position: relative;
    overflow: hidden;
}
.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}
.nav-btn:hover::before {
    left: 100%;
}
.nav-btn:hover { 
    border-color: #10B981; 
    color: #10B981; 
    transform: translateY(-2px); 
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15), 0 4px 10px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #FFFFFF 0%, #F0FDF4 100%);
}
.nav-btn.active { 
    background: linear-gradient(135deg, #10B981 0%, #059669 100%); 
    color: white; 
    border-color: #059669; 
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3), 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}
.nav-btn.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4), 0 3px 10px rgba(0,0,0,0.15);
}
/* Special styling for View Historical button */
#btnHistoryView { 
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%); 
    border-color: #BBF7D0; 
    color: #166534; 
}
#btnHistoryView:hover { 
    background: linear-gradient(135deg, #DCFCE7 0%, #BBF7D0 100%); 
    border-color: #86EFAC; 
    color: #15803D; 
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.15), 0 4px 10px rgba(0,0,0,0.1);
}
#btnHistoryView.active { 
    background: linear-gradient(135deg, #16A34A 0%, #15803D 100%); 
    color: white; 
    border-color: #15803D; 
}

/* Sidebar sections */
.sidebar-section { margin-top: 0.9rem; }
.sidebar-section-title { 
    font-size: 0.59rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    color: #374151; 
    margin-bottom: 0.36rem; 
    padding-left: 0.45rem;
    letter-spacing: 0.5px;
}

/* Estimate type buttons - premium styling */
.estimate-type-btn { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 7px;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%); 
    border: 1px solid #E2E8F0; 
    border-radius: 7px;
    color: #475569; 
    width: 90%;
    margin: 0 auto 0.45rem auto;
    padding: 0.54rem 0.72rem;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
}
.estimate-type-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}
.estimate-type-btn:hover::before {
    left: 100%;
}
.estimate-type-btn:hover { 
    border-color: #10B981; 
    color: #10B981; 
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15), 0 4px 10px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #FFFFFF 0%, #F0FDF4 100%);
}
.estimate-type-btn.active { 
    background: linear-gradient(135deg, #10B981 0%, #059669 100%); 
    color: white; 
    border-color: #059669; 
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3), 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

/* Admin buttons - premium styling */
.admin-btn { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 7px;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%); 
    border: 1px solid #E2E8F0; 
    border-radius: 7px;
    color: #475569; 
    width: 90%;
    margin: 0 auto 0.45rem auto;
    padding: 0.54rem 0.72rem;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
}
.admin-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}
.admin-btn:hover::before {
    left: 100%;
}
.admin-btn:hover { 
    border-color: #8B5CF6; 
    color: #8B5CF6; 
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.15), 0 4px 10px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #FFFFFF 0%, #FAF5FF 100%);
}
.admin-btn:active { 
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%); 
    color: white; 
    border-color: #7C3AED; 
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3), 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

/* Logout button in sidebar - premium styling */
.sidebar-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 90%;
    margin: 0 auto;
    padding: 0.54rem 0.72rem;
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
    border: 1px solid #FECACA;
    border-radius: 7px;
    text-align: center;
    font-weight: 600;
    font-size: 0.72rem;
    color: #DC2626;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
}
.sidebar-logout-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}
.sidebar-logout-btn:hover::before {
    left: 100%;
}
.sidebar-logout-btn:hover {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    border-color: #FCA5A5;
    color: #B91C1C;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.15), 0 4px 10px rgba(0,0,0,0.1);
}

/* =========================================
4. MODAL & LOGIN STYLES
========================================= */
.login-modal, .modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 2000; background: rgba(15, 23, 42, 0.7); backdrop-filter: blur(5px); align-items: center; justify-content: center; overflow-y: auto; padding: 1rem; }
.login-modal.show, .modal.show { display: flex; }
.login-container { background: #FEFEFE; width: 100%; max-width: 280px; border-radius: var(--radius-lg); box-shadow: var(--shadow-modal); position: relative; animation: zoomIn 0.2s cubic-bezier(0.16, 1, 0.3, 1); border: 1px solid rgba(255,255,255,0.5); overflow: hidden; }
.modal-content { background: #FEFEFE; width: 100%; max-width: 600px; border-radius: var(--radius-lg); box-shadow: var(--shadow-modal); position: relative; animation: zoomIn 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes zoomIn { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: scale(1); } }
.login-header-bg { background: linear-gradient(to right, #f8fafc, #f1f5f9); padding: 0.8rem; text-align: center; border-bottom: 1px solid var(--border); }
.login-logo-section svg { animation: logoFloat 3s ease-in-out infinite; }
@keyframes logoFloat { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-3px); } }
.modal-header { padding: 0.8rem 1.2rem; border-bottom: 1px solid var(--border); background: #FEFEFE; display: flex; justify-content: space-between; align-items: center; }
.modal-header h2 { font-size: 0.88rem; color: var(--slate-800); }
.close-btn { background: transparent; border: none; font-size: 1.2rem; color: var(--slate-400); cursor: pointer; line-height: 1; }
.close-btn:hover { color: var(--error); }
.modal-body, .login-form-wrapper { padding: 0.8rem; }
.auth-form { display: none; }
.auth-form.active { display: block; animation: fadeIn 0.4s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================
5. FORM INPUTS
========================================= */
.form-group { margin-bottom: 0.72rem; }
label { display: block; font-size: 0.68rem; font-weight: 600; margin-bottom: 0.32rem; color: var(--slate-600); letter-spacing: 0.3px; }
input, select, textarea { width: 100%; padding: 0.45rem 0.63rem; border: 1px solid var(--slate-200); border-radius: var(--radius-md); font-family: 'Inter', sans-serif; font-size: 0.77rem; color: var(--slate-800); transition: var(--transition); background: #FEFEFE; font-weight: 400; }
input:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }

/* Password toggle button styling */
#togglePassword, #toggleNewPassword {
    transition: var(--transition);
    border-radius: 3px;
}
#togglePassword:hover, #toggleNewPassword:hover {
    background-color: var(--slate-100);
    color: var(--slate-600);
}
#togglePassword:active, #toggleNewPassword:active {
    transform: translateY(-50%) scale(0.95);
}

/* Inline validation styling */
.field-error {
    border-color: #F87171 !important;
    box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.1) !important;
}
.field-warning {
    border-color: #FBBF24 !important;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.1) !important;
}
.validation-message {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    line-height: 1.2;
}
.validation-error {
    color: #DC2626;
}
.validation-warning {
    color: #D97706;
}
.validation-success {
    color: #059669;
}

/* =========================================
REMOVE NUMBER INPUT SPINNERS (ALL BROWSERS)
========================================= */
/* Chrome, Safari, Edge, Opera */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type="number"] {
    -moz-appearance: textfield;
    appearance: none;
}

/* Additional cross-browser spinner removal */
input[type="number"]::-ms-clear {
    display: none;
}

input[type="number"]::-ms-reveal {
    display: none;
}

/* Ensure consistent appearance across all numeric inputs */
input[type="number"] {
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
    appearance: textfield;
}
.auth-button { width: 100%; background: var(--primary); color: white; padding: 0.6rem; border-radius: var(--radius-md); font-weight: 600; border: none; cursor: pointer; transition: all 0.2s; font-size: 0.9rem; margin-top: 0.3rem; box-shadow: 0 2px 4px rgba(13, 148, 136, 0.2); }
.auth-button:hover { background: var(--primary-dark); transform: translateY(-1px); }
.auth-button:disabled { background: var(--slate-400); cursor: not-allowed; transform: none; box-shadow: none; font-family: 'Courier New', monospace; letter-spacing: 0.5px; }
.auth-button:disabled:hover { background: var(--slate-400); transform: none; }
.btn-primary, .btn-secondary, .btn-save { padding: 0.4rem 0.8rem; border-radius: var(--radius-md); font-weight: 500; border: none; cursor: pointer; transition: var(--transition); font-size: 0.68rem; }
.btn-primary, .btn-save { background: var(--secondary-green); color: white; box-shadow: 0 1px 2px rgba(0,0,0,0.1); }
.btn-primary:hover, .btn-save:hover { background: var(--secondary-green-dark); transform: translateY(-1px); }
.btn-secondary { background: #FEFEFE; border: 1px solid var(--slate-200); color: var(--slate-600); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-delete { padding: 0.2rem 0.4rem; background: var(--error-bg); color: #B91C1C; border: 1px solid #FECACA; border-radius: 4px; font-size: 0.56rem; cursor: pointer; }

/* =========================================
6. CALCULATOR DASHBOARD & HISTORY
========================================= */
#calculatorContent { display: none; flex-direction: column; min-height: 100vh; background: var(--bg-body); }
#calculatorContent.show { display: flex; }
.calculator-wrapper { flex: 1; padding: 2rem 1rem; display: flex; justify-content: center; background: var(--bg-body); }
.calculator-inner { 
    background: rgba(255, 255, 255, 0.95); 
    padding: 2.25rem; 
    border-radius: var(--radius-lg); 
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(255, 255, 255, 0.5); 
    width: 100%; 
    max-width: 855px; 
    border: 1px solid rgba(226, 232, 240, 0.8); 
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}
.calculator-title { font-family: 'Playfair Display', serif; font-size: 1.6rem; margin-bottom: 1.5rem; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); color: var(--primary-dark); letter-spacing: 0.5px; text-align: center; background: #F0FDF4; border-radius: var(--radius-md); }
.form-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; margin-bottom: 0.45rem; }
.results-section { margin-top: 1.5rem; border: 1px solid #E2E8F0; border-radius: var(--radius-lg); overflow: hidden; display: none; scroll-margin-top: 2rem; box-shadow: 0 4px 12px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.03); }
.results-section.show { display: block; animation: slideUp 0.4s; }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.results-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; background: #FEFEFE; box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.3); }
.patient-responsibility { grid-row: 1 / 3; background: linear-gradient(135deg, #ECFDF5, #D1FAE5); padding: 0.4rem; display: flex; flex-direction: column; align-items: center; justify-content: center; border-right: 1px solid #E2E8F0; text-align: center; position: relative; overflow: hidden; }
.patient-responsibility::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(to right, transparent, #10B981, transparent); }
.patient-responsibility h3 { color: #064E3B; font-size: 0.55rem; text-transform: uppercase; margin-bottom: 0.2rem; font-weight: 700; letter-spacing: 0.02em; }
.patient-responsibility .amount { font-size: 1.2rem; font-weight: 700; color: #047857; line-height: 1; margin-bottom: 0.2rem; text-shadow: 0 1px 0 rgba(255,255,255,0.8); position: relative; }
.patient-responsibility .amount::after { content: ''; position: absolute; bottom: -0.1rem; left: 50%; transform: translateX(-50%); width: 70%; height: 1px; background: linear-gradient(to right, transparent, rgba(4, 120, 87, 0.2), transparent); }
.patient-responsibility .btn-secondary { font-size: 0.55rem; padding: 0.2rem 0.4rem; margin-top: 0.1rem; background: #FFFFFF; border: 1px solid #10B981; color: #059669; border-radius: 4px; transition: all 0.2s ease; }
.patient-responsibility .btn-secondary:hover { background: #F0FDF4; transform: translateY(-1px); box-shadow: 0 2px 4px rgba(16, 185, 129, 0.15); }
.disclaimer { font-size: 0.45rem; color: #4B5563; font-style: italic; margin-bottom: 0.3rem; }
.result-item { padding: 0.8rem; border-bottom: 1px solid #E2E8F0; border-right: 1px solid #E2E8F0; display: flex; flex-direction: column; justify-content: center; background: linear-gradient(to bottom, #FFFFFF, #F8FAFC); }
.result-label { font-size: 0.7rem; text-transform: uppercase; color: var(--slate-400); font-weight: 600; margin-bottom: 4px; }
.result-item .value { font-size: 1rem; font-weight: 600; color: #1E293B; text-shadow: 0 0.5px 0 rgba(255,255,255,0.8); }
#historyTable { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin-top: 0.5rem; background: #FEFEFE; }
#historyTable th { text-align: left; background: var(--slate-200); padding: 0.6rem; font-weight: 600; color: var(--slate-600); position: sticky; top:0; }
#historyTable td { padding: 0.6rem; border-bottom: 1px solid var(--border); color: var(--slate-800); }
.history-link { color: var(--primary); font-weight: 600; text-decoration: none; border-bottom: 1px dashed var(--primary); transition: all 0.2s; cursor: pointer; }
.history-link:hover { color: var(--primary-dark); border-bottom-style: solid; }
.history-filters { display: flex; gap: 1rem; margin-bottom: 1rem; background: #FEFEFE; padding: 1rem; border-radius: var(--radius-md); border: 1px solid var(--border); align-items: flex-end; }
@media (max-width: 900px) { 
    .form-row { grid-template-columns: repeat(2, 1fr); } 
    .results-grid { grid-template-columns: 1fr 1fr; } 
    .patient-responsibility { grid-row: auto; grid-column: 1 / -1; border-right: none; border-bottom: 1px solid #E2E8F0; padding: 0.6rem; }
    .patient-responsibility .amount { font-size: 1.4rem; }
    .patient-responsibility h3 { font-size: 0.65rem; } 
    .app-container { flex-direction: column; min-height: 100vh; } 
    .sidebar { 
        width: 100%; 
        flex-direction: row; 
        overflow-x: auto; 
        padding: 0.8rem; 
        border-bottom: 1px solid #16A34A; 
        border-right: none; 
        min-height: auto;
    }
    .sidebar-user-info {
        writing-mode: vertical-rl;
        text-orientation: mixed;
        margin-right: 1rem;
        margin-bottom: 0;
        border-bottom: none;
        border-right: 1px solid #E5E7EB;
        padding-right: 0.5rem;
    }
    .sidebar-nav {
        flex-direction: row;
        gap: 0.4rem;
        flex: 1;
    }
    .sidebar-logout {
        margin-top: 0;
        margin-left: 1rem;
        padding-top: 0;
        padding-left: 1rem;
        border-top: none;
        border-left: 1px solid #E5E7EB;
    }
    .sidebar-section {
        display: flex;
        flex-direction: row;
        gap: 0.4rem;
        margin-top: 0;
        margin-right: 0.8rem;
    }
    .sidebar-section-title {
        writing-mode: vertical-rl;
        text-orientation: mixed;
        margin-bottom: 0;
        margin-right: 0.4rem;
        font-size: 0.55rem;
    }
    .nav-btn, .estimate-type-btn, .admin-btn, .sidebar-logout-btn {
        width: auto;
        white-space: nowrap;
        min-width: 100px;
        margin: 0 0.2rem;
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
    }
}
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; gap: 0.5rem; } .results-grid { grid-template-columns: 1fr; } .history-filters { flex-direction: column; } }
.table-wrapper { border: 1px solid var(--border); border-radius: var(--radius-md); overflow-x: auto; margin-bottom: 0.8rem; max-height: 240px; background: #FEFEFE; }
table { width: 100%; border-collapse: collapse; min-width: 320px; }
th { background: var(--slate-200); padding: 0.48rem; text-align: left; font-size: 0.6rem; color: var(--slate-600); font-weight: 600; text-transform: uppercase; position: sticky; top: 0; }
td { padding: 0.4rem 0.48rem; border-top: 1px solid var(--border); font-size: 0.68rem; }
.secondary-checkbox-wrapper { height: 100%; display: flex; align-items: center; gap: 0.5rem; background: #FEFEFE; padding: 0 0.6rem; border-radius: var(--radius-md); border: 1px dashed var(--slate-200); cursor: pointer; justify-content: center; }

/* =========================================
7. LANDING PAGE
========================================= */
#landingPage { 
    display: block; 
    background: #FEFEFE; 
}
.hero-section { 
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.95)), 
                url('https://images.unsplash.com/photo-1576091160399-112ba8d25d1d?q=80&w=2070&auto=format&fit=crop') center/cover; 
    color: white; 
    padding: 6rem 1rem 4rem; 
    text-align: center; 
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary-green), var(--primary));
    z-index: 1;
}

/* White glow effect removed for cleaner premium look */
.hero-section::after {
    display: none;
}
.hero-content h2 { 
    color: white; 
    font-size: 3.2rem; 
    margin-bottom: 1rem; 
    text-shadow: 0 4px 10px rgba(0,0,0,0.3); 
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
}

.hero-content h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--secondary-green);
    border-radius: 3px;
}
.hero-cta-button { 
    background: linear-gradient(135deg, var(--secondary-green), var(--secondary-green-dark)); 
    color: white; 
    padding: 1.1rem 3.2rem; 
    font-size: 1.1rem; 
    font-family: 'Poppins', sans-serif; 
    font-weight: 600; 
    border: none; 
    border-radius: 50px; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.25), 0 5px 10px rgba(0,0,0,0.1), 0 10px 30px rgba(16,185,129,0.35); 
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.7s;
}

.hero-cta-button:hover::before {
    left: 100%;
}
.hero-cta-button:hover { transform: translateY(-3px); box-shadow: 0 15px 35px rgba(16, 185, 129, 0.4); background: var(--secondary-green-dark); }
.no-surprises-text { 
    background: rgba(16, 185, 129, 0.15); 
    border: 1px solid rgba(16, 185, 129, 0.3); 
    border-radius: 12px; 
    padding: 1.2rem; 
    max-width: 700px; 
    margin: 2.5rem auto 0; 
    font-size: 0.95rem; 
    color: #f0fdfa; 
    backdrop-filter: blur(8px); 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

.no-surprises-text strong {
    color: white;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.container { max-width: 1100px; margin: 0 auto; padding: 3rem 1rem; }
.section-header { position: relative; text-align: center; padding-bottom: 1rem; margin-bottom: 2rem; }

.section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}

.section-header h2 { 
    text-align: center; 
    margin-bottom: 0.5rem; 
    font-size: 2.2rem; 
    color: var(--accent);
    font-weight: 700;
    letter-spacing: -0.5px;
}
.benefits-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
    gap: 2rem; 
    margin-bottom: 3rem; 
    position: relative;
    z-index: 1;
}
.benefit-card { 
    padding: 2rem; 
    background: linear-gradient(to bottom, #FFFFFF, #F8FAFC); 
    border-radius: var(--radius-lg); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.04), 0 6px 10px rgba(0,0,0,0.02); 
    border: 1px solid rgba(226, 232, 240, 0.7); 
    transition: all 0.3s ease; 
    position: relative;
    overflow: hidden;
}

.benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--primary);
    transition: height 0.3s ease;
}

.benefit-card:hover::before {
    height: 100%;
}
.benefit-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 15px 35px rgba(0,0,0,0.08), 0 5px 15px rgba(0,0,0,0.04);
    border-color: rgba(13, 148, 136, 0.2);
}
.testimonials-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 2rem; 
    position: relative;
    z-index: 1;
    margin: 0 auto;
    max-width: 900px;
}
.testimonial-card { 
    background: #FEFEFE; 
    padding: 2rem; 
    border-radius: var(--radius-lg); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.04), 0 6px 10px rgba(0,0,0,0.02); 
    border: 1px solid rgba(226, 232, 240, 0.7); 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    position: relative;
    transition: all 0.3s ease;
}

.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 4rem;
    font-family: Georgia, serif;
    color: rgba(13, 148, 136, 0.1);
    line-height: 1;
}

.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08), 0 5px 15px rgba(0,0,0,0.04);
    border-color: rgba(13, 148, 136, 0.2);
}
.testimonial-text { 
    font-style: italic; 
    color: var(--slate-600); 
    font-size: 0.95rem; 
    margin: 0.5rem 0 1.5rem; 
    line-height: 1.6;
    position: relative;
    padding-left: 1rem;
}
.testimonial-author { font-weight: 700; color: var(--slate-800); font-size: 0.85rem; display: flex; align-items: center; gap: 0.5rem; }
.author-role { font-weight: 400; color: var(--slate-400); font-size: 0.75rem; }
.avatar-small { 
    width: 40px; 
    height: 40px; 
    background: linear-gradient(135deg, var(--primary-light), var(--primary)); 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 0.8rem; 
    color: white; 
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(13, 148, 136, 0.2);
}
footer { 
    background: linear-gradient(to right, #1E293B, #0F172A); 
    color: #E2E8F0; 
    padding: 2rem 1rem; 
    text-align: center; 
    font-size: 0.85rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--secondary-green), var(--primary));
}

footer p {
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

footer strong {
    color: white;
    font-weight: 600;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.footer-link {
    color: #94A3B8;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: white;
    text-decoration: underline;
}