/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600;700&family=IBM+Plex+Sans+Thai:wght@300;400;500;600;700&family=Pridi:wght@300;400;500;600;700&family=Kanit:wght@300;400;500;600;700&family=Prompt:wght@300;400;500;600;700&family=Mitr:wght@300;400;500;600;700&family=Chakra+Petch:wght@300;400;500;600;700&family=Bai+Jamjuree:wght@300;400;500;600;700&family=Noto+Sans+Thai:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #60a5fa;
    --primary-hover: #3b82f6;
    --primary-light: #eff6ff;
    --secondary: #0ea5e9;
    --secondary-hover: #0284c7;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;

    --bg-main: #f1f5f9;
    --bg-gradient-start: #eef2ff;
    --bg-gradient-mid: #f0f9ff;
    --bg-gradient-end: #f8fafc;
    --sidebar-bg: #1e293b;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --font-family: 'Sarabun', 'Inter', -apple-system, sans-serif;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

/* Themes */
.theme-pastel-blue {
    --primary: #60a5fa;
    --primary-hover: #3b82f6;
    --primary-light: #eff6ff;
}

.theme-pastel-green {
    --primary: #4ade80;
    --primary-hover: #22c55e;
    --primary-light: #f0fdf4;
}

.theme-pastel-pink {
    --primary: #f472b6;
    --primary-hover: #ec4899;
    --primary-light: #fdf2f8;
}

.theme-pastel-purple {
    --primary: #c084fc;
    --primary-hover: #a855f7;
    --primary-light: #faf5ff;
}

.theme-sunset-terracotta {
    --primary: #e76f51;
    --primary-hover: #d95d3f;
    --primary-light: #fdf0ed;
}

.theme-forest-emerald {
    --primary: #00a896;
    --primary-hover: #028090;
    --primary-light: #e6f6f5;
}

.theme-amber-gold {
    --primary: #fb8500;
    --primary-hover: #e36f00;
    --primary-light: #fff3e6;
}

.theme-lavender-indigo {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #eef2ff;
}

.theme-rose-sakura {
    --primary: #f8ad9d;
    --primary-hover: #f4978e;
    --primary-light: #fff5f3;
}

.theme-slate-obsidian {
    --primary: #475569;
    --primary-hover: #334155;
    --primary-light: #f1f5f9;
}

/* Fonts */
.font-sarabun {
    --font-family: 'Sarabun', 'Inter', -apple-system, sans-serif;
}

.font-apple {
    --font-family: -apple-system, BlinkMacSystemFont, "SF Pro TH", "SF Pro Text", "Helvetica Neue", "Sukhumvit Set", "Inter", "IBM Plex Sans Thai", "Kanit", sans-serif;
}

.font-ibm-plex {
    --font-family: 'IBM Plex Sans Thai', 'Inter', -apple-system, sans-serif;
}

.font-pridi {
    --font-family: 'Pridi', 'Inter', -apple-system, sans-serif;
}

.font-prompt {
    --font-family: 'Prompt', 'Inter', -apple-system, sans-serif;
}

.font-kanit {
    --font-family: 'Kanit', 'Inter', -apple-system, sans-serif;
}

.font-mitr {
    --font-family: 'Mitr', 'Inter', -apple-system, sans-serif;
}

.font-chakra {
    --font-family: 'Chakra Petch', 'Inter', -apple-system, sans-serif;
}

.font-baijamjuree {
    --font-family: 'Bai Jamjuree', 'Inter', -apple-system, sans-serif;
}

.font-noto-sans {
    --font-family: 'Noto Sans Thai', 'Inter', -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    background-image:
        radial-gradient(ellipse at 0% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse at 100% 0%, rgba(14, 165, 233, 0.07) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(16, 185, 129, 0.05) 0%, transparent 55%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Auth Layout (Login Page) */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, rgba(233, 213, 255, 0.05) 90.2%), var(--bg-main);
    padding: 20px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
    padding: 40px;
    transition: transform 0.3s ease;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 14px;
    color: var(--text-muted);
}

.auth-tabs {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 600;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: calc(var(--radius-md) - 2px);
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.auth-tab.active {
    background: var(--card-bg);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

/* Form Styles */
.form-group {
    margin-bottom: 10px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #334155;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 14px;
    background: #f8fafc;
    transition: all 0.2s ease;
    color: var(--text-main);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--card-bg);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 8px;
    text-decoration: none;
    font-family: var(--font-family);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background: #f1f5f9;
    color: #334155;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-block {
    width: 100%;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-info {
    background: var(--info);
    color: white;
}

.btn-info:hover {
    background: #2563eb;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
    gap: 4px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.btn-icon i, .btn-icon svg {
    width: 16px !important;
    height: 16px !important;
}

/* Toast Messages / Alerts */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid transparent;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-left-width: 4px;
    animation: alertSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.3s ease;
}

.alert-danger {
    background: var(--danger-light);
    color: #991b1b;
    border-left-color: var(--danger);
    border-color: rgba(239, 68, 68, 0.15);
}

.alert-success {
    background: var(--success-light);
    color: #065f46;
    border-left-color: var(--success);
    border-color: rgba(16, 185, 129, 0.15);
}

.alert-warning {
    background: var(--warning-light);
    color: #92400e;
    border-left-color: var(--warning);
    border-color: rgba(245, 158, 11, 0.15);
}

.alert-info {
    background: var(--info-light);
    color: #1e40af;
    border-left-color: var(--info);
    border-color: rgba(59, 130, 246, 0.15);
}

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    color: currentColor;
    opacity: 0.6;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transition: all 0.2s;
}

.alert-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.08);
}

.alert.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

/* Dashboard Layout */
.dashboard-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: clip;
}

/* Sidebar (now Top Navbar) Styling */
.sidebar {
    width: 100%;
    background: linear-gradient(to right, var(--primary-hover) 0%, var(--primary) 100%);
    color: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 24px;
    min-height: 70px;
}

/* Mobile specific components (hidden by default on desktop) */
.sidebar-mobile-header {
    display: none;
}

.sidebar-overlay {
    display: none;
}

.sidebar-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    flex-grow: 1;
}

.sidebar-brand {
    padding: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    order: 1;
}

.sidebar-logo-container {
    background: white;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: bold;
    font-size: 18px;
}

.sidebar-brand-name {
    font-weight: 700;
    font-size: 14px;
    color: white;
    line-height: 1.2;
}

.sidebar-user {
    padding: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 0 !important;
    position: relative;
    order: 3;
}

.sidebar-mobile-logout {
    display: none;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.user-info {
    overflow: hidden;
}

.user-name {
    color: white;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-role {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.1);
    padding: 1px 6px;
    border-radius: 9999px;
    display: inline-block;
    color: #38bdf8;
    margin-top: 1px;
}

.sidebar-menu {
    list-style: none;
    padding: 0 16px;
    margin: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    overflow: visible;
    scrollbar-width: none;
    /* Firefox */
    order: 2;
    margin-left: 24px;
    margin-right: 24px;
}

.sidebar-menu::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.sidebar-menu-item {
    margin-bottom: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sidebar-link>i {
    width: 14px;
    height: 14px;
}

.sidebar-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

.sidebar-link.active {
    color: var(--primary);
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sidebar-footer {
    padding: 0;
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    /* Prevents flex items from overflowing */
    overflow-x: clip;
}

.top-bar {
    height: 70px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 40;
}

.page-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.academic-badge {
    background: var(--primary-light);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
}

.content-body {
    padding: 24px;
    flex-grow: 1;
    overflow-y: auto;
    background: transparent;
}

/* Cards & Grid Layouts */
.grid {
    display: grid;
    gap: 16px;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.06),
        0 4px 16px rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.9);
    padding: 12px 20px;
    margin-bottom: 16px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.08),
        0 8px 24px rgba(99, 102, 241, 0.1);
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.06),
        0 4px 16px rgba(99, 102, 241, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.1),
        0 12px 32px rgba(99, 102, 241, 0.12);
}

.stat-card-info h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card-info p {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 4px;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Table Design */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    background-color: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-main);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #f8fafc;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-success {
    background: var(--success-light);
    color: #065f46;
}

.badge-danger {
    background: var(--danger-light);
    color: #991b1b;
}

.badge-warning {
    background: var(--warning-light);
    color: #92400e;
}

.badge-info {
    background: var(--info-light);
    color: #1e40af;
}

/* Action buttons inside table */
.actions-cell,
.action-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: nowrap;
}

.actions-cell form,
.action-buttons form {
    margin: 0;
    display: inline-flex;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-muted);
}

.btn-icon:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-light);
}

.btn-icon-danger:hover {
    color: var(--danger);
    border-color: var(--danger);
    background: var(--danger-light);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.15);
    width: 100%;
    max-width: 550px;
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    padding: 0;
    position: relative;
    overflow: hidden;
    transform: translateY(12px) scale(0.99);
    transition: transform 0.2s cubic-bezier(0.34, 1.1, 0.64, 1);
}

.modal.active .modal-content {
    transform: translateY(0) scale(1);
}

/* modal-box (ใช้ใน club/admin dashboard) */
.modal-box {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.15);
    width: 100%;
    max-width: 550px;
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(12px) scale(0.99);
    transition: transform 0.2s cubic-bezier(0.34, 1.1, 0.64, 1);
}

.modal.active .modal-box {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    color: #ffffff;
    flex-shrink: 0;
}

.modal-title {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-title i {
    color: rgba(255, 255, 255, 0.85);
}

.modal-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    transition: background 0.2s;
    flex-shrink: 0;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

.modal-body {
    padding: 18px 20px;
    overflow-y: auto;
    flex: 1 1 auto;
}

/* ลด gap ใน form-group ภายใน modal */
.modal-body .form-group {
    margin-bottom: 12px;
}

.modal-body .form-label,
.modal-body label {
    font-size: 13px;
    margin-bottom: 4px;
    display: block;
}

.modal-body .form-control {
    padding: 7px 11px;
    font-size: 13px;
}

.modal-body textarea.form-control {
    rows: 2;
    min-height: 60px;
}

/* Form ที่อยู่ภายใน modal-content โดยตรง (ไม่มี modal-body ห่อ) */
.modal-content>form,
.modal-box>form {
    padding: 20px 20px 24px 20px;
    overflow-y: auto;
    flex: 1 1 auto;
}

.modal-content>form .form-group,
.modal-box>form .form-group {
    margin-bottom: 12px;
}

.modal-content>form label,
.modal-box>form label {
    font-size: 13px;
    margin-bottom: 4px;
    display: block;
}

.modal-content>form .form-control,
.modal-box>form .form-control {
    padding: 7px 11px;
    font-size: 13px;
}

/* ปุ่ม submit ท้าย form ใน modal */
.modal-content>form>.btn-block:last-child,
.modal-box>form>.btn-block:last-child {
    margin-top: 8px;
}

/* club dashboard modal-body ที่ form อยู่ใน modal-body */
.modal-body>form {
    display: contents;
}

.modal-footer {
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Tabs inside dashboard pages */
.tab-navigation {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    overflow-x: auto;
}

.tab-nav-btn {
    padding: 12px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-nav-btn:hover {
    color: var(--primary);
}

.tab-nav-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Form layouts */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* Report Card Styles */
.report-card-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.school-brand {
    text-align: left;
}

.student-meta {
    text-align: right;
}

/* Attendance list checker */
.attendance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.attendance-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.attendance-card-header {
    font-weight: 600;
    font-size: 14px;
}

.attendance-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.attendance-radio {
    display: none;
}

.attendance-label {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: white;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.attendance-radio:checked+.attendance-label.lbl-present {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.attendance-radio:checked+.attendance-label.lbl-absent {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.attendance-radio:checked+.attendance-label.lbl-late {
    background: var(--warning);
    color: white;
    border-color: var(--warning);
}

.attendance-radio:checked+.attendance-label.lbl-sick {
    background: var(--info);
    color: white;
    border-color: var(--info);
}

.attendance-radio:checked+.attendance-label.lbl-leave {
    background: #64748b;
    color: white;
    border-color: #64748b;
}

/* Search bar and Filters */
.filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.search-input-group {
    position: relative;
    max-width: 300px;
    width: 100%;
}

/* Medium screen compact adjustments to prevent horizontal scroll / overflow on 1366px and similar laptop screens */
@media (min-width: 993px) and (max-width: 1400px) {
    .sidebar {
        padding: 0 12px !important;
        min-height: 64px !important;
    }

    .sidebar-brand {
        gap: 8px !important;
    }

    .sidebar-logo-container {
        width: 32px !important;
        height: 32px !important;
        font-size: 14px !important;
        border-radius: var(--radius-sm) !important;
    }

    .sidebar-brand-name {
        font-size: 12px !important;
    }

    .sidebar-brand-name span {
        display: none !important;
        /* Hide subtitle to fit small viewports */
    }

    .sidebar-brand-name br {
        display: none !important;
        /* Hide line break as well */
    }

    .sidebar-menu {
        padding: 0 4px !important;
        gap: 2px !important;
    }

    .sidebar-link {
        padding: 6px 6px !important;
        font-size: 11.5px !important;
        gap: 3px !important;
    }

    /* Hide leading menu icons on medium screens to prevent top navbar overflow */
    .sidebar-link > svg:first-of-type,
    .sidebar-link > i:first-of-type,
    .sidebar-link > span > svg:first-of-type,
    .sidebar-link > span > i:first-of-type {
        display: none !important;
    }

    .sidebar-user {
        gap: 8px !important;
        margin-right: 8px !important;
    }

    .user-avatar {
        width: 30px !important;
        height: 30px !important;
        font-size: 12px !important;
    }

    .user-name {
        font-size: 12px !important;
        max-width: 80px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .user-role {
        font-size: 9px !important;
        padding: 1px 4px !important;
    }

    .dropdown-menu {
        min-width: 180px !important;
    }

    .dropdown-item {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
}

/* Responsive top nav and layout */
@media (max-width: 992px) {
    .dashboard-wrapper {
        flex-direction: column;
    }

    /* Override desktop-specific inline grid template columns for responsiveness */
    .grid[style*="grid-template-columns"],
    .form-row[style*="grid-template-columns"],
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    .sidebar {
        width: 100% !important;
        min-height: 60px !important;
        height: 60px !important;
        padding: 0 !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: stretch !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 1001 !important;
        background: linear-gradient(to right, var(--primary-hover) 0%, var(--primary) 100%) !important;
        box-shadow: var(--shadow-md) !important;
    }

    /* Show mobile header bar */
    .sidebar-mobile-header {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        height: 60px !important;
        width: 100% !important;
        padding: 0 16px !important;
        background: linear-gradient(to right, var(--primary-hover) 0%, var(--primary) 100%) !important;
        z-index: 1002 !important;
    }

    .sidebar-mobile-brand {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .sidebar-mobile-brand-name {
        font-size: 15px !important;
        font-weight: 700 !important;
        color: white !important;
        letter-spacing: 0.5px !important;
    }

    .sidebar-mobile-avatar {
        width: 32px !important;
        height: 32px !important;
        border-radius: 50% !important;
        background: rgba(255, 255, 255, 0.1) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: white !important;
        font-weight: 600 !important;
        border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
        font-size: 12px !important;
    }

    .mobile-toggle-btn {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        outline: none !important;
        appearance: none !important;
        -webkit-appearance: none !important;
        color: #94a3b8 !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 6px !important;
        border-radius: var(--radius-sm) !important;
        transition: all 0.2s ease !important;
    }

    .mobile-toggle-btn svg {
        width: 24px !important;
        height: 24px !important;
    }

    .mobile-toggle-btn:hover,
    .mobile-toggle-btn:focus {
        color: white !important;
        background: rgba(255, 255, 255, 0.05) !important;
        outline: none !important;
    }

    /* Hide desktop brand logo inside the drawer/content */
    .sidebar-content .sidebar-brand {
        display: none !important;
    }

    /* Overlay backdrop */
    .sidebar-overlay {
        display: block !important;
        position: fixed !important;
        top: 60px !important;
        left: 0 !important;
        width: 100vw !important;
        height: calc(100vh - 60px) !important;
        background: rgba(15, 23, 42, 0.6) !important;
        backdrop-filter: blur(4px) !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transition: opacity 0.22s ease !important;
        z-index: 999 !important;
    }

    .sidebar-overlay.active {
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    /* Sidebar content as sliding drawer */
    .sidebar-content {
        position: fixed !important;
        top: 60px !important;
        left: -280px !important;
        width: 280px !important;
        height: calc(100vh - 60px) !important;
        background: var(--sidebar-bg) !important;
        box-shadow: var(--shadow-lg) !important;
        z-index: 1000 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        padding: 20px 16px !important;
        gap: 16px !important;
        transition: left 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
        overflow-y: auto !important;
        border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
    }

    .sidebar-content.active {
        left: 0 !important;
    }

    /* Sidebar user profile layout in drawer */
    .sidebar-user {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        padding-bottom: 16px !important;
        margin-right: 0 !important;
        width: 100% !important;
        gap: 12px !important;
        order: 1 !important;
    }

    .sidebar-user .dropdown-toggle {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .sidebar-user .dropdown-toggle i[data-lucide="chevron-down"] {
        display: none !important;
    }

    .sidebar-mobile-logout {
        display: none !important;
    }

    /* Sidebar menu layout in drawer */
    .sidebar-menu {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 6px !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow-x: visible !important;
        flex-grow: 0 !important;
        order: 2 !important;
    }

    .sidebar-menu-item {
        margin-bottom: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }

    .sidebar-link {
        display: flex !important;
        width: 100% !important;
        padding: 10px 14px !important;
        font-size: 14px !important;
    }

    /* Sidebar footer/logout in drawer (hidden on mobile) */
    .sidebar-footer {
        display: none !important;
    }

    .top-bar {
        padding: 0 16px !important;
        height: 60px !important;
    }

    .content-body {
        padding: 16px !important;
    }
}

/* Extra Phone Optimizations */
@media (max-width: 576px) {

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .filters-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .search-input-group {
        max-width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .attendance-grid {
        grid-template-columns: 1fr;
    }

    .top-bar {
        flex-direction: column;
        height: auto;
        padding: 12px 16px;
        align-items: flex-start;
        gap: 8px;
    }

    .academic-badge {
        font-size: 11px;
        padding: 4px 10px;
    }

    .card {
        padding: 16px;
        margin-bottom: 16px;
    }

    .card-title {
        font-size: 14px;
        margin-bottom: 14px;
    }

    th,
    td {
        padding: 12px 10px;
        font-size: 13px;
    }

    .actions-cell,
    .action-buttons {
        flex-wrap: wrap;
    }

    /* Modal บนมือถือ */
    .modal {
        align-items: flex-end;
        padding: 0;
    }

    .modal-box,
    .modal-content {
        max-width: 100%;
        max-height: 92vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
}

.btn-page {
    transition: all 0.2s ease;
}

.btn-page:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    background: var(--primary-light) !important;
}

.btn-page.active:hover {
    color: white !important;
    background: var(--primary) !important;
}

/* Sortable table headers */
.sortable-header {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 24px !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sortable-header:hover {
    background-color: #e2e8f0;
    color: var(--primary);
}

.sortable-header::after {
    content: ' ↕';
    position: absolute;
    right: 8px;
    opacity: 0.4;
    font-size: 11px;
}

.sortable-header.asc::after {
    content: ' ↑';
    opacity: 1;
    color: var(--primary);
}

.sortable-header.desc::after {
    content: ' ↓';
    opacity: 1;
    color: var(--primary);
}

/* Print styles to make reports print-friendly */
@media print {
    body {
        background: white !important;
        color: black !important;
        font-size: 9pt !important;
    }

    .sidebar,
    .sidebar-mobile-header,
    .sidebar-overlay,
    .top-bar,
    .btn,
    .no-print,
    .card.no-print {
        display: none !important;
    }

    .dashboard-wrapper {
        display: block !important;
        min-height: auto !important;
        width: 100% !important;
    }

    .main-content {
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .content-body {
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .card {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        background: transparent !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .table-responsive {
        overflow: visible !important;
        border: none !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    table {
        width: 100% !important;
        max-width: 100% !important;
        border-collapse: collapse !important;
        page-break-inside: auto !important;
        table-layout: auto !important;
    }

    tr {
        page-break-inside: avoid !important;
        page-break-after: auto !important;
    }

    th,
    td {
        border: 1px solid #000 !important;
        color: #000 !important;
        padding: 4px 5px !important;
        background: transparent !important;
        font-size: 8pt !important;
        word-break: break-word !important;
        white-space: normal !important;
    }

    /* Auto scale very wide report tables (like the attendance grid with many dates) */
    .table-responsive table {
        zoom: 0.85;
        /* Shrink to fit perfectly within A4 printable width */
    }

    /* Set page margins to be print-standard but slim */
    @page {
        size: A4 landscape;
        margin: 8mm 6mm;
    }
}

/* Sidebar Dropdown Menu Styles */
.sidebar-menu-item.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--primary-light);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    min-width: 210px;
    list-style: none;
    padding: 6px 0;
    margin-top: 0;
    /* ชิดขอบพอดีเพื่อไม่ให้เมาส์หลุด hover */
    z-index: 1000;
}

/* สะพานเชื่อม hover (Hover Bridge) ป้องกันเมาส์หลุดจากเมนูก่อนชี้ถึง dropdown */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    width: 100%;
    height: 12px;
    background: transparent;
}

.sidebar-menu-item.dropdown:hover .dropdown-menu,
.sidebar-user.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu-right {
    left: auto;
    right: 0;
}

.dropdown-header {
    padding: 6px 16px;
    font-weight: 700;
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    pointer-events: none;
}

.dropdown-divider {
    height: 1px;
    margin: 6px 0;
    overflow: hidden;
    background-color: var(--border-color);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    color: var(--primary-hover);
    background: rgba(0, 0, 0, 0.04);
}

.dropdown-item.active {
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, rgba(79, 70, 229, 0.8) 100%);
}

.dropdown-item i {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* Responsive adjustment for Mobile view drawer */
@media (max-width: 992px) {
    .dropdown-menu {
        position: static !important;
        display: block !important;
        box-shadow: none !important;
        border: none !important;
        background: rgba(0, 0, 0, 0.2) !important;
        margin-top: 4px !important;
        padding-left: 12px !important;
        width: 100% !important;
        border-radius: var(--radius-sm) !important;
    }

    .dropdown-item {
        padding: 8px 12px !important;
        font-size: 13px !important;
        color: rgba(255, 255, 255, 0.85) !important;
    }

    .dropdown-item:hover {
        color: white !important;
        background: rgba(255, 255, 255, 0.1) !important;
    }

    .sidebar-user .dropdown-menu {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        background: transparent !important;
        padding-left: 0 !important;
        margin-top: 4px !important;
    }
    
    .sidebar-user .dropdown-item {
        padding: 10px 14px !important;
        font-size: 14px !important;
        border-radius: var(--radius-md) !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        justify-content: flex-start !important;
    }
    
    .sidebar-user .dropdown-item:hover,
    .sidebar-user .dropdown-item:active {
        background: rgba(255, 255, 255, 0.1) !important;
    }
    
    .sidebar-user .dropdown-item[href="logout.php"] {
        color: #fda4af !important;
        background: rgba(244, 63, 94, 0.1) !important;
        border-color: rgba(244, 63, 94, 0.2) !important;
    }
    
    .sidebar-user .dropdown-item[href="logout.php"]:hover,
    .sidebar-user .dropdown-item[href="logout.php"]:active {
        background: rgba(244, 63, 94, 0.2) !important;
    }
}

/* ==========================================================================
   Modern Toast Notifications & Custom Dialogs System
   ========================================================================== */

#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 380px;
    width: calc(100% - 48px);
}

.toast {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    overflow: hidden;
    transform: translateX(120%);
    animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.fade-out {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
}

.toast-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.toast-content {
    flex-grow: 1;
}

.toast-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2px;
    line-height: 1.4;
}

.toast-message {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-muted);
    opacity: 0.5;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    transition: all 0.2s;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.05);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(0, 0, 0, 0.1);
    transform: scaleX(1);
    transform-origin: left;
    transition: transform linear;
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-success .toast-icon {
    color: var(--success);
}

.toast-success .toast-progress {
    background: var(--success);
}

.toast-error {
    border-left: 4px solid var(--danger);
}

.toast-error .toast-icon {
    color: var(--danger);
}

.toast-error .toast-progress {
    background: var(--danger);
}

.toast-warning {
    border-left: 4px solid var(--warning);
}

.toast-warning .toast-icon {
    color: var(--warning);
}

.toast-warning .toast-progress {
    background: var(--warning);
}

.toast-info {
    border-left: 4px solid var(--info);
}

.toast-info .toast-icon {
    color: var(--info);
}

.toast-info .toast-progress {
    background: var(--info);
}

/* Custom Confirm/Alert Dialog Overlay */
.custom-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.custom-confirm-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.custom-confirm-card {
    background: var(--card-bg, #ffffff);
    border-radius: var(--radius-md, 12px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 90%;
    max-width: 400px;
    padding: 30px 24px;
    text-align: center;
    transform: scale(0.97) translateY(6px);
    transition: transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    border: 1px solid var(--border-color, #e2e8f0);
}

.custom-confirm-overlay.active .custom-confirm-card {
    transform: scale(1) translateY(0);
}

.custom-confirm-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
}

.custom-confirm-icon-wrapper i {
    width: 32px;
    height: 32px;
}

.custom-confirm-icon-wrapper.success {
    background: var(--success-light);
    color: var(--success);
}

.custom-confirm-icon-wrapper.danger {
    background: var(--danger-light);
    color: var(--danger);
}

.custom-confirm-icon-wrapper.warning {
    background: var(--warning-light);
    color: var(--warning);
}

.custom-confirm-icon-wrapper.info {
    background: var(--info-light);
    color: var(--info);
}

.custom-confirm-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.custom-confirm-message {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 24px;
    word-break: break-word;
}

.custom-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.custom-confirm-actions .btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
    height: 40px;
}

/* Animations */
@keyframes alertSlideDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastSlideIn {
    from {
        transform: translateX(120%);
    }

    to {
        transform: translateX(0);
    }
}

/* Student Avatar Hover Zoom Animation */
.student-avatar-container {
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.student-avatar-container:hover {
    z-index: 5 !important;
}

.student-avatar-img {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: zoom-in;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-avatar-container:hover .student-avatar-img {
    transform: scale(1.15);
    box-shadow: 0 0 0 2px var(--primary);
}

/* Responsive Filter Form */
.responsive-filter-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
    margin-left: auto;
}

@media (max-width: 768px) {
    .responsive-filter-form {
        flex-wrap: wrap;
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
        gap: 10px;
    }

    .responsive-filter-form select,
    .responsive-filter-form input,
    .responsive-filter-form .search-input-group,
    .responsive-filter-form button {
        width: 100% !important;
        max-width: none !important;
        flex: 1 1 auto;
    }
}