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

:root {
    --primary: #0066cc;
    --primary-light: #e3f2fd;
    --secondary: #6c757d;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --light: #f8f9fa;
    --dark: #343a40;
    --sidebar-bg: #1a1d29;
    --card-shadow: 0 2px 8px rgba(0,0,0,0.1);
    --accent: #764ba2;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: white;
    padding: 1rem 0;
    box-shadow: var(--card-shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-large, .btn-success, .btn-danger, .btn-warning, .btn-outline {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

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

.btn-primary:hover {
    background: #0052a3;
}

.btn-secondary {
    background: var(--light);
    color: var(--dark);
}

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

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

.btn-warning {
    background: var(--warning);
    color: #333;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    background: var(--primary);
    color: white;
}

.btn-block {
    width: 100%;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

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

/* Hero Section */
.hero {
    text-align: center;
    padding: 5rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Features */
.features {
    padding: 4rem 0;
}

.features-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.features-subtitle {
    text-align: center;
    color: var(--secondary);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.features .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
}

.feature-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.feature-card p {
    color: var(--secondary);
    font-size: 0.95rem;
}

/* How it works */
.how-it-works {
    padding: 4rem 0;
    background: white;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.step {
    text-align: center;
    padding: 1.5rem;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.step h3 {
    margin-bottom: 0.5rem;
}

.step p {
    color: var(--secondary);
    font-size: 0.9rem;
}

/* CTA Section */
.cta-section {
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-white {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    background: white;
    color: var(--primary);
    transition: all 0.3s;
}

.btn-white-outline {
    padding: 0.75rem 1.5rem;
    border: 2px solid white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    background: transparent;
    color: white;
    transition: all 0.3s;
}

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

.login-box {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

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

.logo-center h2 {
    margin-top: 1rem;
    color: var(--dark);
}

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

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

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

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

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar .logo {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: white;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.sidebar-nav a {
    display: block;
    padding: 0.875rem 1.5rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s;
}

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

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-footer a {
    display: block;
    padding: 0.875rem 0.5rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    margin-left: 260px;
}

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

.dashboard-header h1 {
    font-size: 2rem;
    color: var(--dark);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: var(--secondary);
    font-size: 0.9rem;
}

.stat-change {
    font-size: 0.85rem;
    color: var(--secondary);
}

.stat-change.positive {
    color: var(--success);
}

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

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
}

.card.wide {
    grid-column: 1 / -1;
}

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

.card-header h2 {
    font-size: 1.3rem;
    color: var(--dark);
}

/* Lists */
.appointments-list, .schedule-list, .prescriptions-list, .patients-list, .activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.appointment-item, .schedule-item, .prescription-item, .patient-item, .activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 8px;
}

.appointment-date {
    text-align: center;
    padding: 0.5rem;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    min-width: 60px;
}

.appointment-date .day {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
}

.appointment-date .month {
    display: block;
    font-size: 0.8rem;
}

.appointment-info, .schedule-info, .prescription-info, .patient-info, .activity-info {
    flex: 1;
}

.appointment-info h4, .schedule-info h4, .prescription-info h4, .patient-info h4, .activity-info h4 {
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.appointment-info p, .schedule-info p, .prescription-info p, .patient-info p, .activity-info p {
    color: var(--secondary);
    font-size: 0.9rem;
}

.time, .validity {
    font-size: 0.85rem;
    color: var(--secondary);
}

/* Schedule */
.schedule-time {
    font-weight: bold;
    color: var(--primary);
    min-width: 60px;
}

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

.schedule-item.active {
    background: #e3f2fd;
    border-left: 4px solid var(--primary);
}

/* Badges */
.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-secondary {
    background: #e2e3e5;
    color: #383d41;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
}

/* Prescription */
.prescription-icon {
    font-size: 2rem;
}

/* Patient Avatar */
.patient-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

/* Activity */
.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.activity-icon.new { background: #e3f2fd; }
.activity-icon.success { background: #d4edda; }
.activity-icon.warning { background: #fff3cd; }
.activity-icon.danger { background: #f8d7da; }

.activity-time {
    font-size: 0.85rem;
    color: var(--secondary);
    white-space: nowrap;
}

/* Specialty */
.specialty-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.specialty-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.specialty-name {
    min-width: 120px;
    font-size: 0.9rem;
}

.specialty-bar {
    flex: 1;
    height: 8px;
    background: var(--light);
    border-radius: 4px;
    overflow: hidden;
}

.specialty-fill {
    height: 100%;
    background: var(--primary);
}

.specialty-count {
    font-weight: bold;
    color: var(--dark);
}

.filter-select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* ========== NEW COMPONENTS ========== */

/* Chat / Coach IA */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.chat-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
}

.chat-header .chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.chat-header-info h3 {
    font-size: 1rem;
    color: var(--dark);
}

.chat-header-info p {
    font-size: 0.8rem;
    color: var(--success);
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: #f9fafb;
}

.chat-message {
    max-width: 75%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.chat-message.bot {
    background: white;
    align-self: flex-start;
    border: 1px solid #eee;
    border-bottom-left-radius: 4px;
}

.chat-message.user {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-message .msg-time {
    font-size: 0.75rem;
    opacity: 0.6;
    margin-top: 0.25rem;
    display: block;
}

.chat-suggestions {
    padding: 0.5rem 1.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    background: #f9fafb;
    border-top: 1px solid #eee;
}

.chat-suggestion-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--primary);
    border-radius: 20px;
    background: white;
    color: var(--primary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

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

.chat-input {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    background: white;
}

.chat-input input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 0.95rem;
    outline: none;
}

.chat-input input:focus {
    border-color: var(--primary);
}

.chat-input button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafbfc;
}

.upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-area .upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-area h3 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.upload-area p {
    color: var(--secondary);
    font-size: 0.9rem;
}

/* Tabs */
.tab-nav {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 1.5rem;
}

.tab-nav button {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    font-size: 1rem;
    color: var(--secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
}

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

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

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

.data-table th, .data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    font-weight: 600;
    color: var(--dark);
    background: var(--light);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tr:hover {
    background: #f8f9ff;
}

.data-table td {
    font-size: 0.95rem;
    color: #555;
}

/* Meal Cards */
.meal-section {
    margin-bottom: 1.5rem;
}

.meal-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
    font-size: 1.1rem;
}

.meal-card {
    background: var(--light);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.meal-card .meal-icon {
    font-size: 1.5rem;
}

.meal-card .meal-info {
    flex: 1;
}

.meal-card .meal-info h4 {
    font-size: 0.95rem;
    color: var(--dark);
}

.meal-card .meal-info p {
    font-size: 0.85rem;
    color: var(--secondary);
}

.meal-card .meal-macros {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
}

.macro-tag {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.macro-tag.carb { background: #fff3cd; color: #856404; }
.macro-tag.prot { background: #d4edda; color: #155724; }
.macro-tag.fat { background: #f8d7da; color: #721c24; }
.macro-tag.cal { background: var(--primary-light); color: var(--primary); }

/* Diet Plan */
.diet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.diet-header h2 {
    color: white;
}

.diet-macros-summary {
    display: flex;
    gap: 1.5rem;
}

.diet-macro-item {
    text-align: center;
}

.diet-macro-item .value {
    font-size: 1.5rem;
    font-weight: bold;
    display: block;
}

.diet-macro-item .label {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Progress / Evolution */
.progress-bar-container {
    background: #eee;
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s;
}

.progress-bar-fill.green { background: var(--success); }
.progress-bar-fill.blue { background: var(--primary); }
.progress-bar-fill.yellow { background: var(--warning); }
.progress-bar-fill.red { background: var(--danger); }

.metric-card {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.metric-card .metric-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
}

.metric-card .metric-label {
    font-size: 0.9rem;
    color: var(--secondary);
    margin-top: 0.25rem;
}

.metric-card .metric-change {
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.photo-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.photo-slot {
    background: var(--light);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ddd;
}

.photo-slot .photo-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.photo-slot h4 {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.photo-slot p {
    color: var(--secondary);
    font-size: 0.9rem;
}

/* Challenge / Gamification */
.challenge-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: transform 0.3s;
}

.challenge-card:hover {
    transform: translateY(-4px);
}

.challenge-banner {
    padding: 1.5rem;
    color: white;
    position: relative;
}

.challenge-banner.active { background: linear-gradient(135deg, #28a745, #20c997); }
.challenge-banner.upcoming { background: linear-gradient(135deg, #667eea, #764ba2); }
.challenge-banner.completed { background: linear-gradient(135deg, #6c757d, #495057); }

.challenge-banner h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.challenge-banner p {
    font-size: 0.85rem;
    opacity: 0.9;
}

.challenge-body {
    padding: 1.5rem;
}

.challenge-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

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

.challenge-stat .stat-val {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--dark);
}

.challenge-stat .stat-lbl {
    font-size: 0.75rem;
    color: var(--secondary);
}

.challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Gamification - Streaks & Badges */
.streak-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #ff9a56, #ff6a00);
    color: white;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.streak-bar .streak-icon {
    font-size: 2rem;
}

.streak-bar .streak-info h3 {
    color: white;
    font-size: 1.1rem;
}

.streak-bar .streak-info p {
    font-size: 0.85rem;
    opacity: 0.9;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
}

.badge-item {
    text-align: center;
    padding: 1rem;
}

.badge-item .badge-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.badge-item .badge-name {
    font-size: 0.75rem;
    color: var(--dark);
    font-weight: 500;
}

.badge-item.locked {
    opacity: 0.3;
}

/* Form Section (Anamnesis) */
.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* AI Builder */
.ai-builder-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.ai-generated-diet {
    border: 2px solid var(--success);
    border-radius: 12px;
    padding: 1.5rem;
    background: #f0fff4;
}

.ai-generated-diet .ai-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--success);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

/* Marketplace */
.marketplace-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.marketplace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.marketplace-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: transform 0.3s;
}

.marketplace-card:hover {
    transform: translateY(-4px);
}

.marketplace-card-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.marketplace-card-header .nutri-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: bold;
    flex-shrink: 0;
}

.marketplace-card-header .nutri-info h3 {
    font-size: 1rem;
    color: var(--dark);
}

.marketplace-card-header .nutri-info p {
    font-size: 0.85rem;
    color: var(--secondary);
}

.marketplace-card-header .nutri-info .rating {
    color: #ffc107;
    font-size: 0.9rem;
}

.marketplace-card-body {
    padding: 0 1.5rem 1.5rem;
}

.marketplace-card-body .tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.marketplace-card-body .tag {
    padding: 0.2rem 0.5rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.marketplace-card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.marketplace-card-footer .price {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--dark);
}

/* Mentoring / Patient Chat List */
.contact-list {
    display: flex;
    flex-direction: column;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.contact-item:hover, .contact-item.active {
    background: var(--primary-light);
}

.contact-item .unread-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

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

.contact-item .contact-info h4 {
    font-size: 0.95rem;
    color: var(--dark);
}

.contact-item .contact-info p {
    font-size: 0.8rem;
    color: var(--secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.contact-item .contact-time {
    font-size: 0.75rem;
    color: var(--secondary);
}

.mentoring-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
    height: calc(100vh - 180px);
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.mentoring-sidebar {
    border-right: 1px solid #eee;
    overflow-y: auto;
}

.mentoring-sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.mentoring-sidebar-header input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.9rem;
    outline: none;
}

/* Reports */
.chart-placeholder {
    background: var(--light);
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.chart-placeholder .chart-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.chart-placeholder p {
    color: var(--secondary);
}

/* Financial cards */
.revenue-card {
    text-align: center;
    padding: 1.5rem;
}

.revenue-card .revenue-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--success);
}

.revenue-card .revenue-label {
    font-size: 0.9rem;
    color: var(--secondary);
}

/* Search bar in header */
.search-bar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-bar input {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.9rem;
    width: 250px;
    outline: none;
}

.search-bar input:focus {
    border-color: var(--primary);
}

/* PDF Preview */
.pdf-preview {
    background: var(--light);
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.pdf-preview .pdf-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.pdf-file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.pdf-file-item .file-icon {
    font-size: 1.5rem;
}

.pdf-file-item .file-info {
    flex: 1;
}

.pdf-file-item .file-info h4 {
    font-size: 0.95rem;
    color: var(--dark);
}

.pdf-file-item .file-info p {
    font-size: 0.8rem;
    color: var(--secondary);
}

/* Alert boxes */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }

    .sidebar .logo span, .sidebar-nav a span {
        display: none;
    }

    .main-content {
        margin-left: 70px;
    }

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

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

    .mentoring-layout {
        grid-template-columns: 1fr;
    }

    .photo-comparison {
        grid-template-columns: 1fr;
    }

    .diet-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}
