
:root {
    --app-primary: #4f46e5;
    --app-primary-dark: #3730a3;
    --app-secondary: #7c3aed;
    --app-accent: #06b6d4;
    --app-success: #059669;
    --app-warning: #d97706;
    --app-danger: #dc2626;
    --app-bg: #f5f7fb;
    --app-surface: rgba(255,255,255,.94);
    --app-border: rgba(148,163,184,.20);
    --app-text: #172033;
    --app-muted: #718096;
    --app-radius: 20px;
}

html { scroll-behavior: smooth; }

body {
    min-height: 100vh;
    color: var(--app-text);
    background:
        radial-gradient(circle at 0% 0%, rgba(99,102,241,.13), transparent 28rem),
        radial-gradient(circle at 100% 10%, rgba(124,58,237,.10), transparent 30rem),
        var(--app-bg);
    font-family: "Noto Sans Thai", "Sarabun", system-ui, -apple-system, sans-serif;
}

a { text-decoration: none; }
.container { max-width: 1440px; }

.card,
.dashboard-card,
.stat-card,
.modal-content,
.dropdown-menu {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    box-shadow: 0 10px 30px rgba(15,23,42,.055);
}

.card,
.dashboard-card,
.stat-card { background: var(--app-surface); }

.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(148,163,184,.16);
    font-weight: 800;
}

.btn {
    border-radius: 12px;
    font-weight: 700;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary,
.btn-gradient {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--app-primary), var(--app-secondary));
    box-shadow: 0 8px 18px rgba(79,70,229,.20);
}

.btn-primary:hover,
.btn-gradient:hover {
    color: #fff;
    box-shadow: 0 12px 24px rgba(79,70,229,.28);
}

.btn-outline-primary {
    font-weight: 700;
}

.form-control,
.form-select,
.input-group-text {
    border-color: #dbe2ea;
    border-radius: 12px;
    min-height: 44px;
}

.form-control:focus,
.form-select:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 .22rem rgba(99,102,241,.14);
}

.table {
    --bs-table-bg: transparent;
    vertical-align: middle;
}

.table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: .82rem;
    font-weight: 800;
    border-bottom: 0;
    white-space: nowrap;
}

.table tbody td { padding: 14px 15px; }
.table tbody tr { transition: background .2s ease; }
.table tbody tr:hover { background: #f8faff; }

.badge {
    font-weight: 700;
    letter-spacing: .01em;
}

.page-title,
.section-title {
    color: var(--app-text);
    font-weight: 800;
}

.page-subtitle,
.section-subtitle,
.text-muted {
    color: var(--app-muted) !important;
}

.alert {
    border: 0;
    border-radius: 14px;
}

.progress {
    height: 9px;
    background: #eef2f7;
    border-radius: 20px;
}

.progress-bar {
    border-radius: 20px;
    background: linear-gradient(90deg, var(--app-primary), #8b5cf6);
}

.modal-content {
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid rgba(148,163,184,.16);
    background: linear-gradient(135deg, rgba(79,70,229,.06), rgba(124,58,237,.04));
}

.dropdown-menu {
    padding: 8px;
    border: 1px solid var(--app-border);
}

.dropdown-item {
    border-radius: 10px;
    padding: 10px 12px;
}

.dropdown-item:hover {
    background: #eef2ff;
    color: var(--app-primary-dark);
}

.empty-state {
    padding: 38px 15px;
    text-align: center;
    color: #94a3b8;
}

@media (max-width: 767.98px) {
    .container { padding-left: 15px; padding-right: 15px; }
    .card-body { padding: 18px; }
    .page-title { font-size: 1.45rem; }
    .table { font-size: .9rem; }
}
