/**
 * Frontend styly pro Cervene svetlo - Jednotna aplikace
 */

/* Variables */
:root {
    --cs-primary: #000;
    --cs-primary-hover: #000;
    --cs-success: #28a745;
    --cs-success-hover: #218838;
    --cs-danger: #dc3545;
    --cs-warning: #ffc107;
    --cs-info: #17a2b8;
    --cs-gray: #6c757d;
    --cs-gray-light: #adb5bd;
    --cs-light: #f8f9fa;
    --cs-border: #dee2e6;
    --cs-text: #212529;
    --cs-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Base styles */
.cs-app {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--cs-text);
    line-height: 1.5;
    margin: 40px auto;
}

.cs-section {
    margin-bottom: 30px;
}

/* =========================================
   BUTTONS
   ========================================= */
.cs-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: 1px solid var(--cs-border);
    border-radius: 4px;
    background: #fff;
    color: var(--cs-text);
    cursor: pointer;
    transition: all 0.2s;
}

.cs-btn:hover {
    background: var(--cs-light);
}

.cs-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #ccc !important;
    border-color: #ccc !important;
    color: #666 !important;
}

.cs-btn-primary {
    background: var(--cs-primary);
    border-color: var(--cs-primary);
    color: #fff;
}

.cs-btn-primary:hover {
    background: var(--cs-primary-hover);
    border-color: var(--cs-primary-hover);
    color: #fff;
}

.cs-btn-danger {
    background: var(--cs-danger);
    border-color: var(--cs-danger);
    color: #fff;
}

.cs-btn-danger:hover {
    background: #bd2130;
    border-color: #bd2130;
    color: #fff;
}

.cs-btn-calendar {
    background: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

.cs-btn-calendar:hover {
    background: #5a6268;
    border-color: #545b62;
    color: #fff;
}

.cs-btn-small {
    padding: 5px 12px;
    font-size: 12px;
}

.cs-btn-block {
    display: block;
    width: 100%;
}

.cs-btn-nav {
    padding: 8px 15px;
    font-size: 13px;
}

/* =========================================
   FORMS
   ========================================= */
.cs-form-group {
    margin-bottom: 18px;
}

.cs-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--cs-text);
}

.cs-form-group input[type="text"],
.cs-form-group input[type="email"],
.cs-form-group input[type="password"],
.cs-form-group input[type="tel"] {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--cs-border);
    border-radius: 4px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.cs-form-group input:focus {
    outline: none;
    border-color: var(--cs-primary);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.cs-hint {
    font-size: 12px;
    color: var(--cs-gray);
    margin-top: 4px;
}

/* =========================================
   MESSAGES & NOTICES
   ========================================= */
.cs-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-top: 15px;
}

.cs-message.cs-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cs-message.cs-error,
.cs-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 12px 16px;
    border-radius: 4px;
}

.cs-notice {
    padding: 15px 20px;
    border-radius: 4px;
    margin-top: 20px;
}

.cs-notice-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.cs-notice a {
    color: #0c5460;
    font-weight: 600;
}

.cs-loading {
    text-align: center;
    padding: 40px;
    color: var(--cs-gray);
}

.cs-warning {
    color: #856404;
    background: #fff3cd;
    padding: 10px;
    border-radius: 4px;
}

/* Global message (toast) */
.cs-global-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    max-width: 90%;
    padding: 15px 30px;
    border-radius: 6px;
    box-shadow: var(--cs-shadow);
    font-weight: 500;
}

/* =========================================
   USER BAR
   ========================================= */
.cs-user-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--cs-light) 0%, #fff 100%);
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: var(--cs-shadow);
}

.cs-user-info {
    display: flex;
    align-items: center;
    gap: 25px;
}

.cs-user-greeting {
    color: var(--cs-text);
}

.cs-user-balance-display {
    color: var(--cs-success);
    font-weight: 600;
}

.cs-user-actions {
    display: flex;
    gap: 10px;
}

/* =========================================
   AUTH SECTION (Login/Register Tabs)
   ========================================= */
.cs-auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
}

.cs-tab-btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    background: var(--cs-light);
    border: 1px solid var(--cs-border);
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--cs-gray);
}

.cs-tab-btn:hover {
    background: #e9ecef;
    color: var(--cs-text);
    border-color: var(--cs-gray-light);
}

.cs-tab-btn.cs-tab-active {
    background: #fff;
    color: var(--cs-primary);
    border-color: var(--cs-primary);
    border-bottom-color: var(--cs-primary);
}

.cs-tab-content {
    display: none;
    padding: 30px;
    background: #fff;
    border: 1px solid var(--cs-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
}

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

#cs-auth-section {
    max-width: 450px;
    margin: 0 auto;
}

/* =========================================
   PROFILE SECTION
   ========================================= */

/* Profile Dashboard */
.cs-profile-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.cs-profile-card {
    background: #fff;
    border: 1px solid var(--cs-border);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--cs-shadow);
}

.cs-profile-card-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--cs-border);
}

.cs-profile-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--cs-primary) 0%, #c82333 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
}

.cs-profile-card-title {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--cs-text);
    margin: 0;
}

.cs-profile-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cs-profile-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--cs-light);
}

.cs-profile-info-item:last-child {
    border-bottom: none;
}

.cs-profile-info-label {
    color: var(--cs-gray);
    font-size: 14px;
}

.cs-profile-info-value {
    font-weight: 500;
    color: var(--cs-text);
}

/* Balance Card - special styling */
.cs-profile-card.cs-balance-card {
    background: linear-gradient(135deg, var(--cs-success) 0%, #1e7e34 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 25px;
}

.cs-balance-value {
    font-size: 3.5em;
    font-weight: 700;
    line-height: 1;
    margin: 0;
}

.cs-balance-label {
    font-size: 1.1em;
    opacity: 0.9;
    margin-top: 10px;
}

/* Legacy stat box - keep for compatibility */
.cs-profile-stats {
    margin-bottom: 25px;
}

.cs-stat-box {
    display: inline-block;
    padding: 20px 40px;
    background: linear-gradient(135deg, var(--cs-success) 0%, #1e7e34 100%);
    color: #fff;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--cs-shadow);
}

.cs-stat-box .cs-stat-value {
    display: block;
    font-size: 3em;
    font-weight: 700;
    line-height: 1;
}

.cs-stat-box .cs-stat-label {
    display: block;
    font-size: 0.95em;
    opacity: 0.9;
    margin-top: 5px;
}

/* Profile Tabs */
.cs-profile-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
}

.cs-profile-tab-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    background: var(--cs-light);
    border: 1px solid var(--cs-border);
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    color: var(--cs-gray);
    transition: all 0.2s;
}

.cs-profile-tab-btn:hover {
    background: #e9ecef;
    color: var(--cs-text);
    border-color: var(--cs-gray-light);
}

.cs-profile-tab-btn.cs-tab-active {
    background: #fff;
    color: var(--cs-primary);
    border-color: var(--cs-primary);
    border-bottom-color: var(--cs-primary);
}

.cs-profile-tab-content {
    display: none;
    padding: 25px 0;
}

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

.cs-profile-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--cs-border);
}

#cs-profile-section h3 {
    margin: 0 0 20px 0;
    font-size: 1.5em;
}

#cs-profile-section h4 {
    margin: 25px 0 15px 0;
    font-size: 1.1em;
}

#cs-profile-section hr {
    border: none;
    border-top: 1px solid var(--cs-border);
    margin: 25px 0;
}

/* =========================================
   RESERVATIONS LIST
   ========================================= */
.cs-reservations-list {
    border: 0px solid var(--cs-border);
    border-radius: 8px;
    overflow: hidden;
}

.cs-reservation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--cs-border);
    background: #fff;
    transition: background 0.2s;
}

.cs-reservation-item:last-child {
    border-bottom: none;
}

.cs-reservation-item:hover {
    background: var(--cs-light);
}

.cs-reservation-item.cs-status-cancelled {
    opacity: 0.6;
}

.cs-reservation-info {
    flex: 1;
}

.cs-reservation-date {
    font-weight: 600;
    font-size: 15px;
}

.cs-reservation-time {
    color: var(--cs-gray);
    font-size: 14px;
}

.cs-reservation-status {
    margin: 0 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.cs-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.cs-status-badge.cs-status-confirmed {
    background: #d4edda;
    color: #155724;
}

.cs-status-badge.cs-status-completed {
    background: #cce5ff;
    color: #004085;
}

.cs-status-badge.cs-status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.cs-status-badge.cs-status-no_show {
    background: #fff3cd;
    color: #856404;
}

.cs-reservation-actions {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
    align-items: center;
}

.cs-reservation-credits {
    margin-top: 8px;
    font-size: 14px;
}

.cs-credits-label {
    color: var(--cs-gray);
    font-weight: 500;
}

.cs-credits-used {
    color: var(--cs-text);
}

.cs-credits-used-completed {
    color: #dc3545;
    font-weight: 500;
}

.cs-credits-refunded {
    color: var(--cs-success);
    font-weight: 500;
}

.cs-credits-not-refunded {
    color: #dc3545;
    font-weight: 500;
}

.cs-cancelled-info {
    margin-top: 5px;
    font-size: 12px;
    color: var(--cs-gray);
    font-style: italic;
}

.cs-reservation-item.cs-status-cancelled {
    background: #f8f9fa;
    border-left: 3px solid #dc3545;
}

.cs-reservations-section {
    margin-bottom: 30px;
}

.cs-reservations-section:last-child {
    margin-bottom: 0;
}

.cs-reservations-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--cs-text);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--cs-border);
}

.cs-reservations-section:first-child .cs-reservations-section-title {
    border-bottom-color: var(--cs-success);
}

.cs-reservations-section-list {
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    overflow: hidden;
}

.cs-no-reservations {
    padding: 40px;
    text-align: center;
    color: var(--cs-gray);
}

/* =========================================
   CALENDAR
   ========================================= */
.cs-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 0;
}

.cs-current-week {
    font-size: 18px;
    font-weight: 600;
    color: var(--cs-text);
}

.cs-calendar-grid {
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--cs-shadow);
}

.cs-calendar-day {
    border-bottom: 1px solid var(--cs-border);
}

.cs-calendar-day:last-child {
    border-bottom: none;
}

.cs-day-header {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--cs-light);
    font-weight: 600;
}

.cs-day-name {
    color: var(--cs-text);
}

.cs-day-date {
    color: var(--cs-gray);
}

.cs-day-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px 20px;
    min-height: 60px;
}

/* Slot styles */
.cs-slot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.cs-slot-time {
    display: block;
}

.cs-slot-label {
    font-size: 11px;
    text-transform: uppercase;
    opacity: 0.8;
}

/* Available slot (logged in) */
.cs-slot.cs-slot-available {
    background: var(--cs-success);
    color: #fff;
    cursor: pointer;
}

.cs-slot.cs-slot-available:hover {
    background: var(--cs-success-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Locked slot (not logged in) */
.cs-slot.cs-slot-locked {
    background: #e9ecef;
    color: var(--cs-gray);
    cursor: default;
}

/* Booked slot (by someone else) */
.cs-slot.cs-slot-booked {
    background: var(--cs-gray-light);
    color: #fff;
    cursor: not-allowed;
    opacity: 0.7;
}

/* User's own slot */
.cs-slot.cs-slot-mine {
    background: var(--cs-primary);
    color: #fff;
    cursor: default;
}

.cs-no-slots {
    padding: 20px;
    color: var(--cs-gray);
    font-style: italic;
    width: 100%;
}

/* =========================================
   MODAL
   ========================================= */
.cs-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: rgba(0,0,0,0.6);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cs-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    max-width: 420px;
    width: 100%;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.cs-modal-content h3 {
    margin: 0 0 20px 0;
    font-size: 1.4em;
}

.cs-modal-content p {
    margin: 10px 0;
}

.cs-modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.cs-modal-buttons .cs-btn {
    flex: 1;
}

#cs-booking-details p {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--cs-border);
}

#cs-booking-details p:last-child {
    border-bottom: none;
}

/* =========================================
   SUCCESS MODAL
   ========================================= */
.cs-success-modal-content {
    text-align: center;
    max-width: 450px;
}

.cs-success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--cs-success) 0%, #1e7e34 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #fff;
    margin: 0 auto 20px auto;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.cs-success-modal-content h3 {
    color: var(--cs-success);
    font-size: 1.6em;
    margin-bottom: 5px;
}

.cs-success-subtitle {
    color: var(--cs-gray);
    font-size: 1.1em;
    margin-bottom: 25px;
}

.cs-success-details {
    background: var(--cs-light);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.cs-success-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--cs-border);
}

.cs-success-detail-row:last-child {
    border-bottom: none;
}

.cs-success-label {
    color: var(--cs-gray);
    font-size: 14px;
}

.cs-success-value {
    font-weight: 500;
    color: var(--cs-text);
}

.cs-success-balance {
    background: rgba(40, 167, 69, 0.1);
    border-radius: 6px;
    margin-top: 10px;
    padding: 12px !important;
}

.cs-success-balance .cs-success-value strong {
    color: var(--cs-success);
    font-size: 1.2em;
}

.cs-success-note {
    font-size: 13px;
    color: var(--cs-gray);
    margin-top: 15px;
    font-style: italic;
}

.cs-success-modal-content .cs-modal-buttons {
    flex-direction: column;
}

.cs-success-modal-content .cs-modal-buttons .cs-btn {
    width: 100%;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media screen and (max-width: 768px) {
    .cs-app {
        margin: 25px auto;
    }

    .cs-calendar-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .cs-user-bar {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .cs-user-info {
        flex-direction: column;
        gap: 8px;
    }

    .cs-user-actions {
        width: 100%;
        justify-content: center;
    }

    .cs-day-slots {
        justify-content: center;
    }

    .cs-reservation-item {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .cs-reservation-status {
        margin: 0;
    }

    .cs-modal-buttons {
        flex-direction: column;
    }

    .cs-stat-box {
        width: 100%;
        box-sizing: border-box;
    }

    .cs-profile-dashboard {
        grid-template-columns: 1fr;
    }

    .cs-profile-card {
        padding: 20px;
    }

    .cs-balance-value {
        font-size: 2.8em;
    }

    .cs-profile-tabs {
        flex-direction: column;
    }

    .cs-profile-tab-btn {
        border-bottom: 1px solid var(--cs-border);
    }

    .cs-profile-tab-btn.cs-tab-active {
        border-bottom-color: var(--cs-primary);
    }

    .cs-auth-tabs {
        flex-direction: column;
    }

    .cs-tab-btn.cs-tab-active {
        border-bottom: 1px solid var(--cs-primary);
    }
}

@media screen and (max-width: 480px) {
    .cs-app {
        padding: 0 10px;
    }

    .cs-modal {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
    }

    .cs-modal-content {
        padding: 20px;
        max-height: calc(100vh - 40px);
        margin-bottom: 20px;
    }

    .cs-tab-content {
        padding: 20px;
    }

    .cs-day-header {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }

    .cs-slot {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* =========================================
   PASSWORD RESET STYLES
   ========================================= */

/* Link "Zapomenuté heslo?" */
.cs-link-small {
    font-size: 14px;
    color: #0073aa;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.cs-link-small:hover {
    text-decoration: underline;
    color: #005a87;
}

/* Centrování textu */
.cs-text-center {
    text-align: center;
}

/* Popisek nad formulářem */
.cs-form-description {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Nápověda pod inputem */
.cs-form-help {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Success message specific styling */
.cs-message.cs-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
    padding: 12px;
    border-radius: 4px;
    margin-top: 10px;
    border-left: 4px solid #28a745;
}

.cs-message.cs-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin-top: 10px;
    border-left: 4px solid #dc3545;
}

/* Procedure selection buttons */
.cs-procedure-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}

.cs-procedure-btn {
    width: 100%;
    padding: 15px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.cs-procedure-btn:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.cs-procedure-btn.selected {
    border-color: #0073aa;
    background: #0073aa;
    color: #fff;
}

.cs-procedure-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.cs-procedure-duration {
    font-size: 14px;
    opacity: 0.8;
}

.cs-loading-text, .cs-error-text {
    text-align: center;
    padding: 15px;
    color: #666;
}

/* =========================================
   TOPUP CREDIT MODAL
   ========================================= */

/* Topup button in balance card */
.cs-balance-card .cs-topup-btn {
    margin-top: 20px;
    background: rgba(255,255,255,0.2);
    border: 2px solid #fff;
    color: #fff;
    padding: 12px 24px;
    font-weight: 600;
}

.cs-balance-card .cs-topup-btn:hover {
    background: #fff;
    color: var(--cs-success);
}

/* Topup packages grid */
.cs-topup-packages {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.cs-topup-package {
    background: #fff;
    border: 2px solid var(--cs-border);
    border-radius: 10px;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.cs-topup-package:hover {
    border-color: var(--cs-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.cs-topup-package.cs-selected {
    border-color: var(--cs-success);
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(30, 126, 52, 0.1) 100%);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.cs-package-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--cs-text);
    margin-bottom: 8px;
}

.cs-package-credits {
    font-size: 28px;
    font-weight: 700;
    color: var(--cs-success);
    line-height: 1;
}

.cs-package-price {
    font-size: 18px;
    font-weight: 600;
    color: var(--cs-text);
    margin-top: 8px;
}

.cs-package-unit {
    font-size: 12px;
    color: var(--cs-gray);
    margin-top: 4px;
}

/* Topup modal buttons */
#cs-topup-modal .cs-modal-content {
    max-width: 500px;
}

#cs-topup-modal h3 {
    text-align: center;
    margin-bottom: 10px;
}

.cs-topup-intro {
    text-align: center;
    color: var(--cs-gray);
    margin-bottom: 15px;
}

#cs-topup-error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
}

.cs-topup-info-box {
    background: #e7f3ff;
    border: 1px solid #b3d7ff;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    font-size: 14px;
}

.cs-topup-info-box strong {
    display: block;
    margin-bottom: 8px;
    color: #0056b3;
}

.cs-topup-info-box ul {
    margin: 0;
    padding-left: 20px;
}

.cs-topup-info-box li {
    margin-bottom: 5px;
    color: #333;
}

.cs-topup-info-box li:last-child {
    margin-bottom: 0;
}

/* Topup success modal */
#cs-topup-success-modal .cs-modal-content {
    max-width: 480px;
    text-align: center;
}

.cs-topup-success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--cs-success) 0%, #1e7e34 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #fff;
    margin: 0 auto 20px auto;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

#cs-topup-success-modal h3 {
    color: var(--cs-success);
    font-size: 1.5em;
    margin-bottom: 20px;
}

.cs-topup-summary {
    background: var(--cs-light);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.cs-topup-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--cs-border);
}

.cs-topup-summary-row:last-child {
    border-bottom: none;
}

.cs-topup-summary-label {
    color: var(--cs-gray);
    font-size: 14px;
}

.cs-topup-summary-value {
    font-weight: 600;
    color: var(--cs-text);
}

/* QR code section */
.cs-topup-qr-section {
    margin: 25px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--cs-border);
    border-radius: 10px;
}

.cs-topup-qr-title {
    font-weight: 600;
    color: var(--cs-text);
    margin-bottom: 15px;
}

#cs-topup-qr-image {
    max-width: 200px;
    height: auto;
    margin: 0 auto;
    display: block;
}

.cs-topup-payment-info {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--cs-border);
    text-align: left;
}

.cs-topup-payment-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.cs-topup-payment-label {
    color: var(--cs-gray);
}

.cs-topup-payment-value {
    font-weight: 500;
    color: var(--cs-text);
    font-family: monospace;
}

.cs-topup-note {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border-radius: 8px;
    font-size: 13px;
    color: #856404;
    text-align: left;
}

.cs-topup-note strong {
    display: block;
    margin-bottom: 5px;
}

/* Responsive for topup */
@media screen and (max-width: 480px) {
    .cs-topup-packages {
        grid-template-columns: 1fr;
    }

    .cs-topup-package {
        padding: 15px;
    }

    .cs-package-credits {
        font-size: 24px;
    }

    #cs-topup-qr-image {
        max-width: 160px;
    }
}

/* =========================================
   TOPUP REQUESTS LIST (Frontend)
   ========================================= */

.cs-topup-requests-list {
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    overflow: hidden;
}

.cs-no-requests {
    padding: 40px;
    text-align: center;
    color: var(--cs-gray);
}

.cs-topup-request-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--cs-border);
    background: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.cs-topup-request-item:last-child {
    border-bottom: none;
}

.cs-topup-request-item:hover {
    background: var(--cs-light);
}

.cs-topup-request-item.cs-status-pending {
    border-left: 3px solid var(--cs-warning);
}

.cs-topup-request-item.cs-status-paid {
    border-left: 3px solid var(--cs-info);
}

.cs-topup-request-item.cs-status-approved {
    border-left: 3px solid var(--cs-success);
}

.cs-topup-request-item.cs-status-rejected {
    border-left: 3px solid var(--cs-danger);
    opacity: 0.7;
}

.cs-topup-request-item.cs-status-cancelled {
    border-left: 3px solid var(--cs-gray);
    opacity: 0.7;
}

.cs-request-info {
    flex: 1;
}

.cs-request-package {
    font-weight: 600;
    color: var(--cs-text);
}

.cs-request-date {
    font-size: 13px;
    color: var(--cs-gray);
    margin-top: 3px;
}

.cs-request-price {
    font-weight: 600;
    color: var(--cs-text);
    margin: 0 20px;
    min-width: 80px;
    text-align: right;
}

.cs-request-status {
    min-width: 100px;
    text-align: center;
}

.cs-request-action {
    margin-left: 15px;
}

.cs-request-statuses {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 130px;
}

.cs-request-statuses .cs-status-badge {
    font-size: 11px;
    padding: 3px 8px;
}

/* Status badges for topup */
.cs-status-badge.cs-status-pending {
    background: #fff3cd;
    color: #856404;
}

.cs-status-badge.cs-status-paid {
    background: #d1ecf1;
    color: #0c5460;
}

.cs-status-badge.cs-status-approved {
    background: #d4edda;
    color: #155724;
}

.cs-status-badge.cs-status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.cs-status-badge.cs-status-cancelled {
    background: #e2e3e5;
    color: #383d41;
}

.cs-status-badge.cs-status-unpaid {
    background: #f8d7da;
    color: #721c24;
}

/* Topup detail modal */
.cs-topup-detail-content {
    max-width: 500px;
}

.cs-topup-detail-status {
    text-align: center;
    margin-bottom: 20px;
}

.cs-topup-detail-status .cs-status-badge {
    font-size: 14px;
    padding: 8px 20px;
}

/* Dual status display for topup detail */
.cs-topup-detail-statuses {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--cs-light);
    border-radius: 8px;
}

.cs-status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.cs-status-item-label {
    font-size: 12px;
    color: var(--cs-gray);
    text-transform: uppercase;
}

.cs-qr-image {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 15px auto;
}

@media screen and (max-width: 768px) {
    .cs-topup-request-item {
        flex-wrap: wrap;
        gap: 10px;
    }

    .cs-request-statuses {
        flex-direction: row;
        width: 100%;
        justify-content: flex-start;
    }

    .cs-topup-detail-statuses {
        flex-direction: column;
        gap: 15px;
    }

    .cs-request-price {
        margin: 0;
    }

    .cs-request-status {
        min-width: auto;
    }
}
