/* FasoHealth Premium Green & White Clinical Design System */

:root {
    --bg-primary: #f8fafc; /* Slate 50 - Background page */
    --bg-secondary: #ffffff; /* Pure White - Sidebar & cards */
    --bg-card: #ffffff;
    --border-color: #e2e8f0; /* Slate 200 - Borders */
    
    --text-primary: #0f172a; /* Slate 900 */
    --text-secondary: #334155; /* Slate 700 */
    --text-muted: #64748b; /* Slate 500 */
    
    --color-teal: #059669; /* Emerald 600 - Main Brand Green */
    --color-teal-glow: rgba(5, 150, 105, 0.15);
    --color-teal-soft: #f0fdf4; /* Mint 50 - Soft active backgrounds */
    
    --color-purple: #0f766e; /* Teal 700 - Deep green-blue contrast */
    --color-purple-glow: rgba(15, 118, 110, 0.15);
    --color-purple-soft: #f0fdfa; /* Teal 50 */
    
    --color-danger: #dc2626; /* Red 600 */
    --color-danger-glow: rgba(220, 38, 38, 0.15);
    --color-danger-soft: #fef2f2;
    
    --color-success: #10b981; /* Emerald 500 */
    --color-success-soft: rgba(16, 185, 129, 0.08);
    
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --sidebar-width: 280px;
    --border-radius-lg: 16px;
    --border-radius-md: 10px;
    --border-radius-sm: 6px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-family);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    -webkit-font-smoothing: antialiased;
}

/* App Container Layout */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    flex-shrink: 0;
    z-index: 10;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.logo-icon {
    width: 28px;
    height: 28px;
    color: var(--color-teal);
    filter: drop-shadow(0 2px 4px var(--color-teal-glow));
}

/* Role Selector */
.role-selector-container {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.role-selector-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.role-badge {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius-sm);
    background: linear-gradient(135deg, var(--color-teal), var(--color-purple));
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.role-buttons {
    display: flex;
    gap: 0.25rem;
}

.btn-role {
    flex: 1;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem 0;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-role:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

.btn-role.active {
    background: var(--color-teal);
    border-color: var(--color-teal);
    color: #ffffff;
}

/* Nav Menu */
.nav-menu {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
}

.menu-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--border-radius-md);
    transition: var(--transition-fast);
}

.nav-link:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--color-teal-soft);
    color: var(--color-teal);
    font-weight: 600;
}

.nav-link svg {
    flex-shrink: 0;
}

.hidden {
    display: none !important;
}

/* User Summary Panel */
.user-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: 1rem;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-teal), var(--color-purple));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

/* Main Content Workspace */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-width: 0;
    background: radial-gradient(circle at top right, rgba(5, 150, 105, 0.03), transparent 60%),
                radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.03), transparent 60%),
                var(--bg-primary);
}

.main-header {
    height: 70px;
    padding: 0 2rem;
    border-bottom: 1px solid var(--border-color);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.main-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

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

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.status-indicator.online::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--color-success);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px var(--color-success);
}

.content-scroll {
    flex-grow: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* Tab Content Visibility */
.tab-content {
    display: none;
    animation: fadeIn var(--transition-normal);
}

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

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

/* Card Component & Glassmorphism */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.card.glass {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.card-hover {
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.card-hover:hover {
    transform: translateY(-4px);
    border-color: rgba(5, 150, 105, 0.2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.glow-teal {
    box-shadow: 0 0 20px rgba(5, 150, 105, 0.05), inset 0 0 20px rgba(5, 150, 105, 0.02);
    border-color: rgba(5, 150, 105, 0.2);
}

.glow-purple {
    box-shadow: 0 0 20px rgba(15, 118, 110, 0.05), inset 0 0 20px rgba(15, 118, 110, 0.02);
    border-color: rgba(15, 118, 110, 0.2);
}

.card-header {
    margin-bottom: 1.25rem;
}

.card-header h2, .card-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.card-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.card-divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 1.25rem 0;
}

/* Grids and Layout Helpers */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

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

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

.grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .grid-2-1, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

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

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-end {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.gap-2 {
    gap: 0.5rem;
}

.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.w-full { width: 100%; }
.max-w-2xl { max-width: 42rem; }
.max-w-md { max-width: 28rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.75rem; }
.text-teal { color: var(--color-teal); }
.text-purple { color: var(--color-purple); }

/* Buttons & Inputs */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
    outline: none;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-teal), #047857);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.25);
}

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

.btn-secondary:hover {
    background: #f8fafc;
    color: var(--text-primary);
}

.btn-danger {
    background: var(--color-danger);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--color-danger-glow);
}

.btn-danger:hover {
    transform: translateY(-1px);
}

.btn-success {
    background: var(--color-success);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--color-success-soft);
}

.btn-success:hover {
    transform: translateY(-1px);
}

.btn-purple {
    background: linear-gradient(135deg, var(--color-purple), #0d9488);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--color-purple-glow);
}

.btn-purple:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--color-purple-glow);
}

/* Forms styling */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    flex: 1;
}

.flex-1 {
    flex: 1;
}

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

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 0.625rem 0.875rem;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.875rem;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--color-teal);
    box-shadow: 0 0 0 2px var(--color-teal-glow);
}

input:disabled {
    background: #f1f5f9;
    opacity: 0.7;
    cursor: not-allowed;
}

textarea {
    resize: vertical;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: #f8fafc;
    padding: 0.75rem;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
}

.checkbox-group input {
    accent-color: var(--color-teal);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
}

.badge-purple {
    background: var(--color-purple-soft);
    color: var(--color-purple);
    border: 1px solid rgba(15, 118, 110, 0.15);
}

.badge-teal {
    background: var(--color-teal-soft);
    color: var(--color-teal);
    border: 1px solid rgba(5, 150, 105, 0.15);
}

.security-badge {
    background: var(--color-success-soft);
    color: var(--color-teal);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.badge-danger {
    background: var(--color-danger-soft);
    color: var(--color-danger);
    border: 1px solid rgba(220, 38, 38, 0.15);
}

/* User Status Cards Details */
.status-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--border-radius-md);
    margin-bottom: 1.25rem;
}

.member-banner {
    background: var(--color-teal-soft);
    border: 1px solid rgba(5, 150, 105, 0.15);
}

.non-member-banner {
    background: #f8fafc;
    border: 1px solid var(--border-color);
}

.banner-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--color-teal);
}

.status-banner strong {
    font-size: 0.9rem;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.25rem;
}

.status-banner p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

.membership-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
}

.detail-row strong {
    color: var(--text-primary);
}

/* Consultation request view styles */
.price-summary-box {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

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

.price-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

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

.icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.bg-teal-soft {
    background: var(--color-teal-soft);
}

/* Waiting Room Radar Animation */
.waiting-radar {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto;
}

.radar-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--color-teal-soft);
    border: 1.5px solid var(--color-teal);
    animation: radarPulse 2s infinite ease-out;
}

@keyframes radarPulse {
    0% { transform: scale(0.6); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

.radar-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

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

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

.queue-status-box {
    display: flex;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 0;
    margin: 1.5rem 0;
}

.queue-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.queue-stat:not(:last-child) {
    border-right: 1px solid var(--border-color);
}

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

.stat-val {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.live-status-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.ping-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-teal);
    border-radius: 50%;
    animation: blink 1.5s infinite ease-in-out;
}

@keyframes blink {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Modals styling */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeInFast 0.2s ease-out;
}

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

.modal {
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background-color: #ffffff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.card-input-simulation {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1rem;
}

/* Video Consultation Window styling */
.video-consult-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: #0f172a;
    padding: 1.5rem;
}

.video-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    height: 350px;
    position: relative;
}

.video-window {
    background: #020617;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, #0f172a 0%, #020617 100%);
    position: relative;
}

.doctor-feed .video-placeholder {
    flex-direction: column;
}

.stream-label {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.75rem;
    margin-top: 0.5rem;
    border-radius: var(--border-radius-md);
}

.btn-control {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-control:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-control.active {
    background: var(--color-teal);
    color: #ffffff;
    border-color: var(--color-teal);
}

.btn-control.active:hover {
    background: #047857;
}

/* Chat panels (Consultation and Direct) */
.consultation-chat-panel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    height: 220px;
}

.consultation-chat-panel h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-messages-container {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0.25rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.chat-msg {
    max-width: 80%;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-md);
    font-size: 0.8rem;
    line-height: 1.4;
    word-break: break-word;
}

.chat-msg.patient {
    background: var(--color-teal);
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 0;
}

.chat-msg.doctor {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 0;
}

.chat-msg.bot {
    background: var(--color-teal-soft);
    border: 1px solid rgba(5, 150, 105, 0.15);
    color: #065f46;
    align-self: flex-start;
    border-bottom-left-radius: 0;
}

.chat-msg.system {
    align-self: center;
    background: #f1f5f9;
    color: var(--text-secondary);
    font-size: 0.7rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.chat-input-row {
    display: flex;
    gap: 0.5rem;
}

.chat-input-row input {
    flex-grow: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}

/* Dossier Medical Grid layout */
.dossier-grid {
    display: grid;
    grid-template-columns: 1fr 2.5fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .dossier-grid {
        grid-template-columns: 1fr;
    }
}

.info-block {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1rem;
}

.info-block h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.35rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.info-item span {
    color: var(--text-secondary);
}

.info-block p {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--text-primary);
}

/* Timeline medical list */
.consult-timeline {
    position: relative;
    padding-left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.consult-timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
}

.timeline-marker {
    position: absolute;
    left: -20px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-teal);
    box-shadow: 0 0 4px var(--color-teal-glow);
}

.timeline-content {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.01);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.clinical-notes-block {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    border-top: 1px dashed var(--border-color);
}

.prescriptions-box {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: var(--color-teal-soft);
    border: 1px solid rgba(5, 150, 105, 0.15);
    border-radius: var(--border-radius-sm);
}

.prescriptions-box h5 {
    font-size: 0.75rem;
    color: var(--color-teal);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.prescriptions-box ul {
    list-style-type: none;
    padding-left: 0.25rem;
}

.prescriptions-box li {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    color: var(--text-primary);
    gap: 0.25rem;
}

.prescriptions-box li::before {
    content: "•";
    color: var(--color-teal);
}

/* Appointments schedule list styling */
.appointments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.appt-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.01);
}

.appt-card-details h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.appt-time-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

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

.direct-chat-container {
    display: flex;
    flex-direction: column;
    height: 300px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    margin-top: 1rem;
}

/* Conferences Webinar components */
.education-header {
    margin-bottom: 1.5rem;
}

.education-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
}

.badge-purple {
    background: var(--color-purple-soft);
    color: var(--color-purple);
}

.btn-purple {
    background: linear-gradient(135deg, var(--color-purple), #0f766e);
}

.virtual-room-display {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    animation: fadeIn var(--transition-normal);
}

.webinar-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 768px) {
    .webinar-layout {
        grid-template-columns: 1fr;
    }
}

.webinar-screen {
    background: #020617;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
}

.webinar-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.live-stream-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
    z-index: 5;
    animation: pulseSlow 1.5s infinite;
}

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

.webinar-sidebar {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.webinar-sidebar h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.webinar-chat {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    max-height: 180px;
}

.webinar-input-row {
    display: flex;
    gap: 0.25rem;
}

.webinar-input-row input {
    flex-grow: 1;
    font-size: 0.75rem;
    padding: 0.4rem;
}

.educational-library h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.article-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.75rem;
}

.article-badge.diabetes {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.article-badge.hypertension {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.article-badge.nutrition {
    background: #f0fdf4;
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.read-more-link {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-teal);
    text-decoration: none;
    margin-top: 1rem;
}

.read-more-link:hover {
    text-decoration: underline;
}

/* Future features interactive components */
.future-intro {
    margin-bottom: 1.5rem;
}

.kegel-simulator {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
}

.kegel-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: #f8fafc;
    border: 8px solid var(--color-teal-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    transition: transform 3s ease-in-out, border-color 3s ease-in-out, box-shadow 3s ease-in-out;
}

.kegel-circle.contract {
    transform: scale(0.75);
    border-color: var(--color-teal);
    box-shadow: 0 0 15px var(--color-teal-glow);
    color: var(--color-teal);
}

.kegel-circle.hold {
    transform: scale(0.75);
    border-color: var(--color-purple);
    box-shadow: 0 0 15px var(--color-purple-glow);
    color: var(--color-purple);
}

.kegel-circle.relax {
    transform: scale(1);
    border-color: var(--color-teal-soft);
    color: var(--text-primary);
}

.weight-tracker-layout {
    background: #ffffff;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    padding: 1rem;
}

.weight-form-row {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

.weight-chart-container {
    width: 100%;
    display: flex;
    justify-content: center;
    background: #ffffff;
    border-radius: var(--border-radius-sm);
    padding: 0.5rem;
    border: 1px solid var(--border-color);
}

.ai-assistant-container {
    display: flex;
    flex-direction: column;
    height: 280px;
    background: #ffffff;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    padding: 1rem;
}

/* Doctor selection and dashboards tables */
.doctor-compensation-card {
    background: var(--color-teal-soft);
    border: 1px solid rgba(5, 150, 105, 0.15);
    border-radius: var(--border-radius-md);
    padding: 0.5rem 1rem;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.doctor-compensation-card span {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.doctor-compensation-card strong {
    font-size: 1.15rem;
    color: var(--color-teal);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    text-align: left;
}

.data-table th, .data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.data-table th {
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    background: #f8fafc;
}

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

/* Consult notes form styling */
.consult-notes-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.consult-notes-form textarea {
    font-size: 0.8rem;
}

/* Security search and banner styles */
.search-bar-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.search-bar-row input {
    flex-grow: 1;
}

.security-denied-box {
    background: var(--color-danger-soft);
    border: 1px solid rgba(220, 38, 38, 0.15);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    color: var(--text-primary);
}

.security-denied-box h3 {
    color: var(--color-danger);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.security-denied-box p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Admin elements */
.system-logs-container {
    background: #0f172a;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.75rem;
    padding: 1rem;
    border-radius: var(--border-radius-md);
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.log-entry {
    color: #34d399; /* Green text in logs */
    line-height: 1.35;
}

.log-entry.system { color: #94a3b8; }
.log-entry.security { color: #f59e0b; }
.log-entry.payment { color: #38bdf8; }
.log-entry.error { color: #f87171; }

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

.admin-record-item {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.01);
}

.admin-record-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.admin-record-header h4 {
    font-weight: 700;
    color: var(--text-primary);
}

.admin-record-history {
    color: var(--text-primary);
}


/* WhatsApp Toast Notification */
.whatsapp-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    color: #0f172a;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 10000;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    border-left: 4px solid #25D366;
}


/* --- LOGIN SCREEN --- */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--bg-body);
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
}

.hidden {
    display: none !important;
}

/* --- PRESCRIPTION FORM ITEMS --- */
.prescription-item {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    position: relative;
    animation: slideIn 0.2s ease;
}

.prescription-item label.text-xs {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-teal);
    margin-bottom: 3px;
    display: block;
}

.prescription-item input {
    width: 100%;
    padding: 6px 10px;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

/* Required field star */
.required-star {
    color: #ef4444;
    margin-left: 2px;
}

/* Vitals grid */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

@media (max-width: 768px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Card divider */
.card-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 1rem 0;
}

/* Slide-in animation for new prescription blocks */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Vitals display in timeline */
.vitals-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 0.72rem;
    margin: 6px 0;
    background: rgba(0, 180, 216, 0.07);
    padding: 7px 10px;
    border-radius: 6px;
}

/* Prescription table in dossier */
.prescriptions-box table thead th {
    text-align: left;
    padding: 4px 6px;
    font-size: 0.72rem;
    color: var(--color-teal);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* ══════════════════════════════════════════════
   NOTIFICATION BELLS — Doctor Header Area
   ══════════════════════════════════════════════ */

.notif-bell-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.notif-bell-container {
    position: relative;
}

/* Bell Button */
.notif-bell-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    background: #ffffff;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.notif-bell-btn:hover {
    border-color: var(--color-teal);
    color: var(--color-teal);
    background: var(--color-teal-soft);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--color-teal-glow);
}

.notif-bell-btn.has-notifs {
    border-color: var(--color-teal);
    animation: bellRing 1.5s ease-in-out infinite;
}

@keyframes bellRing {
    0%, 100% { transform: rotate(0deg); }
    10%       { transform: rotate(10deg); }
    20%       { transform: rotate(-8deg); }
    30%       { transform: rotate(6deg); }
    40%       { transform: rotate(-4deg); }
    50%       { transform: rotate(0deg); }
}

/* Badge counter */
.notif-count-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: var(--color-danger);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(220,38,38,0.4);
    animation: badgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.notif-count-badge.msg-badge {
    background: var(--color-purple);
    box-shadow: 0 2px 4px var(--color-purple-glow);
}

@keyframes badgePop {
    0%   { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Dropdown panel */
.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 300px;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.06);
    z-index: 5000;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.notif-dropdown.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Arrow tip */
.notif-dropdown::before {
    content: '';
    position: absolute;
    top: -7px;
    right: 14px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-left: 1.5px solid var(--border-color);
    border-top: 1.5px solid var(--border-color);
    transform: rotate(45deg);
}

.notif-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: #f8fafc;
}

.notif-dropdown-header span {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.notif-mark-all {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-teal);
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background var(--transition-fast);
}

.notif-mark-all:hover {
    background: var(--color-teal-soft);
}

.notif-dropdown-body {
    max-height: 280px;
    overflow-y: auto;
}

/* Scrollbar inside dropdown */
.notif-dropdown-body::-webkit-scrollbar { width: 4px; }
.notif-dropdown-body::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }

/* Individual notification item */
.notif-item {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background var(--transition-fast);
    align-items: flex-start;
}

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

.notif-item:hover {
    background: var(--color-teal-soft);
}

.notif-item-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--color-teal-soft);
    border: 1px solid rgba(5,150,105,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-teal);
    flex-shrink: 0;
}

.notif-item.msg-notif .notif-item-icon {
    background: var(--color-purple-soft);
    border-color: rgba(15,118,110,0.2);
    color: var(--color-purple);
}

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

.notif-item-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-item-text {
    font-size: 0.73rem;
    color: var(--text-secondary);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-item-time {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.notif-item-action {
    background: var(--color-teal);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    cursor: pointer;
    flex-shrink: 0;
    align-self: center;
    transition: all var(--transition-fast);
}

.notif-item-action:hover {
    background: #047857;
    transform: scale(1.03);
}

/* Empty state inside dropdown */
.notif-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.notif-empty svg {
    margin-bottom: 8px;
    opacity: 0.4;
}

/* Doctor notif area — shown only for doctor */
.notif-bell-wrapper[style*="none"] {
    display: none;
}

