:root {
    /* --- TEMA CLEAN LIGHT --- */
    --bg: #F8FAFC;
    /* Fondo principal gris muy pálido */
    --surface: #FFFFFF;
    /* Superficie blanca pura */
    --surface-2: #F1F5F9;
    /* Superficie secundaria */
    --surface-3: #E2E8F0;
    /* Elementos UI */

    --border: #E2E8F0;
    /* Bordes sutiles */
    --border-light: #CBD5E1;

    --text: #0F172A;
    /* Texto principal (casi negro) */
    --text-muted: #64748B;
    /* Texto secundario */
    --text-dim: #94A3B8;
    /* Texto terciario */

    /* Acentos vibrantes */
    --accent: #2563EB;
    --accent-glow: #EFF6FF;

    --green: #16A34A;
    --green-dim: #DCFCE7;

    --yellow: #D97706;
    /* Amarillo más oscuro para legibilidad */
    --yellow-dim: #FEF3C7;

    --red: #DC2626;
    --red-dim: #FEE2E2;

    --purple: #7C3AED;
    --purple-dim: #F3E8FF;

    --teal: #0D9488;
    --teal-dim: #CCFBF1;

    --orange: #EA580C;
    --orange-dim: #FFEDD5;

    --font: 'Outfit', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;

    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;

    /* Sombras suaves para dar profundidad */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 24px 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.logo {
    padding: 0 24px 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
    text-align: center;
}

.logo-img {
    max-width: 100%;
    height: auto;
    max-height: 50px;
    object-fit: contain;
}

/* Indicium Branding */
.indicium-branding {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    opacity: 0.8;
}

.indicium-branding img {
    height: 28px;
    width: auto;
    object-fit: contain;
    opacity: 0.9;
}

.indicium-branding span {
    font-size: 9px;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
}

.logo .clinic-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 5px 12px;
    border-radius: 20px;
    background: var(--orange-dim);
    color: var(--orange);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: none;
}

.logo .clinic-tag::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--orange);
}


.nav {
    flex: 1;
    padding: 8px 12px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 2px;
    position: relative;
}

.nav-item:hover {
    background: var(--surface-2);
    color: var(--text);
}

.nav-item.active {
    background: var(--accent-glow);
    color: var(--accent);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

.nav-icon {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    flex-shrink: 0;
}

.nav-item.active .nav-icon {
    opacity: 1;
}

.nav-badge {
    margin-left: auto;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
}

.nav-section {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    padding: 16px 14px 6px;
    font-weight: 700;
}

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.user-name {
    font-size: 13px;
    font-weight: 600;
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* Main content */
.main {
    margin-left: 260px;
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.topbar-left h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text);
}

.topbar-left p {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    color: var(--text-muted);
}

.pill .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.btn-sync {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
    border: none;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
    box-shadow: var(--shadow-sm);
}

.btn-sync:hover {
    background: #1D4ED8;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Page content */
.page {
    display: none;
    padding: 28px 32px;
}

.page.active {
    display: block;
}

/* Metric cards */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.metrics-3 {
    grid-template-columns: repeat(3, 1fr);
}

.metric-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.metric-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.metric-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.metric-card.blue::after {
    background: var(--accent);
}

.metric-card.green::after {
    background: var(--green);
}

.metric-card.yellow::after {
    background: var(--yellow);
}

.metric-card.red::after {
    background: var(--red);
}

.metric-card.purple::after {
    background: var(--purple);
}

.metric-card.teal::after {
    background: var(--teal);
}

.metric-card.orange::after {
    background: var(--orange);
}

.metric-label {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 600;
}

.metric-value {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text);
}

.metric-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.metric-sub .up {
    color: var(--green);
    background: var(--green-dim);
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: 600;
}

.metric-sub .down {
    color: var(--red);
    background: var(--red-dim);
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: 600;
}

/* Clinic cards (dashboard) */
.clinics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.clinic-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.clinic-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.clinic-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.clinic-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.clinic-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.status-on-track {
    background: var(--green-dim);
    color: var(--green);
    border: 1px solid rgba(22, 163, 74, 0.1);
}

.status-warning {
    background: var(--yellow-dim);
    color: var(--yellow);
    border: 1px solid rgba(217, 119, 6, 0.1);
}

.status-behind {
    background: var(--red-dim);
    color: var(--red);
    border: 1px solid rgba(220, 38, 38, 0.1);
}

.progress-container {
    margin-bottom: 14px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.progress-bar {
    height: 8px;
    background: var(--surface-3);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-fill.green {
    background: linear-gradient(90deg, #22C55E, var(--green));
}

.progress-fill.yellow {
    background: linear-gradient(90deg, #F59E0B, var(--yellow));
}

.progress-fill.red {
    background: linear-gradient(90deg, #EF4444, var(--red));
}

.progress-expected {
    position: absolute;
    top: -4px;
    bottom: -4px;
    width: 2px;
    background: var(--text);
    opacity: 0.3;
    border-radius: 1px;
}

.clinic-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.clinic-stat-label {
    font-size: 10.5px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.clinic-stat-value {
    font-size: 18px;
    font-weight: 700;
    margin-top: 2px;
    font-family: var(--font-display);
    color: var(--text);
}

/* Section headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: var(--text);
}

.section-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

/* Tables */
.table-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 12px 16px;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    white-space: nowrap;
}

td {
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--surface-2);
    white-space: nowrap;
    color: var(--text);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--surface-2);
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.fw-600 {
    font-weight: 600;
}

.font-mono {
    font-family: 'DM Sans', monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.3px;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.badge-green {
    background: var(--green-dim);
    color: var(--green);
    border: 1px solid rgba(22, 163, 74, 0.1);
}

.badge-yellow {
    background: var(--yellow-dim);
    color: var(--yellow);
    border: 1px solid rgba(217, 119, 6, 0.1);
}

.badge-red {
    background: var(--red-dim);
    color: var(--red);
    border: 1px solid rgba(220, 38, 38, 0.1);
}

.badge-blue {
    background: var(--accent-glow);
    color: var(--accent);
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.badge-purple {
    background: var(--purple-dim);
    color: var(--purple);
    border: 1px solid rgba(124, 58, 237, 0.1);
}

.badge-teal {
    background: var(--teal-dim);
    color: var(--teal);
    border: 1px solid rgba(13, 148, 136, 0.1);
}

.badge-orange {
    background: var(--orange-dim);
    color: var(--orange);
    border: 1px solid rgba(234, 88, 12, 0.1);
}

.badge-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

/* Semáforo ortodoncia */
.semaforo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 14px;
}

.semaforo-green {
    background: var(--green-dim);
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.1);
}

.semaforo-yellow {
    background: var(--yellow-dim);
    box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.1);
}

.semaforo-red {
    background: var(--red-dim);
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1);
}

/* Two column layout */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 28px;
}

.three-col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 28px;
}

.two-col-wide {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 28px;
}

/* Card */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.card-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Bar chart simple */
.bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.bar-label {
    width: 90px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
    flex-shrink: 0;
    font-weight: 500;
}

.bar-track {
    flex: 1;
    height: 22px;
    background: var(--surface-3);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding-left: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.bar-fill.blue {
    background: linear-gradient(90deg, #1D4ED8, var(--accent));
}

.bar-fill.teal {
    background: linear-gradient(90deg, #0D9488, var(--teal));
}

.bar-fill.purple {
    background: linear-gradient(90deg, #7C3AED, var(--purple));
}

/* Liquidación */
.liq-summary {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
}

.liq-cell {
    background: var(--surface);
    padding: 14px 16px;
    text-align: center;
}

.liq-cell-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-dim);
    margin-bottom: 6px;
    font-weight: 600;
}

.liq-cell-value {
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-display);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.delay-1 {
    animation-delay: 0.05s;
}

.delay-2 {
    animation-delay: 0.1s;
}

.delay-3 {
    animation-delay: 0.15s;
}

.delay-4 {
    animation-delay: 0.2s;
}

.delay-5 {
    animation-delay: 0.25s;
}

.d1 {
    animation-delay: .05s
}

.d2 {
    animation-delay: .1s
}

.d3 {
    animation-delay: .15s
}

.d4 {
    animation-delay: .2s
}

.d5 {
    animation-delay: .25s
}

.d6 {
    animation-delay: .3s
}


/* Filter tabs */
.filter-tabs {
    display: flex;
    gap: 4px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    padding: 3px;
    border: 1px solid var(--border);
}

.filter-tab {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: none;
    font-family: var(--font);
    font-weight: 500;
}

.filter-tab:hover {
    color: var(--text);
}

.filter-tab.active {
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* Specialist treatment card */
.treatment-card {
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.treatment-card:hover {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.treatment-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.treatment-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.treatment-sub {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

.treatment-progress {
    display: flex;
    gap: 16px;
    font-size: 12px;
}

.treatment-progress span {
    color: var(--text-muted);
}

.treatment-progress strong {
    color: var(--text);
}

/* Checklist */
.check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--surface-2);
    font-size: 13px;
    color: var(--text);
}

.check-box {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s;
}

.check-box.checked {
    background: var(--green);
    border-color: var(--green);
}

.check-box.checked::after {
    content: '✓';
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

/* Demo watermark */
.demo-banner {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 200;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

/* Big progress */
.big-progress {
    margin-bottom: 28px;
}

.big-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}

.big-progress-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.big-progress-values {
    font-size: 13px;
    color: var(--text-muted);
}

.big-progress-values strong {
    color: var(--text);
    font-family: var(--font-display);
    font-size: 18px;
}

.big-progress-bar {
    height: 14px;
    background: var(--surface-3);
    border-radius: 7px;
    overflow: hidden;
    position: relative;
}

.big-progress-fill {
    height: 100%;
    border-radius: 7px;
    transition: width 1.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.big-progress-fill.red {
    background: linear-gradient(90deg, #EF4444, #F87171);
}

.big-progress-fill.yellow {
    background: linear-gradient(90deg, #D97706, var(--yellow));
}

.big-progress-fill.green {
    background: linear-gradient(90deg, #166534, var(--green));
}

.big-progress-expected {
    position: absolute;
    top: -2px;
    bottom: -2px;
    width: 2px;
    background: var(--text);
    border-radius: 1px;
    opacity: 0.3;
}

.big-progress-expected-label {
    position: absolute;
    top: -20px;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 600;
}

.big-progress-sub {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11.5px;
    color: var(--text-muted);
}

/* Today's feed */
.feed-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--surface-2);
}

.feed-item:last-child {
    border-bottom: none;
}

.feed-time {
    width: 50px;
    flex-shrink: 0;
    font-size: 12px;
    color: var(--text-dim);
    padding-top: 2px;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.feed-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.feed-icon.install {
    background: var(--teal-dim);
    color: var(--teal);
}

.feed-icon.control {
    background: var(--accent-glow);
    color: var(--accent);
}

.feed-icon.calza {
    background: var(--purple-dim);
    color: var(--purple);
}

.feed-icon.esp {
    background: var(--orange-dim);
    color: var(--orange);
}

.feed-icon.kit {
    background: var(--green-dim);
    color: var(--green);
}

.feed-content {
    flex: 1;
}

.feed-patient {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.feed-detail {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.feed-value {
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-display);
    flex-shrink: 0;
    padding-top: 2px;
    color: var(--text);
}

/* Doctor mini card */
.doc-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: background 0.2s;
    border: 1px solid transparent;
}

.doc-mini:hover {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.doc-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.doc-info {
    flex: 1;
}

.doc-name {
    font-size: 13px;
    font-weight: 600;
}

.doc-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}

.doc-stats {
    text-align: right;
}

.doc-rev {
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-display);
    color: var(--text);
}

.doc-pac {
    font-size: 11px;
    color: var(--text-muted);
}

/* Inventory mini */
.inv-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--surface-2);
}

.inv-row:last-child {
    border-bottom: none;
}

.inv-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
}

.inv-stock {
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-display);
    width: 50px;
    text-align: right;
}

.inv-bar-track {
    width: 100px;
    height: 6px;
    background: var(--surface-3);
    border-radius: 3px;
    overflow: hidden;
}

.inv-bar-fill {
    height: 100%;
    border-radius: 3px;
}

/* Ortodoncia mini semaforo */
.orto-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--surface-2);
    font-size: 13px;
}

.orto-row:last-child {
    border-bottom: none;
}

.orto-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.orto-dot.g {
    background: var(--green);
    box-shadow: 0 0 0 2px var(--green-dim);
}

.orto-dot.y {
    background: var(--yellow);
    box-shadow: 0 0 0 2px var(--yellow-dim);
}

.orto-dot.r {
    background: var(--red);
    box-shadow: 0 0 0 2px var(--red-dim);
}

.orto-name {
    flex: 1;
    color: var(--text);
}

.orto-type {
    font-size: 11px;
    color: var(--text-muted);
}

.orto-last {
    font-size: 11.5px;
    color: var(--text-dim);
    width: 70px;
    text-align: right;
    font-weight: 500;
}

.chk {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--surface-2);
    font-size: 13px;
    color: var(--text);
}

.chk-box {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid var(--border-light);
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chk-box.done {
    background: var(--green);
    border-color: var(--green);
}

.chk-box.done::after {
    content: '✓';
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

/* SPA View Switching */
#view-admin,
#view-clinic {
    display: none;
}

#view-admin.active-view,
#view-clinic.active-view {
    display: block;
}

/* Floating Switcher */
.role-switcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    background: var(--text);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.role-switcher:hover {
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1200px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .clinics-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Navigation */
.mobile-toggle {
    display: none;
    /* Hidden on desktop */
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 200;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    color: var(--text);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.sidebar-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: var(--shadow-md);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .main {
        margin-left: 0;
        padding-top: 60px;
        /* Space for toggle */
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 0 16px 16px;
        margin-top: 16px;
    }

    .topbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .two-col,
    .three-col,
    .two-col-wide {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    /* Tables need scroll on mobile */
    .table-container {
        overflow-x: auto;
    }

    .card {
        padding: 16px;
    }

    .role-switcher {
        bottom: 16px;
        right: 16px;
        font-size: 13px;
        padding: 10px 16px;
    }

    div[style*="padding: 28px 32px;"] {
        padding: 16px !important;
    }

    /* Font Size Adjustments for Mobile */
    .metric-value {
        font-size: 22px;
    }

    .topbar-left h2 {
        font-size: 18px;
    }

    .clinic-stat-value,
    .liq-cell-value,
    .big-progress-values strong {
        font-size: 16px;
    }

    .card-title {
        font-size: 12px;
    }
}

@import "switcher.css";