:root {
    --bs-primary: #006636;
    --bs-primary-rgb: 0, 102, 54;
    --app-gray-900: #1f2937;
    --app-gray-700: #4b5563;
    --app-gray-500: #6b7280;
    --app-gray-300: #d1d5db;
    --app-gray-200: #e5e7eb;
    --app-gray-100: #f3f4f6;
}

html,
body {
    height: 100%;
}

body {
    color: var(--app-gray-900);
    background-color: #ffffff;
}

.text-primary {
    color: var(--bs-primary) !important;
}

.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #00582f !important;
    border-color: #00582f !important;
}

.btn-outline-primary {
    color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-outline-primary:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.form-control,
.btn,
.form-check-input {
    border-radius: 0.5rem;
}

.form-control:focus {
    border-color: rgba(var(--bs-primary-rgb), 0.35);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.15);
}

.form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.page-panel {
    background-color: #ffffff;
}

.login-wrapper {
    max-width: 430px;
}

.brand-row {
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo {
    max-height: 65px;
    width: auto;
    object-fit: contain;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    color: #ffffff;
    background-color: var(--bs-primary);
    margin-right: 0.75rem;
}

.brand-name {
    font-size: 1.45rem;
    line-height: 1;
    letter-spacing: 0.3px;
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.login-subtitle {
    color: #94a3b8;
    margin-bottom: 1.5rem;
}

.forgot-link {
    color: var(--bs-primary);
    font-size: 0.92rem;
    text-decoration: none;
}

.forgot-link:hover {
    color: #00582f;
    text-decoration: underline;
}

.btn-login {
    font-weight: 600;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.login-banner {
    overflow: hidden;
    background-color: #111827;
}

.banner-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%) brightness(0.72);
}

.banner-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.68) 100%);
    z-index: 1;
}

.banner-content {
    position: absolute;
    z-index: 2;
    left: 3rem;
    right: 3rem;
    bottom: 3rem;
    color: #ffffff;
}

.banner-title {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.banner-text {
    font-size: 1.27rem;
    color: rgba(255, 255, 255, 0.93);
    margin-bottom: 0;
    max-width: 650px;
}

.toggle-password {
    cursor: pointer;
    border-color: var(--app-gray-300);
    transition: border-color 0.15s ease-in-out;
}

.form-control:focus + .toggle-password {
    border-color: rgba(var(--bs-primary-rgb), 0.35);
}

@media (max-width: 991.98px) {
    .login-wrapper {
        max-width: 520px;
    }

    .login-title {
        font-size: 1.75rem;
    }
}

/* ═══════════════════════════════════════════
   NAVBAR / DASHBOARD
   ═══════════════════════════════════════════ */

.navbar-logo {
    height: 30px;
    width: auto;
    object-fit: contain;
}

.nav-link-app {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--app-gray-700);
    padding: 0.45rem 0.85rem;
    border-radius: 0.5rem;
    transition: background-color 0.15s, color 0.15s;
}

.nav-link-app:hover,
.nav-link-app.active {
    color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.07);
}

.avatar-circle {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--app-gray-200);
    color: var(--app-gray-500);
    font-size: 1.1rem;
}

.profile-link {
    color: inherit;
    padding: 0.2rem 0.35rem;
    border-radius: 0.65rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.profile-link:hover {
    color: inherit;
    background-color: rgba(var(--bs-primary-rgb), 0.06);
}

/* ═══════════════════════════════════════════
   CARDS DASHBOARD
   ═══════════════════════════════════════════ */

.card-dashboard {
    border: 1px solid var(--app-gray-200);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    background-color: #ffffff;
}

.profile-page {
    padding-top: 2.25rem !important;
    padding-bottom: 3.25rem !important;
}

.profile-shell {
    max-width: 760px;
    width: 100%;
}

.profile-hero {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1rem;
    margin-bottom: 1.4rem !important;
}

.profile-title {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1e293b;
    line-height: 1.1;
}

.profile-subtitle {
    color: #94a3b8;
    font-size: 0.98rem;
    max-width: 520px;
    line-height: 1.45;
}

.profile-card {
    border-radius: 0.85rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.profile-card-header {
    padding: 1.35rem 1.6rem 1.1rem;
    border-bottom: 1px solid #eef2f7;
    background-color: #ffffff;
}

.profile-card-title {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: #1e293b;
    margin: 0.1rem 0 0.15rem;
}

.profile-card-body {
    padding: 1.45rem 1.5rem 1.5rem !important;
}

.profile-form {
    width: 100%;
}

.profile-label {
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.55rem;
}

.profile-input {
    min-height: 40px;
    border-radius: 0.55rem;
    border-color: #e5e7eb;
    padding-left: 0.8rem;
    padding-right: 0.8rem;
    color: #1f2937;
    background-color: #ffffff;
    font-size: 0.95rem;
}

.profile-input-readonly {
    background-color: #f8fafc;
    color: #475569;
}

.profile-password-group .input-group-text {
    border-radius: 0 0.55rem 0.55rem 0;
    border-color: #e5e7eb;
    min-height: 40px;
}

.profile-toggle {
    min-width: 44px;
}

.profile-divider {
    height: 1px;
    background-color: #eef2f7;
    margin: 1.15rem 0 0;
}

.profile-actions {
    margin-top: 0.95rem;
}

.profile-submit {
    min-width: 124px;
    min-height: 40px;
    font-weight: 600;
    font-size: 0.92rem;
    border-radius: 0.6rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.profile-password-hint {
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.55;
    max-width: 580px;
}

/* ═══════════════════════════════════════════
   UPLOAD ZONE
   ═══════════════════════════════════════════ */

.upload-zone {
    border: 2px dashed var(--app-gray-300);
    border-radius: 0.75rem;
    background-color: var(--app-gray-100);
    padding: 2.5rem 1.5rem;
    transition: border-color 0.2s, background-color 0.2s;
}

.upload-zone:hover {
    border-color: rgba(var(--bs-primary-rgb), 0.4);
}

.upload-zone--dragover {
    border-color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.04);
}

.upload-zone--has-file {
    border-style: solid;
    border-color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.03);
}

.upload-zone-icon {
    font-size: 2.5rem;
    color: var(--app-gray-500);
    display: block;
    margin-bottom: 0.75rem;
}

/* ═══════════════════════════════════════════
   TABLE
   ═══════════════════════════════════════════ */

.table-scroll-container {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 65vh;
    border: 1px solid var(--app-gray-200);
    border-radius: 0.5rem;
}

.table-scroll-container table {
    min-width: 1100px;
}

.table-scroll-container thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

.table-head-app th {
    background-color: var(--app-gray-100);
    color: var(--app-gray-700);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.6rem 0.75rem;
    border-bottom: 2px solid var(--app-gray-200);
    white-space: nowrap;
}

#tablaTraslados tbody td {
    font-size: 0.875rem;
    padding: 0.55rem 0.75rem;
    color: var(--app-gray-900);
    vertical-align: middle;
}

#tablaTraslados tbody tr:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.03);
}

.input-tiempo-wrap {
    width: 100px;
}

/* ═══════════════════════════════════════════
   COBRO CELL (valor + tiempo espera unificados)
   ═══════════════════════════════════════════ */

.celda-cobro {
    min-width: 280px;
}

.cobro-inputs,
.cobro-display {
    display: inline-flex;
    flex-direction: row;
    gap: 0.75rem;
    align-items: flex-end;
}

.cobro-field {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    white-space: nowrap;
}

.cobro-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--app-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1;
    white-space: nowrap;
}

/* Campo bloqueado en modal novedades */
.cobro-novedad-field.field-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.cobro-novedad-field.field-disabled .input-valor {
    background-color: var(--app-gray-100);
    cursor: not-allowed;
}

/* Total cobro badge */
.total-cobro-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 0.2rem 0.65rem;
    border-radius: 0.5rem;
    background-color: rgba(var(--bs-primary-rgb), 0.07);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.2);
    line-height: 1.2;
}

.total-cobro-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--app-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.total-cobro-valor {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--bs-primary);
}

/* ═══════════════════════════════════════════
   BADGES ESTADO
   ═══════════════════════════════════════════ */

.badge-estado {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25em 0.75em;
    border-radius: 50rem;
    white-space: nowrap;
}

.badge-pendiente {
    background-color: #ffedd5;
    color: #9a3412;
}

.badge-aprobado {
    background-color: #dcfce7;
    color: #166534;
}

.badge-novedad {
    background-color: #fef9c3;
    color: #854d0e;
}

.badge-registrado {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-solicitado {
    background-color: #ede9fe;
    color: #6d28d9;
}

.badge-default {
    background-color: var(--app-gray-200);
    color: var(--app-gray-700);
}

/* ═══════════════════════════════════════════
   ACTION BUTTONS
   ═══════════════════════════════════════════ */

.btn-action {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.95rem;
    border-radius: 0.4rem;
    border: 1px solid var(--app-gray-200);
    background-color: #ffffff;
    color: var(--app-gray-700);
    transition: all 0.15s;
}

.btn-action:hover {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.06);
}

/* Indicador de novedad del día */
.novedad-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #dc3545;
    border: 1.5px solid #ffffff;
}

/* Botón guardar cobro (check verde) */
.btn-action-save {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.9rem;
    border-radius: 0.4rem;
    border: 1px solid #16a34a;
    background-color: #ffffff;
    color: #16a34a;
    transition: all 0.15s;
    flex-shrink: 0;
}

.btn-action-save:hover {
    background-color: #16a34a;
    color: #ffffff;
}

/* Botón editar (lápiz) */
.btn-action-edit {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.75rem;
    border-radius: 0.35rem;
    border: 1px solid var(--app-gray-300);
    background-color: #ffffff;
    color: var(--app-gray-500);
    transition: all 0.15s;
    flex-shrink: 0;
}

.btn-action-edit:hover {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

/* Botón cancelar edición */
.btn-action-cancel {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.8rem;
    border-radius: 0.4rem;
    border: 1px solid var(--app-gray-300);
    background-color: #ffffff;
    color: var(--app-gray-500);
    transition: all 0.15s;
    flex-shrink: 0;
}

.btn-action-cancel:hover {
    border-color: #dc2626;
    color: #dc2626;
}

/* ═══════════════════════════════════════════
   INPUT VALOR EN TABLA
   ═══════════════════════════════════════════ */

.input-valor-wrap {
    position: relative;
    width: 130px;
    display: inline-flex;
    align-items: center;
}

.input-valor-prefix {
    position: absolute;
    left: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--app-gray-500);
    pointer-events: none;
    line-height: 1;
}

.input-valor {
    font-size: 0.82rem;
    padding: 0.25rem 0.5rem 0.25rem 1.25rem;
    text-align: right;
}

.input-valor:focus {
    border-color: rgba(var(--bs-primary-rgb), 0.5);
    box-shadow: 0 0 0 0.15rem rgba(var(--bs-primary-rgb), 0.12);
}

/* ═══════════════════════════════════════════
   RESPONSIVE DASHBOARD
   ═══════════════════════════════════════════ */

@media (max-width: 767.98px) {
    .card-dashboard .card-body {
        padding: 1.25rem !important;
    }

    .upload-zone {
        padding: 1.75rem 1rem;
    }

    .profile-title {
        font-size: 1.8rem;
    }

    .profile-card-title {
        font-size: 1.05rem;
    }

    .profile-card-body {
        padding: 1.2rem 1rem 1.35rem !important;
    }

    .profile-page {
        padding-top: 1.25rem !important;
        padding-bottom: 2rem !important;
    }

    .upload-zone-icon {
        font-size: 2rem;
    }
}
