:root {
    --navy: #12355b;
    --blue: #1767aa;
    --blue-dark: #0e4e86;
    --cyan: #20b7b5;
    --violet: #7258d6;
    --background: #f3f6fa;
    --surface: #ffffff;
    --text: #172433;
    --muted: #6c7a89;
    --border: #dce4ec;
    --danger: #c93c4b;
    --success: #16835d;
    --shadow: 0 24px 70px rgba(22, 51, 84, .14);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    color: var(--text);
    background: var(--background);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

a {
    color: var(--blue);
    text-decoration: none;
}

.auth-page {
    display: grid;
    min-height: 100vh;
    padding: 32px;
    place-items: center;
    background:
        radial-gradient(circle at 10% 10%, rgba(32, 183, 181, .13), transparent 28%),
        radial-gradient(circle at 90% 90%, rgba(114, 88, 214, .12), transparent 30%),
        #eef3f8;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(400px, 1.05fr) minmax(390px, .95fr);
    width: min(1080px, 100%);
    min-height: 650px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.brand-panel {
    position: relative;
    display: flex;
    overflow: hidden;
    padding: 58px;
    color: #fff;
    background: linear-gradient(145deg, #103b68 0%, #1768a8 55%, #168f9f 100%);
}

.brand-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-lockup strong,
.brand-lockup span {
    display: block;
}

.brand-lockup strong {
    font-size: 17px;
}

.brand-lockup span {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .22em;
    opacity: .76;
}

.brand-symbol {
    display: grid;
    width: 54px;
    height: 54px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 16px;
    background: rgba(255, 255, 255, .13);
    place-items: center;
    backdrop-filter: blur(8px);
}

.brand-symbol svg {
    width: 37px;
    fill: none;
    stroke: #fff;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
}

.brand-message {
    margin: auto 0;
}

.eyebrow {
    display: block;
    margin-bottom: 12px;
    color: var(--cyan);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .2em;
}

.brand-message .eyebrow {
    color: #74e5dd;
}

.brand-message h1 {
    max-width: 460px;
    margin: 0;
    font-size: clamp(34px, 4vw, 48px);
    line-height: 1.08;
    letter-spacing: -.04em;
}

.brand-message > p {
    max-width: 470px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, .78);
    font-size: 16px;
    line-height: 1.7;
}

.feature-list {
    display: grid;
    gap: 14px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 13px;
}

.feature-item > span {
    display: grid;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    color: #0f5672;
    background: #72e4db;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 900;
    place-items: center;
}

.feature-item p {
    margin: 0;
    color: rgba(255, 255, 255, .68);
    font-size: 12px;
    line-height: 1.45;
}

.feature-item strong {
    display: block;
    color: #fff;
    font-size: 13px;
}

.brand-decoration {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 50%;
}

.brand-decoration-one {
    right: -110px;
    top: -80px;
    width: 350px;
    height: 350px;
}

.brand-decoration-two {
    right: -40px;
    bottom: -170px;
    width: 440px;
    height: 440px;
}

.form-panel {
    display: flex;
    align-items: center;
    padding: 58px;
}

.form-container {
    width: 100%;
    max-width: 410px;
    margin: auto;
}

.mobile-brand {
    display: none;
    margin-bottom: 36px;
    color: var(--navy);
    font-size: 18px;
    font-weight: 900;
}

.mobile-brand span {
    color: var(--cyan);
    font-size: 10px;
    letter-spacing: .16em;
}

.form-heading {
    margin-bottom: 30px;
}

.form-heading h2 {
    margin: 0 0 10px;
    color: var(--navy);
    font-size: 32px;
    letter-spacing: -.03em;
}

.form-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.notice {
    margin-bottom: 22px;
    padding: 13px 15px;
    border: 1px solid;
    border-radius: 11px;
    font-size: 13px;
    line-height: 1.5;
}

.notice-error {
    color: #a72f3c;
    border-color: #f0c3c8;
    background: #fff1f2;
}

.notice-success {
    color: #126c4c;
    border-color: #b8e3d2;
    background: #ecfbf5;
}

.auth-form {
    display: grid;
    gap: 21px;
}

.field {
    display: grid;
    gap: 8px;
}

.field label,
.field-label-row {
    color: #35475b;
    font-size: 13px;
    font-weight: 700;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.field-label-row a {
    font-size: 12px;
    font-weight: 700;
}

.field input {
    width: 100%;
    min-height: 50px;
    padding: 0 15px;
    color: var(--text);
    outline: none;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}

.field input::placeholder {
    color: #9ba7b4;
}

.field input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(23, 103, 170, .1);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 72px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    padding: 7px;
    color: var(--blue);
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    transform: translateY(-50%);
}

.remember-option {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #566678;
    cursor: pointer;
    font-size: 13px;
}

.remember-option input {
    width: 17px;
    height: 17px;
    accent-color: var(--blue);
}

.primary-button {
    min-height: 51px;
    color: #fff;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--blue), #168ba4);
    box-shadow: 0 12px 24px rgba(23, 103, 170, .2);
    cursor: pointer;
    font-weight: 800;
    transition: transform .2s, box-shadow .2s;
}

.primary-button:hover {
    box-shadow: 0 15px 30px rgba(23, 103, 170, .26);
    transform: translateY(-1px);
}

.security-note {
    margin: 25px 0 0;
    color: #8a96a3;
    font-size: 11px;
    line-height: 1.6;
    text-align: center;
}

.back-link {
    display: block;
    margin-top: 25px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

/* Dashboard */
.dashboard-page {
    min-height: 100vh;
    background: var(--background);
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    z-index: 20;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    width: 248px;
    padding: 24px 18px;
    color: #fff;
    background: #102f50;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 8px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.sidebar-logo {
    display: grid;
    width: 42px;
    height: 42px;
    color: #fff;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-size: 13px;
    font-weight: 900;
    place-items: center;
}

.sidebar-brand strong,
.sidebar-brand span {
    display: block;
}

.sidebar-brand strong {
    font-size: 15px;
}

.sidebar-brand span {
    margin-top: 3px;
    color: #73dad5;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .18em;
}

.sidebar-nav {
    display: grid;
    gap: 5px;
    margin-top: 18px;
}

.sidebar-nav p {
    margin: 18px 11px 6px;
    color: rgba(255, 255, 255, .38);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .17em;
}

.sidebar-nav a,
.nav-disabled {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    color: rgba(255, 255, 255, .7);
    border-radius: 10px;
    font-size: 13px;
}

.sidebar-nav a.active {
    color: #fff;
    background: rgba(56, 180, 190, .18);
}

.nav-disabled {
    cursor: default;
}

.nav-icon {
    width: 20px;
    color: #75d9d5;
    font-size: 18px;
    text-align: center;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 16px 8px 0;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.avatar {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    color: #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--violet), var(--cyan));
    font-size: 13px;
    font-weight: 900;
    place-items: center;
}

.sidebar-user strong,
.sidebar-user span,
.topbar-user strong,
.topbar-user span {
    display: block;
}

.sidebar-user strong {
    max-width: 150px;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user span {
    margin-top: 3px;
    color: rgba(255, 255, 255, .52);
    font-size: 10px;
}

.main-area {
    width: calc(100% - 248px);
    margin-left: 248px;
}

.topbar {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    padding: 0 34px;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.topbar > div:first-child strong,
.topbar-label {
    display: block;
}

.topbar-label {
    margin-bottom: 3px;
    color: var(--cyan);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .17em;
}

.topbar > div:first-child strong {
    color: var(--navy);
    font-size: 15px;
}

.topbar-actions,
.topbar-user {
    display: flex;
    align-items: center;
}

.topbar-actions {
    gap: 20px;
}

.topbar-user {
    gap: 10px;
}

.topbar-user strong {
    font-size: 12px;
}

.topbar-user span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.logout-button {
    min-height: 36px;
    padding: 0 14px;
    color: var(--navy);
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}

.dashboard-content {
    padding: 32px 34px 45px;
}

.dashboard-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 26px;
}

.dashboard-heading h1 {
    margin: 0;
    color: var(--navy);
    font-size: 30px;
    letter-spacing: -.03em;
}

.dashboard-heading p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    color: var(--success);
    border: 1px solid #c9e7db;
    border-radius: 20px;
    background: #effaf6;
    font-size: 11px;
    font-weight: 800;
}

.system-status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #26ad7b;
}

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

.stat-card {
    position: relative;
    min-height: 145px;
    overflow: hidden;
    padding: 21px;
    border: 1px solid #e3e9ef;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(29, 54, 83, .05);
}

.stat-card::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--card-color);
    content: "";
}

.stat-card span,
.stat-card strong,
.stat-card small {
    display: block;
}

.stat-card span {
    min-height: 34px;
    color: #556677;
    font-size: 12px;
    font-weight: 700;
}

.stat-card strong {
    margin: 4px 0;
    color: var(--navy);
    font-size: 32px;
}

.stat-card small {
    color: #94a0ac;
    font-size: 10px;
}

.stat-blue { --card-color: #2c72bb; }
.stat-green { --card-color: #24a779; }
.stat-violet { --card-color: #755cd7; }
.stat-red { --card-color: #da5260; }
.stat-orange { --card-color: #e89539; }
.stat-yellow { --card-color: #d4af32; }
.stat-cyan { --card-color: #21aaa9; }
.stat-pink { --card-color: #ce64a0; }

.dashboard-panels {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 18px;
    margin-top: 20px;
}

.dashboard-panel {
    min-height: 295px;
    padding: 23px;
    border: 1px solid #e3e9ef;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(29, 54, 83, .05);
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: 17px;
    border-bottom: 1px solid #edf1f4;
}

.panel-heading h2 {
    margin: 0;
    color: var(--navy);
    font-size: 16px;
}

.panel-heading p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.panel-heading > span {
    padding: 6px 9px;
    color: #7a8794;
    border-radius: 15px;
    background: #f1f4f7;
    font-size: 9px;
    font-weight: 800;
}

.empty-state {
    display: grid;
    min-height: 190px;
    color: var(--muted);
    text-align: center;
    place-content: center;
}

.empty-state > div {
    margin-bottom: 10px;
    color: #9fb2c5;
    font-size: 32px;
}

.empty-state strong {
    color: #526476;
    font-size: 13px;
}

.empty-state p {
    margin: 5px 0;
    font-size: 11px;
}

.fleet-list {
    display: grid;
    gap: 4px;
    padding-top: 12px;
}

.fleet-list > div {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    border-bottom: 1px solid #f0f3f6;
    color: #5b6b7b;
    font-size: 12px;
}

.fleet-list span {
    display: flex;
    align-items: center;
    gap: 9px;
}

.fleet-list strong {
    color: var(--navy);
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.green { background: #24a779; }
.dot.violet { background: #755cd7; }
.dot.orange { background: #e89539; }
.dot.red { background: #da5260; }

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

    .dashboard-panels {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 850px) {
    .auth-page {
        padding: 18px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .brand-panel {
        display: none;
    }

    .form-panel {
        min-height: calc(100vh - 36px);
        padding: 38px 28px;
    }

    .mobile-brand {
        display: block;
    }

    .sidebar {
        display: none;
    }

    .main-area {
        width: 100%;
        margin-left: 0;
    }

    .topbar {
        padding: 0 20px;
    }

    .topbar-user {
        display: none;
    }

    .dashboard-content {
        padding: 25px 20px 40px;
    }
}

@media (max-width: 560px) {
    .form-heading h2 {
        font-size: 27px;
    }

    .dashboard-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

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

    .topbar > div:first-child {
        display: none;
    }

    .topbar {
        justify-content: flex-end;
    }

    .logout-button {
        min-height: 40px;
    }
}

/* DM_MENU_NO_VISIBLE_SCROLLBAR_BEGIN */
/* El menu puede seguir desplazandose, pero la barra visual queda oculta. */
#main-sidebar,
#main-sidebar .sidebar-nav {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

#main-sidebar {
    overflow-y: auto !important;
}

#main-sidebar .sidebar-nav {
    overflow-y: auto !important;
}

#main-sidebar::-webkit-scrollbar,
#main-sidebar .sidebar-nav::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}
/* DM_MENU_NO_VISIBLE_SCROLLBAR_END */
