/* style.css - Full Version */

:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #4cc9f0;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --text-dark: #2b2d42;
}

body {
    font-family: 'Sarabun', sans-serif !important;
    background: radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), 
                radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%), 
                radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%);
    background-color: #0f172a;
    background-attachment: fixed;
    background-size: cover;
    color: var(--text-dark);
    min-height: 100vh;
}

/* Background Shapes */
.bg-shape { position: fixed; border-radius: 50%; filter: blur(80px); z-index: 0; animation: floatShape 10s infinite alternate; }
.shape-1 { width: 400px; height: 400px; background: #4361ee; top: -100px; left: -100px; opacity: 0.4; }
.shape-2 { width: 300px; height: 300px; background: #7209b7; bottom: 10%; right: -50px; opacity: 0.4; animation-delay: -2s; }
.shape-3 { width: 250px; height: 250px; background: #4cc9f0; top: 40%; left: 30%; opacity: 0.3; animation-delay: -5s; }
@keyframes floatShape { 0% { transform: translate(0, 0); } 100% { transform: translate(30px, 50px); } }

/* Glass Components */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
}
.glass-card:hover { transform: translateY(-5px); box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.25); }

/* Modal Style Override */
.glass-modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.8);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}
.glass-modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.8);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.bg-light-glass { background: rgba(248, 249, 250, 0.8); }

/* Inputs */
.glass-input, .form-select.glass-input {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #cbd5e0;
    border-radius: 12px;
    padding: 10px 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.glass-input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.15); }
.glass-input-readonly { background: rgba(226, 232, 240, 0.7); cursor: not-allowed; border: 1px solid transparent; border-radius: 12px; }
.glass-input-highlight { background: #fffbeb; border: 1px solid #fcd34d; color: #b45309; border-radius: 12px; }
.glass-input-sm { padding: 6px 10px; font-size: 0.9rem; }
.glass-group .input-group-text { border-radius: 12px 0 0 12px; background: rgba(255,255,255,0.7); border: 1px solid #cbd5e0; border-right: none; }
.glass-group .form-control { border-radius: 0 12px 12px 0; border-left: none; }

/* Dropdown */
.glass-dropdown {
    position: absolute; top: 100%; left: 0; width: 100%;
    background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    max-height: 250px; overflow-y: auto; z-index: 1050; margin-top: 5px; display: none;
}
.glass-dropdown::-webkit-scrollbar { width: 6px; }
.glass-dropdown::-webkit-scrollbar-thumb { background-color: rgba(0,0,0,0.2); border-radius: 10px; }
.search-item { padding: 12px 15px; border-bottom: 1px solid rgba(0,0,0,0.05); cursor: pointer; transition: 0.2s; }
.search-item:hover { background: rgba(67, 97, 238, 0.1); color: var(--primary-color); padding-left: 20px; }

/* Table */
.glass-table { --bs-table-bg: transparent; }
.glass-table thead th { background: linear-gradient(90deg, #4361ee, #4cc9f0); color: white; padding: 15px; border: none; }
.glass-table thead th:first-child { border-top-left-radius: 10px; }
.glass-table thead th:last-child { border-top-right-radius: 10px; }
.glass-table tbody tr { background: rgba(255, 255, 255, 0.6); }
.glass-table tbody tr:hover { background: rgba(255, 255, 255, 0.9); }

/* Buttons & Gradients */
.btn-gradient-primary {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    border: none; color: white; border-radius: 50px; font-weight: 600;
}
.bg-gradient-header { background: linear-gradient(135deg, #3a0ca3, #f72585); }
.text-gradient { background: linear-gradient(to right, #4361ee, #f72585); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* Misc */
.icon-box { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.header-icon-wrapper { width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,0.2); }
.text-shadow { text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.sticky-header thead th { position: sticky; top: 0; z-index: 2; }
.required::after { content: "*"; color: #ef233c; margin-left: 3px; }

/* Animations */
.fade-in-up { animation: fadeInUp 0.8s ease-out forwards; opacity: 0; transform: translateY(20px); }
.fade-in-down { animation: fadeInDown 0.8s ease-out forwards; opacity: 0; transform: translateY(-20px); }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { to { opacity: 1; transform: translateY(0); } }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.hover-lift:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.2) !important; }

/* Modal Animation */
.modal.fade .modal-dialog { transform: scale(0.8); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.modal.show .modal-dialog { transform: scale(1); }