  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
 
        :root {
            --navy:      #0a1f3c;
            --navy-mid:  #112848;
            --teal:      #1a8fa0;
            --teal-light:#22b5cc;
            --gold:      #c8a45a;
            --white:     #ffffff;
            --off-white: #f4f7f9;
            --muted:     rgba(255,255,255,0.5);
        }
 
        html, body {
            height: 100%;
            font-family: 'DM Sans', sans-serif;
            background: var(--navy);
            overflow: hidden;
        }
 
        /* ── Fondo ECG ── */
        #bg-canvas {
            position: fixed;
            inset: 0;
            z-index: 0;
        }
 
        /* ── Wrapper centrado ── */
        .login-wrapper {
            position: relative;
            z-index: 1;
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }
 
        /* ── Card central ── */
        .card {
            display: flex;
            width: 100%;
            max-width: 820px;
            min-height: 520px;
            border-radius: 20px;
            overflow: hidden;
            box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.07);
            animation: fadeUp 0.5s ease both;
        }
 
        @keyframes fadeUp {
            from { opacity: 0; transform: translateY(22px); }
            to   { opacity: 1; transform: translateY(0); }
        }
 
        /* ── Panel izquierdo ── */
        .left {
            flex: 1;
            background: linear-gradient(145deg, rgba(10,31,60,0.88) 0%, rgba(13,42,74,0.85) 100%);
            backdrop-filter: blur(2px);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: flex-start;
            padding: 48px 44px;
            position: relative;
            overflow: hidden;
        }
 
        /* Cruz médica decorativa */
        .left::after {
            content: '';
            position: absolute;
            right: -30px; bottom: -30px;
            width: 180px; height: 180px;
            opacity: 0.04;
            background:
                linear-gradient(var(--white), var(--white)) center/36px 100% no-repeat,
                linear-gradient(var(--white), var(--white)) center/100% 36px no-repeat;
        }
 
        .clinic-logo {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 36px;
        }
        .clinic-logo .icon-box {
            width: 44px; height: 44px;
            background: linear-gradient(135deg, var(--teal), var(--teal-light));
            border-radius: 10px;
            display: flex; align-items: center; justify-content: center;
            font-size: 20px;
            box-shadow: 0 4px 16px rgba(26,143,160,0.4);
        }
        .clinic-logo .logo-text span:first-child {
            display: block;
            font-family: 'Cormorant Garamond', serif;
            font-size: 0.85rem;
            color: var(--gold);
            letter-spacing: 3px;
            text-transform: uppercase;
        }
        .clinic-logo .logo-text span:last-child {
            display: block;
            font-size: 0.68rem;
            color: var(--muted);
            letter-spacing: 1px;
        }
 
        .left h1 {
            font-family: 'Cormorant Garamond', serif;
            font-size: 2rem;
            font-weight: 300;
            color: var(--white);
            line-height: 1.2;
            margin-bottom: 14px;
        }
        .left h1 em {
            font-style: normal;
            color: var(--teal-light);
        }
        .left p {
            font-size: 0.8rem;
            color: var(--muted);
            line-height: 1.7;
            margin-bottom: 36px;
            max-width: 260px;
        }
 
        .stats {
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
        }
        .stat { display: flex; flex-direction: column; gap: 2px; }
        .stat strong {
            font-family: 'Cormorant Garamond', serif;
            font-size: 1.4rem;
            color: var(--gold);
            line-height: 1;
        }
        .stat span { font-size: 0.65rem; color: var(--muted); letter-spacing: 0.5px; }
 
        /* ── Panel derecho ── */
        .right {
            width: 360px;
            background: var(--off-white);
            display: flex;
            flex-direction: column;
            padding: 40px 36px;
            position: relative;
            overflow-y: auto;
        }
        .right::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--teal), var(--gold));
        }
 
        /* Tabs */
        .tabs {
            display: flex;
            border-bottom: 2px solid #e2e8f0;
            margin-bottom: 28px;
        }
        .tab-btn {
            flex: 1;
            padding: 10px 0;
            background: none;
            border: none;
            font-family: 'DM Sans', sans-serif;
            font-size: 0.75rem;
            font-weight: 500;
            color: #94a3b8;
            cursor: pointer;
            letter-spacing: 1px;
            text-transform: uppercase;
            border-bottom: 2px solid transparent;
            margin-bottom: -2px;
            transition: all 0.2s;
        }
        .tab-btn.active { color: var(--navy); border-bottom-color: var(--teal); }
 
        .form-panel { display: none; }
        .form-panel.active { display: block; }
 
        .form-title {
            font-family: 'Cormorant Garamond', serif;
            font-size: 1.5rem;
            font-weight: 500;
            color: var(--navy);
            margin-bottom: 4px;
        }
        .subtitle {
            font-size: 0.75rem;
            color: #94a3b8;
            margin-bottom: 22px;
        }
 
        /* Inputs */
        .input-group {
            position: relative;
            margin-bottom: 14px;
        }
        .input-group .icon {
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 14px;
            pointer-events: none;
        }
        .input-group input {
            width: 100%;
            padding: 11px 12px 11px 38px;
            border: 1.5px solid #e2e8f0;
            border-radius: 9px;
            font-family: 'DM Sans', sans-serif;
            font-size: 0.85rem;
            color: var(--navy);
            background: var(--white);
            outline: none;
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        .input-group input:focus {
            border-color: var(--teal);
            box-shadow: 0 0 0 3px rgba(26,143,160,0.1);
        }
        .show-toggle {
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            font-size: 0.6rem;
            font-weight: 700;
            color: var(--teal);
            cursor: pointer;
            letter-spacing: 1px;
        }
 
        .row-check {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 18px;
            font-size: 0.74rem;
        }
        .row-check label { color: #64748b; display: flex; align-items: center; gap: 6px; cursor: pointer; }
        .row-check a { color: var(--teal); text-decoration: none; }
 
        .btn-primary {
            width: 100%;
            padding: 12px;
            background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
            color: var(--white);
            border: none;
            border-radius: 9px;
            font-family: 'DM Sans', sans-serif;
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            transition: transform 0.15s, box-shadow 0.15s, background 0.3s;
            position: relative;
            overflow: hidden;
        }
        .btn-primary::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, var(--teal) 0%, var(--teal-light) 100%);
            opacity: 0;
            transition: opacity 0.3s;
        }
        .btn-primary:hover::after { opacity: 1; }
        .btn-primary span { position: relative; z-index: 1; }
        .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(10,31,60,0.3); }
 
        .switch-text {
            text-align: center;
            font-size: 0.74rem;
            color: #94a3b8;
            margin-top: 16px;
        }
        .switch-text a { color: var(--teal); cursor: pointer; font-weight: 500; }
 
        /* ── Responsive: móvil ── */
        @media (max-width: 640px) {
            body { overflow-y: auto; }
            .card {
                flex-direction: column;
                max-width: 420px;
                min-height: unset;
                border-radius: 16px;
            }
            .left {
                padding: 30px 28px;
                min-height: unset;
            }
            .left h1 { font-size: 1.5rem; }
            .left p { display: none; }
            .stats { gap: 14px; }
            .right { width: 100%; padding: 28px 24px; }
        }