<style>  
.sidebar.collapsed .nav-header,
.sidebar.collapsed .arrow-icon {
    display: none !important;
}
    .queue-ticket-expired {
        background-color: #f5f5f5 !important;
        border-color: #ccc !important;
        opacity: 0.9;
    }

    .queue-ticket-expired .qt-left {
        background: linear-gradient(135deg, #757575 0%, #9e9e9e 100%) !important;
    }

    .queue-ticket-expired .btn-cancel-queue {
        display: none !important;
    }

    .queue-ticket-expired .qt-value,
    .queue-ticket-expired .qt-label {
        color: #666 !important;
    }
    
    :root {
        --sidebar-bg: #212529;
        --sidebar-text: #ecf0f1;
        --sidebar-hover: #343a40;
        --topbar-bg: #ffffff;
        --body-bg: #f4f6f9;
        --primary-color: #343a40;
        --secondary-color: #0d47a1;
        --accent-color: #1976D2;
        --success-color: #28a745;
        --danger-color: #dc3545;
        --warning-color: #ffc107;
        --text-color: #333;
        --input-border: #ced4da;
        --input-focus: #80bdff;
        --sidebar-width: 260px;
        --sidebar-width-collapsed: 60px;
        --topbar-height: 60px;
        --transition-speed: 0.3s;
    }
   
    .swal2-container {
        z-index: 9999 !important;
    }

    body { 
        font-family: 'Sarabun', sans-serif; 
        margin: 0; 
        padding: 0; 
        background-color: var(--body-bg); 
        color: var(--text-color); 
        overflow-x: hidden; 
    }
    
    * { 
        box-sizing: border-box; 
    }
    
    a { 
        text-decoration: none; 
        color: var(--accent-color); 
    }

    #customLoader { 
        display: none; 
        position: fixed; 
        z-index: 9999; 
        left: 0; 
        top: 0; 
        width: 100%; 
        height: 100%; 
        background-color: rgba(0, 0, 0, 0.4); 
        backdrop-filter: blur(2px); 
        justify-content: center; 
        align-items: center; 
    }
    
    .loader-box { 
        background-color: #1976D2; 
        color: #fff; 
        padding: 20px; 
        border-radius: 8px; 
        width: 300px; 
        text-align: center; 
    }
    
    .loader-track { 
        width: 100%; 
        height: 5px; 
        background: rgba(255,255,255,0.3); 
        border-radius: 3px; 
        position: relative; 
        overflow: hidden; 
        margin-top: 10px; 
    }
    
    .loader-bar { 
        position: absolute; 
        height: 100%; 
        width: 30%; 
        background: #fff; 
        border-radius: 3px; 
        animation: indeterminate 1.5s infinite ease-in-out; 
    }
    
    @keyframes indeterminate { 
        0% { left: -30%; } 
        50% { left: 40%; width: 50%; } 
        100% { left: 100%; width: 30%; } 
    }

    .login-wrapper { 
        display: flex; 
        min-height: 100vh; 
        width: 100%; 
        background-color: #fff; 
        font-family: 'Sarabun', sans-serif; 
        overflow: hidden; 
    }
    
    .login-image-side { 
        flex: 1.2; 
        background-image: url('https://img2.pic.in.th/thm_ubu.jpg'); 
        background-size: cover; 
        background-position: center; 
        position: relative; 
        display: flex; 
        flex-direction: column; 
        justify-content: flex-end; 
        padding: 60px; 
        color: white; 
    }
    
    .login-image-side::before { 
        content: ''; 
        position: absolute; 
        top: 0; 
        left: 0; 
        right: 0; 
        bottom: 0; 
        background: linear-gradient(to bottom, rgba(13, 71, 161, 0.3), rgba(13, 71, 161, 0.95)); 
        z-index: 1; 
    }
    
    .login-image-text { 
        position: relative; 
        z-index: 2; 
        max-width: 650px; 
        animation: fadeInUp 0.8s ease-out; 
    }

    .login-form-side {
        width: 100%;
        max-width: 500px;
        flex-shrink: 0;
        display: block;
        background-color: #ffffff;
        position: relative;
        overflow-y: auto;
        height: 100vh;
    }
    
    .login-form-container {
        width: 100%;
        max-width: 480px;
        margin: 0 auto;
        padding: 60px 30px 40px 30px;
        animation: fadeIn 1s ease-out;
    }
  
    .login-logo {
        width: 80px;
        height: auto;
        display: block;
        margin: 0 auto 15px auto;
        filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
    }

    .modern-input-group {
        position: relative;
        margin-bottom: 25px; 
        text-align: left;
    }
    
    .modern-input {
        width: 100%;
        padding: 12px 15px;
        border: 2px solid #e0e0e0; 
        border-radius: 8px;
        background: none;
        font-family: 'Sarabun', sans-serif;
        font-size: 16px;
        color: #333;
        outline: none;
        transition: border-color 0.3s ease;
        z-index: 1;
    }

    .modern-input:focus,
    .modern-input:not(:placeholder-shown) {
        border-color: var(--secondary-color); 
    }

    .modern-label {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        background-color: #fff; 
        padding: 0 5px;
        color: #999;
        font-size: 16px;
        transition: all 0.3s ease;
        pointer-events: none; 
        z-index: 2;
    }

    .modern-input:focus ~ .modern-label,
    .modern-input:not(:placeholder-shown) ~ .modern-label {
        top: 0;
        font-size: 12px;
        color: var(--secondary-color);
        font-weight: bold;
    }

    .toggle-password-btn {
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        cursor: pointer;
        color: #777;
        z-index: 3;
        background: none;
        border: none;
        padding: 0;
        display: flex;
        align-items: center;
    }

    .toggle-password-btn:hover {
        color: var(--secondary-color);
    }

    .btn-login-new { 
        width: 100%; 
        padding: 12px; 
        background: linear-gradient(135deg, #0d47a1 0%, #1565c0 100%); 
        color: white; 
        border: none; 
        border-radius: 6px; 
        font-size: 16px; 
        font-weight: 700; 
        cursor: pointer; 
        transition: transform 0.2s; 
        box-shadow: 0 4px 6px rgba(13, 71, 161, 0.2); 
    }
    
    .btn-login-new:hover { 
        transform: translateY(-2px); 
    }

    .form-group { 
        margin-bottom: 15px; 
        text-align: left; 
    }
    
    .form-group label { 
        display: block; 
        margin-bottom: 6px; 
        font-weight: 600; 
        font-size: 14px; 
        color: #495057; 
    }
    
    .form-group input, 
    .form-group select, 
    .form-group textarea { 
        width: 100%; 
        padding: 10px 12px; 
        border: 1px solid var(--input-border); 
        border-radius: 6px; 
        font-family: 'Sarabun'; 
        font-size: 14px; 
        background-color: #fff;
        transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    }
    
    .form-group input:focus, 
    .form-group select:focus, 
    .form-group textarea:focus { 
        border-color: var(--input-focus); 
        outline: 0; 
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); 
    }
    
    .form-group input[readonly] { 
        background-color: #e9ecef; 
        opacity: 1; 
        cursor: not-allowed; 
    }
    
    .floating-input { 
        width: 100%; 
        padding: 12px 14px; 
        border: 1px solid #ccc; 
        border-radius: 6px; 
        font-size: 14px; 
        font-family: 'Sarabun'; 
        outline: none; 
        background: #fff; 
        transition: all 0.3s; 
    }
    
    .floating-input:focus { 
        border-color: #0d47a1; 
        box-shadow: 0 0 0 2px rgba(13, 71, 161, 0.1); 
    }
    
    .input-group-password { 
        position: relative; 
    }
    
    .input-group-password input { 
        padding-right: 40px; 
    }
    
    .toggle-password { 
        position: absolute; 
        right: 10px; 
        top: 50%; 
        transform: translateY(-50%); 
        cursor: pointer; 
        color: #777; 
    }

    .form-row { 
        display: grid; 
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
        gap: 15px; 
        margin-bottom: 5px; 
    }
    
    .form-row.address-row { 
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); 
    }

    .form-section-title { 
        color: var(--secondary-color); 
        font-size: 18px; 
        font-weight: bold; 
        margin-top: 30px; 
        margin-bottom: 20px; 
        border-left: 4px solid var(--accent-color); 
        padding-left: 10px; 
        background: #f8f9fa; 
        padding: 10px; 
        border-radius: 0 6px 6px 0; 
    }
    
    .form-subheading { 
        text-align: left; 
        font-weight: bold; 
        color: var(--secondary-color); 
        border-bottom: 2px solid #eee; 
        padding-bottom: 5px; 
        margin-top: 20px; 
        margin-bottom: 15px; 
        font-size: 16px; 
    }

    .app-wrapper { 
        display: flex; 
        min-height: 100vh; 
    }
    
    .sidebar { 
        width: var(--sidebar-width); 
        background-color: var(--sidebar-bg); 
        color: var(--sidebar-text); 
        display: flex; 
        flex-direction: column; 
        position: fixed; 
        top: 0; 
        left: 0; 
        height: 100%; 
        transition: width var(--transition-speed); 
        z-index: 1000; 
        overflow-y: auto; 
    }
    
    .sidebar.collapsed { 
        width: var(--sidebar-width-collapsed); 
    }
    
    .sidebar.collapsed .nav-header {
        display: none;
    }
    
    .sidebar-header { 
        height: var(--topbar-height); 
        display: flex; 
        align-items: center; 
        padding: 0 20px; 
        background-color: rgba(0,0,0,0.1); 
        border-bottom: 1px solid #4b4b4b; 
        white-space: nowrap; 
        overflow: hidden;
    }
    
    .sidebar-logo { 
        height: 40px; 
        width: auto; 
        margin-right: 10px; 
    }
    
    .sidebar-menu { 
        list-style: none; 
        padding: 10px 0; 
        margin: 0; 
    }
    
    .nav-link { 
        display: flex; 
        align-items: center; 
        padding: 12px 20px; 
        color: #cfd8dc; 
        transition: all 0.2s; 
        border-left: 4px solid transparent; 
        cursor: pointer; 
        white-space: nowrap; 
        overflow: hidden; 
        text-decoration: none;
    }
    
    .nav-link:hover, .nav-link.active { 
        background-color: var(--sidebar-hover); 
        color: #fff; 
        border-left-color: var(--secondary-color); 
    }
    
    .nav-link i { 
        min-width: 24px; 
        margin-right: 15px; 
        font-size: 20px; 
        text-align: center; 
    }
    
    .nav-header { 
        font-size: 12px; 
        color: #aaa; 
        padding: 5px 20px; 
        text-transform: uppercase; 
    }
    
    .main-content-wrapper { 
        flex: 1; 
        margin-left: var(--sidebar-width); 
        transition: margin-left var(--transition-speed); 
        display: flex; 
        flex-direction: column; 
        width: 100%; 
    }
    
    .sidebar.collapsed ~ .main-content-wrapper { 
        margin-left: var(--sidebar-width-collapsed); 
    }
    
    .topbar { 
        height: var(--topbar-height); 
        background-color: var(--topbar-bg); 
        display: flex; 
        justify-content: space-between; 
        align-items: center; 
        padding: 0 20px; 
        box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
        position: sticky; 
        top: 0; 
        z-index: 900; 
    }
    
    .content-body { 
        padding: 30px; 
        flex: 1; 
    }
    
    .card { 
        background: #fff; 
        border-radius: 8px; 
        box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
        padding: 25px; 
        margin-bottom: 20px; 
        border-top: 3px solid var(--secondary-color); 
    }
    
    .section { 
        display: none; 
        animation: fadeIn 0.4s ease-in-out; 
    }
    
    .section.active { 
        display: block; 
    }
    
    h2 { 
        margin-top: 0; 
        color: var(--secondary-color); 
        font-size: 22px; 
        border-bottom: 1px solid #eee; 
        padding-bottom: 10px; 
        margin-bottom: 20px; 
        display: flex; 
        align-items: center; 
        gap: 10px; 
    }

    .table-container { 
        overflow-x: auto; 
    }
    
    .clean-table { 
        width: 100%; 
        border-collapse: separate; 
        border-spacing: 0; 
        border: 1px solid #eee; 
        border-radius: 6px; 
        overflow: hidden; 
        margin-top: 10px; 
    }
    
    .clean-table th { 
        background-color: #f1f3f5; 
        color: #495057; 
        font-weight: 700; 
        padding: 12px 15px; 
        border-bottom: 2px solid #ddd; 
        text-align: left; 
    }
    
    .clean-table td { 
        padding: 12px 15px; 
        border-bottom: 1px solid #eee; 
        vertical-align: middle; 
        color: #333; 
    }
    
    .clean-table tr:hover { 
        background-color: #f8f9fa; 
    }
    
    .btn { 
        display: inline-flex; 
        align-items: center; 
        justify-content: center; 
        font-family: 'Sarabun'; 
        font-weight: 600; 
        padding: 8px 16px; 
        border-radius: 4px; 
        border: none; 
        cursor: pointer; 
        transition: all 0.2s; 
        gap: 5px; 
        font-size: 14px; 
    }
    
    .btn-primary { background-color: var(--secondary-color); color: #fff; }
    .btn-success { background-color: var(--success-color); color: #fff; }
    .btn-danger { background-color: var(--danger-color); color: #fff; }
    .btn-info { background-color: #17a2b8; color: white; }
    .btn-secondary { background-color: #6c757d; color: white; }
    .btn:hover { opacity: 0.9; transform: translateY(-1px); }
    
    .admin-stat-grid { 
        display: grid; 
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
        gap: 20px; 
        margin-bottom: 20px; 
    }
    
    .stat-card { 
        background: #fff; 
        border-radius: 12px; 
        padding: 20px; 
        color: #fff; 
        position: relative; 
        overflow: hidden; 
        box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    }
    
    .stat-title { 
        font-size: 14px; 
        opacity: 0.9; 
        margin-bottom: 10px; 
    }
    
    .stat-value { 
        font-size: 28px; 
        font-weight: 700; 
    }
    
    .bg-blue { background: linear-gradient(135deg, #0d47a1 0%, #42a5f5 100%); }
    .bg-green { background: linear-gradient(135deg, #1b5e20 0%, #66bb6a 100%); }
    .bg-orange { background: linear-gradient(135deg, #e65100 0%, #ffa726 100%); }
    .bg-red { background: linear-gradient(135deg, #c62828 0%, #ef5350 100%); }
    
    .modal { 
        display: none; 
        position: fixed; 
        z-index: 2000; 
        left: 0; 
        top: 0; 
        width: 100%; 
        height: 100%; 
        background-color: rgba(0,0,0,0.5); 
        justify-content: center; 
        align-items: center; 
    }
    
    .modal-content { 
        background: #fff; 
        padding: 30px; 
        border-radius: 8px; 
        width: 90%; 
        max-width: 600px; 
        animation: fadeIn 0.3s; 
        position: relative; 
        max-height: 90vh; 
        overflow-y: auto;
    }
    
    .close-button { 
        position: absolute; 
        top: 15px; 
        right: 20px; 
        font-size: 24px; 
        cursor: pointer; 
        color: #999; 
    }

    .student-card { 
        display: flex; 
        flex-direction: row; 
        background: white; 
        border-radius: 16px; 
        box-shadow: 0 10px 25px rgba(0,0,0,0.1); 
        overflow: hidden; 
        border: 1px solid #e0e0e0; 
        width: 100%; 
        margin: 0 auto; 
        position: relative; 
    }
    
    .student-card-left { 
        flex: 0 0 250px; 
        background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%); 
        display: flex; 
        flex-direction: column; 
        align-items: center; 
        justify-content: center; 
        padding: 30px 20px; 
        border-right: 1px solid #ddd; 
        position: relative; 
    }
    
    .profile-img-container { 
        position: relative; 
        width: 150px; 
        height: 200px; 
        margin-bottom: 15px; 
    }

    .profile-img { 
        width: 100%; 
        height: 100%; 
        border-radius: 0; 
        object-fit: contain; 
        object-position: center;
        border: none;
        box-shadow: none;
        background-color: #fff; 
    }

    .upload-overlay { 
        position: absolute; 
        bottom: 5px; 
        right: 5px; 
        background: var(--secondary-color); 
        color: white; 
        width: 35px; 
        height: 35px; 
        border-radius: 50%; 
        display: flex; 
        align-items: center; 
        justify-content: center; 
        cursor: pointer; 
        box-shadow: 0 2px 5px rgba(0,0,0,0.2); 
        transition: transform 0.2s; 
    }
    
    .upload-overlay:hover { 
        transform: scale(1.1); 
    }
    
    .student-card-right { 
        flex: 1; 
        padding: 30px; 
        display: flex; 
        flex-direction: column; 
        justify-content: center; 
    }
    
    .student-header { 
        border-bottom: 2px solid var(--secondary-color); 
        margin-bottom: 20px; 
        padding-bottom: 10px; 
    }
    
    .student-title-th { 
        font-size: 24px; 
        font-weight: bold; 
        color: var(--primary-color); 
        line-height: 1.2; 
    }
    
    .student-title-en { 
        font-size: 14px; 
        color: #777; 
        margin-top: 5px; 
        text-transform: uppercase; 
        letter-spacing: 1px; 
    }
    
    .info-grid { 
        display: grid; 
        grid-template-columns: 1fr; 
        gap: 15px; 
    }
    
    .info-item { 
        display: flex; 
        border-bottom: 1px dashed #eee; 
        padding-bottom: 8px; 
        align-items: center; 
    }
    
    .info-label { 
        font-weight: 600; 
        color: #666; 
        width: 120px; 
        flex-shrink: 0; 
    }
    
    .info-value { 
        color: #333; 
        font-weight: 500; 
        word-break: break-word; 
    }
    
    .card-footer-logo { 
        position: absolute; 
        bottom: 15px; 
        right: 20px; 
        opacity: 0.1; 
        width: 100px; 
        pointer-events: none; 
    }

    @media (max-width: 900px) {
        .login-wrapper { flex-direction: column; }
        .login-image-side { display: none; }
        
        .login-form-side { 
            max-width: 100%; 
            height: auto; 
            min-height: 100vh;
            padding: 10px; 
        }
        
        .login-form-container {
            padding: 30px 15px; 
        }
        
        .signup-grid { grid-template-columns: 1fr; }
        .full-width { grid-column: span 1; }
    }
    
    @media (max-width: 768px) {
        .student-card { flex-direction: column; }
        .student-card-left { flex: 0 0 auto; border-right: none; border-bottom: 1px solid #ddd; padding: 20px; }
        .student-card-right { padding: 20px; }
        .student-title-th { font-size: 20px; }
        .info-label { width: 100px; font-size: 14px; }
        .info-value { font-size: 14px; }
        .form-row.address-row { grid-template-columns: 1fr 1fr; } 
    }
    
    @media (max-width: 480px) {
        .form-row.address-row { grid-template-columns: 1fr; }
    }

    @keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
    @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
    
    tr[onclick] {
        transition: background-color 0.2s;
    }
    
    tr[onclick]:hover {
        background-color: #bbdefb !important; 
    }
    
    .queue-ticket { 
        background: white; 
        border-radius: 16px; 
        box-shadow: 0 5px 20px rgba(0,0,0,0.15); 
        overflow: hidden; 
        max-width: 350px; 
        margin: 20px auto; 
        border: 1px solid #eee; 
        position: relative; 
    }
    
    .queue-header { 
        background: linear-gradient(135deg, #FF6B6B 0%, #EE5D5D 100%); 
        color: white; 
        padding: 20px; 
        text-align: center; 
    }
    
    .queue-number { 
        font-size: 32px; 
        font-weight: 800; 
        margin: 10px 0; 
        letter-spacing: 2px; 
        text-transform: uppercase; 
    }
    
    .queue-body { padding: 20px; }
    .queue-info-row { display: flex; justify-content: space-between; margin-bottom: 10px; border-bottom: 1px dashed #eee; padding-bottom: 5px; }
    
    .queue-ticket-horizontal {
        display: flex;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        overflow: hidden;
        border: 1px solid #e0e0e0;
        max-width: 600px;
        margin: 0 auto;
    }

    .qt-left {
        background: linear-gradient(135deg, #FF6B6B 0%, #EE5D5D 100%);
        color: white;
        padding: 20px;
        width: 35%; 
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .qt-number {
        font-size: 32px;
        font-weight: 800;
        letter-spacing: 1px;
        margin: 5px 0;
    }

    .qt-right {
        padding: 20px;
        width: 65%; 
        display: flex;
        flex-direction: column;
        justify-content: center;
        position: relative;
    }

    .qt-row {
        display: flex;
        gap: 20px;
        margin-bottom: 15px;
    }

    .qt-info-group { margin-bottom: 10px; }
    .qt-label { font-size: 12px; color: #888; }
    .qt-value { font-size: 16px; font-weight: bold; color: #333; }

    .btn-cancel-queue {
        background-color: #ffebee;
        color: #c62828;
        border: 1px solid #ffcdd2;
        padding: 8px 15px;
        border-radius: 6px;
        cursor: pointer;
        font-family: 'Sarabun';
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        transition: all 0.2s;
        margin-top: 10px;
        width: 100%;
    }
    
    .btn-cancel-queue:hover {
        background-color: #ef9a9a;
        color: white;
    }

    @media (max-width: 600px) {
        .queue-ticket-horizontal { flex-direction: column; }
        .qt-left, .qt-right { width: 100%; }
        .qt-row { flex-direction: column; gap: 0; }
    }

    .slot-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
        gap: 25px;
        padding: 20px 5px;
    }

    .slot-card {
        background: #ffffff;
        border-radius: 24px; 
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); 
        border: 1px solid rgba(0,0,0,0.04);
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
        position: relative;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .slot-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    }

    .slot-card.full {
        filter: grayscale(100%);
        opacity: 0.7;
        pointer-events: none;
    }

    .slot-header {
        padding: 20px 25px 10px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .slot-date {
        font-size: 15px;
        color: #888;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .slot-status-badge {
        font-size: 12px;
        padding: 6px 12px;
        border-radius: 30px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .badge-available { background: #e0f2f1; color: #00695c; }
    .badge-warning   { background: #fff3e0; color: #ef6c00; }
    .badge-full      { background: #ffebee; color: #c62828; }

    .slot-body {
        padding: 10px 25px 25px;
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .slot-time {
        font-size: 36px; 
        font-weight: 900;
        margin: 10px 0;
        background: linear-gradient(45deg, #1976D2, #42a5f5); 
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        letter-spacing: -1px;
    }

    .quota-info {
        width: 100%;
        margin-top: 10px;
    }

    .quota-labels {
        display: flex;
        justify-content: space-between;
        font-size: 14px;
        color: #555;
        margin-bottom: 8px;
        font-weight: 500;
    }

    .modern-progress-track {
        height: 12px;
        background: #f1f3f5;
        border-radius: 10px;
        overflow: hidden;
        position: relative;
    }

    .modern-progress-bar {
        height: 100%;
        border-radius: 10px;
        background: linear-gradient(90deg, #4caf50, #81c784);
        box-shadow: 0 2px 5px rgba(76, 175, 80, 0.3);
        transition: width 0.6s ease;
    }

    .btn-book-slot {
        margin-top: 25px;
        width: 100%;
        padding: 14px;
        border: none;
        border-radius: 12px;
        font-family: 'Sarabun', sans-serif;
        font-size: 16px;
        font-weight: 700;
        cursor: pointer;
        transition: transform 0.2s, box-shadow 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .btn-book-slot.active {
        background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
        color: white;
        box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
    }

    .btn-book-slot.active:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(33, 150, 243, 0.4);
    }

    .btn-book-slot.disabled {
        background: #e0e0e0;
        color: #9e9e9e;
        cursor: not-allowed;
        box-shadow: none;
    }

    .slot-header {
        background: linear-gradient(to right, #f8f9fa, #fff);
        padding: 15px 20px;
        border-bottom: 1px solid #f0f0f0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .slot-date {
        font-weight: 700;
        color: var(--secondary-color);
        font-size: 16px;
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .slot-status {
        font-size: 12px;
        padding: 4px 10px;
        border-radius: 20px;
        font-weight: 600;
    }

    .status-available { background-color: #e8f5e9; color: #2e7d32; }
    .status-full { background-color: #ffebee; color: #c62828; }

    .slot-body {
        padding: 20px;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .slot-time {
        font-size: 28px;
        font-weight: 800;
        color: #333;
        letter-spacing: 1px;
        margin-bottom: 15px;
    }

    .quota-container {
        width: 100%;
        margin-bottom: 20px;
    }

    .progress-fill {
        height: 100%;
        border-radius: 10px;
        transition: width 0.5s ease;
    }

    .quota-text {
        font-size: 14px;
        color: #666;
        display: flex;
        justify-content: space-between;
    }

    .btn-book-slot {
        width: 100%;
        padding: 12px;
        border: none;
        border-radius: 8px;
        font-weight: 700;
        font-family: 'Sarabun';
        cursor: pointer;
        transition: background 0.2s;
        font-size: 16px;
    }

    .btn-book-slot.active {
        background: linear-gradient(135deg, var(--secondary-color) 0%, #1976D2 100%);
        color: white;
        box-shadow: 0 4px 10px rgba(13, 71, 161, 0.2);
    }
    
    .btn-book-slot.active:hover {
        background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    }

    .btn-book-slot.disabled {
        background-color: #e0e0e0;
        color: #999;
        cursor: not-allowed;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5); 
        z-index: 999; 
        opacity: 0;
        transition: opacity 0.3s;
    }

    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }

    @media (max-width: 900px) {
        .sidebar { 
            margin-left: -260px; 
            box-shadow: 4px 0 15px rgba(0,0,0,0.2); 
        }
        .sidebar.active { 
            margin-left: 0; 
        }
        .main-content-wrapper { 
            margin-left: 0 !important; 
        }
    }

    .activity-header-wrap {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        gap: 15px; 
        flex-wrap: wrap;
    }

    .activity-desc {
        color: #666;
        margin: 0;
        font-size: 15px;
        flex: 1; 
        min-width: 200px; 
    }

    .btn-history-mobile {
        white-space: nowrap;
        padding: 10px 20px;
        border-radius: 30px; 
        box-shadow: 0 4px 10px rgba(23, 162, 184, 0.2);
        font-size: 14px;
        display: flex;
        align-items: center;
        gap: 5px;
    }

    @media (max-width: 600px) {
        .activity-header-wrap {
            flex-direction: column;
            align-items: flex-start;
            background: #f8f9fa; 
            padding: 15px;
            border-radius: 12px;
        }

        .activity-desc {
            font-size: 13px; 
            margin-bottom: 10px;
            width: 100%;
            color: #555;
        }

        .btn-history-mobile {
            width: 100%; 
            justify-content: center; 
            padding: 12px;
            background: linear-gradient(135deg, #17a2b8 0%, #00838f 100%); 
            border: none;
        }
        
        #userActivitySection h2 {
            font-size: 18px;
            margin-bottom: 15px;
        }
    }

    .history-list-wrapper {
        max-height: 60vh; 
        overflow-y: auto;
        padding: 5px;
    }

    .history-card {
        background: #fff;
        border-radius: 12px;
        border: 1px solid #eee;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
        padding: 15px;
        margin-bottom: 15px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        transition: transform 0.2s;
    }

    .history-card:hover {
        transform: translateY(-3px);
        border-color: var(--secondary-color);
        box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    }

    .hist-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px dashed #f0f0f0;
        padding-bottom: 8px;
    }

    .hist-date {
        font-weight: 700;
        color: var(--secondary-color);
        font-size: 15px;
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .hist-time {
        font-size: 13px;
        color: #555;
        background: #f1f3f5;
        padding: 3px 8px;
        border-radius: 6px;
        font-weight: 600;
    }

    .hist-name {
        font-size: 16px;
        color: #333;
        line-height: 1.5;
    }

    .hist-footer {
        display: flex;
        justify-content: flex-end;
    }

    .hist-status {
        font-size: 12px;
        padding: 4px 12px;
        border-radius: 20px;
        font-weight: 700;
        background-color: #e8f5e9;
        color: #2e7d32; 
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .system-title {
        margin-left: 15px; 
        font-weight: bold; 
        font-size: 18px; 
        color: var(--secondary-color);
        white-space: nowrap; 
        overflow: hidden; 
        text-overflow: ellipsis; 
    }

    .user-profile-info {
        text-align: right; 
        font-size: 14px;
    }

    .btn-logout {
        padding: 6px 15px; 
        font-size: 14px; 
        border-radius: 30px; 
        display: flex; 
        align-items: center; 
        gap: 5px;
        height: 38px;
        transition: all 0.2s;
    }

    @media (max-width: 600px) {
        .system-title {
            font-size: 15px;
            margin-left: 10px;
        }

        #topbarUserRole {
            display: none;
        }
        
        #topbarUserName {
            font-size: 13px;
            max-width: 80px; 
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .logout-text {
            display: none;
        }
        
        .btn-logout {
            padding: 0; 
            border-radius: 50%;
            width: 36px;
            height: 36px;
            justify-content: center;
        }
        
        .btn-logout i {
            font-size: 18px; 
            margin: 0;
        }
    }

    .status-badge {
        padding: 4px 10px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: bold;
        display: inline-block;
    }
    
    .badge-show { background-color: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
    .badge-hide { background-color: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }

    .table-progress {
        background-color: #f1f1f1;
        border-radius: 4px;
        height: 6px;
        width: 100%;
        margin-top: 5px;
        overflow: hidden;
    }
    
    .table-progress-bar {
        height: 100%;
        border-radius: 4px;
        transition: width 0.3s ease;
    }

    .action-btn-group {
        display: flex;
        justify-content: center;
        gap: 5px;
    }
    
    .btn-icon-sm {
        width: 30px;
        height: 30px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
        border: none;
        cursor: pointer;
        transition: all 0.2s;
    }
    
    .btn-icon-sm i { font-size: 16px; }

    .btn-edit-sm { background: #fff3e0; color: #ef6c00; }
    .btn-edit-sm:hover { background: #ffe0b2; }

    .btn-toggle-sm { background: #e3f2fd; color: #1976D2; }
    .btn-toggle-sm:hover { background: #bbdefb; }

    .btn-del-sm { background: #ffebee; color: #c62828; }
    .btn-del-sm:hover { background: #ffcdd2; }

    .row-hidden {
        background-color: #f9f9f9;
        color: #999;
    }
    
    .row-hidden td { opacity: 0.7; }

    .queue-tabs-container {
        display: flex;
        gap: 10px;
        margin-bottom: 15px;
        border-bottom: 1px solid #ddd;
        padding-bottom: 10px;
    }

    .queue-tab-btn {
        background: none;
        border: none;
        padding: 8px 16px;
        border-radius: 20px;
        cursor: pointer;
        font-size: 14px;
        color: #666;
        display: flex;
        align-items: center;
        gap: 5px;
        transition: all 0.3s;
        font-family: 'Sarabun', sans-serif;
    }

    .queue-tab-btn:hover {
        background-color: #f0f0f0;
        color: #333;
    }

    .queue-tab-btn.active {
        background-color: var(--secondary-color); 
        color: white;
        font-weight: bold;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }

    .queue-tab-btn i {
        font-size: 18px;
    }

    .badge-full-admin { 
        background-color: #d32f2f; 
        color: white; 
        border: 1px solid #c62828; 
    }

    .text-full {
        color: #d32f2f;
        font-weight: bold;
    }

    .stat-card {
        position: relative; 
        overflow: hidden;   
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        z-index: 1;
    }

    .stat-watermark {
        position: absolute;
        right: -10px;    
        bottom: -15px;   
        font-size: 100px; 
        color: rgba(255, 255, 255, 0.2); 
        transform: rotate(-15deg); 
        pointer-events: none; 
        z-index: 0;      
        transition: all 0.4s ease;
    }

    .stat-title, .stat-value, .stat-unit {
        position: relative;
        z-index: 1; 
        text-shadow: 0 2px 4px rgba(0,0,0,0.1); 
    }

    .stat-card:hover {
        transform: translateY(-5px); 
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    }

    .stat-card:hover .stat-watermark {
        transform: rotate(0deg) scale(1.1); 
        color: rgba(255, 255, 255, 0.3);    
    }

    .app-footer {
        background-color: #fff;
        border-top: 1px solid #e0e0e0;
        padding: 40px 0 20px;
        margin-top: auto; 
        font-size: 14px;
        color: #555;
    }

    .footer-container {
        display: flex;
        flex-wrap: wrap;
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
        gap: 30px;
    }

    .footer-col {
        flex: 1;
        min-width: 280px; 
    }

    .logo-section {
        display: flex;
        gap: 15px;
        align-items: flex-start;
    }

    .footer-logo img {
        width: 60px;
        height: auto;
    }

    .org-name {
        font-weight: bold;
        font-size: 16px;
        color: var(--secondary-color);
        margin-bottom: 5px;
    }

    .org-address {
        font-size: 13px;
        line-height: 1.5;
        color: #777;
    }

    .contact-list {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .contact-item {
        display: flex;
        gap: 10px;
        align-items: flex-start;
    }

    .contact-item i {
        color: var(--secondary-color);
        font-size: 20px;
        margin-top: 2px;
    }

    .contact-label {
        display: block;
        font-size: 12px;
        color: #999;
        font-weight: 600;
    }

    .contact-value {
        font-weight: 500;
        color: #333;
        font-size: 14px;
        display: block;
        transition: color 0.2s;
    }
    
    .contact-value:hover {
        color: var(--secondary-color);
        text-decoration: underline;
    }

    .contact-sub {
        font-size: 12px;
        color: #888;
        display: block;
        margin-top: 2px;
    }

    @media (max-width: 768px) {
        .footer-container {
            flex-direction: column;
            gap: 40px;
        }
        
        .footer-col {
            border-bottom: 1px dashed #eee;
            padding-bottom: 20px;
        }
        
        .footer-col:last-child {
            border-bottom: none;
        }
    }

    .loan-stepper {
        display: flex;
        justify-content: center;
        margin-bottom: 30px;
        position: relative;
    }
    
    .loan-step {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background-color: #e0e0e0;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        position: relative;
        z-index: 2;
        margin: 0 40px;
        transition: all 0.3s;
    }
    
    .loan-step.active {
        background-color: var(--secondary-color);
        box-shadow: 0 4px 10px rgba(13, 71, 161, 0.3);
    }
    
    .loan-step::after {
        content: attr(data-label);
        position: absolute;
        top: 45px;
        font-size: 12px;
        color: #888;
        white-space: nowrap;
        font-weight: normal;
    }
    
    .loan-step.active::after {
        color: var(--secondary-color);
        font-weight: bold;
    }
    
    .loan-stepper::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 200px;
        height: 3px;
        background-color: #e0e0e0;
        z-index: 1;
    }

    .loan-options-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
        margin-top: 20px;
    }

    .loan-option-card {
        background: #fff;
        border: 2px solid #e0e0e0;
        border-radius: 12px;
        padding: 20px;
        cursor: pointer;
        transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
        position: relative;
        overflow: hidden;
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .loan-option-card:hover {
        border-color: #90caf9;
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    }

    .loan-option-card.selected {
        border-color: var(--secondary-color);
        background-color: #e3f2fd;
    }

    .loan-option-card .icon-box {
        width: 50px;
        height: 50px;
        border-radius: 10px;
        background: #f5f5f5;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #666;
        transition: all 0.2s;
    }

    .loan-option-card.selected .icon-box {
        background: var(--secondary-color);
        color: #fff;
    }

    .loan-option-content h4 {
        margin: 0 0 5px 0;
        color: #333;
        font-size: 16px;
    }

    .loan-option-content p {
        margin: 0;
        font-size: 13px;
        color: #777;
    }

    .loan-receipt-card {
        background: #fff;
        border-radius: 16px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.08);
        overflow: hidden;
        border: 1px solid #eee;
        max-width: 500px;
        margin: 0 auto;
        text-align: center;
        position: relative;
    }

    .receipt-header {
        background: linear-gradient(135deg, #2e7d32 0%, #66bb6a 100%);
        padding: 30px 20px;
        color: white;
    }

    .receipt-header i {
        font-size: 50px;
        margin-bottom: 10px;
        background: rgba(255,255,255,0.2);
        border-radius: 50%;
        padding: 10px;
    }

    .receipt-body {
        padding: 30px;
    }

    .receipt-info-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 12px;
        border-bottom: 1px dashed #eee;
        padding-bottom: 12px;
        font-size: 14px;
    }

    .receipt-total {
        background: #f1f8e9;
        padding: 15px;
        border-radius: 8px;
        color: #2e7d32;
        font-weight: bold;
        font-size: 18px;
        margin-top: 20px;
    }

    .status-tag {
        display: inline-block;
        padding: 5px 12px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: bold;
        background: #fff;
        color: #2e7d32;
        margin-top: 10px;
    }

    .admin-search-box {
        background: #ffffff;
        padding: 25px;
        border-radius: 16px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.05);
        border: 1px solid rgba(0,0,0,0.05);
        margin-bottom: 25px;
    }

    .search-wrapper {
        display: flex;
        gap: 15px;
        align-items: center;
    }

    .student-info-card {
        background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
        color: white;
        border-radius: 16px;
        padding: 25px;
        position: relative;
        overflow: hidden;
        margin-bottom: 25px;
        box-shadow: 0 8px 20px rgba(30, 60, 114, 0.25);
        animation: slideDown 0.4s ease-out;
    }

    .student-info-card::after {
        content: '';
        position: absolute;
        top: -50px;
        right: -50px;
        width: 150px;
        height: 150px;
        background: rgba(255,255,255,0.1);
        border-radius: 50%;
    }

    .std-name { font-size: 20px; font-weight: 700; margin-bottom: 5px; }
    .std-id { font-size: 14px; opacity: 0.8; letter-spacing: 1px; background: rgba(0,0,0,0.2); padding: 2px 10px; border-radius: 20px; display: inline-block; margin-bottom: 15px; }
    .std-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; font-size: 14px; }
    .std-detail-item { background: rgba(255,255,255,0.15); padding: 10px 15px; border-radius: 10px; backdrop-filter: blur(5px); }
    .std-label { display: block; font-size: 11px; opacity: 0.7; margin-bottom: 2px; }

    .admin-action-card {
        background: #fff;
        border-radius: 16px;
        padding: 30px;
        box-shadow: 0 4px 25px rgba(0,0,0,0.05);
        border: 1px solid #eee;
        animation: fadeInUp 0.5s ease-out;
    }

    .action-header {
        font-size: 18px;
        font-weight: 700;
        color: #333;
        margin-bottom: 25px;
        border-left: 5px solid var(--secondary-color);
        padding-left: 15px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .toggle-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 0;
        border-bottom: 1px dashed #eee;
    }

    .toggle-label { font-weight: 600; color: #444; font-size: 15px; display: flex; align-items: center; gap: 10px; }
    .toggle-icon { width: 35px; height: 35px; border-radius: 8px; background: #f0f2f5; display: flex; align-items: center; justify-content: center; color: #666; }

    .switch {
        position: relative;
        display: inline-block;
        width: 50px;
        height: 28px;
    }
    
    .switch input { opacity: 0; width: 0; height: 0; }
    
    .slider {
        position: absolute;
        cursor: pointer;
        top: 0; left: 0; right: 0; bottom: 0;
        background-color: #ccc;
        transition: .4s;
        border-radius: 34px;
    }
    
    .slider:before {
        position: absolute;
        content: "";
        height: 20px;
        width: 20px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }
    
    input:checked + .slider { background-color: var(--secondary-color); }
    input:checked + .slider:before { transform: translateX(22px); }

    .admin-tuition-box {
        background: #f8f9fa;
        padding: 20px;
        border-radius: 12px;
        margin-top: 15px;
        border: 1px solid #e9ecef;
        display: none; 
        animation: fadeIn 0.3s;
    }

    .admin-total-bar {
        background: #333;
        color: #fff;
        padding: 20px;
        border-radius: 12px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin: 30px 0;
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }

    .btn-action-group {
        display: flex;
        gap: 15px;
    }

    @media (max-width: 600px) {
        .search-wrapper { flex-direction: column; }
        .search-wrapper button { width: 100%; }
        .btn-action-group { flex-direction: column-reverse; }
        .btn-action-group button { width: 100%; }
    }

    .export-container {
        max-width: 900px;
        margin: 0 auto;
    }

    .export-header {
        text-align: center;
        margin-bottom: 40px;
    }

    .export-header h2 {
        font-size: 28px;
        color: #333;
        font-weight: 800;
        margin-bottom: 10px;
        border: none;
        justify-content: center;
    }

    .export-header p {
        color: #666;
        font-size: 16px;
    }

    .report-type-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
        margin-bottom: 30px;
    }

    .report-card-label {
        cursor: pointer;
        position: relative;
    }

    .report-card-label input {
        display: none; 
    }

    .report-card {
        background: #fff;
        border: 2px solid #eee;
        border-radius: 16px;
        padding: 25px;
        text-align: center;
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        height: 100%;
        position: relative;
        overflow: hidden;
    }

    .report-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0,0,0,0.05);
        border-color: #bbdefb;
    }

    .report-icon-wrapper {
        width: 60px;
        height: 60px;
        background: #f5f5f5;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 15px;
        transition: all 0.3s;
    }

    .report-icon-wrapper i {
        font-size: 30px;
        color: #777;
    }

    .report-title {
        font-weight: 700;
        font-size: 16px;
        color: #444;
        margin-bottom: 5px;
    }

    .report-desc {
        font-size: 13px;
        color: #888;
        line-height: 1.4;
    }

    .report-card-label input:checked + .report-card {
        border-color: var(--secondary-color);
        background-color: #f0f7ff;
        box-shadow: 0 8px 20px rgba(25, 118, 210, 0.15);
    }

    .report-card-label input:checked + .report-card .report-icon-wrapper {
        background-color: var(--secondary-color);
        transform: scale(1.1);
    }

    .report-card-label input:checked + .report-card .report-icon-wrapper i {
        color: #fff;
    }

    .report-card-label input:checked + .report-card .report-title {
        color: var(--secondary-color);
    }

    .filter-section {
        background: #ffffff;
        padding: 25px;
        border-radius: 16px;
        border: 1px solid #eee;
        box-shadow: 0 4px 15px rgba(0,0,0,0.03);
        display: flex;
        flex-wrap: wrap;
        align-items: flex-end;
        gap: 20px;
    }

    .filter-group {
        flex: 1;
        min-width: 250px;
    }

    .filter-label {
        display: block;
        font-weight: 700;
        margin-bottom: 8px;
        color: #333;
        font-size: 14px;
    }

    .custom-select-wrapper {
        position: relative;
    }

    .custom-select-wrapper i {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--secondary-color);
        pointer-events: none;
    }

    .custom-select {
        width: 100%;
        padding: 12px 15px 12px 45px; 
        border: 2px solid #e0e0e0;
        border-radius: 10px;
        font-size: 15px;
        font-family: 'Sarabun';
        background: #fff;
        cursor: pointer;
        transition: border-color 0.2s;
        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%23007CB2%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 15px top 50%;
        background-size: 12px auto;
    }

    .custom-select:focus {
        border-color: var(--secondary-color);
        outline: none;
    }

    .btn-download-large {
        background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%);
        color: white;
        border: none;
        padding: 12px 30px;
        border-radius: 10px;
        font-size: 16px;
        font-weight: bold;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
        transition: transform 0.2s, box-shadow 0.2s;
        display: flex;
        align-items: center;
        gap: 8px;
        height: 48px;
    }

    .btn-download-large:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(46, 125, 50, 0.4);
    }

    @media (max-width: 600px) {
        .filter-section { flex-direction: column; align-items: stretch; }
        .btn-download-large { width: 100%; justify-content: center; }
    }

    .suspend-container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .alert-card {
        background: #fff5f5;
        border-radius: 12px;
        border: 1px solid #feb2b2;
        padding: 20px;
    }

    .duplicate-item-card {
        background: #ffffff;
        border-radius: 12px;
        border: 1px solid #e2e8f0;
        margin-bottom: 12px;
        transition: all 0.3s ease;
    }

    .duplicate-item-card:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        border-color: #cbd5e0;
    }

    .duplicate-header {
        padding: 15px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
    }

    .duplicate-body {
        display: none;
        padding: 0 20px 20px;
        border-top: 1px solid #edf2f7;
    }

    .badge-count {
        background: #fed7d7;
        color: #c53030;
        padding: 2px 10px;
        border-radius: 20px;
        font-weight: bold;
        font-size: 12px;
    }

    .search-panel {
        background: #f8fafc;
        padding: 15px;
        border-radius: 8px;
        display: flex;
        gap: 10px;
        margin-bottom: 20px;
    }

    .security-dashboard {
        display: flex;
        flex-direction: column;
        gap: 25px;
    }
    
    .security-card {
        background: #ffffff;
        border-radius: 16px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.04);
        border: 1px solid #edf2f7;
        overflow: hidden;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .security-card:hover {
        box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    }
    
    .security-card-header {
        padding: 20px 25px;
        border-bottom: 1px solid #edf2f7;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .bg-warning-light {
        background: linear-gradient(to right, #fffaf0, #ffffff);
        border-left: 5px solid #ed8936;
    }
    
    .bg-danger-light {
        background: linear-gradient(to right, #fff5f5, #ffffff);
        border-left: 5px solid #e53e3e;
    }
    
    .security-card-body {
        padding: 25px;
    }
    
    .btn-pulse-scan {
        background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
        color: white;
        border: none;
        padding: 12px 25px;
        border-radius: 30px;
        font-size: 15px;
        font-family: 'Sarabun';
        font-weight: bold;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
        animation: pulse-red 2s infinite;
        transition: all 0.3s;
    }
    
    .btn-pulse-scan:hover {
        transform: translateY(-2px);
        animation: none;
        box-shadow: 0 6px 20px rgba(229, 62, 62, 0.5);
    }
    
    @keyframes pulse-red {
        0% { box-shadow: 0 0 0 0 rgba(229, 62, 62, 0.7); }
        70% { box-shadow: 0 0 0 10px rgba(229, 62, 62, 0); }
        100% { box-shadow: 0 0 0 0 rgba(229, 62, 62, 0); }
    }
    
    .btn-outline-gray {
        background: white;
        border: 1px solid #cbd5e0;
        color: #4a5568;
        border-radius: 30px;
        padding: 8px 20px;
        display: flex;
        align-items: center;
        gap: 5px;
        transition: all 0.2s;
    }
    
    .btn-outline-gray:hover {
        background: #f7fafc;
        color: #2d3748;
    }

      /* --- สไตล์ SweetAlert2 แบบมาตรฐาน (เน้นฟอนต์ Sarabun) --- */
      .swal2-popup {
          font-family: 'Sarabun', sans-serif !important;
          border-radius: 8px !important; /* ขอบมนเล็กน้อยแบบมาตรฐาน */
          padding: 1em 1em 1.5em !important;
      }
      .swal2-title {
          font-family: 'Sarabun', sans-serif !important;
          font-size: 24px !important;
          font-weight: 600 !important;
          color: #333 !important;
      }
      .swal2-html-container {
          font-family: 'Sarabun', sans-serif !important;
          font-size: 16px !important;
          color: #555 !important;
          margin-top: 10px !important;
      }
      .swal2-confirm, .swal2-cancel {
          font-family: 'Sarabun', sans-serif !important;
          font-size: 16px !important;
          border-radius: 5px !important; /* ปุ่มขอบมนนิดๆ ตามภาพ */
          padding: 10px 24px !important;
      }

/* จัดระเบียบกล่องเนื้อหาหลักให้เต็มจอ */
.main-content-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh; 
}

/* ให้พื้นที่เนื้อหาขยายเต็มที่เพื่อดัน Footer ลงไป */
.content-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ดัน Footer ไปอยู่ด้านล่างสุดเสมอ */
.app-footer {
    margin-top: auto !important;
    width: 100%;
}
</style>
