:root {
    --bg-dark: #050511;
    --bg-card: rgba(255, 255, 255, 0.03);
    --primary: #00f2ff;
    --primary-dim: rgba(0, 242, 255, 0.1);
    --secondary: #7000ff;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --gradient-main: linear-gradient(135deg, #00f2ff 0%, #7000ff 100%);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scrollbar & Selection Polish */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

::selection {
    background: rgba(0, 242, 255, 0.3);
    color: white;
}

/* Background Effects */
.background-glow {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(112, 0, 255, 0.08) 0%, rgba(5, 5, 17, 0) 50%);
    z-index: -1;
    pointer-events: none;
}

/* Creator Banner */
.creator-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 10px;
    font-size: 14px;
    font-weight: 500;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1001;
}

.creator-banner a {
    color: white;
    text-decoration: underline;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.creator-banner a:hover {
    opacity: 0.8;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    width: 100%;
    top: 40px;
    /* Offset for creator banner */
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-main);
}

.logo i {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Buttons */
.btn-primary {
    background: var(--gradient-main);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    backdrop-filter: blur(5px);
    transition: background 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.4);
}

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

.btn-primary.large,
.btn-secondary.large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    padding-top: 120px;
    /* Adjusted for creator banner + navbar */
    gap: 4rem;
}

.hero-content {
    flex: 1;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-dim);
    border: 1px solid rgba(0, 242, 255, 0.2);
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(0, 242, 255, 0.7);
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 242, 255, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(0, 242, 255, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 242, 255, 0);
    }
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Hero Visual */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.glass-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.glass-card:hover {
    transform: rotateY(0) rotateX(0);
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotateY(-5deg) rotateX(5deg);
    }

    50% {
        transform: translateY(-20px) rotateY(-5deg) rotateX(5deg);
    }

    100% {
        transform: translateY(0px) rotateY(-5deg) rotateX(5deg);
    }
}

.code-snippet {
    background: #0f0f1a;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #a1a1aa;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.code-header {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.arrow-down {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.5rem;
    margin: 1rem 0;
    opacity: 0.5;
}

.fhir-preview {
    background: rgba(0, 242, 255, 0.05);
    border: 1px solid rgba(0, 242, 255, 0.1);
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--primary);
    font-weight: 600;
}

.status-badge {
    background: rgba(39, 201, 63, 0.2);
    color: #27c93f;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Features */
.features {
    padding: 5rem 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

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

.feature-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.icon-box {
    width: 60px;
    height: 60px;
    background: var(--primary-dim);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-muted);
}

/* How It Works */
.how-it-works {
    padding: 5rem 5%;
    text-align: center;
}

.steps-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
    margin-top: 3rem;
}

.step {
    flex: 1;
    max-width: 300px;
}

.step-number {
    font-size: 4rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.03);
    font-family: var(--font-heading);
    margin-bottom: -1rem;
    position: relative;
    z-index: -1;
}

.step h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.line {
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin-top: 5rem;
}

/* Footer */
.footer {
    padding: 3rem 5%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4rem;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary);
}

/* Tech Stack */
.tech-stack {
    padding: 5rem 5%;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 242, 255, 0.05) 100%);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.tech-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease, background 0.3s ease;
}

.tech-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
}

.tech-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.tech-card h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: white;
}

/* CTA Section */
.cta-section {
    padding: 6rem 5%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 300px;
    background: var(--primary);
    filter: blur(150px);
    opacity: 0.1;
    z-index: -1;
}

.cta-content h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.cta-form {
    display: flex;
    justify-content: center;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto 1.5rem auto;
}

.cta-form input {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

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

.small-text {
    font-size: 0.9rem !important;
    opacity: 0.7;
}

/* Mobile */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 5%;
    }

    .nav-links {
        display: none;
    }

    .hero {
        flex-direction: column;
        padding-top: 100px;
        text-align: center;
        gap: 3rem;
    }

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

    .hero-actions {
        justify-content: center;
    }

    .steps-container {
        flex-direction: column;
        align-items: center;
    }

    .line {
        display: none;
    }

    .cta-form {
        flex-direction: column;
    }

    .cta-content h2 {
        font-size: 2rem;
    }
}

/* --- Live Demo Styles --- */
.demo-section {
    padding: 5rem 5%;
    background: linear-gradient(180deg, rgba(5, 5, 17, 0) 0%, rgba(0, 242, 255, 0.05) 100%);
}

.demo-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.demo-input {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
}

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

.input-header label {
    font-weight: 600;
    color: var(--primary);
    font-size: 1.1rem;
}

/* Toggle Switch */
.input-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--primary);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

.toggle-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Text Area */
#hl7-input {
    width: 100%;
    height: 150px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #a1a1aa;
    font-family: 'Courier New', monospace;
    padding: 1rem;
    resize: vertical;
    margin-bottom: 1.5rem;
    outline: none;
    transition: border-color 0.3s;
}

#hl7-input:focus {
    border-color: var(--primary);
    color: white;
}

.full-width {
    width: 100%;
    cursor: pointer;
}

/* Results Area */
.demo-results {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hidden {
    display: none !important;
}

.result-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
}

.patient-card {
    border-left: 4px solid var(--primary);
}

.summary-card {
    border-left: 4px solid var(--secondary);
}

.card-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem 1.5rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.card-body {
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 1rem;
}

/* Tabs */
.result-tabs {
    background: var(--bg-card);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.tab-header {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.tab-btn.active {
    border-bottom: 2px solid var(--primary);
    color: var(--primary);
    background: rgba(0, 242, 255, 0.05);
}

.tab-content {
    display: none;
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

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

/* Obs Table */
.obs-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-main);
}

.obs-table th {
    text-align: left;
    color: var(--text-muted);
    padding: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.obs-table td {
    padding: 0.8rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.95rem;
}

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

.obs-flag {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}

.flag-high {
    background: rgba(255, 95, 86, 0.2);
    color: #ff5f56;
}

.flag-low {
    background: rgba(255, 189, 46, 0.2);
    color: #ffbd2e;
}

.flag-normal {
    color: #27c93f;
}

/* JSON Code */
pre {
    margin: 0;
    background: #0f0f1a;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #a1a1aa;
}

/* ========================================
   DASHBOARD STYLES
   ======================================== */

.dashboard-page {
    padding-top: 80px;
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 5%;
}

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

.dashboard-header h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-header h1 i {
    color: var(--primary);
}

.dashboard-header p {
    color: var(--text-muted);
    margin-top: 0.5rem;
}

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

.stat-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.1);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-icon.messages {
    background: rgba(0, 242, 255, 0.1);
    color: var(--primary);
}

.stat-icon.patients {
    background: rgba(112, 0, 255, 0.1);
    color: var(--secondary);
}

.stat-icon.abnormal {
    background: rgba(255, 95, 86, 0.1);
    color: #ff5f56;
}

.stat-icon.recent {
    background: rgba(39, 201, 63, 0.1);
    color: #27c93f;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-heading);
    line-height: 1;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Filters Bar */
.filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease;
}

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

.filter-group {
    display: flex;
    gap: 0.75rem;
}

.filter-group select {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
}

.filter-group select:focus {
    border-color: var(--primary);
}

/* Messages Table */
.messages-section {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
}

.table-container {
    overflow-x: auto;
}

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

.messages-table th {
    text-align: left;
    padding: 1rem 0.75rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.messages-table td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.messages-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

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

.expand-col {
    width: 50px;
}

.expand-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.patient-cell .patient-name {
    color: white;
    font-weight: 500;
}

.obs-count {
    text-align: center;
}

.flags-cell {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.flag-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

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

.timestamp-cell {
    font-size: 0.85rem;
    white-space: nowrap;
}

.empty-state {
    text-align: center;
    padding: 3rem !important;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.5;
}

/* Table Footer / Pagination */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.15);
}

.table-footer span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

.page-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover:not(:disabled) {
    background: var(--primary);
    border-color: var(--primary);
}

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

#page-info {
    font-size: 0.9rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
}

.modal-overlay.visible {
    display: flex;
}

.modal-content {
    background: var(--bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h2 i {
    color: var(--primary);
}

.modal-close {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.modal-close:hover {
    background: rgba(255, 95, 86, 0.2);
    color: #ff5f56;
    border-color: #ff5f56;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

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

.detail-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
}

.detail-card h3 {
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

.detail-card h3 i {
    color: var(--primary);
}

.detail-content {
    padding: 1.25rem;
}

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

.patient-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.patient-field label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.patient-field span {
    font-weight: 500;
    color: white;
}

/* Detail Tabs */
.detail-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.detail-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
}

.detail-tab:hover {
    color: white;
}

.detail-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.detail-tab-content {
    display: none;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    max-height: 300px;
    overflow-y: auto;
}

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

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

.obs-detail-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.obs-detail-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Nav link active state */
.nav-links a.active {
    color: var(--primary);
}

/* Toast styles for dashboard */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(0, 242, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid var(--primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 2000;
    font-weight: 500;
}

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

.toast-success {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
}

.toast-error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

/* Dashboard Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .filters-bar {
        flex-direction: column;
    }

    .search-box {
        max-width: 100%;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select {
        flex: 1;
    }

    .patient-detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-tabs {
        overflow-x: auto;
    }

    .modal-content {
        max-height: 85vh;
    }
}