:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #10b981;
    --bg-color: #f3f4f6;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-main: #1f2937;
    --text-muted: #6b7280;
}

html {
    font-size: 15px !important;
}

body {
    font-family: 'Kanit', 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
}

h1,
.h1 {
    font-size: 1.8rem !important;
}

h2,
.h2 {
    font-size: 1.5rem !important;
}

h3,
.h3 {
    font-size: 1.25rem !important;
}

h4,
.h4 {
    font-size: 1.1rem !important;
}

h5,
.h5 {
    font-size: 0.95rem !important;
}

h6,
.h6 {
    font-size: 0.85rem !important;
}

/* Auth Pages Background */
.auth-bg {
    background: linear-gradient(135deg, #e0e7ff 0%, #ede9fe 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    transition: transform 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-5px);
}

.auth-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.form-control {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(79, 70, 229, 0.25);
}

/* Premium Gradient Buttons */
.btn-grad-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    border: none !important;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-grad-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.5);
}

.btn-grad-info {
    background: linear-gradient(135deg, #2af598 0%, #009efd 100%);
    color: white !important;
    border: none !important;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 158, 253, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-grad-info:hover {
    background: linear-gradient(135deg, #009efd 0%, #2af598 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 158, 253, 0.4);
}

.btn-grad-success {
    background: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);
    color: white !important;
    border: none !important;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 176, 155, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-grad-success:hover {
    background: linear-gradient(135deg, #96c93d 0%, #00b09b 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 176, 155, 0.4);
}

.btn-grad-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: white !important;
    border: none !important;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(253, 160, 133, 0.4);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-grad-warning:hover {
    background: linear-gradient(135deg, #fda085 0%, #f6d365 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(253, 160, 133, 0.5);
}

.btn-grad-danger {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    background: linear-gradient(135deg, #ff0844 0%, #ffb199 100%);
    color: white !important;
    border: none !important;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(255, 8, 68, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-grad-danger:hover {
    background: linear-gradient(135deg, #ffb199 0%, #ff0844 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(255, 8, 68, 0.4);
}

.btn-grad-secondary {
    background: linear-gradient(135deg, #cfd9df 0%, #e2ebf0 100%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
    background: linear-gradient(135deg, #434343 0%, #000000 100%);
    color: white !important;
    border: none !important;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-grad-secondary:hover {
    background: linear-gradient(135deg, #000000 0%, #434343 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}



/* Dashboard Specifics */
.sidebar {
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    position: fixed;
    width: 260px;
    z-index: 1001;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

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

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

.main-content {
    margin-left: 260px;
    padding: 2rem;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .sidebar {
        left: -260px;
    }

    .sidebar.show {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        padding: 1.5rem;
        padding-top: 5rem;
    }
}

.nav-link {
    color: #4b5563;
    padding: 0.85rem 1.5rem;
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: all 0.3s;
    border-left: 4px solid transparent;
    margin: 2px 0;
    border-radius: 0;
    /* Reset previous border-radius */
}

.nav-link i {
    width: 20px;
    margin-right: 12px;
    font-size: 1.1rem;
    color: #6c757d;
    transition: all 0.3s;
}

.nav-link:hover i {
    color: #0d6efd;
}

.nav-link:hover {
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.05);
    border-left-color: rgba(13, 110, 253, 0.3);
}

.nav-link.active {
    color: #fff !important;
    background: #0d6efd !important;
    border-left-color: #0d6efd !important;
    border-radius: 50px;
    margin: 4px 12px;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
}

.nav-link:hover i,
.nav-link.active i {
    color: inherit;
}

.nav-link.active i {
    color: #fff !important;
}


/* Premium Stat Cards */
.stat-card {
    background: #fff;
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    height: 100%;
}

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

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--primary-color);
}

.stat-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.25rem;
    font-size: 1.75rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon-wrapper {
    transform: scale(1.1) rotate(-5deg);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    line-height: 1;
    color: var(--text-main);
    letter-spacing: -1px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.25rem;
    margin-bottom: 0;
}

/* Stat Variants */
.stat-primary .stat-icon-wrapper {
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
}

.stat-primary::before {
    background: #4f46e5;
}

.stat-warning .stat-icon-wrapper {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.stat-warning::before {
    background: #f59e0b;
}

.stat-purple .stat-icon-wrapper {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.stat-purple::before {
    background: #8b5cf6;
}

.stat-success .stat-icon-wrapper {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stat-success::before {
    background: #10b981;
}

.stat-info .stat-icon-wrapper {
    background: rgba(6, 182, 212, 0.1);
    color: #06b6d4;
}

.stat-info::before {
    background: #06b6d4;
}

/* Dashboard Quick Links */
.quick-link-btn {
    padding: 0.75rem 1.25rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none !important;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.quick-link-btn:hover {
    background: var(--primary-color);
    color: #fff !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -10px rgba(79, 70, 229, 0.5);
}

.quick-link-btn i {
    width: 32px;
    height: 32px;
    border-radius: 0.5rem;
    background: rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.quick-link-btn:hover i {
    background: rgba(255, 255, 255, 0.2);
}

/* Card Typography Overrides */
.card .card-header h5,
.card-header .fw-bold,
.card-title,
.card h5.fw-bold {
    font-size: 0.95rem !important;
}

.card .card-body,
.card table,
.card .table,
.card ul,
.card p,
.card .list-group-item,
.card .small,
.card small {
    font-size: 0.8rem !important;
}

.card .card-body h6,
.card h6.fw-bold {
    font-size: 0.85rem !important;
}

.card .badge {
    font-size: 0.7rem !important;
}