/* =========================================================================
   Graduates Directory — Modern UI (gx-*)
   ========================================================================= */
:root {
    --gx-ink: #0f172a;
    --gx-muted: #64748b;
    --gx-faint: #94a3b8;
    --gx-surface: #ffffff;
    --gx-surface-2: #f8fafc;
    --gx-border: rgba(15, 23, 42, 0.08);
    --gx-accent: #2563eb;
    --gx-accent-deep: #1e40af;
    --gx-accent-soft: rgba(37, 99, 235, 0.10);
    --gx-m3: #0284c7;
    --gx-m3-soft: rgba(2, 132, 199, 0.10);
    --gx-m6: #d97706;
    --gx-m6-soft: rgba(217, 119, 6, 0.12);
    --gx-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
    --gx-shadow-hover: 0 2px 4px rgba(15, 23, 42, 0.05), 0 18px 40px rgba(15, 23, 42, 0.12);
    --gx-radius: 18px;
}
[data-theme="dark"], [data-bs-theme="dark"] {
    --gx-ink: #f1f5f9;
    --gx-muted: #94a3b8;
    --gx-faint: #64748b;
    --gx-surface: #111c2e;
    --gx-surface-2: #0b1424;
    --gx-border: rgba(148, 163, 184, 0.14);
    --gx-accent: #3b82f6;
    --gx-accent-soft: rgba(59, 130, 246, 0.14);
    --gx-m3: #38bdf8;
    --gx-m3-soft: rgba(56, 189, 248, 0.14);
    --gx-m6: #fbbf24;
    --gx-m6-soft: rgba(251, 191, 36, 0.14);
    --gx-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --gx-shadow-hover: 0 2px 6px rgba(0, 0, 0, 0.35), 0 18px 40px rgba(0, 0, 0, 0.45);
}

/* Hero */
.gx-hero {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 1.75rem 1.75rem 1.5rem;
    margin-bottom: 1rem;
    color: #eff6ff;
    background: linear-gradient(135deg, #172554 0%, #1e40af 45%, #1e3a8a 100%);
    box-shadow: 0 20px 50px -20px rgba(23, 37, 84, 0.6);
    isolation: isolate;
}
.gx-hero-glow {
    position: absolute; inset: -40% -10% auto auto;
    width: 520px; height: 520px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.45) 0%, rgba(96, 165, 250, 0) 65%);
    filter: blur(10px);
    z-index: -1;
    animation: gxFloat 12s ease-in-out infinite alternate;
}
.gx-hero::after {
    content: ''; position: absolute; left: -120px; bottom: -160px;
    width: 380px; height: 380px; border-radius: 50%;
    background: radial-gradient(circle, rgba(250, 204, 21, 0.22) 0%, rgba(250, 204, 21, 0) 70%);
    z-index: -1;
}
.gx-hero-grid {
    position: absolute; inset: 0; z-index: -1; opacity: 0.35;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
@keyframes gxFloat { from { transform: translate(0, 0); } to { transform: translate(-60px, 40px); } }
.gx-hero-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.35rem; }
.gx-eyebrow {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    color: #bfdbfe; background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 0.3rem 0.75rem; border-radius: 999px; margin-bottom: 0.75rem;
    max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gx-pulse { width: 7px; height: 7px; border-radius: 50%; background: #60a5fa; box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.7); animation: gxPulse 2s infinite; flex-shrink: 0; }
@keyframes gxPulse { 0% { box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.6); } 70% { box-shadow: 0 0 0 9px rgba(96, 165, 250, 0); } 100% { box-shadow: 0 0 0 0 rgba(96, 165, 250, 0); } }
.gx-title {
    font-size: clamp(1.5rem, 2.6vw, 2.15rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 0.35rem;
    background: linear-gradient(90deg, #ffffff 0%, #bfdbfe 60%, #fde68a 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gx-sub { margin: 0; color: rgba(239, 246, 255, 0.75); font-size: 0.9rem; }
.gx-hero-chips { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.gx-chip-glass {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.45rem 0.85rem; border-radius: 12px; font-size: 0.8rem; font-weight: 600;
    background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

/* Stat tiles (glass, also act as level filters) */
.gx-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.gx-stat {
    position: relative; display: block; text-decoration: none !important; color: #eff6ff !important;
    padding: 1rem 1.1rem; border-radius: 16px;
    background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.gx-stat:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.12); }
.gx-stat.is-active { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.45); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), 0 10px 30px -12px rgba(0, 0, 0, 0.5); }
.gx-stat-top { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.55rem; }
.gx-stat-icon { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: rgba(96, 165, 250, 0.2); color: #93c5fd; font-size: 0.95rem; flex-shrink: 0; }
.gx-stat-m3 .gx-stat-icon { background: rgba(56, 189, 248, 0.2); color: #7dd3fc; }
.gx-stat-m6 .gx-stat-icon { background: rgba(251, 191, 36, 0.2); color: #fcd34d; }
.gx-stat-label { font-size: 0.8rem; font-weight: 600; color: rgba(239, 246, 255, 0.8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-stat-value { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.gx-stat-value small { font-size: 0.75rem; font-weight: 500; margin-left: 0.3rem; color: rgba(239, 246, 255, 0.6); letter-spacing: 0; }
.gx-stat-foot { margin-top: 0.55rem; font-size: 0.74rem; color: rgba(239, 246, 255, 0.65); }
.gx-split { display: flex; height: 6px; border-radius: 999px; overflow: hidden; margin-top: 0.7rem; background: rgba(255, 255, 255, 0.12); }
.gx-split-m3 { background: linear-gradient(90deg, #38bdf8, #0ea5e9); }
.gx-split-m6 { background: linear-gradient(90deg, #fbbf24, #f59e0b); }

/* Sticky toolbar */
.gx-toolbar {
    position: sticky; top: 72px; z-index: 20;
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
    padding: 0.55rem; margin-bottom: 1.1rem;
    border-radius: 16px; border: 1px solid var(--gx-border);
    background: color-mix(in srgb, var(--gx-surface) 82%, transparent);
    backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
    box-shadow: var(--gx-shadow);
}
.gx-field {
    display: flex; align-items: center; gap: 0.5rem; height: 40px; margin: 0;
    padding: 0 0.75rem; border-radius: 11px;
    background: var(--gx-surface-2); border: 1px solid var(--gx-border);
    color: var(--gx-faint); transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.gx-field:focus-within { border-color: var(--gx-accent); box-shadow: 0 0 0 4px var(--gx-accent-soft); color: var(--gx-accent); }
.gx-field input, .gx-field select {
    border: 0; outline: 0; background: transparent; color: var(--gx-ink);
    font-size: 0.875rem; font-family: inherit; width: 100%; min-width: 0; height: 100%;
}
.gx-field select { cursor: pointer; font-weight: 600; }
.gx-field select option { color: #0f172a; }
.gx-field-search { flex: 1 1 240px; }
.gx-field-year { flex: 0 1 200px; }
.gx-field-room { flex: 0 0 104px; }
.gx-field-room input::-webkit-outer-spin-button, .gx-field-room input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gx-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--gx-surface-2); border: 1px solid var(--gx-border); height: 40px; }
.gx-seg-item { margin: 0; cursor: pointer; }
.gx-seg-item input { position: absolute; opacity: 0; pointer-events: none; }
.gx-seg-item span { display: inline-flex; align-items: center; height: 100%; padding: 0 0.85rem; border-radius: 8px; font-size: 0.82rem; font-weight: 600; color: var(--gx-muted); transition: all 0.15s ease; white-space: nowrap; }
.gx-seg-item:hover span { color: var(--gx-ink); }
.gx-seg-item input:checked + span { background: var(--gx-surface); color: var(--gx-accent); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
.gx-seg-item input:focus-visible + span { outline: 2px solid var(--gx-accent); outline-offset: 1px; }
.gx-toolbar-actions { display: flex; gap: 0.4rem; margin-left: auto; }
.gx-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    height: 40px; min-width: 40px; padding: 0 1rem; border-radius: 11px;
    font-size: 0.875rem; font-weight: 700; text-decoration: none !important; border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; cursor: pointer;
}
.gx-btn-primary { color: #fff !important; background: linear-gradient(135deg, #2563eb, #2563eb); box-shadow: 0 6px 16px -6px rgba(37, 99, 235, 0.7); }
.gx-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(37, 99, 235, 0.8); }
.gx-btn-ghost { padding: 0; color: var(--gx-muted) !important; background: var(--gx-surface-2); border-color: var(--gx-border); }
.gx-btn-ghost:hover { color: var(--gx-ink) !important; }

/* Results header */
.gx-results-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.85rem; }
.gx-results-title { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; min-width: 0; }
.gx-results-title h2 { font-size: 1.05rem; font-weight: 800; color: var(--gx-ink); margin: 0; letter-spacing: -0.01em; }
.gx-count { font-size: 0.78rem; font-weight: 700; color: var(--gx-accent); background: var(--gx-accent-soft); padding: 0.2rem 0.6rem; border-radius: 999px; font-variant-numeric: tabular-nums; }
.gx-tag { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.76rem; color: var(--gx-muted); background: var(--gx-surface-2); border: 1px solid var(--gx-border); padding: 0.18rem 0.55rem; border-radius: 999px; }
.gx-results-tools { display: flex; gap: 0.5rem; align-items: center; }
.gx-pills { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--gx-surface); border: 1px solid var(--gx-border); }
.gx-pills a, .gx-pills button {
    display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 28px; padding: 0 0.55rem;
    border: 0; border-radius: 7px; background: transparent; color: var(--gx-muted);
    font-size: 0.78rem; font-weight: 700; text-decoration: none; cursor: pointer; transition: all 0.15s ease;
}
.gx-pills a:hover, .gx-pills button:hover { color: var(--gx-ink); background: var(--gx-surface-2); }
.gx-pills .is-active { background: var(--gx-accent) !important; color: #fff !important; }

/* Cards */
.gx-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.gx-card {
    position: relative; display: flex; flex-direction: column; cursor: pointer; outline: none;
    border-radius: var(--gx-radius); overflow: hidden;
    background: var(--gx-surface); border: 1px solid var(--gx-border); box-shadow: var(--gx-shadow);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s ease, border-color 0.22s ease;
    animation: gxIn 0.4s ease both;
}
.gx-card:nth-child(2) { animation-delay: 0.03s; } .gx-card:nth-child(3) { animation-delay: 0.06s; }
.gx-card:nth-child(4) { animation-delay: 0.09s; } .gx-card:nth-child(5) { animation-delay: 0.12s; }
.gx-card:nth-child(n+6) { animation-delay: 0.15s; }
@keyframes gxIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.gx-card:hover, .gx-card:focus-visible { transform: translateY(-4px); box-shadow: var(--gx-shadow-hover); border-color: color-mix(in srgb, var(--gx-accent) 40%, transparent); }
.gx-card:focus-visible { outline: 2px solid var(--gx-accent); outline-offset: 2px; }
.gx-photo { position: relative; aspect-ratio: 4 / 4.2; overflow: hidden; background: linear-gradient(135deg, #dbeafe, #e0f2fe); }
.gx-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transition: transform 0.4s ease; display: block; }
.gx-card:hover .gx-photo img { transform: scale(1.05); }
.gx-photo::after { content: ''; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.45)); pointer-events: none; }
.gx-lvl, .gx-no {
    position: absolute; z-index: 1; font-size: 0.72rem; font-weight: 800; padding: 0.22rem 0.55rem; border-radius: 8px;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.gx-lvl { top: 10px; left: 10px; color: #fff; }
.gx-lvl-3 { background: rgba(2, 132, 199, 0.85); }
.gx-lvl-6 { background: rgba(217, 119, 6, 0.9); }
.gx-no { bottom: 10px; right: 10px; color: #fff; background: rgba(15, 23, 42, 0.45); font-variant-numeric: tabular-nums; }
.gx-card-body { padding: 0.85rem 0.95rem 0.5rem; display: flex; flex-direction: column; gap: 0.45rem; flex: 1; min-width: 0; }
.gx-name { font-size: 0.95rem; font-weight: 700; color: var(--gx-ink); margin: 0; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 0.65rem; font-size: 0.76rem; color: var(--gx-muted); }
.gx-meta i { margin-right: 0.2rem; opacity: 0.7; }
.gx-id { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; color: var(--gx-accent); }
.gx-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.gx-chip { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.72rem; font-weight: 600; padding: 0.18rem 0.5rem; border-radius: 999px; }
.gx-chip-year { color: var(--gx-accent); background: var(--gx-accent-soft); }
.gx-chip-male { color: #2563eb; background: rgba(37, 99, 235, 0.1); }
.gx-chip-female { color: #db2777; background: rgba(219, 39, 119, 0.1); }
[data-theme="dark"] .gx-chip-male { color: #93c5fd; background: rgba(147, 197, 253, 0.14); }
[data-theme="dark"] .gx-chip-female { color: #f9a8d4; background: rgba(249, 168, 212, 0.14); }
.gx-actions { display: flex; gap: 0.3rem; padding: 0.5rem 0.95rem 0.85rem; cursor: default; }
.gx-icon-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px;
    border: 1px solid var(--gx-border); background: var(--gx-surface-2); color: var(--gx-muted);
    font-size: 0.9rem; text-decoration: none; cursor: pointer; transition: all 0.15s ease;
}
.gx-icon-btn:hover { color: #fff; background: var(--gx-accent); border-color: var(--gx-accent); transform: translateY(-1px); }
.gx-icon-danger:hover { background: #ef4444; border-color: #ef4444; }

/* List view = ตารางรายชื่อพร้อมรูปเล็ก */
.gx-list-head, .gx-row-no { display: none; }
.gx-results.is-list {
    --gx-cols: 44px 44px minmax(170px, 2fr) minmax(190px, 2fr) minmax(130px, 1.2fr) 128px;
    grid-template-columns: 1fr; gap: 0;
    border: 1px solid var(--gx-border); border-radius: 14px; overflow: hidden;
    background: var(--gx-surface); box-shadow: var(--gx-shadow);
}
.gx-results.is-list .gx-list-head {
    display: grid; grid-template-columns: var(--gx-cols); align-items: center; column-gap: 0.75rem;
    padding: 0.55rem 0.85rem; background: var(--gx-surface-2); border-bottom: 1px solid var(--gx-border);
    font-size: 0.76rem; font-weight: 700; color: var(--gx-muted);
}
.gx-results.is-list .gx-card {
    display: grid; grid-template-columns: var(--gx-cols); align-items: center; column-gap: 0.75rem;
    padding: 0.4rem 0.85rem; border: 0; border-bottom: 1px solid var(--gx-border);
    border-radius: 0; box-shadow: none; animation: none;
}
.gx-results.is-list .gx-card:last-child { border-bottom: 0; }
.gx-results.is-list .gx-card:hover, .gx-results.is-list .gx-card:focus-visible {
    transform: none; box-shadow: inset 3px 0 0 var(--gx-accent); background: var(--gx-accent-soft); border-color: var(--gx-border);
}
.gx-results.is-list .gx-row-no { display: block; font-size: 0.78rem; font-weight: 700; color: var(--gx-faint); font-variant-numeric: tabular-nums; }
.gx-results.is-list .gx-photo { width: 36px; height: 44px; aspect-ratio: auto; border-radius: 8px; margin: 0; }
.gx-results.is-list .gx-card:hover .gx-photo img { transform: none; }
.gx-results.is-list .gx-photo::after, .gx-results.is-list .gx-no, .gx-results.is-list .gx-lvl { display: none; }
.gx-results.is-list .gx-card-body { display: contents; }
.gx-results.is-list .gx-name { font-size: 0.86rem; }
.gx-results.is-list .gx-meta { font-size: 0.78rem; }
.gx-results.is-list .gx-chips { gap: 0.3rem; }
.gx-results.is-list .gx-chip { font-size: 0.7rem; }
.gx-results.is-list .gx-actions { padding: 0; justify-content: flex-end; gap: 0.25rem; }
.gx-results.is-list .gx-icon-btn { width: 28px; height: 28px; border-radius: 8px; font-size: 0.8rem; }

/* ส่วนหัวและแถบค้นหาแบบกระชับ */
.gx-hero { padding: 1rem 1.25rem 1rem; border-radius: 18px; margin-bottom: 0.75rem; }
.gx-hero-head { margin-bottom: 0.8rem; }
.gx-eyebrow { font-size: 0.66rem; padding: 0.22rem 0.6rem; margin-bottom: 0.45rem; }
.gx-title { font-size: clamp(1.15rem, 1.8vw, 1.45rem); margin-bottom: 0.2rem; }
.gx-sub { font-size: 0.8rem; }
.gx-chip-glass { padding: 0.32rem 0.7rem; border-radius: 10px; font-size: 0.74rem; }
.gx-stats { gap: 0.6rem; }
.gx-stat { padding: 0.65rem 0.85rem; border-radius: 13px; }
.gx-stat-top { margin-bottom: 0.35rem; }
.gx-stat-icon { width: 24px; height: 24px; border-radius: 7px; font-size: 0.8rem; }
.gx-stat-label { font-size: 0.74rem; }
.gx-stat-value { font-size: clamp(1.1rem, 1.8vw, 1.4rem); }
.gx-stat-foot { margin-top: 0.35rem; font-size: 0.7rem; }
.gx-split { height: 5px; margin-top: 0.5rem; }
.gx-toolbar { padding: 0.45rem; margin-bottom: 0.8rem; border-radius: 13px; }
.gx-field, .gx-seg, .gx-btn { height: 36px; }
.gx-btn { min-width: 36px; font-size: 0.82rem; }
.gx-field input, .gx-field select { font-size: 0.84rem; }
.gx-results-head { margin-bottom: 0.6rem; }
.gx-results-title h2 { font-size: 0.95rem; }

/* Empty state */
.gx-empty { text-align: center; padding: 3.5rem 1rem; border-radius: var(--gx-radius); border: 1px dashed var(--gx-border); background: var(--gx-surface); margin-bottom: 1.25rem; }
.gx-empty-icon { width: 76px; height: 76px; margin: 0 auto 1rem; border-radius: 22px; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; color: var(--gx-accent); background: var(--gx-accent-soft); }
.gx-empty h3 { font-size: 1.05rem; font-weight: 800; color: var(--gx-ink); }
.gx-empty p { color: var(--gx-muted); font-size: 0.875rem; margin-bottom: 1.1rem; }

/* Pager */
.gx-pager { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.gx-pager-info { font-size: 0.82rem; color: var(--gx-muted); }
.gx-pager-info strong { color: var(--gx-ink); font-variant-numeric: tabular-nums; }
.gx-pages { display: flex; gap: 0.3rem; align-items: center; flex-wrap: wrap; }
.gx-page {
    display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 0.6rem;
    border-radius: 10px; border: 1px solid var(--gx-border); background: var(--gx-surface); color: var(--gx-ink);
    font-size: 0.85rem; font-weight: 700; text-decoration: none; transition: all 0.15s ease; font-variant-numeric: tabular-nums;
}
.gx-page:hover { border-color: var(--gx-accent); color: var(--gx-accent); }
.gx-page.is-active { background: var(--gx-accent); border-color: var(--gx-accent); color: #fff; box-shadow: 0 6px 14px -6px rgba(37, 99, 235, 0.7); }
.gx-page.is-disabled { opacity: 0.4; pointer-events: none; }
.gx-page-gap { color: var(--gx-faint); padding: 0 0.15rem; }

/* Modal refresh */
#gradDetailModal .modal-content { border-radius: 22px !important; }
#gradDetailModal .modal-header-green { background: linear-gradient(135deg, #172554, #2563eb) !important; }

@media (max-width: 767.98px) {
    .gx-hero { padding: 1.2rem 1rem 1rem; border-radius: 18px; }
    .gx-hero-head { margin-bottom: 1rem; }
    .gx-stats { gap: 0.45rem; }
    .gx-stat { padding: 0.7rem 0.65rem; border-radius: 13px; }
    .gx-stat-icon { display: none; }
    .gx-stat-top { margin-bottom: 0.35rem; }
    .gx-stat-label { font-size: 0.72rem; }
    .gx-stat-foot { font-size: 0.66rem; }
    .gx-toolbar { position: static; }
    .gx-field-search { flex-basis: 100%; }
    .gx-field-year { flex: 1 1 0; min-width: 150px; padding: 0 0.55rem; }
    .gx-field-year > i { display: none; }
    .gx-seg-item span { padding: 0 0.6rem; }
    .gx-field-room { flex: 1 1 0; }
    .gx-toolbar-actions { margin-left: 0; }
    .gx-results { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
    .gx-card-body { padding: 0.65rem 0.7rem 0.35rem; }
    .gx-name { font-size: 0.85rem; }
    .gx-actions { padding: 0.35rem 0.7rem 0.7rem; }
    .gx-icon-btn { width: 30px; height: 30px; font-size: 0.8rem; }
    /* ตารางบนมือถือ: เหลือ ลำดับ / รูป / ชื่อ+รหัส */
    .gx-results.is-list { --gx-cols: 26px 34px minmax(0, 1fr); }
    .gx-results.is-list .gx-list-head { display: none; }
    .gx-results.is-list .gx-card { grid-template-rows: auto auto; padding: 0.45rem 0.65rem; }
    .gx-results.is-list .gx-row-no, .gx-results.is-list .gx-photo { grid-row: span 2; }
    .gx-results.is-list .gx-photo { width: 34px; height: 42px; }
    .gx-results.is-list .gx-meta { grid-column: 3; }
    .gx-results.is-list .gx-chips, .gx-results.is-list .gx-actions { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .gx-hero-glow, .gx-pulse, .gx-card { animation: none; }
    .gx-card, .gx-photo img, .gx-stat { transition: none; }
}
