/* =============================================
   CAVELIM ADMIN — Estilos globales
   ============================================= */

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

/* Ocultar flechas de inputs numéricos en todos los navegadores */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f4f8;
    color: #2d3748;
}

body {
    display: flex;
    min-height: 100vh;
}

/* ────────────────────────────
   SIDEBAR
   ──────────────────────────── */
.sidebar {
    width: 230px;
    min-height: 100vh;
    background: #1a365d;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0; top: 0;
    z-index: 100;
    box-shadow: 2px 0 12px rgba(0,0,0,0.35);
    transition: width 0.25s ease;
}

.sidebar-header {
    padding: 18px 14px;
    display: flex;
    align-items: center;
    gap: 11px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    min-height: 72px;
}

.sidebar-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    overflow: hidden;
}

.sidebar-brand-name {
    color: #f1f5f9;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.sidebar-brand-sub {
    color: rgba(79,209,197,0.75);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.sidebar-nav {
    flex: 1;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 13px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.18s ease;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-link:hover {
    background: rgba(255,255,255,0.07);
    color: #e2e8f0;
}

.sidebar-link.active {
    background: rgba(79,209,197,0.18);
    color: #4fd1c5;
    font-weight: 600;
}

.sidebar-link i {
    width: 18px;
    text-align: center;
    font-size: 15px;
    flex-shrink: 0;
}

.nav-label { overflow: hidden; text-overflow: ellipsis; }

.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 6px 8px;
}

.sidebar-footer {
    padding: 10px 8px 14px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 13px;
    color: #f87171;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.18s ease;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-logout:hover { background: rgba(248,113,113,0.12); }
.sidebar-logout i { width: 18px; text-align: center; font-size: 15px; flex-shrink: 0; }

/* ────────────────────────────
   MAIN CONTENT
   ──────────────────────────── */
.main-content {
    margin-left: 230px;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ── Page header ── */
.page-header {
    background: #2b6cb0;
    color: white;
    padding: 15px 28px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    min-height: 56px;
}

.page-title {
    font-size: 17px;
    font-weight: 600;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title i { color: #4fd1c5; font-size: 16px; }

/* ── Tabs bar ── */
.tabs {
    display: flex;
    background: #1a365d;
    padding: 0 28px;
    border-bottom: 1px solid rgba(0,0,0,0.15);
    flex-wrap: wrap;
}

.tab-button {
    background: none;
    border: none;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(79,209,197,0.5);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.18s ease;
    position: relative;
    bottom: -1px;
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.tab-button:hover { color: rgba(79,209,197,0.8); }
.tab-button.active { color: #4fd1c5; border-bottom-color: #4fd1c5; }
.tab-button i { font-size: 12px; }

/* ── Tab content ── */
.tab-content {
    display: none;
    padding: 24px 28px;
    flex: 1;
    animation: fadeIn 0.22s ease-in;
}

.tab-content.active { display: block; }

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

/* ── Section title ── */
.section-title {
    font-size: 19px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.section-title i { color: #2b6cb0; }

/* ────────────────────────────
   CARDS GRID
   ──────────────────────────── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

/* ── Card ── */
.card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 15px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
    border-color: #4fd1c5;
    box-shadow: 0 4px 16px rgba(79,209,197,0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    flex: 1;
    padding-right: 8px;
    word-break: break-word;
    margin: 0;
}

.card-id {
    background: #f1f5f9;
    color: #64748b;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.card-description {
    color: #475569;
    font-size: 13px;
    line-height: 1.5;
    margin: 8px 0;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 3px solid #4fd1c5;
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 10px 0;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 8px;
    background: #f8fafc;
    border-radius: 5px;
    font-size: 13px;
}

.meta-item .label { font-weight: 600; color: #64748b; font-size: 12px; }
.meta-item .value { color: #0f172a; font-weight: 600; }

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.card-date { color: #94a3b8; font-size: 11px; }

/* ── Card actions ── */
.card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

/* ────────────────────────────
   ICON BUTTONS
   ──────────────────────────── */
.icon-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.15s ease;
    flex-shrink: 0;
    position: relative;
}

.icon-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: #1a365d;
    color: #e6fffa;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 11px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
}

.icon-btn-edit        { background: #dbeafe; color: #1d4ed8; }
.icon-btn-edit:hover  { background: #bfdbfe; }

.icon-btn-delete       { background: #fee2e2; color: #b91c1c; }
.icon-btn-delete:hover { background: #fecaca; }

.icon-btn-view        { background: #e0f2fe; color: #0369a1; }
.icon-btn-view:hover  { background: #bae6fd; }

.icon-btn-rates        { background: #ccfbf1; color: #0f766e; }
.icon-btn-rates:hover  { background: #99f6e4; }

.icon-btn-resources        { background: #ede9fe; color: #6d28d9; }
.icon-btn-resources:hover  { background: #ddd6fe; }

.icon-btn-complete        { background: #dcfce7; color: #15803d; }
.icon-btn-complete:hover  { background: #bbf7d0; }

.icon-btn-cancel        { background: #fff7ed; color: #c2410c; }
.icon-btn-cancel:hover  { background: #fed7aa; }

/* ────────────────────────────
   TOGGLE SWITCH
   ──────────────────────────── */
.toggle-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-right: 4px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 21px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0; height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e0;
    border-radius: 21px;
    transition: 0.22s;
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 15px; width: 15px;
    left: 3px; top: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.22s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider { background: #22c55e; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(17px); }
.toggle-switch input:disabled + .toggle-slider { opacity: 0.5; cursor: not-allowed; }

.toggle-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    min-width: 50px;
}

/* ────────────────────────────
   BADGES
   ──────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.badge-active, .badge-available, .badge-completed {
    background: #dcfce7; color: #15803d;
}

.badge-inactive, .badge-unavailable, .badge-cancelled {
    background: #fee2e2; color: #b91c1c;
}

.badge-pending, .badge-warning  { background: #fef9c3; color: #854d0e; }
.badge-in-progress, .badge-info  { background: #dbeafe; color: #1d4ed8; }
.badge-success                   { background: #dcfce7; color: #15803d; }
.badge-danger                    { background: #fee2e2; color: #b91c1c; }
.badge-secondary                 { background: #f1f5f9; color: #475569; }

.qty-label {
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 2px;
}

/* ────────────────────────────
   FORMS
   ──────────────────────────── */
.form-container {
    max-width: 580px;
}

.form-group { margin-bottom: 16px; }

label {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-weight: 600;
    font-size: 13px;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 7px;
    box-sizing: border-box;
    font-size: 14px;
    color: #1e293b;
    background: #f8fafc;
    transition: all 0.2s ease;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    border-color: #4fd1c5;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(79,209,197,0.2);
}

textarea { resize: vertical; height: 78px; }

/* ── Submit button ── */
.btn-submit {
    background: #2b6cb0;
    color: #ffffff;
    padding: 11px 22px;
    border: none;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(43,108,176,0.35);
    letter-spacing: 0.5px;
}

.btn-submit:hover  { background: #1a365d; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(26,54,93,0.4); }
.btn-submit:active { transform: translateY(1px); box-shadow: none; }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-submit-full { width: 100%; justify-content: center; }
.btn-danger { background: #dc2626 !important; }
.btn-danger:hover { background: #b91c1c !important; }

/* ── Generic buttons ── */
.btn {
    padding: 7px 14px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-secondary       { background: #e2e8f0; color: #374151; }
.btn-secondary:hover { background: #cbd5e0; }

.btn-block { width: 100%; justify-content: center; padding: 11px; font-size: 13px; }

/* ────────────────────────────
   STATUS MESSAGES
   ──────────────────────────── */
.loading-message,
.error-message,
.empty-message {
    padding: 14px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.loading-message { background: #e6fffa; color: #2b6cb0; }
.error-message   { background: #fee2e2; color: #b91c1c; border-left: 3px solid #ef4444; }
.empty-message   { background: #fef9c3; color: #854d0e; border-left: 3px solid #eab308; }

.message {
    margin-top: 14px;
    padding: 11px 14px;
    border-radius: 6px;
    display: none;
    font-weight: 600;
    font-size: 13px;
}

/* ────────────────────────────
   MODAL
   ──────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1000;
    justify-content: center;
    align-items: flex-start;
    padding: 50px 20px;
    overflow-y: auto;
}

.modal-overlay.open { display: flex; }

.modal-box {
    background: white;
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    position: relative;
    margin-bottom: 40px;
}

.modal-box h3 {
    margin: 0 0 16px;
    color: #0f172a;
    font-size: 16px;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
    padding-right: 32px;
}

.modal-close {
    position: absolute;
    top: 13px; right: 13px;
    background: #f1f5f9;
    border: none;
    width: 28px; height: 28px;
    border-radius: 6px;
    cursor: pointer;
    color: #64748b;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.modal-close:hover { background: #e2e8f0; color: #1e293b; }

/* ── Checkbox list ── */
.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 280px;
    overflow-y: auto;
    margin-bottom: 14px;
    padding: 2px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.13s;
}

.checkbox-item:hover { background: #f8fafc; }
.checkbox-item.is-default { border-color: #4fd1c5; background: #e6fffa; }

.checkbox-item input[type="checkbox"] {
    width: auto; cursor: pointer; flex-shrink: 0; margin: 0;
}

.checkbox-item label {
    margin: 0; cursor: pointer; font-weight: normal;
    font-size: 13px; flex: 1; color: #1e293b;
}

.set-default-btn {
    padding: 3px 8px; font-size: 11px;
    border: 1px solid #4fd1c5; background: white;
    color: #2b6cb0; border-radius: 4px; cursor: pointer;
    font-weight: 700; white-space: nowrap; flex-shrink: 0;
    transition: all 0.13s;
}

.set-default-btn:hover { background: #4fd1c5; color: #1a365d; }
.set-default-btn.is-default { background: #4fd1c5; color: #1a365d; border-color: #2b6cb0; }

/* ── Modal section title ── */
.modal-section-title {
    font-size: 11px; font-weight: 700; color: #64748b;
    text-transform: uppercase; letter-spacing: 0.5px;
    margin: 14px 0 6px;
}

/* ────────────────────────────
   COMPRAS — Items table
   ──────────────────────────── */
.items-table {
    width: 100%; border-collapse: collapse;
    font-size: 13px; margin-top: 8px;
}

.items-table th {
    background: #ebf8ff; padding: 8px 10px;
    text-align: left; color: #2b6cb0;
    font-weight: 700; border-bottom: 2px solid #bee3f8;
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px;
}

.items-table td {
    padding: 7px 10px; border-bottom: 1px solid #f1f5f9; color: #1e293b;
}

.items-table tr:last-child td { border-bottom: none; }

/* ── Modal de confirmación personalizado ── */
.confirm-box {
    max-width: 400px;
}
.confirm-icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    margin: 0 auto 14px;
}
.confirm-icon.danger  { background: #fee2e2; color: #dc2626; }
.confirm-icon.warning { background: #fef3c7; color: #d97706; }
.confirm-icon.info    { background: #e0f2fe; color: #0369a1; }
.confirm-title {
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}
.confirm-msg {
    text-align: center;
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 20px;
}
.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.confirm-cancel {
    padding: 8px 18px;
    border: 1.5px solid #e2e8f0;
    border-radius: 7px;
    background: #fff;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.confirm-cancel:hover { background: #f1f5f9; }
.confirm-ok {
    padding: 8px 18px;
    border: none;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s;
}
.confirm-ok:hover { opacity: 0.88; }
.confirm-ok.variant-danger   { background: #dc2626; color: #fff; }
.confirm-ok.variant-warning  { background: #d97706; color: #fff; }
.confirm-ok.variant-primary  { background: #0d9488; color: #fff; }

/* Botón copiar al portapapeles */
.copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.copy-btn:hover { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }

/* Scroll local de ítems en modal de detalle */
.detail-items-scroll {
    max-height: 260px;
    overflow-y: auto;
    padding: 4px 6px 4px 0;
    margin: 4px 0 2px;
}
.detail-items-scroll::-webkit-scrollbar { width: 4px; }
.detail-items-scroll::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 2px; }
.detail-items-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }
.detail-items-scroll::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Badge "referencia" en tasa cambiaria del modal */
.detail-ref-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 4px;
    padding: 1px 6px;
    margin-left: 4px;
    vertical-align: middle;
    letter-spacing: 0.02em;
}

/* Totales al pie del modal de detalle */
.detail-totals {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 2px solid #e8eaed;
}
.detail-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #475569;
}
.detail-total-row strong { font-size: 15px; }
.detail-total-converted {
    padding-top: 4px;
    border-top: 1px dashed #e2e8f0;
    color: #64748b;
    font-size: 12px;
}
.detail-total-converted strong { font-size: 13px; }

/* ── Item rows (compra form) ── */
.item-row {
    display: grid;
    grid-template-columns: 2fr 80px 110px auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 10px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.item-row .form-group { margin-bottom: 0; }

.remove-item-btn {
    width: 34px; height: 34px;
    background: #fee2e2; color: #b91c1c;
    border: none; border-radius: 7px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; transition: background 0.15s;
    flex-shrink: 0;
}

.remove-item-btn:hover { background: #fecaca; }

/* ── Total display ── */
.total-display {
    text-align: right; font-size: 16px;
    font-weight: 700; color: #0f172a;
    padding: 12px 0 4px;
    border-top: 2px solid #e2e8f0;
    margin-top: 10px;
}

.total-display span { color: #15803d; }

/* ── Toggle items btn ── */
.toggle-items-btn {
    background: none; border: 1px solid #e2e8f0;
    border-radius: 5px; padding: 4px 10px;
    cursor: pointer; font-size: 12px;
    color: #64748b; font-weight: 600;
    transition: all 0.13s;
}

.toggle-items-btn:hover { background: #f8fafc; border-color: #94a3b8; }

.purchase-items {
    display: none; margin-top: 10px;
    padding-top: 10px; border-top: 1px solid #f1f5f9;
}

.purchase-items.expanded { display: block; }

.purchase-status-row {
    display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}

/* ────────────────────────────
   TOAST
   ──────────────────────────── */
.toast {
    position: fixed;
    bottom: 24px; right: 24px;
    padding: 12px 18px;
    border-radius: 9px;
    font-weight: 600; font-size: 13px;
    z-index: 9999;
    animation: toastSlideIn 0.28s ease;
    max-width: 330px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.15);
    display: flex; align-items: center; gap: 10px;
}

.toast-success { background: #dcfce7; color: #15803d; border-left: 3px solid #22c55e; }
.toast-error   { background: #fee2e2; color: #b91c1c; border-left: 3px solid #ef4444; }

@keyframes toastSlideIn {
    from { transform: translateX(110%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

/* ────────────────────────────
   PAGE BODY (sin tabs)
   ──────────────────────────── */
.page-body {
    padding: 20px 28px;
    flex: 1;
}

/* ── Botón Nuevo en header ── */
.btn-new {
    margin-left: auto;
    background: #22c55e;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.15s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(34,197,94,0.35);
}

.btn-new:hover { background: #16a34a; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(34,197,94,0.45); }
.btn-new:active { transform: translateY(1px); box-shadow: none; }

/* ────────────────────────────
   DATA TABLE
   ──────────────────────────── */
.table-wrapper {
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 600px;
}

.data-table th {
    background: #ebf8ff;
    padding: 10px 14px;
    text-align: left;
    color: #2b6cb0;
    font-weight: 700;
    border-bottom: 2px solid #bee3f8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    vertical-align: middle;
}

.data-table tbody tr:hover { background: #ebf8ff; }
.data-table tbody tr:last-child td { border-bottom: none; }

.data-table .actions-cell {
    display: flex;
    gap: 5px;
    align-items: center;
}

.cell-id   { color: #94a3b8; font-size: 11px; font-weight: 600; }
.cell-name { font-weight: 700; color: #0f172a; }
.cell-desc {
    color: #64748b;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cell-date { color: #94a3b8; font-size: 12px; white-space: nowrap; }

/* ────────────────────────────
   PURCHASE SUMMARY
   ──────────────────────────── */
.purchase-summary {
    background: linear-gradient(135deg, #ebf8ff 0%, #e6fffa 100%);
    border: 1px solid #90cdf4;
    border-radius: 10px;
    padding: 16px 20px;
    margin: 14px 0;
    display: none;
}

.summary-header {
    font-size: 11px;
    font-weight: 700;
    color: #2b6cb0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    font-size: 13px;
    color: #2d3748;
}

.summary-divider {
    border: none;
    border-top: 1px solid #90cdf4;
    margin: 8px 0;
}

.summary-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    padding-top: 4px;
}

.summary-total-value { color: #15803d; }

/* ────────────────────────────
   FORMULARIO DE COMPRA
   ──────────────────────────── */

/* Layout principal: columna izquierda (form) + sidebar derecho (resumen) */
.purchase-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    align-items: start;
}

.purchase-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Tarjeta de paso */
.pc-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.pc-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(90deg, #2b6cb0 0%, #1a365d 100%);
    padding: 10px 16px;
}

.pc-card-header h3 {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.pc-step {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(79,209,197,0.25);
    border: 1.5px solid #4fd1c5;
    color: #4fd1c5;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pc-card-body {
    padding: 16px;
}

/* Pill de referencia de pago */
.ref-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ebf8ff;
    border: 1px solid #90cdf4;
    border-radius: 20px;
    padding: 5px 12px 5px 8px;
    font-size: 13px;
    color: #2b6cb0;
    user-select: none;
    margin-top: 6px;
}

.ref-pill.clickable {
    cursor: pointer;
    transition: background 0.15s;
}
.ref-pill.clickable:hover { background: #bee3f8; }

.ref-currency-badge {
    background: #2b6cb0;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    letter-spacing: 0.05em;
}
.ref-currency-badge.direct { background: #2c7a7b; }

.ref-rate-text { font-weight: 500; }

.ref-change-hint {
    font-size: 11px;
    color: #4fd1c5;
    margin-left: 2px;
}

/* Lista expandida de referencias */
.refs-list { display: none; margin-top: 8px; }
.refs-list.open { display: flex; flex-direction: column; gap: 6px; }

.ref-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.12s;
    font-size: 13px;
    background: #f8fafc;
}
.ref-option:hover { background: #ebf8ff; }
.ref-option.active {
    border-color: #4fd1c5;
    background: #e6fffa;
}

.ref-option-main { font-weight: 500; color: #2d3748; }
.ref-option-sub  { font-size: 11px; color: #4fd1c5; margin-top: 2px; }

/* Tabla de ítems */
.items-scroll-wrap {
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    margin-bottom: 12px;
}

.purchase-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.purchase-items-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #ebf8ff;
    color: #2b6cb0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 7px 8px;
    border-bottom: 2px solid #bee3f8;
    white-space: nowrap;
}

.purchase-items-table tbody tr:nth-child(even) { background: #f8fafc; }
.purchase-items-table tbody tr:hover           { background: #ebf8ff; }

.purchase-items-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

/* Anchos de columna */
.col-resource { min-width: 160px; }
.col-qty      { width: 130px; }
.col-price    { width: 120px; }

/* Cantidad + etiqueta de unidad */
.qty-with-unit {
    display: flex;
    align-items: center;
    gap: 4px;
}
.qty-with-unit input[type="number"] {
    flex: 1;
    min-width: 0;
}
.unit-tag {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    background: #e2e8f0;
    border-radius: 4px;
    padding: 2px 5px;
    white-space: nowrap;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}
.col-sub      { width: 90px; text-align: right; font-weight: 600; color: #2b6cb0; }
.col-del      { width: 34px; text-align: center; }

.purchase-items-table select,
.purchase-items-table input[type="number"] {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 12px;
    background: #fff;
    color: #2d3748;
}

.purchase-items-table select:focus,
.purchase-items-table input[type="number"]:focus {
    outline: none;
    border-color: #4fd1c5;
    box-shadow: 0 0 0 2px rgba(79,209,197,0.2);
}

.empty-items-msg {
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    padding: 24px 0;
}

/* Botón quitar fila */
.btn-del-row {
    background: none;
    border: none;
    color: #e53e3e;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background 0.1s;
}
.btn-del-row:hover { background: #fee2e2; }

/* Botón añadir recurso */
.btn-add-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1.5px dashed #90cdf4;
    color: #2b6cb0;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 7px;
    cursor: pointer;
    width: 100%;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
}
.btn-add-item:hover:not(:disabled) {
    background: #ebf8ff;
    border-color: #4fd1c5;
}
.btn-add-item:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Sidebar de compra */
.purchase-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 20px;
}

/* Resumen rows */
.sum-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    padding: 5px 0;
    font-size: 13px;
}

.sum-row.sum-total {
    font-size: 15px;
    font-weight: 700;
    color: #1a365d;
    padding-top: 8px;
}

.sum-lbl { color: #4a5568; flex: 1; }
.sum-val  { font-weight: 600; color: #2b6cb0; white-space: nowrap; }

.sum-info-box {
    background: #e6fffa;
    border: 1px solid #b2f5ea;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 11.5px;
    color: #2c7a7b;
    margin-top: 8px;
}
.sum-info-box strong { display: block; margin-bottom: 2px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; }

.sum-placeholder {
    color: #94a3b8;
    font-size: 13px;
    text-align: center;
    padding: 12px 0;
}

/* Botón registrar compra (full width en sidebar) */
.btn-submit-full {
    width: 100%;
    justify-content: center;
}

/* ── Filter bar ── */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.filter-field {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    padding: 5px 10px;
    transition: border-color 0.15s, background 0.15s;
    min-width: 150px;
}
.filter-field:focus-within { border-color: #0d9488; background: #f0fdfa; }
.filter-field > i { color: #94a3b8; font-size: 11px; flex-shrink: 0; }
.filter-field input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 12.5px;
    color: #334155;
    width: 100%;
}
.filter-field input::placeholder { color: #cbd5e1; }

.filter-sep { width: 1px; height: 22px; background: #e2e8f0; flex-shrink: 0; }

/* Filter multiselect chips */
.filter-ms { position: relative; }

.filter-ms-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    font-size: 12.5px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    font-weight: 500;
}
.filter-ms-btn:hover { border-color: #94a3b8; color: #334155; }
.filter-ms-btn.active { border-color: #0d9488; background: #f0fdfa; color: #0d9488; }

.filter-ms-badge {
    display: none;
    background: #0d9488;
    color: #fff;
    border-radius: 9px;
    padding: 0 5px;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
}
.filter-ms-btn.active .filter-ms-badge { display: inline; }

.filter-ms-panel {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    z-index: 300;
    padding: 6px;
    min-width: 170px;
    max-height: 220px;
    overflow-y: auto;
}
.filter-ms-panel.open { display: block; }

.filter-ms-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12.5px;
    color: #334155;
    user-select: none;
}
.filter-ms-opt:hover { background: #f0fdfa; }
.filter-ms-opt input[type="checkbox"] { cursor: pointer; accent-color: #0d9488; width: 14px; height: 14px; flex-shrink: 0; }

.filter-reset {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border: 1px solid #fca5a5;
    border-radius: 7px;
    background: #fff;
    color: #ef4444;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.filter-reset:hover { background: #fef2f2; border-color: #ef4444; }

.btn-excel {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border: 1px solid #16a34a;
    border-radius: 7px;
    background: #f0fdf4;
    color: #16a34a;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
    white-space: nowrap;
}
.btn-excel:hover { background: #16a34a; color: #fff; }

/* No-results row */
.no-results-cell {
    text-align: center;
    padding: 28px 16px;
    color: #94a3b8;
    font-size: 13px;
}
.no-results-cell i { margin-right: 6px; opacity: 0.6; }

/* Card search bar */
.card-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    margin-bottom: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    max-width: 340px;
    transition: border-color 0.15s;
}
.card-search-bar:focus-within { border-color: #0d9488; }
.card-search-bar i { color: #94a3b8; font-size: 13px; flex-shrink: 0; }
.card-search-bar input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    color: #334155;
    width: 100%;
}
.card-search-bar input::placeholder { color: #cbd5e1; }

.card-search-empty {
    text-align: center;
    padding: 36px 16px;
    color: #94a3b8;
    font-size: 13px;
    display: none;
}
.card-search-empty i { display: block; font-size: 26px; margin-bottom: 8px; opacity: 0.35; }

/* ────────────────────────────
   RESPONSIVE
   ──────────────────────────── */
@media (max-width: 900px) {
    .sidebar { width: 58px; }
    .sidebar-brand, .nav-label { display: none; }
    .sidebar-header { justify-content: center; padding: 15px 10px; }
    .sidebar-link { justify-content: center; padding: 11px; }
    .sidebar-logout { justify-content: center; padding: 11px; }
    .main-content { margin-left: 58px; }
}

@media (max-width: 900px) {
    .purchase-layout { grid-template-columns: 1fr; }
    .purchase-sidebar { position: static; }
}

@media (max-width: 640px) {
    .tab-content { padding: 16px; }
    .tabs { padding: 0 16px; }
    .page-header { padding: 12px 16px; }
    .cards-grid { grid-template-columns: 1fr; }
    .item-row { grid-template-columns: 1fr 1fr; }
    .item-row .remove-item-btn { grid-column: span 2; width: 100%; }
    .modal-overlay { padding: 20px 12px; }
    .purchase-layout { gap: 12px; }
}

/* =============================================
   LOGIN — Layout split-screen
   ============================================= */

.login-body {
    flex-direction: row;
    min-height: 100vh;
    background: #f0f4f8;
}

/* ── Panel izquierdo: marca institucional ── */
.login-brand {
    width: 420px;
    min-height: 100vh;
    background: linear-gradient(160deg, #0f1f3d 0%, #1a365d 55%, #0d4a6e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
    flex-shrink: 0;
}

.login-brand-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 100%;
    max-width: 320px;
    text-align: center;
}

.login-logo {
    width: 160px;
    height: auto;
    display: block;
    margin-bottom: 22px;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.5));
}

.login-institution {
    margin-bottom: 6px;
}

.login-inst-name {
    font-size: 14px;
    font-weight: 700;
    color: #e2e8f0;
    line-height: 1.4;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.login-inst-divider {
    width: 48px;
    height: 2px;
    background: #0d9488;
    border-radius: 2px;
    margin: 16px auto;
}

.login-inst-detail {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 28px;
}

.login-inst-detail p {
    font-size: 13px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-inst-detail i {
    color: #0d9488;
    width: 14px;
    text-align: center;
}

.login-project-badge {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.login-project-badge span {
    font-size: 10px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.login-project-badge strong {
    font-size: 15px;
    color: #e2e8f0;
    letter-spacing: 0.04em;
}

/* ── Panel derecho: formulario ── */
.login-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 40px 36px;
    width: 100%;
    max-width: 380px;
}

.login-card-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-title {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.login-subtitle {
    font-size: 13px;
    color: #94a3b8;
    letter-spacing: 0.02em;
}

.login-btn {
    width: 100%;
    padding: 11px;
    background: #0d9488;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: background 0.18s, transform 0.12s;
    margin-top: 4px;
}

.login-btn:hover   { background: #0f766e; }
.login-btn:active  { transform: scale(0.99); }
.login-btn:disabled { background: #94a3b8; cursor: not-allowed; }

.login-message {
    font-size: 13px;
    text-align: center;
    padding: 8px 12px;
    border-radius: 7px;
    margin-bottom: 10px;
    display: none;
}
.login-message.error   { display: block; background: #fee2e2; color: #b91c1c; }
.login-message.success { display: block; background: #dcfce7; color: #15803d; }

@media (max-width: 700px) {
    .login-body      { flex-direction: column; }
    .login-brand     { width: 100%; min-height: auto; padding: 32px 20px; }
    .login-logo      { width: 100px; margin-bottom: 16px; }
    .login-inst-name { font-size: 12px; }
    .login-inst-detail p { font-size: 12px; }
    .login-card      { padding: 28px 20px; }
}

/* ── Tooltips ── */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #f8fafc;
    font-size: 11.5px;
    line-height: 1.5;
    font-weight: 400;
    padding: 6px 10px;
    border-radius: 7px;
    white-space: normal;
    max-width: 220px;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 3px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1e293b;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease;
    z-index: 10000;
}
[data-tooltip]:hover::after,
[data-tooltip]:hover::before { opacity: 1; }

[data-tooltip-pos="bottom"]::after {
    bottom: auto;
    top: calc(100% + 8px);
}
[data-tooltip-pos="bottom"]::before {
    bottom: auto;
    top: calc(100% + 3px);
    border-top-color: transparent;
    border-bottom-color: #1e293b;
}

/* ─────────────────────────────────────────────────
   VENTAS — "Ver detalles" expandable item rows
   ───────────────────────────────────────────────── */

/* IVA badge inside the PRECIO column */
.sit-iva-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    letter-spacing: .3px;
    margin-top: 3px;
}
.sit-iva-on  { background: #dbeafe; color: #1d4ed8; }
.sit-iva-off { background: #f1f5f9; color: #94a3b8; }

/* Toggle button (▼ ver detalle) */
.sit-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    cursor: pointer;
    color: #64748b;
    font-size: 10px;
    transition: background 0.15s, color 0.15s, transform 0.2s;
    flex-shrink: 0;
}
.sit-toggle-btn:hover { background: #e2e8f0; color: #1a365d; }
.sit-toggle-btn.sit-toggle-open { background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }
.sit-toggle-btn.sit-toggle-open i { transform: rotate(180deg); }
.sit-toggle-btn i { transition: transform 0.2s; }

/* Hidden detail row */
.sit-detail-row { display: none; }
.sit-detail-row.sit-detail-open { display: table-row; }

.sit-detail-td {
    padding: 0 8px 10px 20px !important;
    background: #f8fafc !important;
    border-top: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.sit-detail-info {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 8px;
    padding-top: 6px;
    font-weight: 600;
}

/* 3-column breakdown grid */
.sit-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.sit-dc {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    padding: 8px 10px;
}
.sit-dc-iva   { border-color: #bfdbfe; background: #eff6ff; }
.sit-dc-total { border-color: #bbf7d0; background: #f0fdf4; }

.sit-dc-label {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 4px;
}

.sit-dc-amount {
    font-size: 13px;
    font-weight: 700;
    color: #1a365d;
    line-height: 1.3;
}
.sit-dc-iva   .sit-dc-amount { color: #1d4ed8; }
.sit-dc-total .sit-dc-amount { color: #15803d; }

.sit-dc-amount small {
    font-size: 10px;
    font-weight: 400;
    color: #94a3b8;
}

.sit-dc-dest {
    font-size: 11px;
    color: #0369a1;
    margin-top: 2px;
    font-weight: 600;
}

/* ── Role checkboxes (usuarios.html) ── */
.role-check-opt {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #f8fafc;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s;
    font-weight: 500;
}
.role-check-opt:hover { border-color: #0d9488; background: #f0fdfa; color: #0d9488; }
.role-check-opt input[type="checkbox"] { accent-color: #0d9488; cursor: pointer; width: 14px; height: 14px; }
.role-check-opt:has(input:checked) { border-color: #0d9488; background: #f0fdfa; color: #0d9488; font-weight: 600; }
