/* ============================================================
   SOPORTE DIGITAL PRO - ERP PROFESSIONAL THEME
   Brand palette derived from Content/images/logo.png
   Primary brand: #558f99
   ============================================================ */

:root {
    --sdp-brand: #558f99;
    --sdp-brand-rgb: 85, 143, 153;
    --sdp-brand-dark: #356873;
    --sdp-brand-deep: #214b54;
    --sdp-brand-ink: #173840;
    --sdp-brand-soft: #eaf3f4;
    --sdp-brand-soft-2: #f4f9fa;
    --sdp-accent: #78aeb7;
    --sdp-accent-light: #cfe1e4;
    --sdp-bg: #f5f8f9;
    --sdp-surface: #ffffff;
    --sdp-surface-muted: #f8fafb;
    --sdp-text: #1f3035;
    --sdp-muted: #6f7f84;
    --sdp-border: #dfe8ea;
    --sdp-border-strong: #cbdadd;
    --sdp-success: #2f806e;
    --sdp-warning: #b9832f;
    --sdp-danger: #b84d5b;
    --sdp-info: #4d8298;
    --sdp-shadow-sm: 0 2px 10px rgba(26, 63, 71, .06);
    --sdp-shadow: 0 10px 30px rgba(26, 63, 71, .09);
    --sdp-shadow-lg: 0 20px 55px rgba(26, 63, 71, .14);
    --sdp-radius-sm: 8px;
    --sdp-radius: 12px;
    --sdp-radius-lg: 18px;
    --sdp-sidebar-width: 272px;
    --bs-primary: var(--sdp-brand);
    --bs-primary-rgb: var(--sdp-brand-rgb);
    --bs-body-font-family: "Segoe UI", Inter, Roboto, Arial, sans-serif;
    --bs-body-color: var(--sdp-text);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.erp-body,
body {
    margin: 0;
    background:
        radial-gradient(circle at 100% 0%, rgba(var(--sdp-brand-rgb), .07), transparent 26rem),
        var(--sdp-bg);
    color: var(--sdp-text);
    font-family: "Segoe UI", Inter, Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(var(--sdp-brand-rgb), .2); color: var(--sdp-brand-deep); }

a { color: var(--sdp-brand-dark); }
a:hover { color: var(--sdp-brand-deep); }

/* ------------------------------ Shell / Sidebar ------------------------------ */
.sidebar {
    width: var(--sdp-sidebar-width) !important;
    background: linear-gradient(180deg, #173b43 0%, #214f58 52%, #173b43 100%) !important;
    color: #fff;
    border-right: 1px solid rgba(255,255,255,.06);
    box-shadow: 10px 0 35px rgba(20, 52, 59, .13);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.26) transparent;
    z-index: 1040;
}
.sidebar::-webkit-scrollbar { width: 7px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 20px; }

.sidebar-header {
    padding: 24px 18px 20px !important;
    border-bottom: 1px solid rgba(255,255,255,.10) !important;
    background: rgba(255,255,255,.035);
    position: sticky;
    top: 0;
    z-index: 2;
    backdrop-filter: blur(12px);
}
.sidebar-header img {
    width: 86px !important;
    height: 86px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    padding: 3px;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.sidebar-header h5 {
    margin: 12px 0 2px !important;
    color: #fff;
    font-size: 17px;
    letter-spacing: .01em;
}
.sidebar-brand-subtitle {
    display: block;
    font-size: 11px;
    color: rgba(255,255,255,.63);
    text-transform: uppercase;
    letter-spacing: .13em;
    font-weight: 600;
}

.sidebar a { color: rgba(255,255,255,.82) !important; }
.sidebar .menu-item {
    margin: 4px 10px;
    padding: 11px 13px !important;
    border-radius: 10px;
    display: flex !important;
    align-items: center;
    gap: 11px;
    font-size: 13.5px;
    font-weight: 550;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.sidebar .menu-item i {
    width: 21px;
    text-align: center;
    font-size: 16px;
    color: #a9cdd3;
}
.sidebar .menu-item:hover {
    background: rgba(255,255,255,.10) !important;
    color: #fff !important;
    transform: translateX(2px);
}
.sidebar .menu-item.active {
    background: linear-gradient(135deg, rgba(124,183,193,.35), rgba(85,143,153,.22)) !important;
    color: #fff !important;
    box-shadow: inset 3px 0 0 #a8d2d9;
}
.sidebar .menu-item.active i { color: #d9f0f3; }
.sidebar .menu-home {
    border-bottom: none !important;
    margin-bottom: 8px !important;
}

.submenu {
    margin: 2px 9px 7px;
    padding: 5px 0 8px 0 !important;
    background: rgba(7, 28, 33, .22) !important;
    border-radius: 11px;
    border: 1px solid rgba(255,255,255,.045);
}
.submenu a {
    position: relative;
    margin: 1px 7px;
    padding: 8px 10px 8px 31px !important;
    border-radius: 8px;
    color: rgba(255,255,255,.68) !important;
    font-size: 12.5px !important;
    line-height: 1.35;
    transition: all .16s ease;
}
.submenu a::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(180,220,226,.45);
    transform: translateY(-50%);
}
.submenu a:hover {
    background: rgba(255,255,255,.075);
    color: #fff !important;
}
.submenu a.active {
    border-left: 0 !important;
    padding-left: 31px !important;
    background: rgba(138,198,207,.17);
    color: #fff !important;
    font-weight: 650;
}
.submenu a.active::before {
    width: 6px;
    height: 6px;
    left: 14px;
    background: #b8dde2;
    box-shadow: 0 0 0 4px rgba(184,221,226,.10);
}
.submenu-section {
    padding: 11px 16px 5px !important;
    color: #82b2ba !important;
    font-size: 9.5px !important;
    font-weight: 700;
    letter-spacing: .13em !important;
}
.sidebar-footer {
    margin: 18px 16px 22px;
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,.09);
    color: rgba(255,255,255,.46);
    font-size: 10.5px;
    text-align: center;
}

.main-content {
    margin-left: var(--sdp-sidebar-width) !important;
    min-height: 100vh;
    transition: margin-left .22s ease;
}
.topbar {
    height: 68px !important;
    padding: 0 28px !important;
    background: rgba(255,255,255,.92) !important;
    border-bottom: 1px solid var(--sdp-border) !important;
    box-shadow: 0 1px 0 rgba(32,77,85,.02);
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: blur(14px);
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.sidebar-toggle {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--sdp-border);
    border-radius: 10px;
    background: #fff;
    color: var(--sdp-brand-deep);
    box-shadow: var(--sdp-shadow-sm);
}
.topbar-brandline {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.topbar-system {
    color: var(--sdp-brand-deep);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: .01em;
}
.topbar-context {
    color: var(--sdp-muted);
    font-size: 11px;
    line-height: 1.25;
    margin-top: 2px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 410px;
}
.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 11px 7px 8px;
    border: 1px solid var(--sdp-border);
    background: #fff;
    border-radius: 999px;
    box-shadow: var(--sdp-shadow-sm);
}
.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--sdp-brand-soft);
    color: var(--sdp-brand-dark);
    font-size: 15px;
}
.usuario-info {
    color: var(--sdp-text);
    font-size: 12px;
    font-weight: 650 !important;
    max-width: 260px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 11px;
    border-radius: 9px;
    color: var(--sdp-danger) !important;
    font-size: 12px;
    transition: background .15s ease;
}
.logout-btn:hover { background: #fff0f2; }

.content-area {
    padding: 28px 30px 42px !important;
}
.content-area > .container-fluid,
.content-area > div.container-fluid {
    max-width: 1680px;
    margin-left: auto;
    margin-right: auto;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(9, 30, 35, .44);
    z-index: 1035;
    backdrop-filter: blur(2px);
}

/* ------------------------------ Typography / page headings ------------------------------ */
.content-area h1,
.content-area h2,
.content-area h3,
.content-area h4,
.content-area h5,
.content-area h6 {
    color: var(--sdp-text);
}
.content-area h2,
.content-area h3,
.tes-title,
.libro-title {
    letter-spacing: -.025em;
}
.content-area h2.fw-bold,
.content-area h3.fw-bold,
.tes-title,
.libro-title {
    position: relative;
    color: var(--sdp-brand-ink);
}
.content-area h2.fw-bold::after,
.content-area h3.fw-bold::after,
.tes-title::after,
.libro-title::after {
    content: "";
    display: block;
    width: 44px;
    height: 3px;
    margin-top: 8px;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--sdp-brand), #9bc5cc);
}
.text-muted,
.tes-subtitle,
.libro-subtitle,
.small-note { color: var(--sdp-muted) !important; }

/* ------------------------------ Cards / sections ------------------------------ */
.card-erp,
.tes-card,
.tra-card,
.cb-card,
.nc-card,
.libro-card,
.summary-box,
.resumen-card,
.card:not(.kpi-card) {
    background: var(--sdp-surface) !important;
    border: 1px solid var(--sdp-border) !important;
    border-radius: var(--sdp-radius) !important;
    box-shadow: var(--sdp-shadow-sm) !important;
}
.card-erp,
.tes-card,
.tra-card,
.cb-card,
.nc-card,
.libro-card {
    padding: 21px !important;
    margin-bottom: 20px !important;
}
.card-erp {
    position: relative;
}
.card-erp::before,
.tes-card::before,
.tra-card::before,
.cb-card::before,
.nc-card::before,
.libro-card::before {
    content: "";
    position: absolute;
    left: 18px;
    top: -1px;
    width: 48px;
    height: 2px;
    border-radius: 0 0 10px 10px;
    background: var(--sdp-brand);
    opacity: .85;
}
.tes-card,.tra-card,.cb-card,.nc-card,.libro-card { position: relative; }
.card-header {
    padding: 16px 19px !important;
    border-bottom: 1px solid var(--sdp-border) !important;
    background: linear-gradient(180deg, #fff, #fbfdfd) !important;
    border-radius: var(--sdp-radius) var(--sdp-radius) 0 0 !important;
}
.card-body { padding: 19px !important; }
.card-footer {
    background: var(--sdp-surface-muted) !important;
    border-top: 1px solid var(--sdp-border) !important;
}
.card-erp > h5:first-child,
.card-erp > h6:first-child,
.tes-card > h5:first-child,
.tes-card > h6:first-child {
    color: var(--sdp-brand-deep);
}
.summary-box,
.resumen-card {
    background: linear-gradient(145deg, #fbfdfd, var(--sdp-brand-soft-2)) !important;
}
.resumen-label {
    color: var(--sdp-muted) !important;
    font-weight: 700;
    letter-spacing: .06em;
}
.resumen-valor,
.valor-grande,
.saldo-caja,
.tes-value,
.cb-value {
    color: var(--sdp-brand-deep);
    font-variant-numeric: tabular-nums;
}

/* ------------------------------ Bootstrap cards / dashboard KPIs ------------------------------ */
.kpi-card {
    position: relative;
    overflow: hidden;
    min-height: 128px;
    border: 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 28px rgba(25, 66, 74, .14) !important;
}
.kpi-card::before {
    content: "";
    position: absolute;
    width: 115px;
    height: 115px;
    right: -34px;
    top: -42px;
    border-radius: 50%;
    background: rgba(255,255,255,.11);
}
.kpi-card::after {
    content: "";
    position: absolute;
    width: 72px;
    height: 72px;
    right: 18px;
    bottom: -44px;
    border-radius: 50%;
    border: 12px solid rgba(255,255,255,.08);
}
.kpi-card .card-body { position: relative; z-index: 1; }
.kpi-card.kpi-brand { background: linear-gradient(135deg, #558f99, #356873) !important; color: #fff; }
.kpi-card.kpi-deep { background: linear-gradient(135deg, #356873, #214b54) !important; color: #fff; }
.kpi-card.kpi-soft { background: linear-gradient(135deg, #709fa7, #4f7f88) !important; color: #fff; }
.kpi-card.kpi-slate { background: linear-gradient(135deg, #526c73, #334b51) !important; color: #fff; }
.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.16);
    font-size: 23px;
}
.kpi-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .8;
}

/* ------------------------------ Forms ------------------------------ */
.form-label,
label {
    color: #44575d;
}
.form-label {
    font-size: 12px;
    font-weight: 700 !important;
    margin-bottom: 6px !important;
}
.form-control,
.form-select,
.input-group-text {
    height: 40px !important;
    min-height: 40px;
    border-color: var(--sdp-border-strong) !important;
    border-radius: 9px !important;
    font-size: 13px !important;
    color: var(--sdp-text);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.form-control,
.form-select {
    background-color: #fff;
}
.form-control:hover:not(:disabled):not([readonly]),
.form-select:hover:not(:disabled) { border-color: #afc9ce !important; }
.form-control:focus,
.form-select:focus {
    border-color: var(--sdp-brand) !important;
    box-shadow: 0 0 0 .20rem rgba(var(--sdp-brand-rgb), .14) !important;
}
.form-control[readonly],
.form-control:read-only,
.form-select:disabled,
.form-control:disabled {
    background: #f1f5f6 !important;
    color: #66787d !important;
}
textarea.form-control { height: auto !important; min-height: 82px; resize: vertical; }
.input-group-text {
    background: var(--sdp-brand-soft-2) !important;
    color: var(--sdp-brand-deep);
}
.form-check-input:checked {
    background-color: var(--sdp-brand) !important;
    border-color: var(--sdp-brand) !important;
}
.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(var(--sdp-brand-rgb), .14); }
.form-text { color: var(--sdp-muted) !important; font-size: 11px; }

/* ------------------------------ Buttons ------------------------------ */
.btn {
    min-height: 38px;
    padding: 8px 15px;
    border-radius: 9px !important;
    font-size: 12.5px;
    font-weight: 650;
    letter-spacing: .005em;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn-primary,
.btn-info {
    background: var(--sdp-brand) !important;
    border-color: var(--sdp-brand) !important;
    color: #fff !important;
    box-shadow: 0 5px 13px rgba(var(--sdp-brand-rgb), .18);
}
.btn-primary:hover,
.btn-info:hover { background: var(--sdp-brand-dark) !important; border-color: var(--sdp-brand-dark) !important; }
.btn-outline-primary,
.btn-outline-info {
    color: var(--sdp-brand-dark) !important;
    border-color: var(--sdp-brand) !important;
    background: #fff !important;
}
.btn-outline-primary:hover,
.btn-outline-info:hover { color: #fff !important; background: var(--sdp-brand) !important; }
.btn-success { background: var(--sdp-success) !important; border-color: var(--sdp-success) !important; }
.btn-danger { background: var(--sdp-danger) !important; border-color: var(--sdp-danger) !important; }
.btn-warning { background: var(--sdp-warning) !important; border-color: var(--sdp-warning) !important; color: #fff !important; }
.btn-secondary { background: #65777c !important; border-color: #65777c !important; }
.btn-light { border-color: var(--sdp-border) !important; background: #fff !important; color: var(--sdp-text) !important; }
.btn-outline-secondary { border-color: #aab9bd !important; color: #5b6d72 !important; }
.btn-outline-secondary:hover { background: #61747a !important; border-color: #61747a !important; color: #fff !important; }
.btn-sm { min-height: 31px; padding: 5px 10px; border-radius: 7px !important; font-size: 11.5px; }
.btn-lg { min-height: 46px; padding: 10px 20px; font-size: 14px; }

/* ------------------------------ Tables / GridView ------------------------------ */
.table-responsive {
    border-radius: 10px;
    scrollbar-width: thin;
    scrollbar-color: #b8cdd1 transparent;
}
.table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: rgba(var(--sdp-brand-rgb), .045);
    margin-bottom: 0;
    color: var(--sdp-text);
    font-size: 12.5px !important;
    border-color: var(--sdp-border) !important;
}
.table > :not(caption) > * > * {
    padding: .72rem .72rem;
    border-bottom-color: var(--sdp-border) !important;
    vertical-align: middle;
}
.table thead th,
.table > tbody > tr:first-child > th,
.table tr:first-child th {
    background: #eef5f6 !important;
    color: var(--sdp-brand-ink) !important;
    border-color: #d8e5e7 !important;
    font-size: 11.5px;
    font-weight: 750;
    letter-spacing: .015em;
    white-space: nowrap;
}
.table tbody tr { transition: background .12s ease; }
.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: rgba(85,143,153,.018); }
.table-primary,
.table-primary > * { --bs-table-bg: #e2eff1 !important; --bs-table-border-color: #cadde0 !important; color: var(--sdp-brand-ink) !important; }
.table-success,
.table-success > * { --bs-table-bg: #e8f4f0 !important; }
.table-warning,
.table-warning > * { --bs-table-bg: #fff5e4 !important; }
.table-danger,
.table-danger > * { --bs-table-bg: #fff0f1 !important; }
.table-bordered > :not(caption) > * { border-color: var(--sdp-border) !important; }
.table .btn { white-space: nowrap; }
.money, .num, .text-end { font-variant-numeric: tabular-nums; }

/* GridView pager */
.table > tbody > tr > td[colspan] > table { margin: 10px auto; }
.table > tbody > tr > td[colspan] > table td { padding: 2px; }
.table > tbody > tr > td[colspan] > table a,
.table > tbody > tr > td[colspan] > table span {
    display: inline-flex;
    min-width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--sdp-border);
    border-radius: 7px;
    text-decoration: none;
    background: #fff;
    color: var(--sdp-brand-dark);
}
.table > tbody > tr > td[colspan] > table span {
    background: var(--sdp-brand);
    border-color: var(--sdp-brand);
    color: #fff;
}

/* ------------------------------ Tabs / nav ------------------------------ */
.nav-tabs {
    border-bottom-color: var(--sdp-border);
    gap: 3px;
}
.nav-tabs .nav-link {
    color: #607278;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 8px 8px 0 0;
    font-weight: 650;
    font-size: 12.5px;
}
.nav-tabs .nav-link:hover { background: var(--sdp-brand-soft-2); color: var(--sdp-brand-deep); }
.nav-tabs .nav-link.active {
    color: var(--sdp-brand-deep);
    border-bottom-color: var(--sdp-brand);
    background: var(--sdp-brand-soft-2);
}
.nav-pills .nav-link { color: var(--sdp-brand-dark); border-radius: 9px; }
.nav-pills .nav-link.active { background: var(--sdp-brand) !important; color: #fff; }

/* ------------------------------ Alerts / badges / status ------------------------------ */
.alert {
    border-radius: 10px !important;
    border-width: 1px !important;
    font-size: 12.5px;
    box-shadow: 0 2px 8px rgba(29,62,69,.035);
}
.alert-info { background: #edf6f8 !important; border-color: #cce2e6 !important; color: #315e68 !important; }
.alert-success { background: #edf7f4 !important; border-color: #cbe5dd !important; color: #286a5c !important; }
.alert-warning { background: #fff7e8 !important; border-color: #efddb6 !important; color: #7d5a20 !important; }
.alert-danger { background: #fff1f2 !important; border-color: #efcfd3 !important; color: #8f3e49 !important; }
.badge { padding: .45em .65em; border-radius: 7px; font-weight: 650; }
.bg-primary { background-color: var(--sdp-brand) !important; }
.text-primary { color: var(--sdp-brand-dark) !important; }
.border-primary { border-color: var(--sdp-brand) !important; }

.estado-abierta {
    background: #e4f3ef !important;
    color: #286a5c !important;
    border: 1px solid #c8e3db;
}
.estado-cerrada {
    background: #eef2f3 !important;
    color: #5c6d72 !important;
    border: 1px solid #dce5e7;
}

/* ------------------------------ Modals / dropdowns ------------------------------ */
.modal-content {
    border: 1px solid var(--sdp-border) !important;
    border-radius: 15px !important;
    box-shadow: var(--sdp-shadow-lg);
}
.modal-header { border-bottom-color: var(--sdp-border) !important; background: #fbfdfd; }
.modal-footer { border-top-color: var(--sdp-border) !important; background: #fbfdfd; }
.dropdown-menu {
    border: 1px solid var(--sdp-border) !important;
    border-radius: 10px !important;
    box-shadow: var(--sdp-shadow);
    font-size: 12.5px;
}
.dropdown-item:active,
.dropdown-item.active { background: var(--sdp-brand) !important; }

/* ------------------------------ jQuery autocomplete ------------------------------ */
.ui-autocomplete {
    border: 1px solid var(--sdp-border-strong) !important;
    border-radius: 10px !important;
    box-shadow: var(--sdp-shadow) !important;
    padding: 5px !important;
    font-family: inherit !important;
}
.ui-menu .ui-menu-item-wrapper {
    border-radius: 7px;
    padding: 8px 10px !important;
    border: 0 !important;
}
.ui-state-active,
.ui-widget-content .ui-state-active {
    background: var(--sdp-brand) !important;
    border-color: var(--sdp-brand) !important;
    color: #fff !important;
}

/* ------------------------------ Empty states / separators ------------------------------ */
hr { border-color: var(--sdp-border); opacity: 1; }
.border { border-color: var(--sdp-border) !important; }
.rounded, .rounded-3 { border-radius: var(--sdp-radius-sm) !important; }
.rounded-4 { border-radius: var(--sdp-radius) !important; }
.shadow-sm { box-shadow: var(--sdp-shadow-sm) !important; }

/* ------------------------------ Login ------------------------------ */
body.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 8%, rgba(137, 190, 199, .26), transparent 24rem),
        radial-gradient(circle at 92% 92%, rgba(85,143,153,.20), transparent 28rem),
        linear-gradient(140deg, #edf5f6 0%, #f8fbfb 44%, #e6f0f2 100%);
}
.login-shell {
    min-height: 100vh;
    padding: 32px;
}
.login-panel {
    width: min(960px, 100%);
    min-height: 555px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(85,143,153,.18);
    background: #fff;
    box-shadow: 0 30px 70px rgba(24,60,68,.16);
}
.login-brand-pane {
    position: relative;
    overflow: hidden;
    padding: 52px 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(145deg, #173b43 0%, #356873 58%, #558f99 100%);
    color: #fff;
}
.login-brand-pane::before,
.login-brand-pane::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.10);
}
.login-brand-pane::before { width: 380px; height: 380px; right: -190px; top: -155px; }
.login-brand-pane::after { width: 250px; height: 250px; left: -130px; bottom: -90px; }
.login-brand-logo {
    width: 112px;
    height: 112px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    padding: 4px;
    box-shadow: 0 15px 38px rgba(0,0,0,.2);
    position: relative;
    z-index: 1;
}
.login-brand-title {
    margin: 27px 0 8px;
    font-size: 30px;
    font-weight: 750;
    letter-spacing: -.025em;
    position: relative;
    z-index: 1;
}
.login-brand-text {
    max-width: 390px;
    color: rgba(255,255,255,.72);
    font-size: 14px;
    position: relative;
    z-index: 1;
}
.login-brand-meta {
    color: rgba(255,255,255,.55);
    font-size: 11px;
    position: relative;
    z-index: 1;
}
.login-form-pane {
    padding: 58px 58px 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.login-eyebrow {
    color: var(--sdp-brand-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 9px;
}
.login-title {
    margin: 0;
    color: var(--sdp-brand-ink);
    font-size: 29px;
    font-weight: 750;
    letter-spacing: -.025em;
}
.login-subtitle { color: var(--sdp-muted); margin: 8px 0 28px; }
.login-form-pane .form-label { font-size: 12px; }
.login-form-pane .form-control { min-height: 46px; padding-left: 42px; }
.login-input-wrap { position: relative; }
.login-input-wrap > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    color: var(--sdp-brand);
    font-size: 16px;
    pointer-events: none;
}
.login-submit { min-height: 46px; width: 100%; font-size: 14px; }
.login-footer { margin-top: 28px; color: #91a0a4; font-size: 11px; text-align: center; }
.login-error { display: block; margin-top: 12px; color: var(--sdp-danger) !important; font-size: 12px; }

/* ------------------------------ Responsive ------------------------------ */
@media (max-width: 1199.98px) {
    :root { --sdp-sidebar-width: 258px; }
    .content-area { padding: 24px 22px 36px !important; }
}

@media (max-width: 991.98px) {
    .sidebar {
        width: 282px !important;
        transform: translateX(-100%);
        transition: transform .22s ease;
        box-shadow: 18px 0 40px rgba(13,40,46,.23);
    }
    body.sidebar-open .sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-backdrop { display: block; }
    .main-content { margin-left: 0 !important; }
    .sidebar-toggle { display: inline-flex; }
    .topbar { padding: 0 18px !important; }
    .content-area { padding: 22px 17px 34px !important; }
    .usuario-info { max-width: 190px; }
}

@media (max-width: 767.98px) {
    body { font-size: 13px; }
    .topbar { height: 62px !important; }
    .topbar-system { font-size: 12px; }
    .topbar-context { max-width: 190px; }
    .user-chip { border: 0; box-shadow: none; padding-right: 2px; }
    .usuario-info { display: none; }
    .logout-btn span { display: none; }
    .content-area { padding: 18px 12px 30px !important; }
    .card-erp,.tes-card,.tra-card,.cb-card,.nc-card,.libro-card { padding: 16px !important; }
    .login-shell { padding: 16px; }
    .login-panel { grid-template-columns: 1fr; min-height: auto; }
    .login-brand-pane { display: none; }
    .login-form-pane { padding: 42px 30px 34px; }
    .login-title { font-size: 25px; }
    .table { font-size: 11.5px !important; }
}

@media (max-width: 480px) {
    .topbar-context { display: none; }
    .content-area { padding-left: 10px !important; padding-right: 10px !important; }
    .btn { padding-left: 12px; padding-right: 12px; }
    .login-form-pane { padding-left: 22px; padding-right: 22px; }
}

/* ------------------------------ Browser print fallback ------------------------------ */
@media print {
    .sidebar, .topbar, .sidebar-backdrop, .no-print { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .content-area { padding: 0 !important; }
    body { background: #fff !important; }
    .card-erp,.tes-card,.tra-card,.cb-card,.nc-card,.libro-card,.card {
        box-shadow: none !important;
        border-color: #d8d8d8 !important;
    }
}
