/* ══════════════════════════════════════════════════════════════════
   style.css – ปาริชาติเกมส์ | โรงเรียนจอมสุรางค์อุปถัมภ์
   Theme: Navy & White (Light Mode)
   ══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ── */
:root {
    --navy-900: #0a1f44;
    --navy-800: #0d2b5e;
    --navy-700: #1a3a6e;
    --navy-600: #1e4d8c;
    --navy-500: #2563b0;
    --navy-400: #3b7dc8;
    --navy-300: #6fa3d8;
    --navy-200: #b8d4ee;
    --navy-100: #dceaf8;
    --navy-50:  #eef5fc;

    --gold:     #c8921a;
    --gold-l:   #e8b13a;
    --gold-bg:  #fef8e8;

    --bg:       #f4f7fc;
    --bg-card:  #ffffff;
    --bg-nav:   #0d2b5e;

    --text:     #0a1f44;
    --text-m:   #4a6080;
    --text-s:   #7a96b4;
    --text-inv: #ffffff;

    --border:   #c8d9ec;
    --border-s: #e4edf7;

    --success:  #1a7a44;
    --success-bg: #e8f5ee;
    --danger:   #c0392b;
    --danger-bg:#fdecea;
    --warning:  #b45309;
    --warning-bg:#fef3e2;
    --info:     #1a5fa0;
    --info-bg:  #e8f0fb;

    --shadow-sm: 0 2px 8px rgba(13,43,94,.08);
    --shadow:    0 4px 20px rgba(13,43,94,.12);
    --shadow-lg: 0 8px 40px rgba(13,43,94,.16);

    --radius:   12px;
    --radius-sm: 8px;
    --radius-lg: 18px;

    --font: 'Sarabun', 'Tahoma', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    font-size: 15px;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

body.with-nav {
    padding-top: 72px;
}

/* ── Background subtle pattern ── */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse 60% 40% at 10% 10%, rgba(37,99,176,.06) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 90% 90%, rgba(13,43,94,.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ── Navbar ── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 72px;
    background: var(--bg-nav);
    box-shadow: 0 2px 16px rgba(13,43,94,.25);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 20px;
    z-index: 1000;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
    flex-shrink: 0;
}

.nav-brand img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: contain;
    background: rgba(255,255,255,.15);
    padding: 4px;
}

.nav-brand-txt {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.nav-brand-title {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    letter-spacing: .3px;
}

.nav-brand-sub {
    font-size: 11px;
    color: rgba(255,255,255,.6);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2px;
    flex: 1;
    padding: 0 12px;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: rgba(255,255,255,.75);
    font-size: 14px;
    font-weight: 500;
    transition: all .2s ease;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255,255,255,.15);
    color: #fff;
}

.nav-links a.active {
    background: rgba(255,255,255,.2);
    color: #fff;
    font-weight: 700;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-avatar {
    width: 36px; height: 36px;
    background: rgba(255,255,255,.2);
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
}

.nav-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.nav-user-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.nav-user-role {
    font-size: 11px;
    color: rgba(255,255,255,.6);
}

/* Registration status chip */
.reg-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.reg-open {
    background: rgba(26,122,68,.25);
    color: #a7f3c4;
    border: 1px solid rgba(26,122,68,.4);
}

.reg-closed {
    background: rgba(192,57,43,.25);
    color: #fca5a5;
    border: 1px solid rgba(192,57,43,.4);
}

.status-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%,100% { opacity:1; }
    50%      { opacity:.4; }
}

/* ── Main content ── */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px 24px 40px;
    position: relative;
    z-index: 1;
}

/* ── Page header ── */
.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--navy-900);
    line-height: 1.2;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-m);
    margin-top: 4px;
}

/* ── Cards ── */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-s);
    position: relative;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--navy-50);
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy-800);
}

/* ── Stats grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border-s);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform .2s, box-shadow .2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.si-purple { background: #eef2ff; }
.si-gold   { background: #fef8e8; }
.si-green  { background: #ecfdf5; }
.si-blue   { background: #eff6ff; }
.si-cyan   { background: #e0f2fe; }

.stat-val {
    font-size: 30px;
    font-weight: 800;
    color: var(--navy-900);
    line-height: 1;
}

.stat-lbl {
    font-size: 12px;
    color: var(--text-m);
    margin-top: 4px;
}

/* ── Progress bar ── */
.prog-wrap {
    height: 6px;
    background: var(--navy-100);
    border-radius: 99px;
    overflow: hidden;
}

.prog-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--navy-600), var(--navy-400));
    border-radius: 99px;
    transition: width .4s ease;
}

/* ── Tables ── */
.table-wrap { overflow-x: auto; }

.dt {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.dt th {
    background: var(--navy-50);
    color: var(--navy-700);
    font-weight: 700;
    padding: 11px 14px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 2px solid var(--navy-200);
}

.dt td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-s);
    color: var(--text);
    vertical-align: middle;
}

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

.dt tbody tr:hover td {
    background: var(--navy-50);
}

.row-click { cursor: pointer; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all .2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--navy-600);
    color: white;
    box-shadow: 0 2px 8px rgba(30,77,140,.3);
}
.btn-primary:hover { background: var(--navy-700); transform: translateY(-1px); }

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-l));
    color: white;
    box-shadow: 0 2px 8px rgba(200,146,26,.35);
}
.btn-gold:hover { filter: brightness(1.08); transform: translateY(-1px); }

.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover { filter: brightness(1.1); }

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--navy-700);
}
.btn-outline:hover {
    background: var(--navy-50);
    border-color: var(--navy-300);
    color: var(--navy-900);
}

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover { filter: brightness(1.1); }

.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-xs { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.w-100 { width: 100%; justify-content: center; }

/* ── Login page ── */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-700) 50%, var(--navy-600) 100%);
}

/* ── Landing Page Layout ── */
.landing-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    width: 100%;
    max-width: 1100px;
    margin: 40px auto;
    align-items: start;
    position: relative;
    z-index: 10;
}

@media (min-width: 1024px) {
    .landing-container {
        grid-template-columns: 420px 1fr;
    }
}

.landing-col-left {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.landing-col-right {
    display: flex;
    flex-direction: column;
}

.landing-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 20px 40px rgba(10,31,68,.25);
    border: 1px solid rgba(255,255,255,0.4);
    backdrop-filter: blur(16px);
}

.landing-card.login-card-custom {
    padding: 40px 32px;
}

.landing-stats-list {
    overflow-y: auto;
    padding-right: 8px;
}

/* Custom Scrollbar for stats-list */
.landing-stats-list::-webkit-scrollbar {
    width: 6px;
}
.landing-stats-list::-webkit-scrollbar-track {
    background: transparent;
}
.landing-stats-list::-webkit-scrollbar-thumb {
    background: var(--navy-200);
    border-radius: 3px;
}
.landing-stats-list::-webkit-scrollbar-thumb:hover {
    background: var(--navy-400);
}

.login-logo-wrap { text-align: center; margin-bottom: 16px; }
.login-logo {
    width: 90px; height: 90px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(13,43,94,.2));
}

.login-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--navy-900);
    text-align: center;
    margin-bottom: 4px;
    line-height: 1.3;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-m);
    text-align: center;
    margin-bottom: 28px;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--navy-700), var(--navy-500));
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    box-shadow: 0 4px 14px rgba(13,43,94,.3);
}

.login-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(13,43,94,.4);
}

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-group.mb-0 { margin-bottom: 0; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--navy-800);
    margin-bottom: 6px;
}

.req { color: var(--danger); }

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--navy-50);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    transition: all .2s;
    outline: none;
}

.form-control:focus {
    border-color: var(--navy-500);
    background: white;
    box-shadow: 0 0 0 3px rgba(37,99,176,.15);
}

select.form-control { cursor: pointer; }

.form-actions { margin-top: 20px; }

/* ── Alerts ── */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 14px;
}

.alert-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(26,122,68,.2);
}
.alert-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(192,57,43,.2);
}
.alert-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(180,83,9,.2);
}
.alert-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid rgba(26,95,160,.2);
}

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.badge-purple { background: #ede9fe; color: #5b21b6; }
.badge-gold   { background: var(--gold-bg); color: var(--gold); }
.badge-success{ background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info   { background: var(--info-bg); color: var(--info); }
.badge-warning{ background: var(--warning-bg); color: var(--warning); }

/* ── Color dot ── */
.cdot {
    width: 10px; height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* ── Layouts ── */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 900px) {
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .navbar { padding: 0 14px; }
    .nav-links a span { display: none; }
}

.flex-b { display:flex; align-items:center; justify-content:space-between; }
.flex-c { display:flex; align-items:center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mb-16  { margin-bottom: 16px; }
.text-m { color: var(--text-m); }
.text-s { color: var(--text-s); }

/* ── Filter bar ── */
.filter-bar {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 150px;
}

.filter-item label {
    font-size: 12px;
    font-weight: 700;
    color: var(--navy-700);
    text-transform: uppercase;
    letter-spacing: .4px;
}

.filter-item input,
.filter-item select {
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--navy-50);
    font-family: var(--font);
    font-size: 13px;
    color: var(--text);
}

/* ── Student card ── */
.student-card {
    background: var(--navy-50);
    border: 1.5px solid var(--navy-200);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.student-avt {
    width: 50px; height: 50px;
    background: var(--navy-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.student-name { font-size: 17px; font-weight: 800; color: var(--navy-900); }
.student-detail { font-size: 13px; color: var(--text-m); margin-top: 2px; }

/* ── Award option cards ── */
.award-opt {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all .2s;
    background: white;
    position: relative;
}

.award-opt:hover {
    border-color: var(--navy-400);
    background: var(--navy-50);
}

.award-opt.selected {
    border-color: var(--navy-600);
    background: var(--info-bg);
    box-shadow: 0 0 0 3px rgba(37,99,176,.1);
}

.award-medal { font-size: 28px; }

.award-name { font-size: 14px; font-weight: 700; color: var(--navy-900); }
.award-desc { font-size: 12px; color: var(--text-m); }

/* ── Color header banner (for color team pages) ── */
.color-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    border-left: 5px solid;
}

.color-header-icon { font-size: 32px; }
.color-header-title { font-size: 20px; font-weight: 800; color: var(--navy-900); }
.color-header-sub { font-size: 13px; color: var(--text-m); }

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10,31,68,.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(10,31,68,.3);
    border-top: 4px solid var(--navy-600);
}

.modal-title { font-size: 18px; font-weight: 800; color: var(--navy-900); margin-bottom: 12px; }
.modal-body  { font-size: 14px; color: var(--text-m); margin-bottom: 20px; line-height: 1.7; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; }

/* ── Empty state ── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-m);
}

.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: .5; }
.empty-title { font-size: 16px; font-weight: 700; color: var(--text-m); }

/* ── Footer ── */
.site-footer {
    text-align: center;
    padding: 24px;
    color: var(--text-s);
    font-size: 12px;
    line-height: 1.8;
    border-top: 1px solid var(--border-s);
    margin-top: 40px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--navy-50); }
::-webkit-scrollbar-thumb { background: var(--navy-300); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--navy-500); }

/* ── Code ── */
code {
    background: var(--navy-50);
    color: var(--navy-700);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Consolas', monospace;
}

/* ══════════════════════════════════════════════════════════════════
   CERTIFICATE – Landscape (A4)
   ══════════════════════════════════════════════════════════════════ */
.cert-page {
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}

.cert-action-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Certificate container – A4 Landscape ratio */
#print-cert {
    width: 100%;
    max-width: 940px;       /* ~A4 landscape width */
    min-height: 540px;      /* ~A4 landscape height proportion */
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 60%, var(--navy-600) 100%);
    border-radius: 16px;
    padding: 48px 60px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(10,31,68,.4);
}

/* Decorative elements inside cert */
#print-cert::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 320px; height: 320px;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
}

#print-cert::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -60px;
    width: 240px; height: 240px;
    border-radius: 50%;
    background: rgba(255,255,255,.03);
}

/* Top gold border bar */
#print-cert .cert-top-bar {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--gold), var(--gold-l), var(--gold));
}

/* Bottom gold border bar */
#print-cert .cert-bottom-bar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Left decorative sidebar in cert */
#print-cert .cert-left-deco {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 8px;
    background: linear-gradient(180deg, var(--gold), var(--gold-l), var(--gold));
}

.cert-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 40px;
    height: 100%;
}

/* Left column – logo & school name */
.cert-left-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 180px;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,.15);
    padding-right: 40px;
    min-height: 380px;
}

.cert-logo { width: 90px; height: 90px; object-fit: contain; margin-bottom: 12px; }

.cert-school-name {
    font-size: 12px;
    color: rgba(255,255,255,.7);
    line-height: 1.5;
    margin-bottom: 16px;
}

.cert-divider-v {
    width: 40px; height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 0 auto 16px;
}

.cert-game-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--gold-l);
    letter-spacing: 1px;
}

/* Right column – main content */
.cert-right-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.cert-number-display {
    font-size: 15px;
    color: rgba(255,255,255,.6);
    text-align: right;
    font-family: var(--font);
    font-weight: 700;
    margin-bottom: -15px;
}

.cert-header-title {
    font-size: 50px;
    font-weight: 800;
    color: var(--gold-l);
    line-height: 1;
    margin-bottom: 4px;
    text-shadow: 0 0 30px rgba(200,146,26,.4);
}

.cert-given-text {
    font-size: 17px;
    color: rgba(255,255,255,.7);
}

.cert-student-name {
    font-size: 38px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}

.cert-class {
    font-size: 15px;
    color: rgba(255,255,255,.55);
}

.cert-divider-h {
    width: 100%; height: 1px;
    background: linear-gradient(90deg, var(--gold), transparent);
    margin: 8px 0;
}

.cert-award-text {
    font-size: 26px;
    font-weight: 800;
    color: var(--gold-l);
}

.cert-sport-text {
    font-size: 18px;
    color: rgba(255,255,255,.85);
}

/* Signature row */
.cert-sign-row {
    display: flex;
    gap: 48px;
    margin-top: 20px;
}

.cert-sign {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.cert-sign-line {
    width: 160px; height: 1px;
    background: rgba(255,255,255,.35);
    margin-bottom: 4px;
}

.cert-sign-name {
    font-size: 12px;
    color: rgba(255,255,255,.45);
}

.cert-footer {
    font-size: 12px;
    color: rgba(255,255,255,.3);
    margin-top: 16px;
}

/* Background image overlay inside cert */
.cert-bg-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: .12;
    border-radius: 14px;
}

/* ── Print styles (Landscape A4) ── */
@media print {
    @page {
        size: A4 landscape;
        margin: 0;
    }

    body { background: white !important; margin: 0; }
    .cert-action-bar { display: none !important; }
    .cert-page { padding: 0; background: white !important; min-height: auto; }

    #print-cert {
        width: 297mm;
        height: 210mm;
        max-width: none;
        min-height: 0;
        border-radius: 0;
        box-shadow: none;
        margin: 0;
        padding: 32mm 24mm 24mm 28mm;
        background: white !important;
        page-break-inside: avoid;
    }

    #print-cert::before,
    #print-cert::after { display: none; }

    .cert-top-bar { background: var(--navy-700) !important; }
    .cert-left-deco { background: var(--navy-700) !important; }

    .cert-header-title { color: var(--navy-700) !important; text-shadow: none !important; }
    .cert-student-name { color: var(--navy-900) !important; }
    .cert-award-text   { color: var(--gold) !important; }
    .cert-school-name, .cert-given-text, .cert-class,
    .cert-sport-text, .cert-footer, .cert-sign-name,
    .cert-game-name, .cert-sign-line, .cert-number-display { color: #555 !important; border-color: #aaa !important; }
    .cert-divider-v, .cert-divider-h { background: #999 !important; }
    .cert-left-col { border-right-color: #ccc !important; }
}
