:root {
    --sidebar-width: 260px;
    --primary-color: #3b82f6; /* Modern Blue */
    --primary-hover: #2563eb;
    --secondary-color: #64748b;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-radius: 8px;
    --box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    --box-shadow-hover: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* M572: the same stack everywhere, named, so a voucher is laid out in
   Prompt or in nothing else. */
body { background-color: var(--light-bg); font-family: 'Prompt', sans-serif; color: var(--text-main); overflow-x: hidden; }

/* 🗂️ Sidebar */
.sidebar { width: var(--sidebar-width); height: 100vh; position: fixed; background: #0f172a; color: #e2e8f0; display: flex; flex-direction: column; z-index: 1050; }
.sidebar-header { padding: 1.5rem 1.5rem; background: rgba(255,255,255,0.02); border-bottom: 1px solid rgba(255,255,255,0.05); }
.sidebar .nav-link { color: #94a3b8; border: none; padding: 12px 25px; border-radius: 0; text-align: left; display: flex; align-items: center; gap: 12px; font-size: 0.95rem; background: transparent; transition: color 0.2s; }
.sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,0.05); }
.sidebar .nav-link.active { color: #fff !important; font-weight: 500; background: rgba(255,255,255,0.05) !important; border-left: 4px solid var(--primary-color); }
.sidebar-divider { margin: 1.5rem 1.5rem 0.5rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: #475569; font-weight: 600; }

/* 🗂️ Main Content */
.main-content { margin-left: var(--sidebar-width); padding: 20px 40px; min-height: 100vh; }

/* Top Bar */
.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid #e2e8f0; }
.search-filter-wrapper { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; display: flex; align-items: center; overflow: hidden; box-shadow: var(--box-shadow); }
.search-filter-wrapper input { border: none; outline: none; padding: 8px 15px; width: 250px; font-size: 0.9rem; }
.search-filter-wrapper select { border: none; border-left: 1px solid #e2e8f0; outline: none; padding: 8px 15px; background: transparent; font-size: 0.9rem; color: var(--text-muted); cursor: pointer; }

/* Summary Row */
.summary-item { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 600; color: var(--text-muted); }
.summary-item i { font-size: 1.1rem; }
.summary-count { background: #f1f5f9; color: var(--text-main); font-size: 0.8rem; min-width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 700; border: 1px solid #e2e8f0; }

/* 📋 List View UI (Horizontal Cards) */
.list-group-header { padding: 10px 0; display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; user-select: none; }
.list-group-header:hover { opacity: 0.8; }
.horizontal-card { background: var(--card-bg); border-radius: 8px; border: 1px solid #e2e8f0; margin-bottom: 8px; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; padding: 12px 15px; box-shadow: var(--box-shadow); }
.horizontal-card:hover { border-color: #cbd5e1; box-shadow: var(--box-shadow-hover); }
.drag-handle { color: #cbd5e1; cursor: grab; padding-right: 15px; }
.drag-handle:hover { color: var(--text-muted); }
.sortable-ghost { opacity: 0.5; background: #f8fafc; border: 1px dashed #cbd5e1; }

/* 🏷️ Badges */
.badge-minimal { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; font-weight: 500; }
.badge-urgent { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; font-weight: 500;}
.badge-high { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; font-weight: 500;}

/* 🪟 Modals & Forms */
.modal-content { border: none; border-radius: 12px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); }
.modal-header { border-bottom: 1px solid #f1f5f9; padding: 1.25rem 1.5rem; background-color: #fff; border-radius: 12px 12px 0 0; }
.modal-footer { border-top: 1px solid #f1f5f9; padding: 1.25rem 1.5rem; background-color: #f8fafc; border-radius: 0 0 12px 12px; }
.form-control, .form-select { border-radius: 6px; border: 1px solid #cbd5e1; padding: 0.5rem 0.8rem; font-size: 0.95rem; }
.form-control:focus, .form-select:focus { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); border-color: var(--primary-color); }
.btn { border-radius: 6px; font-weight: 500; font-size: 0.9rem; padding: 0.5rem 1rem; }
.btn-primary { background-color: var(--primary-color); border-color: var(--primary-color); }

/* --- ส่วนเพิ่มเติมสำหรับหน้า Authentication (auth.html) --- */
.auth-body {
    background-color: var(--light-bg);
    background-image: radial-gradient(circle at top right, #e0f2fe 0%, transparent 40%), 
                      radial-gradient(circle at bottom left, #f1f5f9 0%, transparent 40%);
}

.auth-card {
    width: 100%;
    max-width: 900px;
    min-height: 550px;
    border: 1px solid rgba(0,0,0,0.05);
}

.auth-banner {
    background: linear-gradient(135deg, var(--primary-color), #1e40af);
}

.auth-card .form-control {
    padding: 0.7rem 1rem;
}