﻿/* CoreUI-based styles for Miritrans Admin Panel - Faithful Copy */
:root {
    --coreui-primary: #20a8d8;
    --coreui-secondary: #a4b7c1;
    --coreui-success: #4dbd74;
    --coreui-info: #63c2de;
    --coreui-warning: #ffbe76;
    --coreui-danger: #f86c6b;
    --coreui-light: #f0f3f5;
    --coreui-dark: #2f353a;
    --coreui-sidebar-bg: #2f353a;
    --coreui-sidebar-nav-link-active-bg: #3a4248;
    --coreui-sidebar-nav-link-hover-bg: #20a8d8;
    --coreui-sidebar-width: 200px;
    --coreui-header-height: 55px;
    --coreui-font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    font-family: var(--coreui-font-family);
    font-size: .875rem;
    color: #23282c;
    background: #e4e5e6;
    height: 100%;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,.2);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-card .logo { margin-bottom: 20px; }
.login-card .logo img { max-height: 80px; }
.login-card .logo h1 { margin: 10px 0 5px; color: #333; font-weight: 500; font-size: 22px; }
.login-card .logo h2 { margin: 10px 0 5px; color: #333; font-weight: 500; font-size: 18px; }
.login-card .logo p { color: #999; font-size: 13px; margin: 0; }
.login-card .form-group { margin-bottom: 16px; text-align: left; }
.login-card .form-group label { display: block; margin-bottom: 6px; font-weight: 500; color: #555; font-size: 13px; }
.login-card .form-group input { width: 100%; padding: 10px 14px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; transition: border-color .2s; }
.login-card .form-group input:focus { outline: none; border-color: var(--coreui-primary); box-shadow: 0 0 0 3px rgba(32,168,216,.15); }
.login-card .btn-login { width: 100%; padding: 12px; background: var(--coreui-primary); color: #fff; border: none; border-radius: 4px; font-size: 15px; font-weight: 500; cursor: pointer; transition: background .2s; margin-top: 8px; }
.login-card .btn-login:hover { background: #1b9bc2; }
.login-error { color: var(--coreui-danger); font-size: 13px; margin-top: 10px; display: none; }
.login-error.show { display: block; }

/* ===== APP LAYOUT ===== */
.app-layout { display: flex; min-height: 100vh; }

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--coreui-sidebar-width);
    background: var(--coreui-sidebar-bg);
    color: #fff;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: width .2s;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .8125rem 1rem;
    min-height: 55px;
    background: rgba(0,0,0,.2);
    text-decoration: none;
    color: #fff;
}

.sidebar-brand .brand-name { font-size: 1rem; font-weight: 500; white-space: nowrap; overflow: hidden; letter-spacing: .5px; }

.sidebar-nav { flex: 1; padding: 0; list-style: none; margin: 0; }
.sidebar-nav .nav-title { padding: .75rem 1rem .375rem; font-size: .65rem; font-weight: 600; text-transform: uppercase; color: rgba(255,255,255,.4); letter-spacing: .5px; }
.sidebar-nav .nav-item { list-style: none; }
.sidebar-nav .nav-link { display: flex; align-items: center; padding: .5rem 1rem; color: rgba(255,255,255,.6); text-decoration: none; font-size: .875rem; transition: all .15s; cursor: pointer; border: none; background: none; width: 100%; text-align: left; border-left: 3px solid transparent; }
.sidebar-nav .nav-link:hover { color: #fff; background: var(--coreui-sidebar-nav-link-hover-bg); border-left-color: var(--coreui-primary); }
.sidebar-nav .nav-link.active { color: #fff; background: var(--coreui-sidebar-nav-link-active-bg); border-left-color: var(--coreui-primary); }
.sidebar-nav .nav-link i,
.sidebar-nav .nav-link .material-icons,
.sidebar-nav .nav-link .pi { margin-right: .75rem; font-size: 1rem; width: 20px; text-align: center; }

/* ===== MAIN CONTENT ===== */
.main-content { flex: 1; margin-left: var(--coreui-sidebar-width); display: flex; flex-direction: column; min-height: 100vh; }

/* ===== HEADER ===== */
.app-header { height: var(--coreui-header-height); background: #fff; border-bottom: 1px solid #c8ced3; display: flex; align-items: center; padding: 0 1rem; position: sticky; top: 0; z-index: 100; }
.header-left { display: flex; align-items: center; }
.header-left .sidebar-toggler { background: none; border: 0; font-size: 1.25rem; color: #73818f; cursor: pointer; padding: .25rem .5rem; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.header-right .cooperativa-label { font-size: .75rem; color: #73818f; font-weight: 500; }
.header-right .cooperativa-name { font-size: .8125rem; color: #23282c; font-weight: 500; background: var(--coreui-light); padding: .25rem .625rem; border-radius: 4px; }
.header-right .user-dropdown { display: flex; align-items: center; gap: .375rem; cursor: pointer; padding: .25rem .5rem; border-radius: 4px; transition: background .15s; }
.header-right .user-dropdown:hover { background: var(--coreui-light); }
.header-right .user-dropdown .material-icons { font-size: 20px; color: #555; }

/* ===== PAGE CONTENT ===== */
.page-content { flex: 1; padding: 1.25rem; display: flex; flex-direction: column; }
.page-iframe { flex: 1; width: 100%; border: none; min-height: 0; background: #fff; display: block; }
.page-header { margin-bottom: 1.25rem; }
.page-header h4 { margin: 0; font-size: 1.125rem; font-weight: 500; color: #23282c; }
.page-header .breadcrumb { display: flex; gap: 6px; font-size: .75rem; color: #73818f; margin-top: .25rem; }
.page-header .breadcrumb a { color: var(--coreui-primary); text-decoration: none; }

/* ===== CARDS ===== */
.card { background: #fff; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.08); margin-bottom: 20px; border: 1px solid #c8ced3; }
.card-header { padding: .75rem 1.25rem; border-bottom: 1px solid #c8ced3; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; background-color: #f0f3f5; }
.card-header h5 { margin: 0; font-size: .8125rem; font-weight: 500; }
.card-body { padding: 20px; }
.card-footer { padding: 12px 20px; border-top: 1px solid #c8ced3; background: #f0f3f5; }

/* ===== TABLES (CoreUI faithful) ===== */
.table-container { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: .8125rem; }

table thead th { background: #f0f3f5; padding: .75rem; text-align: left; font-weight: 600; color: #23282c; border-bottom: 2px solid #c8ced3; white-space: nowrap; }

table tbody td { padding: .75rem; border-bottom: 1px solid #c8ced3; color: #23282c; vertical-align: middle; }

/* Alternating row colors - matches original */
table tbody tr:nth-child(odd) { background-color: #f8f9fa; }
table tbody tr:nth-child(2n) { background-color: #fff; }
table tbody tr:hover { background: #e9ecef; }

/* ===== STATUS BADGES (original colors) ===== */
.atrasado { background-color: #da981f; color: #000; padding: 2px 8px; border-radius: 3px; font-size: 12px; font-weight: 500; }
.adelantado { background-color: #28f116; color: #000; padding: 2px 8px; border-radius: 3px; font-size: 12px; font-weight: 500; }
.puntual { background-color: #4dbd74; color: #fff; padding: 2px 8px; border-radius: 3px; font-size: 12px; font-weight: 500; }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: .375rem .75rem; border: 1px solid transparent; border-radius: 4px; font-size: .8125rem; font-weight: 400; cursor: pointer; transition: all .15s; text-decoration: none; line-height: 1.5; }
.btn-primary { background: var(--coreui-primary); color: #fff; border-color: var(--coreui-primary); }
.btn-primary:hover { background: #1b9bc2; border-color: #1b9bc2; }
.btn-success { background: var(--coreui-success); color: #fff; border-color: var(--coreui-success); }
.btn-success:hover { background: #3ba862; border-color: #3ba862; }
.btn-danger { background: var(--coreui-danger); color: #fff; border-color: var(--coreui-danger); }
.btn-danger:hover { background: #e55c5a; border-color: #e55c5a; }
.btn-warning { background: var(--coreui-warning); color: #23282c; border-color: var(--coreui-warning); }
.btn-secondary { background: #73818f; color: #fff; border-color: #73818f; }
.btn-info { background: var(--coreui-info); color: #fff; border-color: var(--coreui-info); }
.btn-dark { background: var(--coreui-dark); color: #fff; border-color: var(--coreui-dark); }
.btn-sm { padding: .25rem .5rem; font-size: .75rem; }
.btn-outline-primary { background: transparent; color: var(--coreui-primary); border: 1px solid var(--coreui-primary); }
.btn-outline-primary:hover { background: var(--coreui-primary); color: #fff; }
.btn-raised { box-shadow: 0 2px 4px rgba(0,0,0,.2); }
.btn-rounded { border-radius: 50%; padding: 8px; width: 34px; height: 34px; justify-content: center; }
.btn-text { background: transparent; color: var(--coreui-primary); border: none; }
.btn-text:hover { background: rgba(32,168,216,.1); }
.btn-outlined { background: transparent; border: 1px solid; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: .5rem; font-weight: 500; font-size: .8125rem; color: #23282c; }
.form-control { width: 100%; padding: .375rem .75rem; border: 1px solid #c8ced3; border-radius: 4px; font-size: .8125rem; font-family: inherit; transition: border-color .15s; line-height: 1.5; }
.form-control:focus { outline: none; border-color: var(--coreui-primary); box-shadow: 0 0 0 .2rem rgba(32,168,216,.25); }
select.form-control { appearance: auto; }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ===== FILTER TOOLBAR ===== */
.filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; padding: .75rem; background: #f0f3f5; border: 1px solid #c8ced3; border-radius: 4px; }
.filter-bar .filter-label { font-size: .75rem; color: #73818f; font-weight: 500; }
.filter-bar select { padding: .375rem .75rem; border: 1px solid #c8ced3; border-radius: 4px; font-size: .8125rem; min-width: 140px; }
.filter-bar select:focus { outline: none; border-color: var(--coreui-primary); }
.filter-bar input[type="text"] { padding: .375rem .75rem; border: 1px solid #c8ced3; border-radius: 4px; font-size: .8125rem; min-width: 140px; }
.filter-bar input[type="date"] { padding: .375rem .75rem; border: 1px solid #c8ced3; border-radius: 4px; font-size: .8125rem; }
.filter-bar label { font-size: .75rem; color: #73818f; margin-right: 4px; }

/* ===== TOOLBAR ===== */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar .search-input { padding: 7px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; min-width: 200px; }
.toolbar .search-input:focus { outline: none; border-color: var(--coreui-primary); }

/* ===== PAGINATION ===== */
.paginator { display: flex; align-items: center; justify-content: space-between; padding: .75rem 0; font-size: .8125rem; color: #73818f; border-top: 1px solid #c8ced3; }
.paginator .paginator-current { margin-left: auto; color: #73818f; }
.paginator .page-buttons { display: flex; gap: 2px; }
.paginator .page-buttons button { padding: .25rem .625rem; border: 1px solid #c8ced3; background: #fff; border-radius: 3px; cursor: pointer; font-size: .75rem; }
.paginator .page-buttons button:hover { background: #e9ecef; }
.paginator .page-buttons button.active { background: var(--coreui-primary); color: #fff; border-color: var(--coreui-primary); }
.paginator select { padding: .25rem .5rem; border: 1px solid #c8ced3; border-radius: 3px; font-size: .75rem; }
.paginator .page-buttons button:disabled { background: transparent; color: #c8ced3; cursor: default; border-color: transparent; }

/* ===== MODAL / DIALOG ===== */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 2000; }
.modal-content { background: #fff; border-radius: 4px; width: 90%; max-width: 600px; max-height: 80vh; overflow-y: auto; box-shadow: 0 10px 40px rgba(0,0,0,.3); border: 1px solid rgba(0,0,0,.2); }
.modal-header { padding: 1rem 1.25rem; border-bottom: 1px solid #c8ced3; display: flex; align-items: center; justify-content: space-between; background: #f0f3f5; }
.modal-header h5 { margin: 0; font-size: 1rem; font-weight: 500; color: #23282c; }
.modal-header .close-btn { background: none; border: none; font-size: 1.25rem; cursor: pointer; color: #73818f; }
.modal-body { padding: 1.25rem; }
.modal-footer { padding: .75rem 1.25rem; border-top: 1px solid #c8ced3; display: flex; justify-content: flex-end; gap: .5rem; background: #f0f3f5; }

/* ===== TOAST ===== */
.toast { position: fixed; top: 1.25rem; right: 1.25rem; padding: .75rem 1.25rem; border-radius: 4px; color: #fff; font-size: .8125rem; z-index: 3000; animation: slideIn .3s ease; box-shadow: 0 .25rem .75rem rgba(0,0,0,.15); }
.toast-success { background: var(--coreui-success); }
.toast-error { background: var(--coreui-danger); }
.toast-warning { background: var(--coreui-warning); color: #23282c; }
.toast-info { background: var(--coreui-info); }

@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== STAT CARDS ===== */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat-card { background: #fff; border-radius: 4px; padding: 1.25rem; border: 1px solid #c8ced3; display: flex; align-items: center; gap: 1rem; }
.stat-card .stat-icon { width: 48px; height: 48px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #fff; }
.stat-card .stat-icon.bg-primary { background: var(--coreui-primary); }
.stat-card .stat-icon.bg-success { background: var(--coreui-success); }
.stat-card .stat-icon.bg-warning { background: var(--coreui-warning); }
.stat-card .stat-icon.bg-danger { background: var(--coreui-danger); }
.stat-card .stat-icon.bg-info { background: var(--coreui-info); }
.stat-card .stat-info h3 { margin: 0; font-size: 1.375rem; font-weight: 500; color: #23282c; }
.stat-card .stat-info p { margin: 2px 0 0; font-size: .75rem; color: #73818f; }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 40px 20px; color: #999; min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.empty-state .material-icons { font-size: 48px; color: #ddd; margin-bottom: 12px; }

/* ===== TABS ===== */
.tabs { display: flex; border-bottom: 2px solid #dee2e6; margin-bottom: 16px; }
.tab-btn { padding: 10px 20px; border: none; background: none; font-size: 14px; color: #666; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .2s; }
.tab-btn:hover { color: #333; }
.tab-btn.active { color: var(--coreui-primary); border-bottom-color: var(--coreui-primary); font-weight: 500; }

/* ===== BADGE ===== */
.badge { display: inline-block; padding: .25em .4em; border-radius: 4px; font-size: 75%; font-weight: 600; line-height: 1; text-align: center; white-space: nowrap; vertical-align: baseline; }
.badge-success { background: #d4edda; color: #155724; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-info { background: #d1ecf1; color: #0c5460; }
.badge-secondary { background: #e9ecef; color: #495057; }

/* Product badge (PrimeNG-style status) */
.product-badge { border-radius: 2px; padding: .25em .5rem; text-transform: uppercase; font-weight: 700; letter-spacing: .3px; font-size: 11px; }
.product-badge.status-debe { background: #f8d7da; color: #721c24; }
.product-badge.status-cancelado { background: #d4edda; color: #155724; }
.product-badge.status-cobrado { background: #d1ecf1; color: #0c5460; }
.product-badge.status-pendiente { background: #fff3cd; color: #856404; }
.product-badge.status-sin_despacho { background: #e9ecef; color: #495057; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar { width: 0; overflow: hidden; }
    .sidebar.open { width: var(--coreui-sidebar-width); }
    .main-content { margin-left: 0; }
    .stat-cards { grid-template-columns: 1fr; }
    .filter-bar { flex-direction: column; }
}

/* ===== 404/500 PAGE ===== */
.error-page { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; text-align: center; }
.error-page h1 { font-size: 72px; color: #ddd; margin: 0; }
.error-page h4 { font-size: 20px; color: #666; margin: 10px 0 5px; }
.error-page p { font-size: 16px; color: #888; margin: 10px 0 20px; }

/* ===== LOADING SPINNER ===== */
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid #fff; border-radius: 50%; border-top-color: transparent; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== CRUD MODAL (gmc) Elegant Design ===== */
.gmc-content { max-width:480px; width:90%; background:#fff; border-radius:10px; border:none; box-shadow:0 10px 40px rgba(0,0,0,0.2); max-height:80vh; overflow-y:auto; overflow-x:hidden; }
.gmc-header { background:#fff; border-bottom:1px solid #f0f0f0; padding:18px 22px; display:flex; justify-content:space-between; align-items:center; }
.gmc-header h5 { font-size:15px; font-weight:600; color:#2c3e50; margin:0; display:flex; align-items:center; }
.gmc-close { background:none; border:none; font-size:1.5rem; color:#9aa8b5; cursor:pointer; padding:0; line-height:1; }
.gmc-close:hover { color:#5a6872; }
.gmc-body { padding:22px; }
.gmc-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px 16px; margin-bottom:4px; }
.gmc-field { display:flex; flex-direction:column; }
.gmc-full { grid-column:1 / -1; }
.gmc-label { font-size:11px; font-weight:600; color:#5a6872; text-transform:uppercase; letter-spacing:0.3px; margin-bottom:4px; }
.gmc-input { height:40px; border:1.5px solid #e0e4e8; border-radius:6px; padding:0 12px; font-size:14px; color:#2c3e50; background:#fff; transition:border-color .2s; outline:none; width:100%; box-sizing:border-box; font-family:inherit; }
.gmc-input:focus { border-color:#20a8d8; box-shadow:0 0 0 3px rgba(32,168,216,0.12); }
select.gmc-input { appearance:none; -webkit-appearance:none; -moz-appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a9ba8' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 10px center; padding-right:30px; cursor:pointer; }
.gmc-footer { display:flex; justify-content:flex-end; gap:10px; padding-top:16px; border-top:1px solid #f0f0f0; margin-top:8px; }
.gmc-btn { padding:10px 22px; border-radius:6px; font-size:13px; font-weight:500; cursor:pointer; border:none; transition:all .2s; display:inline-flex; align-items:center; gap:6px; }
.gmc-btn-cancel { background:#f5f6f8; color:#5a6872; }
.gmc-btn-cancel:hover { background:#e8eaed; }
.gmc-btn-submit { background:#20a8d8; color:#fff; }
.gmc-btn-submit:hover { background:#1b9bc2; }

/* ===== CONFIRM DIALOG ===== */
.confirm-dialog { text-align: center; }
.confirm-dialog p { font-size: 14px; color: #555; margin-bottom: 20px; }
.confirm-dialog .confirm-actions { display: flex; gap: 8px; justify-content: center; }

/* ===== FORM GRID ===== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

/* ===== INFO TEXT ===== */
.info-text { font-size: 13px; color: #888; font-style: italic; margin-top: 8px; }

/* ===== TOTAL FOOTER ===== */
.total-footer { padding: .75rem 1.25rem; background: #f0f3f5; border-top: 1px solid #c8ced3; font-weight: 500; font-size: .875rem; display: flex; justify-content: flex-end; gap: 1.25rem; color: #23282c; }

/* ===== USER ROLE ===== */
.user-role { font-size: 11px; color: #6c757d; margin-left: 4px; font-weight: normal; }
/* ===== VUELTAS PAGE STYLES ===== */
.vueltas-page .main-container {
    background-color: #f8f9fb;
    border: 1px solid #d1d6dc;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    overflow: hidden;
}
.vueltas-page .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f4f6f9;
    border-bottom: 1px solid #e1e5eb;
}
.vueltas-page .header h1 {
    font-size: 18px;
    font-weight: 500;
    color: #444;
    margin: 0;
}
.vueltas-page .header-controls {
    display: flex;
    gap: 15px;
}
.vueltas-page select {
    padding: 8px 30px 8px 10px;
    border: 1px solid #cbd0d6;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
    color: #555;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23666%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 10px auto;
    min-width: 150px;
    outline: none;
}
.vueltas-page select:focus, .vueltas-page input:focus {
    border-color: #2196F3;
}
.vueltas-page .filters {
    display: flex;
    align-items: center;
    padding: 20px;
    background-color: #fdfdfe;
    border-bottom: 1px solid #e1e5eb;
    gap: 30px;
}
.vueltas-page .filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.vueltas-page .filter-group label {
    font-weight: 600;
    color: #444;
    font-size: 14px;
    margin: 0;
}
.vueltas-page input[type="date"] {
    padding: 8px 10px;
    border: 1px solid #cbd0d6;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
    outline: none;
}
.vueltas-page .btn-filtrar {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 9px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    margin-left: auto;
    transition: background-color 0.2s;
}
.vueltas-page .btn-filtrar:hover {
    background-color: #0b7dda;
}
.vueltas-page .table-responsive {
    overflow-x: auto;
    background-color: #fff;
    min-height: 400px;
}
.vueltas-page table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
}
.vueltas-page th, .vueltas-page td {
    padding: 8px 10px;
    border: 1px solid #eceff1;
}
.vueltas-page th {
    background-color: #fff;
    color: #455a64;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    position: relative;
}
.vueltas-page th:hover {
    background-color: #f5f7f9;
}
.vueltas-page th .sort-icon {
    display: inline-block;
    margin-left: 5px;
    color: #90a4ae;
    font-size: 10px;
    vertical-align: middle;
}
.vueltas-page th.active-sort {
    color: #2196F3;
    border: 1px solid #2196F3;
    border-bottom: 2px solid #2196F3;
}
.vueltas-page th.active-sort .sort-icon {
    color: #2196F3;
}
.vueltas-page .row-blue { background-color: #2196F3; color: #111; }
.vueltas-page .row-orange { background-color: #d99636; color: #111; }
.vueltas-page .row-green { background-color: #25e025; color: #111; }
.vueltas-page .row-white { background-color: #ffffff; color: #333; }
.vueltas-page tbody tr td {
    border-right: 1px solid rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* ===== PUNTOS PAGE VARIABLES ===== */
:root {
    --bg-body: #eceff4;
    --bg-panel: #f8f9fa;
    --border-color: #dee2e6;
    --text-main: #495057;
    --text-muted: #6c757d;
    --primary-blue: #2196f3;
    --primary-blue-hover: #1976d2;
    --export-purple: #9c27b0;
    --export-purple-hover: #7b1fa2;
    --row-hover: #f1f3f5;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== PUNTOS PAGE STYLES ===== */
.puntos-page .container {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    max-width: 1400px;
    overflow: hidden;
}
.puntos-page .top-bar {
    background-color: var(--bg-panel);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}
.puntos-page .top-bar h2 {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}
.puntos-page .top-filters {
    display: flex;
    gap: 15px;
}
.puntos-page select, .puntos-page input[type="date"], .puntos-page input[type="time"] {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-main);
    outline: none;
    background-color: #fff;
    font-family: var(--font-family);
}
.puntos-page select {
    min-width: 180px;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%236c757d" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 30px;
}
.puntos-page .date-bar {
    background-color: var(--bg-panel);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--border-color);
}
.puntos-page .date-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.puntos-page .date-group label {
    font-weight: 600;
    color: #333;
}
.puntos-page .btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}
.puntos-page .btn-filtrar {
    background-color: var(--primary-blue);
    margin-left: auto;
}
.puntos-page .btn-filtrar:hover { background-color: var(--primary-blue-hover); }
.puntos-page .table-container {
    width: 100%;
    overflow-x: auto;
}
.puntos-page table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    white-space: nowrap;
    font-size: .8125rem;
}
.puntos-page th, .puntos-page td {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
}
.puntos-page th:nth-child(2), .puntos-page td:nth-child(2) { text-align: left; }
.puntos-page th:nth-child(8), .puntos-page td:nth-child(8) { text-align: center; }
.puntos-page th:nth-child(12), .puntos-page td:nth-child(12) { text-align: center; }
.puntos-page th:nth-child(14), .puntos-page td:nth-child(14) { text-align: left; }
.puntos-page th {
    color: #333;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    background-color: #fff;
}
.puntos-page th:hover {
    background-color: var(--row-hover);
}
.puntos-page th i {
    color: #adb5bd;
    margin-left: 5px;
    font-size: 11px;
}
.puntos-page th.sort-asc i.fa-arrow-down-long { display: none; }
.puntos-page th.sort-asc i.fa-arrow-up-long { color: var(--primary-blue); display: inline-block; }
.puntos-page th.sort-desc i.fa-arrow-up-long { display: none; }
.puntos-page th.sort-desc i.fa-arrow-down-long { color: var(--primary-blue); display: inline-block; }
.puntos-page th .fa-sort { display: inline-block; }
.puntos-page th.sort-asc .fa-sort, .puntos-page th.sort-desc .fa-sort { display: none; }
.puntos-page tbody tr:hover {
    background-color: var(--row-hover);
}
.puntos-page .dif-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    color: #000;
    font-weight: 500;
    min-width: 38px;
    text-align: center;
}
.puntos-page .dif-badge-negative { background-color: #26f217; }
.puntos-page .dif-badge-positive { background-color: #d8941b; }
.puntos-page .pagination-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    gap: 5px;
}
.puntos-page .page-btn, .puntos-page .page-num {
    background: none;
    border: none;
    padding: 6px 12px;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 4px;
}
.puntos-page .page-btn:hover, .puntos-page .page-num:hover {
    background-color: var(--row-hover);
    color: #333;
}
.puntos-page .page-num.active {
    background-color: #e3f2fd;
    color: var(--primary-blue);
    font-weight: bold;
}
.puntos-page .rows-per-page {
    margin-left: 15px;
}
.puntos-page .footer-bar {
    background-color: var(--bg-panel);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.puntos-page .total-text {
    font-size: 15px;
    color: #333;
}
.puntos-page .action-buttons {
    display: flex;
    gap: 10px;
}
.puntos-page .btn-excel { background-color: #008cba; }
.puntos-page .btn-excel:hover { background-color: #007399; }
.puntos-page .btn-export { background-color: #9c27b0; }
.puntos-page .btn-export:hover { background-color: #7b1fa2; }
@media print {
    .puntos-page .top-bar, .puntos-page .date-bar, .puntos-page .pagination-bar, .puntos-page .action-buttons { display: none !important; }
    .puntos-page .footer-bar { background-color: #fff; border-top: 2px solid #000; }
    .puntos-page .total-text { font-weight: bold; }
    .puntos-page table { border-collapse: collapse; }
    .puntos-page th, .puntos-page td { border: 1px solid #ddd; padding: 6px; font-size: 11px; }
}

/* ===== JUSTIFICACIONES PAGE STYLES ===== */
.justificaciones-page { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; }
.justificaciones-page .main-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.justificaciones-page .header-section { padding: 15px 20px; border-bottom: 1px solid #eaeaea; display: flex; justify-content: space-between; align-items: center; }
.justificaciones-page .header-section h5 { margin: 0; color: #333; font-weight: 500; font-size: 16px; }
.justificaciones-page .btn-add { background-color: #689F38; color: white; border: none; border-radius: 4px; padding: 8px 16px; font-size: 14px; cursor: pointer; }
.justificaciones-page .btn-add:hover { background-color: #558b2f; color: white; }
.justificaciones-page .filter-section { padding: 15px 20px; border-bottom: 1px solid #eaeaea; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; background-color: #fbfbfb; }
.justificaciones-page .filter-group { display: flex; align-items: center; gap: 10px; }
.justificaciones-page .filter-group label { font-weight: 500; color: #333; font-size: 14px; }
.justificaciones-page .form-control { font-size: 13px; border-radius: 4px; border-color: #ccc; padding: 6px 10px; height: 34px; }
.justificaciones-page .btn-filter { background-color: #2196F3; color: white; border: none; padding: 6px 30px; height: 34px; border-radius: 4px; cursor: pointer; }
.justificaciones-page .btn-filter:hover { background-color: #1976D2; color: white; }
.justificaciones-page .table-responsive { overflow-x: auto; min-height: 300px; }
.justificaciones-page table { margin-bottom: 0; width: 100%; border-collapse: collapse; }
.justificaciones-page th { background-color: #f8f9fa; color: #555; font-weight: 600; font-size: 12px; padding: 12px 10px; border-bottom: 1px solid #eaeaea; white-space: nowrap; cursor: pointer; }
.justificaciones-page th i { color: #aaa; margin-left: 5px; font-size: 10px; }
.justificaciones-page td { padding: 12px 10px; border-bottom: 1px solid #eaeaea; color: #333; font-size: 13px; }
.justificaciones-page .empty-state { text-align: center; padding: 60px 20px; color: #777; }
.justificaciones-page .pagination-section { padding: 10px 20px; border-bottom: 1px solid #eaeaea; display: flex; justify-content: center; align-items: center; gap: 15px; background-color: #fff; }
.justificaciones-page .page-btn { background: transparent; border: none; color: #aaa; cursor: pointer; padding: 5px; }
.justificaciones-page .page-num { background: transparent; border: none; color: #666; cursor: pointer; padding: 5px 10px; }
.justificaciones-page .page-num.active, .justificaciones-page .page-btn.active { background-color: #e3f2fd; color: #1976d2; border-radius: 4px; padding: 5px 12px; font-weight: bold; }
.justificaciones-page .footer-section { padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; background-color: #fff; }
.justificaciones-page .total-text { color: #333; font-weight: 500; }
.justificaciones-page .action-buttons { display: flex; gap: 10px; }
.justificaciones-page .btn-excel { background-color: #039BE5; color: white; border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; margin-right: 10px; }
.justificaciones-page .btn-excel:hover { background-color: #0277bd; }
.justificaciones-page .btn-export { background-color: #9C27B0; color: white; border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; }
.justificaciones-page .btn-export:hover { background-color: #7b1fa2; }
/* Justificacion Modal - Elegant Design */
.jmc-content { max-width:520px; width:90%; background:#fff; border-radius:10px; border:none; box-shadow:0 10px 40px rgba(0,0,0,0.2); max-height:80vh; overflow-y:auto; overflow-x:hidden; }
.jmc-header { background:#fff; border-bottom:1px solid #f0f0f0; padding:20px 24px; display:flex; justify-content:space-between; align-items:center; }
.jmc-header h5 { font-size:16px; font-weight:600; color:#2c3e50; margin:0; display:flex; align-items:center; }
.jmc-close { background:none; border:none; font-size:1.5rem; color:#9aa8b5; cursor:pointer; padding:0; line-height:1; }
.jmc-close:hover { color:#5a6872; }
.jmc-body { padding:24px; }
.jm-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px 16px; margin-bottom:8px; }
.jm-field { display:flex; flex-direction:column; }
.jm-label { font-size:12px; font-weight:600; color:#5a6872; text-transform:uppercase; letter-spacing:0.3px; margin-bottom:5px; }
.jm-input { height:40px; border:1.5px solid #e0e4e8; border-radius:6px; padding:0 12px; font-size:14px; color:#2c3e50; background:#fff; transition:border-color .2s; outline:none; width:100%; box-sizing:border-box; font-family:inherit; }
.jm-input:focus { border-color:#689F38; box-shadow:0 0 0 3px rgba(104,159,56,0.12); }
select.jm-input { appearance:none; -webkit-appearance:none; -moz-appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a9ba8' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 10px center; padding-right:30px; cursor:pointer; }
.jm-input-money { padding-left:28px !important; }
.jm-textarea { height:auto; min-height:80px; padding:10px 12px; resize:vertical; }
.jm-money-input { position:relative; }
.jm-currency { position:absolute; left:12px; top:50%; transform:translateY(-50%); font-size:14px; color:#8a9ba8; font-weight:500; z-index:1; pointer-events:none; }
.jm-search-section { display:flex; align-items:center; gap:12px; margin:16px 0; flex-wrap:wrap; }
.jm-btn-search { display:inline-flex; align-items:center; gap:6px; background:#689F38; color:#fff; border:none; border-radius:6px; padding:9px 18px; font-size:13px; font-weight:500; cursor:pointer; transition:background .2s; white-space:nowrap; }
.jm-btn-search:hover { background:#558b2f; }
.jm-search-hint { font-size:12px; color:#9aa8b5; line-height:1.3; }
.jm-divider { height:1px; background:#f0f0f0; margin:16px 0; }
.jm-footer { display:flex; justify-content:flex-end; gap:10px; padding-top:16px; border-top:1px solid #f0f0f0; margin-top:8px; }
.jm-btn { padding:10px 24px; border-radius:6px; font-size:14px; font-weight:500; cursor:pointer; border:none; transition:all .2s; display:inline-flex; align-items:center; gap:6px; }
.jm-btn-cancel { background:#f5f6f8; color:#5a6872; }
.jm-btn-cancel:hover { background:#e8eaed; }
.jm-btn-submit { background:#689F38; color:#fff; }
.jm-btn-submit:hover { background:#558b2f; }
@media print {
    .justificaciones-page .btn-add, .justificaciones-page .filter-section, .justificaciones-page .pagination-section, .justificaciones-page .action-buttons { display: none !important; }
    .justificaciones-page .main-card { border: none; box-shadow: none; }
    .justificaciones-page th, .justificaciones-page td { border: 1px solid #ddd; padding: 6px; font-size: 11px; }
}
