/* == VARIABLES RINVIC ==================================== */
:root {
    /* Color principal de marca (azulado, buen contraste con texto blanco) */
    --app-azul:        #1d4ed8;
    --app-azul-hover:  #1e40af;
    --app-azul-light:  #dbeafe;
    --app-azul-border: #93c5fd;

    /* Alias heredados — mantienen compatibilidad con el resto de hojas de estilo */
    --rinvic-rojo:       var(--app-azul);
    --rinvic-rojo-hover: var(--app-azul-hover);
    --rinvic-sidebar-bg: #ffffff;
    --rinvic-sidebar-w: 210px;
    --rinvic-header-h: 56px;
    --rinvic-bg:      #f2f1ef;
    --rinvic-text:    #1a1a1a;
    --rinvic-muted:   #6b7280;
    --rinvic-border:  #e5e7eb;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--rinvic-bg);
    color: var(--rinvic-text);
}

h1:focus {
    outline: none;
}

/* == LOGIN ============================================== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--rinvic-bg);
}

.login-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    padding: 2.5rem 2.25rem;
    width: 100%;
    max-width: 400px;
}

.login-title {
    color: var(--rinvic-rojo);
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.25rem;
    letter-spacing: 1px;
}

.login-subtitle {
    color: var(--rinvic-muted);
    text-align: center;
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
}

.login-card .form-control {
    border-radius: 10px;
    background: #f7f7f7;
    border: 1.5px solid var(--rinvic-border);
    padding: 0.65rem 1rem;
}

.login-card .form-control:focus {
    border-color: var(--rinvic-rojo);
    box-shadow: 0 0 0 3px rgba(29,78,216,0.10);
    background: #fff;
}

.btn-rinvic {
    background-color: var(--rinvic-rojo);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.7rem;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    transition: background-color 0.2s;
}

.btn-rinvic:hover {
    background-color: var(--rinvic-rojo-hover);
    color: #fff;
}

.login-forgot {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: var(--rinvic-muted);
    font-size: 0.9rem;
    text-decoration: none;
}

.login-forgot:hover {
    color: var(--rinvic-rojo);
    text-decoration: underline;
}

/* == RECUPERAR CONTRASEÑA == */
.forgot-title {
    color: #1a1a1a;
    font-size: 32px;
    font-weight: 700;
    text-align: left;
    margin-bottom: 0.5rem;
    line-height: 1.15;
}

.forgot-subtitle {
    color: var(--rinvic-muted);
    text-align: left;
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
    line-height: 1.35;
}

.forgot-input {
    border-radius: 10px;
    background: #f7f5f2;
    border: 1.5px solid #e0e0e0;
    padding: 0.7rem 1rem;
}

.btn-recuperar {
    border-radius: 12px;
    padding: 0.85rem;
    font-size: 1rem;
    font-weight: 600;
}

/* == LAYOUT PRINCIPAL ==================================== */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* == SIDEBAR ============================================ */
.sidebar {
    width: var(--rinvic-sidebar-w);
    min-width: var(--rinvic-sidebar-w);
    background: var(--rinvic-sidebar-bg);
    border-right: 1px solid var(--rinvic-border);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1100;
    transition: transform 0.25s ease;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.1rem 1.25rem 0.75rem;
    border-bottom: 1px solid var(--rinvic-border);
}

.sidebar-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--rinvic-rojo);
    letter-spacing: 1px;
}

.sidebar-icons {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
    color: var(--rinvic-muted);
    font-size: 1.1rem;
}

.sidebar-icons .badge-icon {
    position: relative;
}

.sidebar-icons .badge-dot {
    position: absolute;
    top: -4px;
    right: -5px;
    background: var(--rinvic-rojo);
    color: #fff;
    border-radius: 50%;
    font-size: 0.6rem;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-nav {
    flex: 1;
    padding: 0.5rem 0;
}

.sidebar-section-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rinvic-muted);
    padding: 0.85rem 1.25rem 0.25rem;
}

.sidebar-nav a,
.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 1.25rem;
    font-size: 0.875rem;
    color: var(--rinvic-text);
    text-decoration: none;
    border-radius: 8px;
    margin: 0 0.4rem;
    transition: background 0.15s;
}

.sidebar-nav a:hover,
.sidebar-nav .nav-link:hover {
    background: #f3f4f6;
    color: var(--rinvic-text);
}

.sidebar-nav a.active,
.sidebar-nav .nav-link.active {
    background: var(--rinvic-rojo);
    color: #fff;
}

.sidebar-nav a.active i,
.sidebar-nav .nav-link.active i {
    color: #fff;
}

.sidebar-nav i {
    font-size: 1rem;
    color: var(--rinvic-muted);
    width: 18px;
    text-align: center;
}

.sidebar-footer {
    border-top: 1px solid var(--rinvic-border);
    padding: 0.85rem 1.25rem;
}

.sidebar-theme-btn {
    background: none;
    border: none;
    color: var(--rinvic-muted);
    font-size: 0.8rem;
    padding: 0;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.sidebar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--rinvic-rojo);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.sidebar-user-info {
    overflow: hidden;
}

.sidebar-user-name {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-email {
    font-size: 0.7rem;
    color: var(--rinvic-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--rinvic-text);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 100%;
}

.sidebar-logout:hover {
    color: var(--rinvic-rojo);
}

/* == CONTENIDO PRINCIPAL ================================ */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 2.5rem;
    background: var(--rinvic-bg);
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA9OC4wNjUxIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNNMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NzAyIDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDg2IDY2LjA1NDogaHR0cHM6Ly93d3cud2MzaS54bHAvYXV0aDAuanM/c2h0b3c9Y29udGFpbmVyJmZyb209MiYtbmFtZT0icGhvdG8vZGVtbwpbXS5jbGltYTsiOiJjb252ZXJ0IiwiYXZhdGFyYXJydHMiOnRydWV9XSwiYXV0aHNjaGVtZXMiOlsiY29udGFpbmVyIl19LHsiY29udGFpbGVycyI6WyJhcHBsaWNhdGlvbiIsIm1vZGlmaWNhdGlvbiIsImN1c3RvbWVyIl19LHsiY29udGFpbGVycyI6WyJuYWl2ZSJdfSx7ImNvbXBvbmVudE1vZGlmaWNhdGlvbiI6ZmFsc2V9LHsiY29udGFpbGVycyI6WyJhcHBsaWNhdGlvbi4uLiIsIm1vZGlmaWNhdGlvbi4uLiIsImN1c3RvbWVyLi4uIl19LHsiY29udGFpbGVycyI6WyJuYWl2ZS4uLiJdfSx7ImNvbXBvbmVudE1vZGlmaWNhdGlvbiI6ZmFsc2V9LHsiY29udGFpbGVycyI6WyJhcHBsaWNhdGlvbiIsIm1vZGlmaWNhdGlvbiIsImN1c3RvbWVyIl19XSwiYXV0aHNjaGVtZXMiOlsiY29udGFpbmVyIiwiYXV0aC5jb250YWluZXIiXX0=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }
.darker-border-checkbox.form-check-input { border-color: #929292; }

.mobile-topbar,
.mobile-bottom-nav,
.sidebar-backdrop {
    display: none;
}

.sidebar-toggle {
    display: none;
}

@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        transform: translateX(-100%);
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        z-index: 1300;
        height: 100dvh;
    }

    .sidebar-toggle:checked ~ .sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.35);
        z-index: 1250;
        cursor: pointer;
    }

    .sidebar-toggle:checked ~ .sidebar-backdrop {
        display: block;
    }

    .main-content {
        padding: 1rem 1rem 5.5rem;
    }

    .mobile-topbar {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.5rem 0 1rem;
    }

    .hamburger-btn {
        width: 40px;
        height: 40px;
        border: 1px solid var(--rinvic-border);
        border-radius: 10px;
        background: #fff;
        color: var(--rinvic-text);
        font-size: 1.4rem;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        margin: 0;
    }

    .mobile-topbar-title {
        font-weight: 700;
        color: var(--rinvic-rojo);
        letter-spacing: 0.03em;
    }

    .mobile-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: 64px;
        display: flex;
        background: #fff;
        border-top: 1px solid var(--rinvic-border);
        z-index: 1200;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .mobile-bottom-link {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.2rem;
        text-decoration: none;
        color: var(--rinvic-muted);
        font-size: 0.68rem;
        font-weight: 600;
    }

    .mobile-bottom-link i {
        font-size: 1rem;
    }

    .mobile-bottom-link:hover {
        color: var(--rinvic-rojo);
    }
}

@media (max-width: 576px) {
    .main-content {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }
}

/* == CONFIGURACIÓN == */

.config-page {
    width: 100%;
    max-width: 100%;
}

.config-header {
    margin-bottom: 1.75rem;
}

.config-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.35rem 0;
}

.config-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

a.config-card {
    text-decoration: none;
    color: inherit;
}

.config-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    text-align: left;
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    width: 100%;
    box-sizing: border-box;
}

.config-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.config-card-main {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    flex: 1;
    min-width: 0;
}

.config-card-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    background: #fef2f2;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.config-card-content {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.config-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.config-card-desc {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.35;
    margin: 0;
}

.config-card-arrow {
    color: #9ca3af;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

@media (max-width: 1024px) {
    .config-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .config-title {
        font-size: 2rem;
    }

    .config-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .config-card {
        padding: 1rem 1.15rem;
    }

    .config-card-desc {
        font-size: 0.82rem;
    }
}

/* == ADMINISTRADORES == */

.admin-page {
    width: 100%;
    max-width: 100%;
}

.admin-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #6b7280;
    text-decoration: none;
    margin-bottom: 0.75rem;
}

.admin-back-link:hover {
    color: #1a1a1a;
}

.admin-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.admin-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.35rem 0;
}

.admin-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    max-width: 700px;
}

.admin-loading {
    color: #6b7280;
    font-size: 0.95rem;
}

.admin-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.admin-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
    padding: 1.25rem 1.5rem;
}

.admin-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
}

.admin-card-hint {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0 0 1.25rem 0;
}

.admin-field {
    margin-bottom: 1rem;
}

.admin-label {
    display: block;
    font-size: 0.83rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.35rem;
}

.admin-input {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f7f7f5;
    padding: 0.55rem 0.75rem;
    font-size: 0.875rem;
    color: #1f2937;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.admin-input:focus {
    outline: none;
    border-color: #9ca3af;
    background: #fff;
}

.admin-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.55rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.admin-btn:hover:not(:disabled) {
    background: #1e40af;
}

.admin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.admin-alert {
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.admin-alert-success {
    background: #dcfce7;
    color: #15803d;
}

.admin-alert-error {
    background: #fef2f2;
    color: #dc2626;
}

.admin-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.admin-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.2rem;
    flex-wrap: wrap;
}

.admin-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.admin-table-wrapper {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-table thead tr {
    border-bottom: 1px solid #e5e7eb;
}

.admin-table th {
    text-align: left;
    padding: 0.85rem 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-name {
    font-weight: 600;
    color: #1a1a1a;
}

.admin-badge-you {
    display: inline-flex;
    align-items: center;
    background: #f3f4f6;
    color: #374151;
    border-radius: 6px;
    padding: 0.15rem 0.45rem;
    font-size: 0.68rem;
    font-weight: 700;
    margin-left: 0.5rem;
}

.admin-status {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.25rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    border: 1px solid #e5e7eb;
}

.admin-status-active {
    background: #f0fdf4;
    color: #059669;
    border-color: #a7f3d0;
}

.admin-status-inactive {
    background: #f9fafb;
    color: #6b7280;
}

.admin-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.admin-password-wrapper .admin-input {
    flex: 1;
    padding-right: 5rem;
}

.admin-icon-btn {
    position: absolute;
    right: 0.3rem;
    width: 2rem;
    height: 2rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
}

.admin-icon-btn:hover {
    color: #1a1a1a;
    background: #f3f4f6;
}

.admin-icon-btn:nth-of-type(2) {
    right: 2.6rem;
}

.admin-password-hint {
    font-size: 0.78rem;
    color: #9ca3af;
    display: block;
    margin-top: 0.25rem;
}

.admin-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1400;
    padding: 1rem;
}

.admin-modal {
    background: #faf9f7;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.25rem 1.4rem 1.4rem;
    box-sizing: border-box;
}

.admin-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.admin-modal-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 0.25rem 0;
}

.admin-modal-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.35;
}

.admin-modal-close {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0.15rem;
    flex-shrink: 0;
}

.admin-modal-close:hover {
    color: #1a1a1a;
}

.admin-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.admin-btn-secondary {
    background: #fff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
}

.admin-btn-secondary:hover:not(:disabled) {
    background: #f3f4f6;
}

@media (max-width: 1024px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {

    .admin-title {
        font-size: 2rem;
    }

    .admin-card {
        padding: 1rem;
    }

    .admin-section-header {
        padding: 1rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.75rem;
    }

    .admin-actions {
        justify-content: stretch;
    }

    .admin-actions .admin-btn,
    .admin-section-header .admin-btn {
        flex: 1;
        justify-content: center;
    }

    .admin-section-header .admin-btn {
        width: 100%;
    }

    .admin-modal-actions {
        flex-direction: column-reverse;
    }

    .admin-modal-actions .admin-btn {
        width: 100%;
        justify-content: center;
    }

    .admin-password-wrapper .admin-input {
        padding-right: 5rem;
    }
}

/* == DATOS DE LA EMPRESA == */

.empresa-page {
    width: 100%;
    max-width: 100%;
}

.empresa-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #6b7280;
    text-decoration: none;
    margin-bottom: 0.75rem;
}

.empresa-back-link:hover {
    color: #1a1a1a;
}

.empresa-header {
    margin-bottom: 1.75rem;
}

.empresa-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.35rem 0;
}

.empresa-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.empresa-loading {
    color: #6b7280;
    font-size: 0.95rem;
}

.empresa-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

.empresa-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.empresa-field {
    margin-bottom: 1.25rem;
}

.empresa-field:last-child {
    margin-bottom: 0;
}

.empresa-field-full {
    width: 100%;
}

.empresa-label {
    display: block;
    font-size: 0.83rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.35rem;
}

.empresa-input {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f7f7f5;
    padding: 0.55rem 0.75rem;
    font-size: 0.875rem;
    color: #1f2937;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.empresa-input:focus {
    outline: none;
    border-color: #9ca3af;
    background: #fff;
}

.empresa-textarea {
    min-height: 80px;
    resize: vertical;
}

.empresa-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.25rem;
}

.empresa-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.55rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.empresa-btn:hover:not(:disabled) {
    background: #1e40af;
}

.empresa-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.empresa-alert {
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
    margin-top: 1rem;
}

.empresa-alert-success {
    background: #dcfce7;
    color: #15803d;
}

.empresa-alert-error {
    background: #fef2f2;
    color: #dc2626;
}

@media (max-width: 768px) {
    .empresa-row-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .empresa-card {
        padding: 1rem;
    }

    .empresa-actions {
        justify-content: stretch;
    }

    .empresa-actions .empresa-btn {
        flex: 1;
        justify-content: center;
    }
}

/* == CATEGORÍAS DE GASTO == */

.categorias-gasto-page {
    width: 100%;
    max-width: 100%;
}

.categorias-gasto-empty {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    font-size: 0.9rem;
}

.categorias-gasto-codigo {
    display: inline-flex;
    align-items: center;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.categorias-gasto-nombre {
    font-weight: 600;
    color: #1a1a1a;
    margin-right: 0.5rem;
}

.categorias-gasto-ambito {
    display: inline-flex;
    align-items: center;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #dbeafe;
    border-radius: 9999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.categorias-gasto-ambito-vehiculo {
    background: #f3f4f6;
    color: #374151;
    border-color: #e5e7eb;
}

.categorias-gasto-ambito-conductor {
    background: #eff6ff;
    color: #2563eb;
    border-color: #dbeafe;
}

.categorias-gasto-recurrente {
    color: #9ca3af;
    font-size: 0.9rem;
    margin-left: 0.35rem;
    vertical-align: middle;
}

.categorias-gasto-acciones {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.categorias-gasto-btn-editar,
.categorias-gasto-btn-eliminar {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.categorias-gasto-btn-editar {
    color: #6b7280;
}

.categorias-gasto-btn-eliminar {
    color: #2563eb;
}

.categorias-gasto-btn-editar:disabled,
.categorias-gasto-btn-eliminar:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.categorias-gasto-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.categorias-gasto-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.categorias-gasto-switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #d1d5db;
    border-radius: 9999px;
    transition: background-color 0.2s ease-in-out;
}

.categorias-gasto-switch-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-in-out;
}

.categorias-gasto-switch input:checked + .categorias-gasto-switch-slider {
    background-color: #2563eb;
}

.categorias-gasto-switch input:checked + .categorias-gasto-switch-slider::before {
    transform: translateX(20px);
}

.categorias-gasto-switch input:disabled + .categorias-gasto-switch-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 576px) {
    .categorias-gasto-acciones {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.4rem;
    }
}

/* == CATEGORÍAS DE MANTENIMIENTO == */

.categorias-mantenimiento-page {
    width: 100%;
    max-width: 100%;
}

.categorias-mantenimiento-empty {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    font-size: 0.9rem;
}

.categorias-mantenimiento-table thead th:nth-child(1),
.categorias-mantenimiento-table tbody td:nth-child(1) {
    width: 8%;
    white-space: nowrap;
}

.categorias-mantenimiento-table thead th:nth-child(2),
.categorias-mantenimiento-table tbody td:nth-child(2) {
    width: 20%;
}

.categorias-mantenimiento-table thead th:nth-child(3),
.categorias-mantenimiento-table tbody td:nth-child(3) {
    width: 16%;
}

.categorias-mantenimiento-table thead th:nth-child(4),
.categorias-mantenimiento-table tbody td:nth-child(4) {
    width: 16%;
}

.categorias-mantenimiento-table thead th:nth-child(5),
.categorias-mantenimiento-table tbody td:nth-child(5) {
    width: 12%;
    white-space: nowrap;
}

.categorias-mantenimiento-table thead th:nth-child(6),
.categorias-mantenimiento-table tbody td:nth-child(6) {
    width: 14%;
    white-space: nowrap;
}

.categorias-mantenimiento-codigo {
    display: inline-flex;
    align-items: center;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.categorias-mantenimiento-nombre {
    font-weight: 600;
    color: #1a1a1a;
}

.categorias-mantenimiento-valor {
    color: #4b5563;
}

.categorias-mantenimiento-fecha {
    color: #6b7280;
    font-size: 0.85rem;
    white-space: nowrap;
}

.categorias-mantenimiento-acciones {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.categorias-mantenimiento-btn-editar,
.categorias-mantenimiento-btn-eliminar {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.categorias-mantenimiento-btn-editar {
    color: #6b7280;
}

.categorias-mantenimiento-btn-eliminar {
    color: #2563eb;
}

.categorias-mantenimiento-btn-editar:disabled,
.categorias-mantenimiento-btn-eliminar:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 1024px) {
    .categorias-mantenimiento-table thead th:nth-child(1),
    .categorias-mantenimiento-table tbody td:nth-child(1) {
        width: 10%;
    }

    .categorias-mantenimiento-table thead th:nth-child(5),
    .categorias-mantenimiento-table tbody td:nth-child(5),
    .categorias-mantenimiento-table thead th:nth-child(6),
    .categorias-mantenimiento-table tbody td:nth-child(6) {
        width: auto;
    }
}

@media (max-width: 768px) {
    .categorias-mantenimiento-table {
        display: block;
    }

    .categorias-mantenimiento-table thead {
        display: none;
    }

    .categorias-mantenimiento-table tbody,
    .categorias-mantenimiento-table tr,
    .categorias-mantenimiento-table td {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
    }

    .categorias-mantenimiento-table tr {
        border-bottom: 1px solid #e5e7eb;
        padding: 1rem;
    }

    .categorias-mantenimiento-table td {
        border: none;
        padding: 0.35rem 0;
        display: flex;
        align-items: baseline;
        gap: 0.5rem;
    }

    .categorias-mantenimiento-table td::before {
        content: attr(data-label);
        flex-shrink: 0;
        font-size: 0.78rem;
        font-weight: 600;
        color: #6b7280;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        min-width: 110px;
    }

    .categorias-mantenimiento-table td:nth-child(1)::before { content: "Código"; }
    .categorias-mantenimiento-table td:nth-child(2)::before { content: "Nombre"; }
    .categorias-mantenimiento-table td:nth-child(3)::before { content: "Intervalo"; }
    .categorias-mantenimiento-table td:nth-child(4)::before { content: "Aviso"; }
    .categorias-mantenimiento-table td:nth-child(5)::before { content: "Actualizada"; }
    .categorias-mantenimiento-table td:nth-child(6)::before { content: "Acciones"; }

    .categorias-mantenimiento-empty {
        text-align: center;
        padding: 2rem;
    }

    .categorias-mantenimiento-acciones {
        justify-content: flex-start;
    }
}

/* == ORÍGENES DE SERVICIO == */

.origenes-servicio-page {
    width: 100%;
    max-width: 100%;
}

.origenes-servicio-table thead th:nth-child(1),
.origenes-servicio-table tbody td:nth-child(1) {
    width: 15%;
    min-width: 120px;
}

.origenes-servicio-table thead th:nth-child(2),
.origenes-servicio-table tbody td:nth-child(2) {
    width: 30%;
}

.origenes-servicio-table thead th:nth-child(3),
.origenes-servicio-table tbody td:nth-child(3) {
    width: 18%;
    min-width: 140px;
}

.origenes-servicio-table thead th:nth-child(4),
.origenes-servicio-table tbody td:nth-child(4) {
    width: 18%;
    min-width: 130px;
    white-space: nowrap;
}

.origenes-servicio-table thead th:nth-child(5),
.origenes-servicio-table tbody td:nth-child(5) {
    width: 19%;
    min-width: 170px;
}

.origenes-servicio-acciones-header {
    text-align: right;
}

.origen-servicio-codigo {
    display: inline-flex;
    align-items: center;
    background: #f9fafb;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.origen-servicio-descripcion {
    color: #1f2937;
    font-weight: 500;
}

.origen-servicio-estado {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.origen-servicio-toggle {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
    border-radius: 9999px;
    background: #d1d5db;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.origen-servicio-toggle::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.origen-servicio-toggle.activo {
    background: #2563eb;
}

.origen-servicio-toggle.activo::after {
    transform: translateX(16px);
}

.origen-servicio-estado-texto {
    font-size: 0.875rem;
    font-weight: 500;
}

.origen-servicio-estado-texto.activo {
    color: #16a34a;
}

.origen-servicio-estado-texto.inactivo {
    color: #6b7280;
}

.origen-servicio-toggle-field {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.origen-servicio-toggle-label {
    flex: 1;
}

.origen-servicio-toggle-label .admin-password-hint {
    margin: 0;
}

.origen-servicio-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

.origen-servicio-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.origen-servicio-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    border-radius: 9999px;
    transition: background-color 0.2s ease;
}

.origen-servicio-slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.origen-servicio-switch input:checked + .origen-servicio-slider {
    background-color: #2563eb;
}

.origen-servicio-switch input:checked + .origen-servicio-slider::before {
    transform: translateX(20px);
}

.origen-servicio-switch-texto {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    min-width: 4.5rem;
}

/* == CONDUCTOR: LAYOUT MÓVIL ============================ */

.conductor-layout {
    min-height: 100vh;
    background: #f2f1ef;
    display: flex;
    justify-content: center;
}

.conductor-main {
    width: 100%;
    max-width: 820px;
    background: #f2f1ef;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.conductor-frame {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-top: 57px;
    padding-bottom: 72px;
    min-height: 100vh;
    overflow: hidden;
}

.conductor-topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border-bottom: 1px solid var(--rinvic-border);
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 820px;
    height: 57px;
    box-sizing: border-box;
    z-index: 100;
}

.conductor-topbar-menu,
.conductor-topbar-notif {
    background: none;
    border: none;
    color: var(--rinvic-text);
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    cursor: pointer;
}

.conductor-topbar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #374151;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.conductor-topbar-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.conductor-topbar-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--rinvic-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conductor-topbar-subtitle {
    font-size: 0.7rem;
    color: var(--rinvic-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conductor-content {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    min-height: 0;
}

.conductor-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 820px;
    height: 64px;
    background: #fff;
    border-top: 1px solid var(--rinvic-border);
    display: flex;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}

.conductor-nav-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    text-decoration: none;
    color: var(--rinvic-muted);
    font-size: 0.75rem;
    font-weight: 600;
    transition: color 0.15s, background 0.15s;
}

.conductor-nav-link i {
    font-size: 1.15rem;
}

.conductor-nav-link:hover,
.conductor-nav-link.active {
    color: #fff;
    background: var(--rinvic-rojo);
}

.conductor-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1200;
}

.conductor-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100dvh;
    background: #fff;
    z-index: 1300;
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    padding-bottom: calc(1rem + 64px + env(safe-area-inset-bottom));
    transform: translateX(0);
}

.conductor-drawer-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.5rem 1rem 1rem;
    border-bottom: 1px solid var(--rinvic-border);
    margin-bottom: 0.75rem;
}

.conductor-drawer-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #f0eeec;
    color: #374151;
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.conductor-drawer-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.conductor-drawer-name {
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conductor-drawer-role {
    font-size: 0.8rem;
    color: var(--rinvic-muted);
}

.conductor-drawer-version {
    font-size: 0.7rem;
    color: var(--rinvic-muted);
    opacity: 0.75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conductor-drawer-close {
    background: none;
    border: none;
    color: var(--rinvic-muted);
    font-size: 1.1rem;
    padding: 0.25rem;
    cursor: pointer;
}

.conductor-drawer-close:hover {
    color: var(--rinvic-text);
}

.conductor-drawer-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0 0.75rem;
    overflow-y: auto;
}

.conductor-drawer-link {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    text-decoration: none;
    color: var(--rinvic-text);
    font-size: 0.95rem;
    font-weight: 500;
}

.conductor-drawer-link i {
    font-size: 1.15rem;
    color: var(--rinvic-muted);
    width: 22px;
    text-align: center;
}

.conductor-drawer-link:hover,
.conductor-drawer-link.active {
    background: #f3f4f6;
    color: var(--rinvic-text);
}

.conductor-drawer-footer {
    border-top: 1px solid var(--rinvic-border);
    padding: 1rem 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.conductor-drawer-theme {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: none;
    background: none;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    color: var(--rinvic-muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
}

.conductor-drawer-theme i {
    font-size: 1rem;
}

.conductor-drawer-theme:hover {
    background: #f3f4f6;
}

.conductor-drawer-logout {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    border: none;
    background: none;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    color: var(--rinvic-text);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
}

.conductor-drawer-logout i {
    font-size: 1.15rem;
    color: var(--rinvic-muted);
}

.conductor-drawer-logout:hover {
    background: #fef2f2;
    color: var(--rinvic-rojo);
}

.conductor-drawer-logout:hover i {
    color: var(--rinvic-rojo);
}

/* == CONDUCTOR: HOME =================================== */

.conductor-home {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.conductor-home-greeting {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1f2937;
    margin: 0;
}

.conductor-home-hint {
    font-size: 0.85rem;
    color: var(--rinvic-muted);
    margin: -0.25rem 0 0 0;
}

.conductor-home-clockin {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    border: none;
    border-radius: 14px;
    padding: 1rem 1.2rem;
    color: #fff;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(29, 78, 216, 0.25);
}

.conductor-home-clockin i {
    font-size: 1.6rem;
    opacity: 0.95;
}

.conductor-clockin-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.conductor-clockin-label {
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.92;
}

.conductor-clockin-action {
    font-size: 1.05rem;
    font-weight: 800;
}

.conductor-home-draft {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    padding: 1rem 1.2rem;
    color: #9a3412;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.conductor-home-draft:hover {
    background: #ffedd5;
    color: #9a3412;
    text-decoration: none;
}

.conductor-home-draft:focus-visible {
    outline: 2px solid #9a3412;
    outline-offset: 3px;
}

.conductor-home-draft-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 0.25rem;
}

.conductor-home-draft-label {
    font-size: 0.75rem;
    font-weight: 600;
}

.conductor-home-draft-title {
    font-size: 1rem;
    font-weight: 800;
}

.conductor-home-draft-action {
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: underline;
}

.conductor-home-draft > i {
    flex-shrink: 0;
    font-size: 1.6rem;
}

.conductor-home-today {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    border: 1px solid var(--rinvic-border);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    text-decoration: none;
    color: var(--rinvic-text);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.conductor-home-today i:first-child {
    color: var(--rinvic-muted);
    font-size: 1.1rem;
}

.conductor-home-today span {
    flex: 1;
}

.conductor-home-today i:last-child {
    color: #9ca3af;
    font-size: 0.9rem;
}

.conductor-home-notice {
    display: flex;
    gap: 0.8rem;
    background: #fff;
    border: 1px solid var(--rinvic-border);
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.conductor-notice-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fef2f2;
    color: var(--rinvic-rojo);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.conductor-notice-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.conductor-notice-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1f2937;
}

.conductor-notice-text {
    font-size: 0.78rem;
    color: var(--rinvic-muted);
    line-height: 1.45;
    margin: 0;
}

.conductor-notice-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.conductor-notice-later {
    background: none;
    border: none;
    color: #374151;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
}

.conductor-notice-enable {
    background: var(--rinvic-rojo);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.45rem 0.9rem;
    cursor: pointer;
}

.conductor-notice-enable:hover {
    background: var(--rinvic-rojo-hover);
}

.conductor-home-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.conductor-home-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    background: #fff;
    border: 1px solid var(--rinvic-border);
    border-radius: 14px;
    padding: 1rem;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    min-height: 110px;
}

.conductor-home-card i {
    color: #374151;
    font-size: 1.2rem;
}

.conductor-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1f2937;
    margin-top: auto;
}

.conductor-card-desc {
    font-size: 0.72rem;
    color: var(--rinvic-muted);
    line-height: 1.3;
}

/* == CONDUCTOR: MIS GASTOS ============================= */

.mis-gastos-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mis-gastos-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.mis-gastos-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin:  0;
    color: var(--rinvic-text);
}

.mis-gastos-subtitle {
    font-size: 0.85rem;
    color: var(--rinvic-muted);
    margin: 0.35rem 0 0;
    line-height: 1.4;
}

.mis-gastos-add {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--rinvic-rojo);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.55rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.mis-gastos-add:hover {
    background: var(--rinvic-rojo-hover);
}

.mis-gastos-list {
    display: flex;
    flex-direction: column;
    gap:  0.75rem;
}

.mis-gastos-card {
    background: #fff;
    border: 1px solid var(--rinvic-border);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    cursor: pointer;
    transition: box-shadow 0.15s ease;
}

.mis-gastos-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0,  0, 0.06);
}

.mis-gastos-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--rinvic-text);
}

.mis-gastos-card-title i {
    color: var(--rinvic-muted);
    font-size: 1rem;
}

.mis-gastos-card-date {
    font-size: 0.8rem;
    color: var(--rinvic-muted);
}

.mis-gastos-card-amount {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--rinvic-rojo);
    margin-top: 0.25rem;
}

.mis-gastos-empty {
    text-align: center;
    color: var(--rinvic-muted);
    font-size: 0.9rem;
    padding: 2rem 1rem;
}

/* == CONDUCTOR: PARTE DE HOY =========================== */

.parte-conductor-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.parte-conductor-header {
    margin-bottom: 0.25rem;
}

.parte-conductor-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--rinvic-text);
    margin: 0;
}

.parte-conductor-date {
    font-size: 0.9rem;
    color: var(--rinvic-muted);
    margin: 0.25rem 0 0;
}

.parte-conductor-photo-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: #fff;
    border: 1px dashed var(--rinvic-border);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.parte-conductor-photo-card i {
    color: var(--rinvic-rojo);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.parte-conductor-photo-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.parte-conductor-photo-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--rinvic-text);
}

.parte-conductor-photo-hint {
    font-size: 0.78rem;
    color: var(--rinvic-muted);
    line-height: 1.35;
}

.parte-conductor-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.6rem;
    background: #fff;
    border: 1px solid var(--rinvic-border);
    border-radius: 14px;
    padding: 2rem 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.parte-conductor-empty-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #f0eeec;
    color: var(--rinvic-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

.parte-conductor-empty-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--rinvic-text);
    margin: 0;
}

.parte-conductor-empty-hint {
    font-size: 0.8rem;
    color: var(--rinvic-muted);
    line-height: 1.4;
    margin: 0;
    max-width: 320px;
}

.parte-conductor-start-btn {
    margin-top: 0.5rem;
    background: var(--rinvic-rojo);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.7rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.parte-conductor-start-btn:hover {
    background: var(--rinvic-rojo-hover);
}

/* == CONDUCTOR: NUEVO PARTE ============================= */

.nuevo-parte-conductor-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 1rem;
}

.nuevo-parte-conductor-header {
    margin-bottom: 0.25rem;
}

.nuevo-parte-conductor-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--rinvic-text);
    margin: 0;
}

.nuevo-parte-conductor-date {
    font-size: 0.9rem;
    color: var(--rinvic-muted);
    margin: 0.25rem 0 0;
}

.nuevo-parte-conductor-section {
    background: #fff;
    border: 1px solid var(--rinvic-border);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.nuevo-parte-conductor-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--rinvic-text);
    flex-wrap: wrap;
}

.nuevo-parte-conductor-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    background: var(--app-azul);
    border-radius: 9999px;
}

.nuevo-parte-conductor-badge.enviado {
    background: #d1fae5;
    color: #065f46;
}

.nuevo-parte-conductor-meta {
    font-size: 0.78rem;
    color: var(--rinvic-muted);
    margin: -0.25rem 0 0;
}

.nuevo-parte-conductor-km-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.75rem;
}

.nuevo-parte-conductor-km-field {
    min-width: 0;
}

.nuevo-parte-conductor-km-field label,
.nuevo-parte-conductor-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--rinvic-text);
    margin-bottom: 0.35rem;
}

.nuevo-parte-conductor-input-group {
    display: flex;
    align-items: center;
    border: 1px solid var(--rinvic-border);
    border-radius: 10px;
    background: #f7f7f5;
    overflow: hidden;
    width: 100%;
    min-width: 0;
}

.nuevo-parte-conductor-input {
    flex: 1 1 0;
    width: 100%;
    border: none;
    background: transparent;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    color: var(--rinvic-text);
    outline: none;
    min-width: 0;
}

.nuevo-parte-conductor-input::placeholder {
    color: #9ca3af;
}

.nuevo-parte-conductor-input-unit {
    padding: 0 0.75rem;
    font-size: 0.75rem;
    color: var(--rinvic-muted);
    font-weight: 600;
    flex-shrink: 0;
}

.nuevo-parte-conductor-date-select,
.nuevo-parte-conductor-select,
.nuevo-parte-conductor-textarea {
    width: 100%;
    border: 1px solid var(--rinvic-border);
    border-radius: 10px;
    background: #f7f7f5;
    color: var(--rinvic-text);
    font: inherit;
    font-size: 0.9rem;
    outline: none;
}

.nuevo-parte-conductor-date-select,
.nuevo-parte-conductor-select {
    min-height: 40px;
    padding: 0.55rem 2rem 0.55rem 0.75rem;
}

.nuevo-parte-conductor-date-select {
    width: auto;
    margin-top: 0.3rem;
}

.nuevo-parte-conductor-textarea {
    display: block;
    min-height: 84px;
    padding: 0.65rem 0.75rem;
    resize: vertical;
}

.nuevo-parte-conductor-date-select:focus,
.nuevo-parte-conductor-select:focus,
.nuevo-parte-conductor-textarea:focus,
.nuevo-parte-conductor-input-group:focus-within {
    border-color: var(--app-azul-border);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
    background: #fff;
}

.nuevo-parte-conductor-input:disabled,
.nuevo-parte-conductor-select:disabled,
.nuevo-parte-conductor-textarea:disabled {
    color: #4b5563;
    background: #f3f4f6;
    opacity: 1;
    cursor: not-allowed;
}

.nuevo-parte-conductor-alert {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    font-size: 0.84rem;
    line-height: 1.4;
}

.nuevo-parte-conductor-alert-success {
    color: #065f46;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.nuevo-parte-conductor-alert-error {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.nuevo-parte-conductor-vehicle-info {
    margin-left: auto;
    color: #374151;
    font-size: 0.8rem;
    font-weight: 600;
}

.nuevo-parte-conductor-total-small {
    margin-left: auto;
    color: var(--rinvic-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.nuevo-parte-conductor-empty-state {
    padding: 1.25rem 0.5rem;
    color: var(--rinvic-muted);
    font-size: 0.85rem;
    text-align: center;
}

.nuevo-parte-conductor-servicios-lista {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.nuevo-parte-conductor-servicio {
    overflow: hidden;
    border: 1px solid var(--rinvic-border);
    border-radius: 12px;
    background: #fff;
}

.nuevo-parte-conductor-servicio-cabecera {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 42px;
    padding: 0.6rem 0.75rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--rinvic-border);
    font-size: 0.84rem;
}

.nuevo-parte-conductor-servicio-origen {
    flex-shrink: 0;
    color: var(--app-azul);
    font-weight: 700;
}

.nuevo-parte-conductor-servicio-origen.sin-origen,
.nuevo-parte-conductor-servicio-nombre.sin-descripcion {
    color: var(--rinvic-muted);
    font-style: italic;
}

.nuevo-parte-conductor-servicio-nombre {
    min-width: 0;
    overflow: hidden;
    color: #374151;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nuevo-parte-conductor-servicio-total {
    margin-left: auto;
    flex-shrink: 0;
    color: var(--rinvic-text);
    font-weight: 700;
}

.nuevo-parte-conductor-servicio-eliminar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-left: 0.15rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
}

.nuevo-parte-conductor-servicio-eliminar:hover {
    background: #fef2f2;
    color: #dc2626;
}

.nuevo-parte-conductor-servicio-campos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0.8rem;
}

.nuevo-parte-conductor-field {
    min-width: 0;
}

.nuevo-parte-conductor-autocomplete {
    position: relative;
}

.nuevo-parte-conductor-autocomplete > .nuevo-parte-conductor-input {
    border: 1px solid var(--rinvic-border);
    border-radius: 10px;
    background: #f7f7f5;
}

.nuevo-parte-conductor-autocomplete > .nuevo-parte-conductor-input:focus {
    border-color: var(--app-azul-border);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
    background: #fff;
}

.nuevo-parte-conductor-sugerencias {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    z-index: 20;
    max-height: 180px;
    margin: 0;
    padding: 0.3rem;
    overflow-y: auto;
    border: 1px solid var(--rinvic-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    list-style: none;
}

.nuevo-parte-conductor-sugerencias li {
    padding: 0.5rem 0.6rem;
    border-radius: 7px;
    font-size: 0.84rem;
    cursor: pointer;
}

.nuevo-parte-conductor-sugerencias li:hover {
    background: #eff6ff;
}

.nuevo-parte-conductor-add-link {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: none;
    background: transparent;
    color: var(--app-azul);
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
}

.nuevo-parte-conductor-field-hint,
.nuevo-parte-conductor-caja-hint {
    margin: 0.45rem 0 0;
    color: var(--rinvic-muted);
    font-size: 0.76rem;
    line-height: 1.4;
}

.nuevo-parte-conductor-caja-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.15rem 0;
    color: #4b5563;
    font-size: 0.88rem;
}

.nuevo-parte-conductor-caja-value {
    color: var(--rinvic-text);
    font-weight: 600;
}

.nuevo-parte-conductor-caja-total {
    margin-top: 0.2rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--rinvic-border);
    color: var(--rinvic-text);
    font-weight: 700;
}

.nuevo-parte-conductor-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.nuevo-parte-conductor-btn-secondary,
.nuevo-parte-conductor-btn-primary,
.nuevo-parte-conductor-discard {
    min-height: 44px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}

.nuevo-parte-conductor-btn-secondary {
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
}

.nuevo-parte-conductor-btn-primary {
    border: 1px solid var(--app-azul);
    background: var(--app-azul);
    color: #fff;
}

.nuevo-parte-conductor-btn-primary:hover {
    background: var(--app-azul-hover);
}

.nuevo-parte-conductor-btn-secondary:disabled,
.nuevo-parte-conductor-btn-primary:disabled {
    opacity: 0.6;
    cursor: wait;
}

.nuevo-parte-conductor-discard {
    align-self: center;
    min-height: auto;
    padding: 0.45rem 0.75rem;
    border: none;
    background: transparent;
    color: #6b7280;
}

.nuevo-parte-conductor-discard:hover {
    color: #dc2626;
}

@media (max-width: 576px) {
    .nuevo-parte-conductor-section {
        padding: 0.85rem 0.9rem;
    }

    .nuevo-parte-conductor-km-row {
        gap: 0.5rem;
    }

    .nuevo-parte-conductor-input {
        padding: 0.55rem 0.5rem;
    }

    .nuevo-parte-conductor-input-unit {
        padding: 0 0.5rem;
    }

    .nuevo-parte-conductor-servicio-campos {
        grid-template-columns: 1fr;
        gap: 0.65rem;
        padding: 0.7rem;
    }

    .nuevo-parte-conductor-vehicle-info {
        width: 100%;
        margin-left: 0;
    }
}