@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600&family=Sarabun:wght@300;400;500;600&display=swap');

:root {
    --primary-color: #4e73df;
    --primary-dark: #224abe;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-bg: #f8f9fc;
    --dark-text: #5a5c69;
    --card-shadow: 0 .15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    --hover-shadow: 0 .5rem 2rem 0 rgba(58, 59, 69, 0.15);
}

body {
    font-family: 'Sarabun', sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-text);
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand,
.btn,
.card-header,
th {
    font-family: 'Prompt', sans-serif;
}

/* Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    padding: 0.8rem 1rem;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--primary-color) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    font-weight: 500;
    color: #666 !important;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(78, 115, 223, 0.1);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: rgba(78, 115, 223, 0.05);
    color: var(--primary-color);
}

/* Cards */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: #fff;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hover-shadow);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 1.2rem 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    border-radius: 10px;
    padding: 0.5rem 1.2rem;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    box-shadow: 0 4px 10px rgba(78, 115, 223, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(78, 115, 223, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #e74a3b, #c0392b);
    border: none;
    box-shadow: 0 4px 10px rgba(231, 74, 59, 0.3);
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(231, 74, 59, 0.4);
}

/* Inputs */
.form-control,
.form-select {
    border-radius: 10px;
    padding: 0.7rem 1rem;
    border: 1px solid #d1d3e2;
    background-color: #fdfdfd;
    transition: all 0.2s;
}

.form-control:focus,
.form-select:focus {
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(78, 115, 223, 0.15);
    border-color: #bac8f3;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: rgba(78, 115, 223, 0.05);
    border-bottom: none;
    font-weight: 600;
    color: var(--primary-color);
    padding: 1rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

.table-hover tbody tr {
    transition: background-color 0.2s;
}

.table-hover tbody tr:hover {
    background-color: rgba(78, 115, 223, 0.03);
}

/* Badges */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
    border-radius: 30px;
    letter-spacing: 0.5px;
}

/* Custom Utilities */
.text-primary-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.shadow-sm {
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;
}

.shadow-hover:hover {
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important;
    transform: translateY(-2px);
    transition: all 0.3s;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

main.container,
main.container-fluid {
    padding-top: 2rem;
    padding-bottom: 3rem;
    animation: fadeInUp 0.6s ease-out;
}

.card:nth-child(1) {
    animation-delay: 0.1s;
}

.card:nth-child(2) {
    animation-delay: 0.2s;
}

.card:nth-child(3) {
    animation-delay: 0.3s;
}