/* Member Check-in Custom Styles */
:root {
    --primary-color: #28a745;
    --primary-dark: #218838;
    --secondary-color: #6c757d;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-bg: #f8f9fa;
    --card-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.checkin-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    padding: 2.5rem;
    margin: 1rem auto;
    max-width: 700px;
    border: none;
    position: relative;
    /* JANGAN di-clip, biar card & garis hijau kelihatan utuh */
    overflow: visible;
}


.checkin-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
}

/* Logo Styles - Diperbesar */
.logo-img {
    max-width: 150px; /* Diperbesar dari 80px */
    height: auto;
    margin-bottom: 1.5rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.logo-img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.brand-title {
    color: #2c3e50;
    font-weight: 800; /* Lebih tebal */
    font-size: 2.2rem; /* Diperbesar */
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    letter-spacing: -0.5px;
}

.checkin-title {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.8rem; /* Diperbesar */
    margin-bottom: 2rem;
    position: relative;
}

.checkin-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Header container untuk logo dan teks */
.header-container {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f8f9fa;
}

.form-control, .form-control-lg {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.3rem rgba(40, 167, 69, 0.25);
    background: white;
    transform: translateY(-2px);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    border-radius: 12px;
    padding: 15px 50px;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.5);
    color: white;
}

.btn-submit:active {
    transform: translateY(-1px);
}

/* Table Styles */
.table {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 0;
}

.table th {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    border: none;
    padding: 18px;
    font-weight: 600;
    text-align: center;
    font-size: 1rem;
}

.table td {
    padding: 15px;
    vertical-align: middle;
    border-color: #e9ecef;
    text-align: center;
}

/* Badge Styles */
.badge {
    padding: 10px 15px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Button Styles in Table */
.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.4);
}

/* Modal Styles */
.modal-content {
    border-radius: 18px;
    border: none;
    box-shadow: 0 25px 70px rgba(0,0,0,0.3);
}

.modal-header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    border-radius: 18px 18px 0 0;
    border: none;
    padding: 1.8rem;
}

.modal-title {
    font-weight: 700;
    font-size: 1.4rem;
}

.modal-body {
    padding: 2.5rem;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1.8rem;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1.2rem 1.8rem;
    font-weight: 600;
    font-size: 1rem;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Results Area */
#resultArea {
    margin-top: 1.5rem;
}

/* Responsive Design untuk Logo Besar */
@media (max-width: 768px) {
    .checkin-card {
        padding: 2rem;
        margin: 0.5rem;
    }
    
    .logo-img {
        max-width: 120px; /* Tetap besar di tablet */
        margin-bottom: 1.2rem;
    }
    
    .brand-title {
        font-size: 1.8rem;
    }
    
    .checkin-title {
        font-size: 1.5rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .modal-body {
        padding: 2rem;
    }
    
    .btn-submit {
        padding: 14px 40px;
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    body {
        padding: 15px;
    }
    
    .checkin-card {
        padding: 1.5rem;
        border-radius: 18px;
    }
    
    .logo-img {
        max-width: 100px; /* Tetap terlihat di mobile */
        margin-bottom: 1rem;
    }
    
    .brand-title {
        font-size: 1.6rem;
    }
    
    .checkin-title {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
    
    .form-control, .form-control-lg {
        padding: 12px 15px;
        font-size: 1rem;
    }
    
    .btn-submit {
        width: 100%;
        padding: 14px;
        font-size: 1.1rem;
    }
    
    .table th,
    .table td {
        padding: 12px 10px;
        font-size: 0.85rem;
    }
    
    .modal-header,
    .modal-footer {
        padding: 1.2rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
}

/* Animation */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(25px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes slideIn {
    from { 
        transform: translateX(-100%); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.checkin-card {
    animation: fadeIn 0.8s ease-out;
}

/* Logo animation */
.logo-img {
    animation: pulse 2s ease-in-out infinite;
}

/* Loading State */
.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Status Colors */
.status-pending { background-color: var(--warning-color); color: #000; }
.status-checked { background-color: var(--primary-color); color: white; }
.status-reject { background-color: var(--danger-color); color: white; }
.status-missed { background-color: var(--secondary-color); color: white; }
.status-today { background-color: var(--info-color); color: white; }

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark), #138496);
}

/* Form group spacing */
.form-group {
    margin-bottom: 1.5rem;
}

/* User info section */
.user-info-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    margin-top: 0.5rem;  /* boleh disesuaikan */
}


.user-info-section h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.user-info-section p {
    color: #495057;
    margin-bottom: 0;
}

.user-summary-card {
  background: #f8fafc;
  border-left: 4px solid #22c55e; /* garis hijau di kiri card */
}

.user-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #22c55e, #3b82f6);
  color: #fff;
  font-weight: 600;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
}

/* BARU: Styling untuk modal konfirmasi */
.confirmation-details table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.confirmation-details table td {
    background-color: #fff;
}

.alert-warning {
    border-left: 4px solid #ffc107;
}

.form-check-input:checked {
    background-color: #198754;
    border-color: #198754;
}

/* Styling untuk status HANGUS */
.hangus-status {
    color: #dc3545;
    font-weight: bold;
    font-size: 14px;
}

/* Styling untuk tiket deposit di status Check-in */
.text-success small {
    font-size: 12px;
}

/* Styling untuk alert di dalam table */
.table .alert {
    margin-bottom: 0;
    padding: 8px 12px;
    border-radius: 6px;
}

/* Styling untuk icon ticket */
.fa-ticket-alt {
    font-size: 11px;
}

/* Tambahkan di akhir file CSS */

/* Style untuk input yang invalid */
.is-invalid {
    border-color: #dc3545 !important;
    background-color: #fff8f8 !important;
}

.is-invalid:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Style untuk tiket deposit */
.ticket-deposit-info {
    background-color: #f8f9fa;
    border-left: 4px solid #ffc107;
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 5px;
}

.ticket-deposit-info.success {
    border-left-color: #198754;
    background-color: #f0fff4;
}

.ticket-deposit-info.danger {
    border-left-color: #dc3545;
    background-color: #fff8f8;
}

/* Style untuk status pending */
.pending-ticket {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #856404;
}

/* Style untuk informasi tiket deposit */
.ticket-info {
    font-size: 0.85rem;
    margin-top: 5px;
}

.ticket-info .fa-ticket-alt {
    font-size: 0.8rem;
    width: 14px;
}

/* Style untuk status HANGUS */
.hangus-status {
    color: #dc3545;
    font-weight: bold;
    font-size: 14px;
}

/* Style untuk tiket deposit di status Check-in */
.text-success small {
    font-size: 12px;
}

/* Style untuk alert di dalam table */
.table .alert {
    margin-bottom: 0;
    padding: 8px 12px;
    border-radius: 6px;
}

/* Style untuk informasi reject */
.reject-info {
    background-color: #f8f9fa;
    border-left: 3px solid #dc3545;
    padding: 8px 12px;
    margin-top: 5px;
    border-radius: 4px;
}

.reject-info .fa-exclamation-triangle {
    color: #dc3545;
}

/* Style untuk pending ticket */
.pending-ticket {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #856404;
    background-color: #fff3cd;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8rem;
}

/* Style untuk checked ticket */
.checked-ticket {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #155724;
    background-color: #d4edda;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8rem;
}

/* ===== TABEL RESPONSIVE KHUSUS MOBILE (<=576px) ===== */
@media (max-width: 576px) {

    /* Paksa tabel bagi rata kolom & full width */
    .table {
        width: 100%;
        table-layout: fixed;
    }

    .table th,
    .table td {
        padding: 8px 4px;          /* padding diperkecil */
        font-size: 0.78rem;        /* text diperkecil */
        white-space: nowrap;       /* biar tidak turun 2 baris */
    }

    /* Atur proporsi lebar kolom:
       1: Tanggal
       2: Reward
       3: Tokens
       4: Status & Keterangan
    */
    .table thead th:nth-child(1),
    .table tbody td:nth-child(1) { width: 26%; }

    .table thead th:nth-child(2),
    .table tbody td:nth-child(2) { width: 26%; }

    .table thead th:nth-child(3),
    .table tbody td:nth-child(3) { width: 14%; }

    .table thead th:nth-child(4),
    .table tbody td:nth-child(4) { width: 34%; }

    /* Perkecil badge status di kolom 4 */
    .table td:nth-child(4) .badge {
        display: inline-block;
        padding: 4px 6px;
        font-size: 0.7rem;
        min-width: 0;
    }

    /* Perkecil tombol Claim di kolom 4 */
    .table td:nth-child(4) .btn {
        padding: 6px 10px;
        font-size: 0.75rem;
        white-space: nowrap;
    }
}

/* === DATE CELL DI TABEL CHECKIN (MOBILE FRIENDLY) === */

.date-cell {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
    min-width: 58px;           /* bikin kolom tanggal agak sempit tapi cukup */
}

.date-cell .date-top {
    font-size: 0.85rem;
    font-weight: 600;
}

.date-cell .date-bottom {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Supaya kolom lain nggak nabrak di mobile */
@media (max-width: 576px) {
    .table th,
    .table td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }

    .date-cell {
        min-width: 52px;
    }

    .date-cell .date-top {
        font-size: 0.8rem;
    }

    .date-cell .date-bottom {
        font-size: 0.7rem;
    }

    /* Status & keterangan boleh wrap ke 2 baris */
    td:nth-child(4) {
        white-space: normal;
    }
}

.logo-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 18px;
    margin-bottom: 1.5rem;
}

/* Hilangkan margin bawah bawaan logo di dalam wrapper */
.logo-wrapper .logo-img {
    margin-bottom: 0;
}

.checkin-subtitle {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .checkin-subtitle {
        font-size: 1rem;
    }
}

/* =========================================================
   BUTTON CLAIM REWARD TOKEN & BACK LINK
   ========================================================= */
.btn-token-claim {
    background: linear-gradient(135deg, var(--warning-color), #ff9800);
    border: none;
    border-radius: 12px;
    padding: 10px 32px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 6px 18px rgba(255, 193, 7, 0.45);
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.btn-token-claim:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(255, 193, 7, 0.6);
}

/* Link "Kembali ke halaman Check-in" */
.back-to-checkin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--secondary-color);
    text-decoration: none;
    margin-top: 1.5rem;
    transition: all 0.2s ease;
}

.back-to-checkin:hover {
    color: var(--primary-dark);
    transform: translateY(-1px);
}

/* HISTORY CLAIM TOKEN TABLE (MOBILE SCROLL) */
.history-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    display: block;
}

/* Biar semua kolom tetap table-cell dan tidak di-hide */
.history-table-wrapper table {
    min-width: 1000px;  /* 8 kolom: Waktu s/d Rejected At */
    white-space: nowrap;
    table-layout: auto;
}

.history-table-wrapper table th,
.history-table-wrapper table td {
    display: table-cell !important;
}

/* Pastikan di mobile nggak ada rules lain yang “nge-card-in” tabel */
@media (max-width: 768px) {
    .history-table-wrapper table {
        width: 100%;
    }
}

.claim-description p:last-child {
    margin-bottom: 0;
}

