/* Sistema de Pagos - Custom Styles */
:root {
    --sp-primary: #1a73e8;
    --sp-primary-dark: #1557b0;
    --sp-success: #0d9f6e;
    --sp-warning: #e8a817;
    --sp-danger: #dc3545;
    --sp-dark: #1a2332;
    --sp-bg: #f0f2f5;
    --sp-card-radius: 10px;
    --sp-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--sp-card-radius);
    box-shadow: var(--sp-shadow);
    transition: box-shadow 0.2s;
}
.card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.card-header {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background: transparent;
}

/* Stat Cards */
.stat-card {
    border-radius: var(--sp-card-radius);
    padding: 20px;
    color: #fff;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
}
.stat-card .stat-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    opacity: 0.2;
}
.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}
.stat-card .stat-label {
    font-size: 0.82rem;
    opacity: 0.85;
    margin-top: 4px;
}
.stat-bg-primary   { background: linear-gradient(135deg, #1a73e8, #4a90e8); }
.stat-bg-warning   { background: linear-gradient(135deg, #e8a817, #f0c040); }
.stat-bg-success   { background: linear-gradient(135deg, #0d9f6e, #34c88a); }
.stat-bg-info      { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.stat-bg-danger    { background: linear-gradient(135deg, #dc3545, #f06070); }

/* Badges */
.badge-estado {
    padding: 5px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.badge-pendiente {
    background: #fff3cd;
    color: #856404;
}
.badge-pagado {
    background: #d4edda;
    color: #155724;
}

/* Table */
.table thead th {
    border-top: none;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    color: #6b7280;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.table td {
    vertical-align: middle;
}
.table-hover tbody tr:hover {
    background-color: rgba(26,115,232,0.04);
}

/* Buttons */
.btn-primary {
    background: var(--sp-primary);
    border-color: var(--sp-primary);
}
.btn-primary:hover {
    background: var(--sp-primary-dark);
    border-color: var(--sp-primary-dark);
}
.btn-action {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.85rem;
    border: none;
    transition: all 0.15s;
}
.btn-action:hover {
    transform: scale(1.1);
}

/* Form */
.form-control:focus {
    border-color: var(--sp-primary);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
}

/* Filter bar */
.filter-bar {
    background: #fff;
    border-radius: var(--sp-card-radius);
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: var(--sp-shadow);
}
.filter-bar .form-control,
.filter-bar .custom-select {
    border-radius: 8px;
    font-size: 0.88rem;
    height: 38px;
}

/* Comprobante thumbnail */
.comp-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid #e5e7eb;
    transition: border-color 0.2s, transform 0.2s;
}
.comp-thumb:hover {
    border-color: var(--sp-primary);
    transform: scale(1.08);
}
.comp-pdf {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #fee2e2;
    color: #dc2626;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s;
}
.comp-pdf:hover { transform: scale(1.08); }

/* Sidebar tweaks */
.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active {
    background: var(--sp-primary);
    border-radius: 8px;
}
.main-sidebar .nav-sidebar .nav-link {
    border-radius: 8px;
    margin: 2px 8px;
}

/* Modal image */
.modal-comprobante img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 8px;
}

/* Login page */
.login-page {
    background: linear-gradient(135deg, #1a2332 0%, #0f1923 100%);
}
.login-box .card {
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .stat-card .stat-value { font-size: 1.4rem; }
    .stat-card .stat-icon { font-size: 2rem; }
    .filter-bar .row > [class*="col-"] { margin-bottom: 8px; }
    .btn-action { width: 28px; height: 28px; font-size: 0.78rem; }
    .table { font-size: 0.85rem; }
    .comp-thumb, .comp-pdf { width: 36px; height: 36px; }
}
