:root {
    --bg: #07111f;
    --surface: rgba(11, 24, 42, 0.86);
    --surface-strong: rgba(7, 17, 31, 0.94);
    --text: #f5fbff;
    --muted: rgba(210, 232, 255, 0.68);
    --border: rgba(120, 185, 255, 0.18);

    --blue: #149bff;
    --blue-deep: #075bea;
    --green: #20c96b;
    --orange: #ffb545;
    --red: #ff5d5d;

    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    --soft: 0 18px 46px rgba(0, 0, 0, 0.3);

    --sidebar: 292px;

    /* Variables dinámicas */
    --glow: radial-gradient(
            circle,
            rgba(20, 155, 255, 0.25),
            transparent 70%
    );

    --tipo-color: var(--blue);

    --w: 0%;
}

body.light {
    --bg: #eaf3ff;
    --surface: rgba(255, 255, 255, 0.76);
    --surface-strong: rgba(255, 255, 255, 0.94);
    --text: #07111f;
    --muted: #57708f;
    --border: rgba(7, 91, 234, 0.16);
    --blue: #075bea;
    --blue-deep: #0347c9;
    --green: #16a857;
    --orange: #d87900;
    --red: #d92d20;
    --shadow: 0 24px 70px rgba(13, 72, 130, 0.16);
    --soft: 0 18px 46px rgba(13, 72, 130, 0.12);
}

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

body {
    min-height: 100vh;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "SF Pro Text", Inter, Segoe UI, Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    background: radial-gradient(
            circle at 12% 8%,
            rgba(20, 155, 255, 0.22),
            transparent 34%
    ),
    radial-gradient(
            circle at 86% 14%,
            rgba(7, 91, 234, 0.16),
            transparent 30%
    ),
    linear-gradient(135deg, #07111f 0%, #08192d 48%, #030912 100%);
}

body.light {
    background: radial-gradient(
            circle at 14% 8%,
            rgba(20, 155, 255, 0.24),
            transparent 32%
    ),
    radial-gradient(
            circle at 86% 8%,
            rgba(7, 91, 234, 0.14),
            transparent 28%
    ),
    linear-gradient(135deg, #f6fbff 0%, #e6f2ff 48%, #d8e9fb 100%);
}

button,
input,
select,
textarea {
    font: inherit;
}

.hidden {
    display: none !important;
}

.btn {
    border: 0;
    border-radius: 999px;
    padding: 11px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 850;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: 0.18s ease;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.iconbtn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 0;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.iconbtn svg {
    width: 18px;
    height: 18px;
    display: block;
}

.iconbtn.whatsapp svg {
    width: 19px;
    height: 19px;
}

.iconbtn.primary,
.iconbtn.secondary,
.iconbtn.danger,
.iconbtn.whatsapp {
    box-shadow: var(--soft);
}

.rowactions {
    align-items: center;
}

.primary {
    color: white;
    background: linear-gradient(135deg, var(--blue-deep), var(--blue));
    box-shadow: 0 0 28px rgba(20, 155, 255, 0.28),
    0 14px 28px rgba(0, 95, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.secondary {
    color: var(--text);
    background: rgba(20, 155, 255, 0.1);
    border: 1px solid var(--border);
}

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

.whatsapp {
    color: white;
    background: linear-gradient(135deg, #20c96b, #16a857);
    box-shadow: 0 12px 24px rgba(32, 201, 107, 0.22);
}

.ghost {
    background: transparent;
    color: var(--muted);
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.035);
    border-radius: 16px;
    outline: none;
    padding: 13px 14px;
    color: var(--text);
    transition: 0.18s;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.light input,
body.light select,
body.light textarea {
    background: rgba(255, 255, 255, 0.78);
    color: #07111f;
}

input::placeholder,
textarea::placeholder {
    color: rgba(210, 232, 255, 0.45);
}

body.light input::placeholder,
body.light textarea::placeholder {
    color: rgba(87, 112, 143, 0.66);
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(20, 155, 255, 0.72);
    box-shadow: 0 0 0 5px rgba(20, 155, 255, 0.12);
}

textarea {
    min-height: 98px;
    resize: vertical;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 750;
    color: var(--muted);
    margin-bottom: 8px;
}

.section-divider {
    margin: 24px 0 14px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.section-divider h3 {
    margin-bottom: 6px;
    color: var(--text);
}

.family-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 22px 0 12px;
    flex-wrap: wrap;
}

.adherente-card {
    padding: 16px;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: rgba(20, 155, 255, 0.055);
    margin-bottom: 14px;
}

.adherente-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.adherente-title strong {
    color: var(--text);
}

.readonly-field {
    opacity: 0.82;
    cursor: not-allowed;
}

/* LOGIN */
.login-screen {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: block;
    padding: 0;
    margin: 0;
    background: #061226;
}

.login-card {
    width: 100vw;
    height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.84fr);
    overflow: hidden;
    background: #07111f;
    isolation: isolate;
}

.login-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(
            90deg,
            rgba(1, 8, 18, 0.1),
            rgba(1, 8, 18, 0.22)
    ),
    url("/static/imagen_crm.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.login-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.12),
            transparent 46%,
            rgba(0, 0, 0, 0.2)
    ),
    linear-gradient(180deg, transparent 62%, rgba(2, 7, 15, 0.36) 100%);
    pointer-events: none;
}

.login-form {
    padding: 28px 20px;
    background: linear-gradient(
            150deg,
            rgba(11, 24, 42, 0.98),
            rgba(5, 13, 25, 0.98)
    );
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    border-left: 1px solid rgba(120, 185, 255, 0.16);
    position: relative;
    overflow: hidden;
}

.login-form-inner {
    width: min(410px, 100%);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.login-logo {
    width: 82px;
    height: 82px;
    margin: 0 auto 18px;
    color: #1a97ff;
    display: grid;
    place-items: center;
    filter: drop-shadow(0 0 16px rgba(3, 122, 255, 0.35));
}

.login-logo svg {
    width: 84px;
    height: 84px;
}

.login-form h1,
.login-form h2 {
    text-align: center;
    font-size: 38px;
    font-weight: 650;
    letter-spacing: 0.01em;
    color: white;
    line-height: 1.1;
    margin: 0;
}

.login-form .eyebrow {
    text-align: center;
    color: #1ca0ff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    margin: 2px 0 14px;
    text-transform: uppercase;
}


.login-form .muted {
    margin: 12px 0 24px;
    text-align: center;
    color: #98abc2;
    font-size: 14px;
}

.login-form form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-form .field {
    position: relative;
}

.login-form label {
    display: none;
}

.login-form input {
    width: 100%;
    height: 50px;
    border-radius: 12px;
    border: 1px solid rgba(120, 185, 255, 0.3);
    background: rgba(11, 27, 50, 0.42);
    color: white;
    font-size: 15px;
    letter-spacing: 0.01em;
    padding: 0 16px 0 50px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    transition: border-color 170ms ease, box-shadow 170ms ease, background 170ms ease;
}

.login-form input::placeholder {
    color: rgba(173, 193, 214, 0.72);
    font-weight: 400;
}

.login-form input:focus {
    outline: none;
    border-color: #4cb1ff;
    background: rgba(13, 36, 69, 0.54);
    box-shadow: 0 0 0 3px rgba(76, 177, 255, 0.2);
}

.login-field-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    color: rgba(173, 193, 214, 0.82);
    pointer-events: none;
}

.password-eye {
    position: absolute;
    right: 24px;
    top: 50%;
    width: 28px;
    height: 28px;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.55);
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 14px 0 18px;
    color: white;
    font-size: 16px;
}

.remember {
    display: inline-flex;
    align-items: center;
    gap: 11px;
}

.check-box {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    border: 2px solid rgba(255, 255, 255, 0.85);
}

.forgot {
    color: #1594ff;
    text-decoration: none;
}

.login-submit {
    width: 100%;
    margin-top: 2px;
    height: 50px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: none;
    border: 0;
    color: #f7fbff;
    background: linear-gradient(120deg, #0a67ea 0%, #1589ff 40%, #27b6ff 100%);
    box-shadow: 0 10px 24px rgba(10, 103, 234, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition: filter 170ms ease, transform 170ms ease, box-shadow 170ms ease;
}

.login-submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow: 0 12px 26px rgba(10, 103, 234, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.login-submit:active {
    transform: translateY(0);
    filter: brightness(0.98);
}

.login-submit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(42, 157, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.hint {
    display: none;
}

/* APP */
.app {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar) 1fr;
    background: radial-gradient(
            circle at 18% 8%,
            rgba(20, 155, 255, 0.22),
            transparent 30%
    ),
    radial-gradient(
            circle at 82% 12%,
            rgba(7, 91, 234, 0.18),
            transparent 34%
    ),
    linear-gradient(135deg, var(--bg) 0%, #08192d 48%, #030912 100%);
    color: var(--text);
}

body.light .app {
    background: radial-gradient(
            circle at 14% 8%,
            rgba(20, 155, 255, 0.24),
            transparent 32%
    ),
    radial-gradient(
            circle at 86% 8%,
            rgba(7, 91, 234, 0.14),
            transparent 28%
    ),
    linear-gradient(135deg, #f6fbff 0%, #e6f2ff 48%, #d8e9fb 100%);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: linear-gradient(
            180deg,
            rgba(3, 10, 20, 0.98),
            rgba(5, 13, 25, 0.96)
    );
    border-right: 1px solid rgba(20, 155, 255, 0.22);
    backdrop-filter: blur(28px) saturate(180%);
}

body.light .sidebar {
    background: linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.86),
            rgba(232, 244, 255, 0.74)
    );
    border-right: 1px solid rgba(7, 91, 234, 0.14);
}

.sidebox,
.topbar,
.card,
.filters,
.tablewrap,
.empty,
.modal {
    background: linear-gradient(
            145deg,
            rgba(11, 24, 42, 0.94),
            rgba(5, 13, 25, 0.92)
    );
    border: 1px solid var(--border);
    box-shadow: var(--soft), inset 0 1px 0 rgba(255, 255, 255, 0.055);
    backdrop-filter: blur(22px) saturate(170%);
}

body.light .sidebox,
body.light .topbar,
body.light .card,
body.light .filters,
body.light .tablewrap,
body.light .empty,
body.light .modal {
    background: rgba(255, 255, 255, 0.76);
    box-shadow: var(--soft), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.sidebox {
    height: 100%;
    padding: 18px;
    display: flex;
    flex-direction: column;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 6px 24px;
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: 17px;
    background: linear-gradient(135deg, var(--blue-deep), var(--blue));
    color: white;
    display: grid;
    place-items: center;
    font-size: 22px;
    font-weight: 950;
    box-shadow: 0 0 28px rgba(20, 155, 255, 0.34),
    0 14px 26px rgba(0, 75, 180, 0.22);
}

.brand strong {
    display: block;
    font-size: 17px;
    color: var(--text);
}

.brand span {
    font-size: 12px;
    color: var(--muted);
}

.nav {
    display: grid;
    gap: 7px;
}

.nav button {
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    border-radius: 17px;
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 11px;
    font-weight: 800;
    transition: 0.18s;
}

.nav button:hover {
    background: rgba(20, 155, 255, 0.1);
    transform: translateX(2px);
}

.nav button.active {
    background: linear-gradient(135deg, var(--blue-deep), var(--blue));
    color: white;
    box-shadow: 0 16px 34px rgba(0, 95, 255, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.nav button i {
    width: 31px;
    height: 31px;
    border-radius: 12px;
    background: rgba(20, 155, 255, 0.12);
    color: var(--blue);
    display: grid;
    place-items: center;
    font-style: normal;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(20, 155, 255, 0.12);
}

.nav button.active i {
    color: white;
    background: rgba(255, 255, 255, 0.16);
}

.nav button i::before,
.nav button i::after {
    content: "";
    position: absolute;
    display: block;
}

.ico-dashboard::before {
    width: 15px;
    height: 15px;
    border: 2px solid currentColor;
    border-radius: 5px;
    box-shadow: 10px 0 0 -2px currentColor, 0 10px 0 -2px currentColor,
    10px 10px 0 -2px currentColor;
    opacity: 0.9;
}

.ico-clients::before {
    width: 11px;
    height: 11px;
    border: 2px solid currentColor;
    border-radius: 50%;
    top: 6px;
    left: 9px;
}

.ico-clients::after {
    width: 18px;
    height: 9px;
    border: 2px solid currentColor;
    border-top: 0;
    border-radius: 0 0 12px 12px;
    bottom: 6px;
    left: 6px;
}

.ico-plus::before {
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.ico-plus::after {
    width: 2px;
    height: 16px;
    background: currentColor;
    border-radius: 2px;
}

.ico-services::before {
    width: 15px;
    height: 18px;
    border: 2px solid currentColor;
    border-radius: 5px;
}

.ico-services::after {
    width: 9px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    top: 12px;
    left: 11px;
    box-shadow: 0 5px 0 currentColor;
}

.ico-types::before {
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.ico-types::after {
    width: 10px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

.ico-companies::before {
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-radius: 4px;
}

.ico-companies::after {
    width: 2px;
    height: 14px;
    background: currentColor;
    box-shadow: 6px 0 0 currentColor, 12px 0 0 currentColor;
    left: 8px;
    top: 8px;
    opacity: 0.85;
}

.ico-alerts::before {
    width: 17px;
    height: 17px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.ico-alerts::after {
    width: 7px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    left: 15px;
    top: 9px;
    transform-origin: left center;
    transform: rotate(90deg);
    box-shadow: 0 -6px 0 currentColor;
}

.ico-logout::before {
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right: 0;
    border-radius: 5px 0 0 5px;
    left: 7px;
}

.ico-logout::after {
    width: 12px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    right: 6px;
    box-shadow: 4px -4px 0 -1px currentColor, 4px 4px 0 -1px currentColor;
}

.sidefoot {
    margin-top: auto;
}

.user {
    padding: 14px;
    border-radius: 18px;
    background: rgba(20, 155, 255, 0.08);
    border: 1px solid var(--border);
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--blue-deep), var(--blue));
    color: white;
    font-weight: 950;
}

.main {
    padding: 24px;
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 16px;
    z-index: 5;
    margin-bottom: 22px;
    padding: 14px 16px;
    border-radius: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.search {
    width: min(460px, 46vw);
    position: relative;
}

.search input {
    border-radius: 999px;
    padding-left: 42px;
    background: rgba(255, 255, 255, 0.035);
}

body.light .search input {
    background: rgba(255, 255, 255, 0.78);
}

.search::before {
    content: "⌕";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-55%);
    color: var(--muted);
    font-size: 20px;
    z-index: 1;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-actions {
    margin-top: 18px;
}

.category-actions {
    text-align: right;
}

.category-actions .btn {
    margin-top: 10px;
}

.screen {
    animation: appear 0.24s ease both;
}

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

.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin: 10px 4px 22px;
    flex-wrap: wrap;
}

.eyebrow {
    color: var(--blue);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.title h2 {
    font-size: clamp(30px, 3vw, 44px);
    letter-spacing: -0.05em;
    line-height: 1;
    color: var(--text);
}

.title p,
.muted,
.small {
    color: var(--muted);
    line-height: 1.5;
}

.card {
    border-radius: 24px;
}

.panel {
    padding: 22px;
}

.panel h3 {
    font-size: 20px;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    color: var(--text);
}

.small {
    font-size: 13px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.stat {
    padding: 20px;
    min-height: 150px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(
            135deg,
            rgba(20, 155, 255, 0.14),
            rgba(255, 255, 255, 0.025)
    );
}

body.light .stat {
    background: linear-gradient(
            135deg,
            rgba(20, 155, 255, 0.12),
            rgba(255, 255, 255, 0.7)
    );
}

.stat::after {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    right: -42px;
    top: -42px;
    border-radius: 50%;
    background: var(--glow);
}

.icon {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, var(--blue-deep), var(--blue));
    box-shadow: 0 0 24px rgba(20, 155, 255, 0.26),
    0 12px 20px rgba(0, 0, 0, 0.12);
    margin-bottom: 18px;
}

.stat p {
    font-size: 13px;
    color: var(--muted);
    font-weight: 800;
}

.number {
    font-size: 42px;
    font-weight: 950;
    letter-spacing: -0.055em;
    margin-top: 4px;
    color: var(--text);
}

.dashboard-overview {
    display: grid;
    grid-template-columns: minmax(210px, 0.7fr) minmax(210px, 0.7fr) minmax(
            360px,
            1.6fr
          );
    gap: 16px;
    margin-bottom: 18px;
    align-items: stretch;
}

.metric-card {
    padding: 20px;
    min-height: 154px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(
            135deg,
            rgba(20, 155, 255, 0.14),
            rgba(255, 255, 255, 0.025)
    );
}

body.light .metric-card {
    background: linear-gradient(
            135deg,
            rgba(20, 155, 255, 0.12),
            rgba(255, 255, 255, 0.7)
    );
}

.metric-card::after {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    right: -42px;
    top: -42px;
    border-radius: 50%;
    background: var(--glow);
}

.type-summary-card {
    padding: 20px;
    min-height: 154px;
}

.type-summary-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.type-summary-head h3 {
    margin-bottom: 4px;
}

.type-total-badge {
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(20, 155, 255, 0.12);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.type-list {
    display: grid;
    gap: 12px;
}

.type-item {
    display: grid;
    gap: 8px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(20, 155, 255, 0.055);
    border: 1px solid rgba(120, 185, 255, 0.1);
}

.type-row {
    display: grid;
    grid-template-columns: minmax(120px, 190px) 1fr auto;
    align-items: center;
    gap: 12px;
}

.type-options {
    display: grid;
    gap: 7px;
    margin-left: 12px;
    padding-left: 14px;
    border-left: 2px solid rgba(120, 185, 255, 0.16);
}

.type-option-row {
    display: grid;
    grid-template-columns: minmax(110px, 180px) 1fr auto;
    align-items: center;
    gap: 10px;
}

.type-option-name {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.type-option-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(120, 185, 255, 0.1);
    overflow: hidden;
}

.type-option-fill {
    display: block;
    height: 100%;
    width: var(--w);
    border-radius: inherit;
    background: linear-gradient(
            90deg,
            color-mix(in srgb, var(--tipo-color, var(--blue)) 55%, transparent),
            var(--tipo-color, var(--blue))
    );
}

.type-option-count {
    min-width: 66px;
    text-align: right;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.type-name {
    min-width: 0;
}

.type-name strong {
    display: block;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.type-name span {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.type-track {
    height: 14px;
    border-radius: 999px;
    background: rgba(120, 185, 255, 0.12);
    overflow: hidden;
    border: 1px solid rgba(120, 185, 255, 0.08);
}

.type-fill {
    display: block;
    height: 100%;
    width: var(--w);
    border-radius: inherit;
    background: linear-gradient(
            90deg,
            color-mix(in srgb, var(--tipo-color, var(--blue)) 72%, #07111f),
            var(--tipo-color, var(--blue))
    );
    box-shadow: 0 0 18px color-mix(in srgb, var(--tipo-color, var(--blue)) 28%, transparent);
}

.type-count {
    min-width: 74px;
    text-align: right;
    font-weight: 950;
    color: var(--text);
}

.type-count small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    margin-top: 2px;
}

.empty-types {
    padding: 18px;
    border-radius: 18px;
    background: rgba(20, 155, 255, 0.08);
    color: var(--muted);
    border: 1px dashed var(--border);
}

.dashgrid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 16px;
}

.quick {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.quickitem,
.premium-tile,
.service,
.infobox {
    background: linear-gradient(
            135deg,
            rgba(20, 155, 255, 0.12),
            rgba(255, 255, 255, 0.025)
    );
    border: 1px solid rgba(120, 185, 255, 0.12);
}

body.light .quickitem,
body.light .premium-tile,
body.light .service,
body.light .infobox {
    background: linear-gradient(
            135deg,
            rgba(20, 155, 255, 0.12),
            rgba(255, 255, 255, 0.7)
    );
    border-color: rgba(7, 91, 234, 0.13);
}

.quickitem {
    padding: 14px;
    border-radius: 19px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.quickitem strong {
    display: block;
    margin-bottom: 3px;
    color: var(--text);
}

.premium-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 14px;
}

.premium-tile {
    padding: 16px;
    border-radius: 20px;
}

.premium-tile span {
    font-size: 12px;
    color: var(--muted);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.premium-tile b {
    display: block;
    margin-top: 6px;
    font-size: 24px;
    letter-spacing: -0.04em;
    color: var(--text);
}

.barlist {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.barrow {
    display: grid;
    grid-template-columns: 110px 1fr 46px;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--muted);
}

.bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(120, 185, 255, 0.12);
    overflow: hidden;
}

.bar i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--blue-deep), var(--blue));
    box-shadow: 0 0 16px rgba(20, 155, 255, 0.28);
}

.pillrow {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.mini-pill {
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(20, 155, 255, 0.1);
    font-size: 12px;
    font-weight: 850;
    color: var(--text);
}

.formgrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.stacked-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
}

.tipos-form-row {
    display: grid;
    grid-template-columns: 40fr 40fr 20fr;
    gap: 14px;
    align-items: end;
}

.empresas-main-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.empresas-contact-row {
    display: grid;
    grid-template-columns: 30fr 30fr 30fr;
    gap: 14px;
}

.servicios-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.servicios-row-3 {
    display: grid;
    grid-template-columns: 30fr 30fr 30fr;
    gap: 14px;
}

.servicios-row-full {
    display: grid;
    grid-template-columns: 1fr;
}

.tipos-description-row {
    display: grid;
    grid-template-columns: 1fr;
}

.tipo-color-field input[type="color"] {
    min-height: 48px;
    padding: 4px;
    cursor: pointer;
}

.color-swatch {
    display: inline-block;
    width: 34px;
    height: 22px;
    border: 1px solid var(--border);
    border-radius: 8px;
    vertical-align: middle;
}

.color-cell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 750;
}

.tipo-badge-empresa {
    border: 1px solid currentColor;
    font-weight: 850;
}

.filters {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, minmax(150px, 0.7fr));
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px;
    border-radius: 24px;
}

.filters input:disabled {
    cursor: not-allowed;
}

.tablewrap {
    overflow: hidden;
    border-radius: 24px;
}

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

th,
td {
    padding: 15px 16px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid rgba(120, 185, 255, 0.11);
    font-size: 14px;
    color: var(--text);
}

th {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(20, 155, 255, 0.09);
}

tr:last-child td {
    border-bottom: 0;
}

tr:hover td {
    background: rgba(20, 155, 255, 0.075);
}

.clientcell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.clientavatar {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    font-weight: 950;
    color: white;
    background: linear-gradient(135deg, var(--blue-deep), var(--blue));
    box-shadow: 0 10px 22px rgba(0, 95, 255, 0.18);
    flex: 0 0 auto;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
    border: 1px solid transparent;
}

.tipo-badge {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.color-field {
    display: grid;
    grid-template-columns: 54px 1fr;
    align-items: center;
    gap: 10px;
}

.color-field input[type="color"] {
    width: 54px;
    height: 48px;
    padding: 5px;
    border-radius: 15px;
    cursor: pointer;
}

.color-preview-text {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.bseg {
    color: #b8e7ff;
    background: rgba(20, 155, 255, 0.16);
    border-color: rgba(20, 155, 255, 0.2);
}

.bobra,
.bact {
    color: #bff6d9;
    background: rgba(32, 201, 107, 0.16);
    border-color: rgba(32, 201, 107, 0.2);
}

.bpen {
    color: #ffe0a8;
    background: rgba(255, 181, 69, 0.16);
    border-color: rgba(255, 181, 69, 0.2);
}

.bven {
    color: #ffc4c4;
    background: rgba(255, 93, 93, 0.16);
    border-color: rgba(255, 93, 93, 0.2);
}

body.light .bseg {
    color: #075bea;
}

body.light .bobra,
body.light .bact {
    color: #117b34;
}

body.light .bpen {
    color: #925700;
}

body.light .bven {
    color: #b42318;
}

.rowactions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.empty {
    padding: 42px 24px;
    text-align: center;
    color: var(--muted);
    border-radius: 24px;
}

.empty .big {
    font-size: 38px;
    margin-bottom: 8px;
}

.profile {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 16px;
    margin-bottom: 16px;
}

.profilecard {
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.profilecard::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -90px;
    width: 230px;
    height: 230px;
    background: radial-gradient(
            circle,
            rgba(20, 155, 255, 0.2),
            transparent 70%
    );
    border-radius: 50%;
}

.ptitle {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.ptitle .clientavatar {
    width: 66px;
    height: 66px;
    border-radius: 22px;
    font-size: 24px;
}

.ptitle h2 {
    font-size: 34px;
    letter-spacing: -0.05em;
    color: var(--text);
}

.infogrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    position: relative;
    z-index: 1;
}

.infobox {
    padding: 14px;
    border-radius: 18px;
}

.infobox span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 4px;
}

.infobox b {
    font-size: 14px;
    word-break: break-word;
    color: var(--text);
}

.contactcard {
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
}

.services {
    display: grid;
    gap: 12px;
}

.service {
    padding: 16px;
    border-radius: 20px;
}

.servicehead {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 9px;
}

.service h3 {
    color: var(--text);
}

.modalback {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    background: rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(14px);
    z-index: 30;
    padding: 20px;
}

.modalback.show {
    display: grid;
}

.modal {
    width: min(100%, 540px);
    padding: 22px;
    border-radius: 24px;
}

.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    padding: 14px 16px;
    border-radius: 18px;
    color: white;
    background: rgba(7, 17, 31, 0.94);
    border: 1px solid rgba(120, 185, 255, 0.18);
    box-shadow: var(--shadow);
    transform: translateY(30px);
    opacity: 0;
    pointer-events: none;
    transition: 0.22s;
    z-index: 40;
    font-weight: 800;
}

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

/* =========================
   DASHBOARD: 2 TARJETAS ARRIBA + DISTRIBUCIÓN ABAJO
========================= */

.dashboard-overview {
    display: block;
    margin-bottom: 18px;
}

.dashboard-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

.statcard {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    border-radius: 32px;
    padding: 34px;
    background: radial-gradient(
            circle at top right,
            rgba(38, 132, 255, 0.22),
            transparent 34%
    ),
    linear-gradient(135deg, #0f3f88 0%, #07295f 100%);
    border: 1px solid rgba(82, 153, 255, 0.22);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.statcard::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    top: -60px;
    right: -60px;
    background: rgba(39, 123, 255, 0.16);
}

.staticon {
    position: relative;
    z-index: 1;
    width: 72px;
    height: 72px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f6fff, #1d9dff);
    margin-bottom: 28px;
    box-shadow: 0 10px 25px rgba(0, 111, 255, 0.28);
}

.staticon svg {
    width: 34px;
    height: 34px;
}

.statlabel {
    position: relative;
    z-index: 1;
    font-size: 20px;
    font-weight: 650;
    color: #dcecff;
    margin-bottom: 8px;
}

.statvalue {
    position: relative;
    z-index: 1;
    font-size: 82px;
    line-height: 1;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.06em;
}

.distribucion-wrap {
    margin-top: 10px;
}

.distribucion-wrap .type-summary-card {
    width: 100%;
    padding: 32px;
    border-radius: 32px;
}

.distribucion-wrap .type-list {
    gap: 14px;
}

.distribucion-wrap .type-item {
    padding: 18px;
    border-radius: 24px;
}

@media (max-width: 980px) {
    .dashboard-top {
        grid-template-columns: 1fr;
    }

    .statcard {
        min-height: 180px;
    }

    .statvalue {
        font-size: 64px;
    }
}

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

    .dashboard-overview {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .type-summary-card {
        grid-column: 1 / -1;
    }

    .dashgrid,
    .profile {
        grid-template-columns: 1fr;
    }

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

    .formgrid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 860px) {
    .login-card {
        grid-template-columns: 1fr;
    }

    .login-hero {
        min-height: 360px;
    }

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

    .sidebar {
        position: relative;
        height: auto;
        padding: 14px;
    }

    .sidebox {
        height: auto;
    }

    .nav {
        grid-template-columns: repeat(2, 1fr);
    }

    .sidefoot {
        display: none;
    }

    .topbar {
        position: relative;
        top: 0;
        flex-direction: column;
        align-items: stretch;
    }

    .search {
        width: 100%;
    }

    .main {
        padding: 14px;
    }
}

@media (max-width: 640px) {
    .login-hero {
        display: none;
    }

    .login-card {
        grid-template-columns: 1fr;
    }

    .login-form {
        padding: 30px;
    }

    .stats,
    .dashboard-overview,
    .filters,
    .tipos-form-row,
    .empresas-main-row,
    .empresas-contact-row,
    .servicios-row-2,
    .servicios-row-3,
    .formgrid,
    .infogrid,
    .premium-strip {
        grid-template-columns: 1fr;
    }

    .tablewrap {
        overflow-x: auto;
    }

    table {
        min-width: 860px;
    }

    .header {
        align-items: flex-start;
    }

    .ptitle {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .type-row,
    .type-option-row {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .type-options {
        margin-left: 0;
    }

    .type-count,
    .type-option-count {
        text-align: left;
    }
}

/* =========================
   BOTÓN PARA ABRIR / CERRAR MENÚ
   Abierto = X | Cerrado = 3 rayitas
========================= */

.sidebox {
    position: relative;
}

.brand {
    padding-right: 58px;
}

.menu-toggle {
    position: absolute;
    top: 20px;
    right: 18px;
    z-index: 20;
    width: 46px;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 16px;
    color: white;
    background: linear-gradient(135deg, var(--blue-deep), var(--blue));
    box-shadow: 0 14px 34px rgba(0, 95, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: 0.22s ease;
}

.menu-toggle:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
    content: "";
    position: absolute;
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: 0.22s ease;
}

.menu-toggle span {
    position: relative;
}

.menu-toggle span::before {
    top: -7px;
    left: 0;
}

.menu-toggle span::after {
    top: 7px;
    left: 0;
}

body:not(.menu-cerrado) .menu-toggle span {
    background: transparent;
}

body:not(.menu-cerrado) .menu-toggle span::before {
    top: 0;
    transform: rotate(45deg);
}

body:not(.menu-cerrado) .menu-toggle span::after {
    top: 0;
    transform: rotate(-45deg);
}

body.menu-cerrado .app {
    grid-template-columns: 1fr;
}

body.menu-cerrado .sidebar {
    position: fixed;
    left: calc(-1 * var(--sidebar));
    top: 0;
    width: var(--sidebar);
    opacity: 0;
    pointer-events: none;
}

body.menu-cerrado .main {
    width: 100%;
    max-width: none;
    padding-left: 92px;
}

body.menu-cerrado .menu-toggle {
    position: fixed;
    top: 22px;
    left: 22px;
    right: auto;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    display: grid;
    pointer-events: auto;
}

body.menu-cerrado .menu-toggle span {
    background: currentColor;
}

body.menu-cerrado .menu-toggle span::before {
    top: -7px;
    transform: none;
}

body.menu-cerrado .menu-toggle span::after {
    top: 7px;
    transform: none;
}

#loginScreen:not(.hidden) ~ #app .menu-toggle,
#app.hidden .menu-toggle {
    display: none !important;
}

@media (max-width: 860px) {
    body.menu-cerrado .sidebar {
        display: none;
    }

    body.menu-cerrado .menu-toggle {
        top: 16px;
        left: 16px;
    }

    body.menu-cerrado .main {
        padding-left: 14px;
        padding-top: 76px;
    }
}

.menu-toggle-btn {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 9999;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 22px;
    background: #111827;
    color: white;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

body.menu-cerrado .sidebar {
    transform: translateX(-100%);
}

body.menu-cerrado main {
    margin-left: 0 !important;
}

/* BOTÓN EXTERNO PARA REABRIR MENÚ */
.menu-open-btn {
    position: fixed;
    top: 22px;
    left: 22px;
    z-index: 10000;
    width: 46px;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 16px;
    color: white;
    background: linear-gradient(135deg, var(--blue-deep), var(--blue));
    box-shadow: 0 14px 34px rgba(0, 95, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
    display: none;
    place-items: center;
    cursor: pointer;
    transition: 0.22s ease;
}

.menu-open-btn span,
.menu-open-btn span::before,
.menu-open-btn span::after {
    content: "";
    position: absolute;
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.menu-open-btn span {
    position: relative;
}

.menu-open-btn span::before {
    top: -7px;
    left: 0;
}

.menu-open-btn span::after {
    top: 7px;
    left: 0;
}

body.menu-cerrado #menuOpenBtn {
    display: grid !important;
}

body:not(.menu-cerrado) #menuOpenBtn,
#loginScreen:not(.hidden) ~ #app #menuOpenBtn,
#app.hidden ~ #menuOpenBtn,
body:has(#loginScreen:not(.hidden)) #menuOpenBtn {
    display: none !important;
}

body.menu-cerrado .menu-toggle {
    display: none !important;
}

body.menu-cerrado .main {
    width: 100%;
    max-width: none;
    padding-left: 92px;
}

@media (max-width: 860px) {
    .menu-open-btn {
        top: 16px;
        left: 16px;
    }

    body.menu-cerrado .main {
        padding-left: 14px;
        padding-top: 76px;
    }
}

@media (max-width: 860px) {
    .login-form {
        padding: 24px 20px;
        justify-content: center;
    }

    .login-form-inner {
        width: min(480px, 100%);
    }

    .login-form h1,
    .login-form h2 {
        font-size: 34px;
    }

    .login-logo {
        margin-bottom: 14px;
    }
}

@media (max-width: 640px) {
    .login-form {
        padding: 24px 18px 22px;
    }

    .login-form-inner {
        width: min(360px, 100%);
    }

    .login-form h1,
    .login-form h2 {
        font-size: 32px;
    }

    .login-form .eyebrow {
        letter-spacing: 0.14em;
    }
}

/* LOGIN COMPOSITION REFINEMENT */
#loginScreen .login-form {
    padding: 42px 30px;
    justify-content: center;
    min-height: 100%;
}

#loginScreen .login-form-inner {
    width: min(420px, 100%);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

#loginScreen .login-logo {
    width: 92px;
    height: 92px;
    margin: 0 auto 24px;
    color: #1d99ff;
}

#loginScreen .login-logo svg {
    width: 92px;
    height: 92px;
}

#loginScreen .login-form .eyebrow {
    color: #27a3ff;
    margin: 0 0 18px;
    letter-spacing: 0.22em;
}

#loginScreen .login-form h1,
#loginScreen .login-form h2 {
    margin: 0 0 10px;
    font-size: 44px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.01em;
    line-height: 1.05;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

#loginScreen .login-form .muted {
    margin: 8px 0 28px;
    color: #adc0d3;
    font-size: 14px;
    font-weight: 400;
    text-align: center;
}

#loginScreen .login-form form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#loginScreen .login-form .field {
    margin-top: 0;
    position: relative;
}

#loginScreen .login-form input {
    width: 100%;
    height: 50px;
    border-radius: 12px;
    border: 1px solid rgba(120, 185, 255, 0.45);
    background: linear-gradient(180deg, rgba(12, 28, 52, 0.62) 0%, rgba(9, 17, 31, 0.62) 100%);
    color: #fff;
    font-size: 15px;
    letter-spacing: 0.01em;
    padding: 0 16px 0 50px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.035);
    transition: border-color 170ms ease, box-shadow 170ms ease, background-color 170ms ease;
}

#loginScreen .login-form input::placeholder {
    color: rgba(173, 193, 214, 0.78);
    font-weight: 400;
}

#loginScreen .login-form input:focus {
    border-color: #57b7ff;
    background: linear-gradient(180deg, rgba(18, 38, 63, 0.73) 0%, rgba(11, 21, 37, 0.72) 100%);
    box-shadow:
        0 0 0 3px rgba(76, 177, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

#loginScreen .login-field-icon {
    left: 16px;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    color: rgba(173, 193, 214, 0.9);
    pointer-events: none;
    display: grid;
    place-items: center;
}

#loginScreen .login-submit {
    margin-top: 30px;
    width: 100%;
    height: 50px;
    border-radius: 14px;
    border: 0;
    background: linear-gradient(120deg, #0a67ea 0%, #1589ff 40%, #27b6ff 100%);
    box-shadow: 0 6px 16px rgba(10, 103, 234, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #f7fbff;
    transition: filter 170ms ease, transform 170ms ease, box-shadow 170ms ease;
}

#loginScreen .login-submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow: 0 7px 18px rgba(10, 103, 234, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

#loginScreen .login-submit:active {
    transform: translateY(0);
    filter: brightness(0.98);
}

#loginScreen .login-submit:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(42, 157, 255, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

@media (max-width: 860px) {
    #loginScreen .login-form {
        padding: 36px 24px;
    }

    #loginScreen .login-form-inner {
        width: min(470px, 100%);
    }

    #loginScreen .login-form h1,
    #loginScreen .login-form h2 {
        font-size: 40px;
    }

    #loginScreen .login-logo {
        margin-bottom: 20px;
        width: 88px;
        height: 88px;
    }

    #loginScreen .login-logo svg {
        width: 88px;
        height: 88px;
    }
}

@media (max-width: 640px) {
    #loginScreen .login-form {
        padding: 28px 16px 24px;
    }

    #loginScreen .login-form-inner {
        width: min(360px, 100%);
    }

    #loginScreen .login-form h1,
    #loginScreen .login-form h2 {
        font-size: 38px;
    }

    #loginScreen .login-form .eyebrow {
        letter-spacing: 0.18em;
    }

    #loginScreen .login-form form {
        gap: 15px;
    }

    #loginScreen .login-submit {
        margin-top: 30px;
    }
}
