/* ============================================================
   BD RESULT PORTAL — MINIMAL THEME
   Activated via body.minimal class (toggled by UI Switch)
   Pure black & white. No shadows, no italics, no rounded blobs.
   ============================================================ */

/* Apply pre-minimal class on <html> BEFORE body class is set
   so the page renders correctly on first paint. */
html.pre-minimal body { /* placeholder — actual styling under body.minimal */ }

/* ===== THEME OVERRIDES ===== */
body.minimal {
    --bg: #ffffff;
    --bg-warm: #ffffff;
    --bg-inset: #f0f0f0;
    --mint: #000000;
    --mint-light: #f0f0f0;
    --mint-deep: #000000;
    --mint-pale: #f0f0f0;
    --text: #000000;
    --text-secondary: #333333;
    --text-muted: #666666;
    --shadow-light: transparent;
    --shadow-dark: transparent;
    --neo-out: none;
    --neo-out-sm: 1px solid #000000;
    --neo-in: inset 0 0 0 1px #000000;
    --neo-in-deep: inset 0 0 0 1px #000000;
    --font-display: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    background: #ffffff;
    color: #000000;
    line-height: 1.5;
}

/* ===== HEADER ===== */
body.minimal header {
    padding: 16px 0;
    border-bottom: 1px solid #000000;
    background: #ffffff;
}

body.minimal .header-inner {
    max-width: 720px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

body.minimal .header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

body.minimal .logo {
    font-family: var(--font-body);
    font-style: normal;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #000000;
}

body.minimal .logo em {
    color: #000000;
    font-style: normal;
    font-weight: 400;
    margin-left: 4px;
}

body.minimal .header-nav {
    display: flex;
    gap: 20px;
}

body.minimal .header-nav a {
    font-size: 13px;
    font-weight: 500;
    color: #000000;
    text-decoration: none;
    letter-spacing: 0;
    transition: opacity 0.15s;
}

body.minimal .header-nav a:hover { opacity: 0.5; }

/* ===== UI SWITCH ===== */
body.minimal .ui-switch,
.ui-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 6px;
    background: transparent;
    border: 1px solid var(--bg-inset, #e4ded6);
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted, #9a9590);
    transition: all 0.2s;
    letter-spacing: 0.3px;
}

.ui-switch:hover { color: var(--mint-deep, #5fb889); }

.ui-switch-track {
    width: 26px;
    height: 14px;
    background: var(--bg-inset, #e4ded6);
    border-radius: 8px;
    position: relative;
    transition: background 0.2s;
}

.ui-switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}

body.minimal .ui-switch {
    border-color: #000000;
    color: #000000;
    background: #ffffff;
}

body.minimal .ui-switch-track {
    background: #000000;
}

body.minimal .ui-switch-thumb {
    transform: translateX(12px);
    background: #ffffff;
    box-shadow: none;
}

body.minimal .ui-switch-label {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== HERO ===== */
body.minimal .hero {
    padding: 48px 0 32px;
}

body.minimal .hero h1 {
    font-family: var(--font-body);
    font-style: normal;
    font-weight: 700;
    font-size: clamp(28px, 4.5vw, 40px);
    line-height: 1.15;
    color: #000000;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

body.minimal .hero h1 span {
    color: #000000;
    font-weight: 400;
}

body.minimal .hero p {
    font-size: 14px;
    color: #666666;
    max-width: 520px;
    line-height: 1.6;
}

/* ===== EXAM SELECTOR ===== */
body.minimal .exam-selector {
    display: flex;
    gap: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    margin-bottom: 32px;
    width: fit-content;
    border: 1px solid #000000;
    flex-wrap: wrap;
}

body.minimal .exam-btn {
    padding: 10px 18px;
    border: none;
    border-right: 1px solid #000000;
    border-radius: 0;
    background: #ffffff;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    color: #000000;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

body.minimal .exam-btn:last-child { border-right: none; }
body.minimal .exam-btn:hover { background: #f0f0f0; }

body.minimal .exam-btn.active {
    background: #000000;
    color: #ffffff;
    box-shadow: none;
    font-weight: 700;
}

/* ===== FORM ===== */
body.minimal .form-section { margin-bottom: 40px; }

body.minimal .form-section-title {
    font-family: var(--font-body);
    font-style: normal;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
    color: #000000;
    letter-spacing: -0.2px;
}

body.minimal .form-section-desc {
    font-size: 13px;
    color: #666666;
    margin-bottom: 24px;
}

body.minimal .form-row {
    gap: 16px;
    margin-bottom: 16px;
}

body.minimal .form-field { gap: 6px; }

body.minimal .form-label {
    font-size: 11px;
    font-weight: 600;
    color: #000000;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding-left: 0;
}

body.minimal .form-label .req { color: #000000; }

body.minimal .neo-input,
body.minimal .neo-select {
    width: 100%;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #000000;
    border-radius: 0;
    box-shadow: none;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    outline: none;
    transition: border-color 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

body.minimal .neo-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M5 6L0 0h10z' fill='%23000'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}

body.minimal .neo-select option {
    background: #ffffff;
    color: #000000;
}

body.minimal .neo-input::placeholder { color: #999999; }

body.minimal .neo-input:focus,
body.minimal .neo-select:focus {
    border-color: #000000;
    box-shadow: inset 0 0 0 1px #000000;
}

body.minimal .form-hint {
    font-size: 11px;
    color: #666666;
    padding-left: 0;
}

/* ===== CAPTCHA ===== */
body.minimal .captcha-row {
    gap: 12px;
    margin-bottom: 20px;
}

body.minimal .captcha-img-wrap {
    flex-shrink: 0;
    padding: 4px;
    border-radius: 0;
    box-shadow: none;
    background: #ffffff;
    border: 1px solid #000000;
}

body.minimal .captcha-img-wrap img {
    display: block;
    height: 40px;
    border-radius: 0;
}

body.minimal .captcha-reload {
    padding: 10px 14px;
    border: 1px solid #000000;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    color: #000000;
    cursor: pointer;
    transition: background 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

body.minimal .captcha-reload:hover { background: #000000; color: #ffffff; }

body.minimal .captcha-input-wrap { flex: 1; }

/* ===== SUBMIT ===== */
body.minimal .submit-btn {
    width: 100%;
    padding: 14px;
    background: #000000;
    border: 1px solid #000000;
    border-radius: 0;
    box-shadow: none;
    font-family: var(--font-body);
    font-style: normal;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

body.minimal .submit-btn:hover {
    background: #ffffff;
    color: #000000;
    transform: none;
}

body.minimal .submit-btn:active {
    transform: none;
    box-shadow: none;
}

body.minimal .submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

body.minimal .submit-btn .spinner {
    display: none;
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto;
}

body.minimal .submit-btn:hover .spinner {
    border-color: rgba(0,0,0,0.2);
    border-top-color: #000000;
}

body.minimal .submit-btn.loading .btn-text { display: none; }
body.minimal .submit-btn.loading .spinner { display: block; }

/* ===== RESULT ===== */
body.minimal .result-section {
    margin-bottom: 48px;
    animation: none;
}

body.minimal .result-header-text {
    font-family: var(--font-body);
    font-style: normal;
    font-weight: 700;
    font-size: 22px;
    margin-bottom: 2px;
    letter-spacing: -0.2px;
}

body.minimal .result-sub-text {
    font-size: 13px;
    color: #666666;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.minimal .info-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 32px;
    border: 1px solid #000000;
}

body.minimal .info-item {
    padding: 14px 16px;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
    border-right: 1px solid #000000;
    border-bottom: 1px solid #000000;
}

body.minimal .info-item:nth-child(2n) { border-right: none; }
body.minimal .info-item:nth-last-child(-n+2) { border-bottom: none; }
body.minimal .info-item:nth-last-child(1):nth-child(odd) { border-bottom: none; }

body.minimal .info-item.wide {
    grid-column: 1 / -1;
    border-right: none;
}

body.minimal .info-item .lbl {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #666666;
    margin-bottom: 4px;
}

body.minimal .info-item .val {
    font-family: var(--font-body);
    font-style: normal;
    font-weight: 500;
    font-size: 15px;
    color: #000000;
}

/* GPA display is hidden (round ring removed) */
body.minimal .gpa-display { display: none !important; }

/* ===== GRADES TABLE ===== */
body.minimal .grades-wrap { margin-bottom: 24px; }

body.minimal .grades-title {
    font-family: var(--font-body);
    font-style: normal;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 0;
    padding: 12px 16px;
    border: 1px solid #000000;
    border-bottom: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #000000;
    color: #ffffff;
}

body.minimal .grade-row {
    display: grid;
    grid-template-columns: 56px 1fr 60px 56px;
    align-items: center;
    padding: 10px 16px;
    border-radius: 0;
    margin-bottom: 0;
    background: #ffffff;
    box-shadow: none;
    border: 1px solid #000000;
    border-top: none;
    gap: 4px;
    transition: background 0.1s;
}

body.minimal .grade-row:last-child { /* nothing special */ }
body.minimal .grade-row:hover { background: #f5f5f5; }

body.minimal .grade-row .code {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #666666;
}

body.minimal .grade-row .subject {
    font-weight: 500;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.3;
}

body.minimal .grade-row .subject .subject-en {
    font-weight: 500;
    font-size: 13px;
    color: #000000;
}

body.minimal .grade-row .subject .subject-bn {
    font-family: 'Noto Sans Bengali', var(--font-body);
    font-size: 11px;
    color: #666666;
    font-weight: 400;
}

body.minimal .grade-row .marks-col {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #333333;
    text-align: right;
}

body.minimal .grade-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 0;
    font-size: 11px;
    font-weight: 700;
    min-width: 36px;
    border: 1px solid #000000;
    background: #ffffff;
    color: #000000;
}

body.minimal .pill-ap,
body.minimal .pill-a,
body.minimal .pill-am,
body.minimal .pill-b,
body.minimal .pill-c,
body.minimal .pill-d,
body.minimal .pill-f {
    background: #ffffff;
    color: #000000;
    border-color: #000000;
}

body.minimal .pill-f {
    background: #000000;
    color: #ffffff;
}

body.minimal .print-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #000000;
    text-decoration: underline;
    transition: opacity 0.15s;
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--font-body);
    padding: 0;
    margin-top: 16px;
}

body.minimal .print-link:hover { opacity: 0.5; }

/* ===== ERROR ===== */
body.minimal .error-section {
    padding: 24px;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
    margin-bottom: 32px;
    border: 1px solid #000000;
    animation: none;
}

body.minimal .error-section .err-title {
    font-family: var(--font-body);
    font-style: normal;
    font-weight: 700;
    font-size: 16px;
    color: #000000;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

body.minimal .error-section .err-msg {
    font-size: 13px;
    color: #333333;
    max-width: 460px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== BOARDS ===== */
body.minimal .boards-section { margin-bottom: 48px; }

body.minimal .section-heading {
    font-family: var(--font-body);
    font-style: normal;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.minimal .boards-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

body.minimal .board-item {
    padding: 8px 16px;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
    border: 1px solid #000000;
    border-right: none;
    font-size: 12px;
    font-weight: 500;
    color: #000000;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    font-family: var(--font-body);
    margin: 0;
}

body.minimal .board-item:last-child { border-right: 1px solid #000000; }
body.minimal .board-item:hover { background: #000000; color: #ffffff; }

body.minimal .board-item.picked {
    background: #000000;
    color: #ffffff;
    box-shadow: none;
}

body.minimal .divider {
    height: 1px;
    background: #000000;
    margin: 36px 0;
}

/* ===== FOOTER ===== */
body.minimal footer {
    padding: 20px 0;
    border-top: 1px solid #000000;
    text-align: center;
}

body.minimal .footer-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 32px;
}

body.minimal .footer-note {
    font-size: 11px;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.minimal .crafted-by {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

body.minimal .crafted-text {
    font-family: var(--font-body);
    font-style: normal;
    font-weight: 500;
    font-size: 12px;
    color: #000000;
    letter-spacing: 0.3px;
}

body.minimal .crafted-text em {
    color: #000000;
    font-style: normal;
    font-weight: 700;
}

body.minimal .social-links {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    justify-content: center;
}

body.minimal .social-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
    border: 1px solid #000000;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    color: #000000;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

body.minimal .social-link + .social-link { border-left: none; }

body.minimal .social-link:hover {
    background: #000000;
    color: #ffffff;
    transform: none;
}

/* ===== TOAST ===== */
body.minimal .toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 16px;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
    border: 1px solid #000000;
    font-size: 13px;
    font-weight: 600;
    color: #000000;
    z-index: 999;
    transform: translateY(80px);
    opacity: 0;
    transition: all 0.2s ease;
}

body.minimal .toast.visible { transform: translateY(0); opacity: 1; }
body.minimal .toast.ok { color: #000000; }
body.minimal .toast.err {
    color: #ffffff;
    background: #000000;
    border-color: #000000;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    body.minimal .header-inner,
    body.minimal .container,
    body.minimal .footer-inner { padding: 0 16px; }
    body.minimal .hero { padding: 32px 0 24px; }
    body.minimal .form-row { grid-template-columns: 1fr; gap: 14px; }
    body.minimal .info-grid { grid-template-columns: 1fr; }
    body.minimal .info-item { border-right: none; }
    body.minimal .info-item:nth-child(2n) { border-right: none; }
    body.minimal .info-item:nth-last-child(-n+2) { border-bottom: 1px solid #000000; }
    body.minimal .info-item:last-child { border-bottom: none; }
    body.minimal .exam-selector { width: 100%; }
    body.minimal .exam-btn { flex: 1; padding: 10px 8px; font-size: 11px; }
    body.minimal .grade-row { grid-template-columns: 40px 1fr 50px 44px; padding: 8px 10px; }
    body.minimal .header-nav { display: none; }
    body.minimal .header-right { gap: 12px; }
    body.minimal .ui-switch { padding: 4px 8px 4px 4px; }
    body.minimal .ui-switch-label { display: none; }
    body.minimal .boards-list .board-item { border-right: 1px solid #000000; }
    body.minimal .captcha-row { flex-wrap: wrap; }
    body.minimal .social-link { padding: 6px 10px; font-size: 10px; }
}

@media print {
    body.minimal .info-item,
    body.minimal .error-section { box-shadow: none; }
    body.minimal .grade-pill { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
