/* ============================================================
   CROWNGENIX - Main Stylesheet
   Premium Telehealth Hair Restoration Platform
   Charcoal & Copper Color Scheme
   ============================================================ */

:root {
    --primary: #2C2C2C;
    --secondary: #C67D4A;
    --dark: #1a1a1a;
    --light: #f8f8f6;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-500: #adb5bd;
    --gray-700: #495057;
    --gray-900: #212529;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
}

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font-body);
    color: var(--gray-900);
    line-height: 1.6;
    background: #fff;
}
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; }
img { max-width: 100%; height: auto; }
a { color: var(--primary); transition: var(--transition); }
a:hover { color: var(--secondary); }

/* Navbar */
.navbar { padding: 0.8rem 0; box-shadow: 0 2px 20px rgba(0,0,0,0.1); }
.brand-text { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; letter-spacing: 1px; }
.navbar .nav-link { font-weight: 500; padding: 0.5rem 1rem !important; font-size: 0.95rem; }
.navbar .btn-outline-light { border-radius: 50px; font-size: 0.85rem; }

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    color: white;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 70%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(212,168,83,0.1) 0%, transparent 70%);
    pointer-events: none;
}
.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}
.hero p.lead {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 540px;
    margin-bottom: 2rem;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: var(--transition);
}
.btn-primary:hover {
    background-color: var(--dark);
    border-color: var(--dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(27,77,62,0.3);
}
.btn-secondary {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: var(--dark);
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 600;
}
.btn-secondary:hover {
    background-color: #c49a42;
    border-color: #c49a42;
    color: var(--dark);
    transform: translateY(-2px);
}
.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 600;
}
.btn-outline-primary:hover {
    background-color: var(--primary);
    color: white;
}
.btn-lg { padding: 1rem 2.5rem; font-size: 1.1rem; }

/* Cards */
.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.card-body { padding: 1.75rem; }

/* Product Cards */
.product-card { position: relative; }
.product-card .badge-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--secondary);
    color: var(--dark);
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}
.product-card .product-img {
    height: 220px;
    background: linear-gradient(135deg, #f0f7f4 0%, #e8f0ed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--primary);
}
.product-card h5 { font-family: var(--font-heading); }
.product-card .price-original { text-decoration: line-through; color: var(--gray-500); font-size: 0.9rem; }
.product-card .price-sub { color: var(--primary); font-weight: 700; font-size: 1.4rem; }
.product-card .price-label { color: var(--gray-700); font-size: 0.8rem; }

/* Trust Badges Section */
.trust-section {
    background: var(--gray-100);
    padding: 3rem 0;
}
.trust-badge {
    text-align: center;
    padding: 1.5rem;
}
.trust-badge i { font-size: 2.5rem; color: var(--primary); margin-bottom: 0.75rem; }
.trust-badge h6 { font-weight: 700; margin-bottom: 0.25rem; }
.trust-badge p { font-size: 0.85rem; color: var(--gray-700); margin: 0; }

/* How It Works */
.steps-section { padding: 5rem 0; }
.step-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    border-radius: var(--radius);
    background: white;
    position: relative;
}
.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
    font-family: var(--font-heading);
}
.step-card h5 { font-family: var(--font-heading); margin-bottom: 0.75rem; }
.step-card p { color: var(--gray-700); font-size: 0.95rem; }

/* Section Headers */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2.5rem; margin-bottom: 1rem; color: var(--primary); }
.section-header p { font-size: 1.1rem; color: var(--gray-700); max-width: 600px; margin: 0 auto; }
.section-header .divider {
    width: 60px;
    height: 3px;
    background: var(--secondary);
    margin: 1rem auto;
    border-radius: 2px;
}

/* Questionnaire */
.questionnaire-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 0;
}
.q-progress {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    margin-bottom: 2rem;
    overflow: hidden;
}
.q-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
    transition: width 0.5s ease;
}
.q-section { display: none; }
.q-section.active { display: block; animation: fadeInUp 0.4s ease; }
.q-section h3 { font-family: var(--font-heading); margin-bottom: 0.5rem; color: var(--primary); }
.q-section .section-desc { color: var(--gray-700); margin-bottom: 2rem; }
.q-question { margin-bottom: 2rem; }
.q-question label.q-label { font-weight: 600; margin-bottom: 0.75rem; display: block; font-size: 1.05rem; }
.q-question .form-check { padding: 0.75rem 1rem 0.75rem 2.75rem; border: 2px solid var(--gray-200); border-radius: var(--radius-sm); margin-bottom: 0.5rem; transition: var(--transition); cursor: pointer; }
.q-question .form-check:hover { border-color: var(--primary); background: rgba(var(--primary-rgb), 0.03); }
.q-question .form-check-input:checked + .form-check-label { color: var(--primary); font-weight: 600; }
.q-question .form-check-input:checked ~ .form-check { border-color: var(--primary); background: rgba(var(--primary-rgb), 0.05); }

/* Photo Upload */
.photo-upload {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--gray-100);
}
.photo-upload:hover { border-color: var(--primary); background: rgba(var(--primary-rgb), 0.03); }
.photo-upload i { font-size: 2.5rem; color: var(--gray-500); margin-bottom: 0.5rem; }
.photo-upload.has-image { border-color: var(--success); background: rgba(40,167,69,0.05); }

/* Subscription Toggle */
.plan-toggle {
    display: flex;
    background: var(--gray-100);
    border-radius: 50px;
    padding: 4px;
    max-width: 360px;
    margin: 0 auto 2rem;
}
.plan-toggle button {
    flex: 1;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    background: transparent;
    color: var(--gray-700);
    cursor: pointer;
    transition: var(--transition);
}
.plan-toggle button.active { background: var(--primary); color: white; box-shadow: 0 2px 10px rgba(27,77,62,0.3); }
.save-badge { background: var(--secondary); color: var(--dark); padding: 0.15rem 0.5rem; border-radius: 50px; font-size: 0.7rem; font-weight: 700; margin-left: 0.25rem; }

/* Footer */
.site-footer { background: var(--dark); color: white; }

/* Dashboard Layouts */
.dashboard-wrapper { display: flex; min-height: 100vh; }
.dashboard-sidebar {
    width: 260px;
    background: var(--primary);
    color: white;
    padding: 1.5rem 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}
.dashboard-sidebar .sidebar-brand {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 1rem;
}
.dashboard-sidebar .sidebar-brand h5 { font-family: var(--font-heading); margin: 0; }
.dashboard-sidebar .sidebar-brand small { opacity: 0.7; }
.dashboard-sidebar .nav-link {
    color: rgba(255,255,255,0.75);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}
.dashboard-sidebar .nav-link:hover { color: white; background: rgba(255,255,255,0.1); }
.dashboard-sidebar .nav-link.active { color: white; background: rgba(255,255,255,0.15); border-left-color: var(--secondary); }
.dashboard-sidebar .nav-link .badge { background: var(--secondary); color: var(--dark); font-size: 0.7rem; }
.dashboard-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
    background: var(--gray-100);
    min-height: 100vh;
}
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}
.dashboard-header h2 { font-family: var(--font-heading); color: var(--primary); margin: 0; }

/* Stats Cards */
.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}
.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.stat-card h3 { font-family: var(--font-body); font-size: 2rem; font-weight: 700; margin: 0.5rem 0 0.25rem; }
.stat-card p { color: var(--gray-700); font-size: 0.85rem; margin: 0; }

/* Data Tables */
.data-table { background: white; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.data-table .table { margin: 0; }
.data-table .table th { background: var(--gray-100); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray-700); border: none; padding: 1rem 1.25rem; }
.data-table .table td { padding: 1rem 1.25rem; vertical-align: middle; border-color: var(--gray-100); }

/* Messages / Chat */
.chat-container { display: flex; flex-direction: column; height: 500px; background: white; border-radius: var(--radius); box-shadow: var(--shadow); }
.chat-messages { flex: 1; overflow-y: auto; padding: 1.5rem; }
.chat-message { margin-bottom: 1rem; display: flex; }
.chat-message.sent { justify-content: flex-end; }
.chat-bubble {
    max-width: 70%;
    padding: 0.85rem 1.25rem;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
}
.chat-message.received .chat-bubble { background: var(--gray-100); border-bottom-left-radius: 4px; }
.chat-message.sent .chat-bubble { background: var(--primary); color: white; border-bottom-right-radius: 4px; }
.chat-input {
    padding: 1rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 0.5rem;
}
.chat-input input { border-radius: 50px; }
.chat-input button { border-radius: 50px; }

/* Prescription Label (print) */
.rx-label {
    border: 2px solid #000;
    padding: 1rem;
    max-width: 4in;
    font-family: monospace;
    font-size: 11px;
    line-height: 1.4;
}
@media print {
    .no-print { display: none !important; }
    .rx-label { border: 2px solid #000 !important; }
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.5s ease forwards; }

/* Responsive */
@media (max-width: 991px) {
    .hero h1 { font-size: 2.5rem; }
    .hero { padding: 4rem 0; }
    .dashboard-sidebar { transform: translateX(-100%); transition: var(--transition); }
    .dashboard-sidebar.show { transform: translateX(0); }
    .dashboard-content { margin-left: 0; }
}
@media (max-width: 575px) {
    .hero h1 { font-size: 2rem; }
    .step-card { padding: 1.5rem 1rem; }
}

/* Efficacy Meter */
.efficacy-meter { height: 6px; background: var(--gray-200); border-radius: 3px; overflow: hidden; }
.efficacy-meter .fill { height: 100%; border-radius: 3px; transition: width 1s ease; }
.efficacy-high .fill { background: linear-gradient(90deg, var(--success), #20c997); }
.efficacy-med .fill { background: linear-gradient(90deg, var(--warning), #fd7e14); }
.efficacy-low .fill { background: linear-gradient(90deg, var(--gray-500), var(--gray-500)); }

/* Norwood Scale Visual */
.norwood-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 0.75rem; }
.norwood-option {
    text-align: center;
    padding: 1rem 0.5rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}
.norwood-option:hover { border-color: var(--primary); }
.norwood-option.selected { border-color: var(--primary); background: rgba(var(--primary-rgb), 0.05); }
.norwood-option .stage-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.norwood-option .stage-label { font-size: 0.75rem; font-weight: 600; }
