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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    min-height: 100vh;
}

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
}

.login-card h1 {
    text-align: center;
    color: #1e3a5f;
    margin-bottom: 8px;
    font-size: 24px;
}

.login-card .subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 30px;
    font-size: 14px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #2d5a87;
    box-shadow: 0 0 0 3px rgba(45, 90, 135, 0.1);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background-color: #1e3a5f;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background-color: #2d5a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

.btn-success {
    background-color: #059669;
    color: white;
}

.btn-success:hover {
    background-color: #047857;
}

.btn-success:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-danger {
    background-color: #dc2626;
    color: white;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* Navbar */
.navbar {
    background: white;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    font-size: 18px;
    font-weight: 700;
    color: #1e3a5f;
}

.navbar-info {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: #6b7280;
}

.navbar-info .sucursal-badge {
    background: #e0e7ff;
    color: #3730a3;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.btn-logout {
    background: none;
    border: 1px solid #d1d5db;
    padding: 8px 16px;
    border-radius: 6px;
    color: #6b7280;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

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

/* Main content */
.main-content {
    max-width: 900px;
    margin: 32px auto;
    padding: 0 24px;
}

/* Search section */
.search-section {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.search-section h2 {
    color: #1e3a5f;
    margin-bottom: 16px;
    font-size: 18px;
}

.search-form {
    display: flex;
    gap: 12px;
}

.search-form input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-form input:focus {
    outline: none;
    border-color: #2d5a87;
    box-shadow: 0 0 0 3px rgba(45, 90, 135, 0.1);
}

.search-form .btn {
    white-space: nowrap;
}

/* Result card */
.result-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.result-card-header {
    padding: 24px 32px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-card-header h3 {
    color: #1e3a5f;
    font-size: 20px;
}

.result-card-body {
    padding: 24px 32px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item .label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    font-weight: 600;
}

.info-item .value {
    font-size: 15px;
    color: #1f2937;
    font-weight: 500;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.status-pendiente {
    background: #fef3c7;
    color: #92400e;
}

.status-pagado {
    background: #d1fae5;
    color: #065f46;
}

/* Stats section */
.stats-section {
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.stats-section h4 {
    color: #374151;
    margin-bottom: 12px;
    font-size: 14px;
}

.stats-total {
    font-size: 24px;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 12px;
}

.stats-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stats-detail .stat-item {
    background: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    border: 1px solid #e5e7eb;
}

.stats-detail .stat-item strong {
    color: #1e3a5f;
}

/* Payment section */
.payment-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #f3f4f6;
}

.payment-confirmed {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #065f46;
    font-size: 14px;
}

.payment-confirmed .icon {
    font-size: 18px;
}

/* Alert messages */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Not found */
.not-found {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.not-found .icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.not-found h3 {
    color: #6b7280;
    margin-bottom: 8px;
}

.not-found p {
    color: #9ca3af;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .main-content {
        padding: 0 16px;
        margin: 16px auto;
    }

    .search-form {
        flex-direction: column;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .result-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}


/* Navigation links */
.navbar-nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:hover {
    background: #f3f4f6;
    color: #1e3a5f;
}

/* Page header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h2 {
    color: #1e3a5f;
    font-size: 22px;
}

/* Table styles */
.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #f8fafc;
}

.data-table th {
    padding: 14px 20px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
}

.data-table td {
    padding: 14px 20px;
    font-size: 14px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

.data-table .actions {
    display: flex;
    gap: 8px;
}

.empty-state {
    text-align: center;
    color: #9ca3af;
    padding: 40px 20px !important;
}

/* Form card */
.form-card {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    max-width: 600px;
}

.form-card h2 {
    color: #1e3a5f;
    margin-bottom: 24px;
    font-size: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group select:focus {
    outline: none;
    border-color: #2d5a87;
    box-shadow: 0 0 0 3px rgba(45, 90, 135, 0.1);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* Responsive tables */
@media (max-width: 768px) {
    .navbar-nav {
        display: none;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}


/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease;
}

.modal-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.modal-title {
    color: #1e3a5f;
    font-size: 20px;
    margin-bottom: 12px;
}

.modal-text {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 28px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-actions .btn {
    min-width: 140px;
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.toast-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* Payment details */
.payment-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.payment-meta {
    font-size: 13px;
    color: #6b7280;
}


/* Filter section */
.filter-section {
    background: white;
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-input {
    flex: 1;
    min-width: 250px;
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-input:focus {
    outline: none;
    border-color: #2d5a87;
    box-shadow: 0 0 0 3px rgba(45, 90, 135, 0.1);
}

.filter-select {
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    min-width: 160px;
}

.filter-select:focus {
    outline: none;
    border-color: #2d5a87;
    box-shadow: 0 0 0 3px rgba(45, 90, 135, 0.1);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.page-numbers {
    display: flex;
    gap: 4px;
    align-items: center;
}

.page-link {
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    transition: all 0.2s;
}

.page-link:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.page-link.active {
    background: #1e3a5f;
    color: white;
    border-color: #1e3a5f;
}

.page-ellipsis {
    padding: 8px 6px;
    color: #9ca3af;
}

.pagination-info {
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
    color: #6b7280;
}

/* Total badge */
.total-badge {
    background: #f3f4f6;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: #4b5563;
    font-weight: 500;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
    }

    .filter-input,
    .filter-select {
        width: 100%;
        min-width: unset;
    }

    .page-header-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* Version page */
.version-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.version-card {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.version-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.version-number {
    font-size: 32px;
    font-weight: 700;
    color: #1e3a5f;
}

.version-env {
    background: #e0e7ff;
    color: #3730a3;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.git-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.git-item {
    font-size: 14px;
    color: #374151;
}

.git-label {
    font-weight: 600;
    color: #6b7280;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.git-commit {
    font-family: monospace;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
}

.release-notes-section {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.release-notes-section h3 {
    color: #1e3a5f;
    margin-bottom: 16px;
}

.release-selector select {
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    margin-bottom: 20px;
}

.release-rendered {
    padding: 8px 0;
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
}

.release-rendered h1 {
    font-size: 22px;
    color: #1e3a5f;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.release-rendered h2 {
    font-size: 18px;
    color: #1e3a5f;
    margin-top: 24px;
    margin-bottom: 10px;
}

.release-rendered h3 {
    font-size: 15px;
    color: #374151;
    margin-top: 20px;
    margin-bottom: 8px;
}

.release-rendered p {
    margin-bottom: 12px;
}

.release-rendered ul {
    padding-left: 24px;
    margin-bottom: 16px;
}

.release-rendered li {
    margin-bottom: 6px;
}

.release-rendered strong {
    color: #1e3a5f;
}

.release-rendered code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'Consolas', monospace;
}

.release-rendered hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 20px 0;
}

.page-info {
    font-size: 14px;
    color: #6b7280;
    padding: 8px 4px;
}


/* Stats cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-card-icon {
    font-size: 36px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f4f8;
    border-radius: 12px;
}

.stat-card-content {
    display: flex;
    flex-direction: column;
}

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e3a5f;
    line-height: 1.2;
}

.stat-card-label {
    font-size: 13px;
    color: #6b7280;
    margin-top: 2px;
}

.stat-card-percent {
    font-size: 14px;
    font-weight: 600;
    color: #059669;
    margin-top: 4px;
}

/* Charts grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 24px;
}

.chart-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.chart-card h3 {
    color: #1e3a5f;
    font-size: 16px;
    margin-bottom: 16px;
}

.chart-container {
    position: relative;
    height: 280px;
}

@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }
}


/* Payment confirmed detail */
.payment-confirmed-detail {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 20px;
}

.payment-confirmed-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #065f46;
    font-size: 15px;
    margin-bottom: 14px;
}

.payment-confirmed-header .icon {
    font-size: 20px;
}

.payment-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.payment-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.payment-info-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    font-weight: 600;
}

.payment-info-value {
    font-size: 14px;
    color: #1f2937;
    font-weight: 500;
}
