/* Prize Bond admin theme (green / gold). Loaded after Bootstrap. */
:root {
    --pb-ground: #F4F3EE;
    --pb-surface: #FFFFFF;
    --pb-ink: #15201B;
    --pb-ink-2: #3F4944;
    --pb-muted: #5B655F;
    --pb-line: #E3E1D8;
    --pb-line-soft: #ECEAE2;
    --pb-head: #F7F6F1;
    --pb-green-900: #0E3B2C;
    --pb-green-700: #146C4B;
    --pb-green-600: #1B5A43;
    --pb-green-500: #275C48;
    --pb-green-50: #E6F2EB;
    --pb-green-text: #12603F;
    --pb-gold: #D9A93F;
    --pb-gold-50: #FBF0D9;
    --pb-gold-text: #6B4A0F;
    --pb-side-text: #D3E0D8;
    --pb-side-muted: #A9C2B5;

    --bs-body-font-family: 'Public Sans', system-ui, sans-serif;
    --bs-body-color: var(--pb-ink);
    --bs-body-bg: var(--pb-ground);
    --bs-primary: #146C4B;
    --bs-primary-rgb: 20, 108, 75;
    --bs-success: #146C4B;
    --bs-success-rgb: 20, 108, 75;
    --bs-link-color: #146C4B;
    --bs-link-color-rgb: 20, 108, 75;
    --bs-link-hover-color: #0E3B2C;
    --bs-link-hover-color-rgb: 14, 59, 44;
    --bs-border-color: var(--pb-line);
    --bs-border-radius: 10px;
}

body { background: var(--pb-ground); color: var(--pb-ink); font-size: 15px; line-height: 1.5; }
h1, h2, h3, h4, h5, h6, .pb-display { font-family: Sora, sans-serif; letter-spacing: -0.01em; }
.pb-num { font-variant-numeric: tabular-nums; }

/* Shell */
.pb-shell { min-height: 100vh; display: flex; flex-wrap: wrap; }
.pb-side {
    flex: 1 1 248px; background: var(--pb-green-900); color: #E9EFEA;
    padding: 28px 18px; display: flex; flex-direction: column; gap: 28px;
}
.pb-main { flex: 999 1 560px; min-width: 0; padding: 32px clamp(16px, 3vw, 40px) 48px; display: flex; flex-direction: column; gap: 24px; }

.pb-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; color: inherit; text-decoration: none; }
.pb-brand-mark {
    width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--pb-gold);
    color: var(--pb-green-900); display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.pb-brand-name { font-family: Sora, sans-serif; font-weight: 600; font-size: 16px; color: #fff; display: block; }
.pb-brand-sub { font-size: 12px; color: var(--pb-side-muted); display: block; }

.pb-nav { display: flex; flex-direction: column; gap: 4px; }
.pb-nav a {
    display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px;
    border-radius: 10px; color: var(--pb-side-text); text-decoration: none;
}
.pb-nav a .bi { font-size: 17px; }
.pb-nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.pb-nav a.active { background: var(--pb-green-600); color: #fff; font-weight: 600; }

.pb-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding: 16px 8px 0; border-top: 1px solid var(--pb-green-500); }
.pb-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pb-avatar {
    width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--pb-green-500); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px;
}
.pb-user-name { font-weight: 600; color: #fff; font-size: 14px; display: block; }
.pb-user-mail { font-size: 12px; color: var(--pb-side-muted); display: block; overflow: hidden; text-overflow: ellipsis; }
.pb-logout {
    width: 100%; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px;
    border-radius: 10px; border: 1px solid var(--pb-green-500); background: transparent;
    color: var(--pb-side-text); font: inherit; font-size: 14px; cursor: pointer;
}
.pb-logout:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

@media (max-width: 860px) {
    .pb-side { gap: 16px; padding: 16px; }
    .pb-nav { flex-direction: row; flex-wrap: wrap; }
    .pb-nav a { flex: 1 1 140px; }
    .pb-side-foot { flex-direction: row; align-items: center; justify-content: space-between; }
    .pb-logout { width: auto; }
}

/* Page header */
.pb-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.pb-eyebrow { font-size: 13px; color: var(--pb-muted); font-weight: 500; }
.pb-title { margin: 0; font-weight: 600; font-size: 30px; }
.pb-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Buttons */
.pb-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
    border-radius: 10px; border: 1px solid #D6D4CA; background: #fff; color: var(--pb-ink);
    font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.pb-btn:hover { background: #F7F6F1; color: var(--pb-ink); }
.pb-btn-primary { background: var(--pb-green-700); border-color: var(--pb-green-700); color: #fff; }
.pb-btn-primary:hover { background: var(--pb-green-900); border-color: var(--pb-green-900); color: #fff; }
.pb-btn-light { background: #fff; border-color: #fff; color: var(--pb-green-900); }
.pb-btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.pb-btn-ghost { border-color: transparent; background: transparent; color: var(--pb-green-700); }
.pb-btn-ghost:hover { background: var(--pb-green-50); color: var(--pb-green-900); }
.pb-btn-danger-ghost { border-color: transparent; background: transparent; color: #A12C1C; }
.pb-btn-danger-ghost:hover { background: #FBE9E6; color: #8A2A1B; }

/* Cards and figures */
.pb-card { background: var(--pb-surface); border: 1px solid var(--pb-line); border-radius: 16px; }
.pb-card-pad { padding: 20px 24px; }
.pb-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; }
.pb-card-title { margin: 0; font-size: 18px; font-weight: 600; }
.pb-card-sub { font-size: 13px; color: var(--pb-muted); }
.pb-link { font-size: 14px; font-weight: 600; color: var(--pb-green-700); text-decoration: none; }
.pb-link:hover { color: var(--pb-green-900); text-decoration: underline; }

.pb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.pb-stat { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; border-radius: 14px; background: #fff; border: 1px solid var(--pb-line); }
.pb-stat-label { font-size: 13px; color: var(--pb-muted); font-weight: 600; }
.pb-stat-value { font-family: Sora, sans-serif; font-size: 32px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.pb-stat-note { font-size: 13px; color: var(--pb-muted); }
.pb-stat-warn { background: #FBF3E1; border-color: #EAD9B0; }
.pb-stat-warn .pb-stat-label, .pb-stat-warn .pb-stat-note, .pb-stat-warn a { color: #7A5512; }
.pb-stat-warn .pb-stat-value { color: #5C3F0B; }

.pb-row { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.pb-col-wide { flex: 999 1 520px; min-width: 0; }
.pb-col-narrow { flex: 1 1 300px; min-width: 0; }

/* Next draw banner */
.pb-hero {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
    padding: 24px 28px; border-radius: 16px; background: var(--pb-green-900); color: #fff;
}
.pb-hero-left { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.pb-datebox {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 76px; height: 76px; border-radius: 14px; background: var(--pb-gold); color: var(--pb-green-900);
}
.pb-datebox-mon { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; }
.pb-datebox-day { font-family: Sora, sans-serif; font-size: 30px; font-weight: 700; line-height: 1; }
.pb-hero-kicker { font-size: 13px; color: var(--pb-side-muted); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.pb-hero-title { font-family: Sora, sans-serif; font-size: 24px; font-weight: 600; display: block; }
.pb-hero-meta { font-size: 14px; color: var(--pb-side-text); }

/* Tables */
.pb-table-wrap { overflow-x: auto; }
.pb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pb-table thead tr { background: var(--pb-head); color: var(--pb-muted); text-align: left; }
.pb-table th { padding: 11px 12px; font-weight: 600; white-space: nowrap; }
.pb-table td { padding: 13px 12px; border-top: 1px solid var(--pb-line-soft); vertical-align: middle; }
.pb-table th:first-child, .pb-table td:first-child { padding-left: 24px; }
.pb-table th:last-child, .pb-table td:last-child { padding-right: 24px; }
.pb-table .r { text-align: right; }
.pb-table-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--pb-line-soft); font-size: 13px; color: var(--pb-muted); }
.pb-empty { padding: 32px 24px; text-align: center; color: var(--pb-muted); }

/* Badges */
.pb-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pb-badge-green { background: var(--pb-green-50); color: var(--pb-green-text); }
.pb-badge-gold { background: var(--pb-gold-50); color: var(--pb-gold-text); }
.pb-badge-grey { background: #ECEBE5; color: #4A544F; }
.pb-badge-strong { font-weight: 700; }
.pb-bond { font-family: Sora, sans-serif; font-weight: 600; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }

/* Upcoming list */
.pb-up-item { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--pb-line-soft); }
.pb-up-date { width: 48px; flex: none; display: flex; flex-direction: column; align-items: center; color: var(--pb-ink-2); }
.pb-up-mon { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; }
.pb-up-day { font-family: Sora, sans-serif; font-size: 20px; font-weight: 600; line-height: 1.1; color: var(--pb-ink); }

/* Prize bars */
.pb-bar { height: 10px; border-radius: 999px; background: #EFEDE5; overflow: hidden; }
.pb-bar > span { display: block; height: 100%; border-radius: 999px; }

/* Segmented tabs */
.pb-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: #E9E7DF; }
.pb-tabs a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 9px; color: #4A544F; font-weight: 600; text-decoration: none; }
.pb-tabs a:hover { color: var(--pb-ink); }
.pb-tabs a.active { background: #fff; color: var(--pb-ink); box-shadow: 0 1px 2px rgba(20, 32, 27, 0.12); }

.pb-select, .pb-input {
    min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid #C9C7BC; background: #fff;
    font: inherit; color: var(--pb-ink);
}
.pb-input:focus, .pb-select:focus { outline: 2px solid var(--pb-green-700); outline-offset: 1px; border-color: var(--pb-green-700); }

/* Alerts */
.pb-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; font-size: 14px; }
.pb-alert-success { background: var(--pb-green-50); color: var(--pb-green-text); }
.pb-alert-error { background: #FBE9E6; color: #8A2A1B; }
.pb-alert-warn { background: var(--pb-gold-50); color: var(--pb-gold-text); }
.pb-alert ul { margin: 0; padding-left: 18px; }
.pb-alert .btn-close { margin-left: auto; }

/* Bootstrap pages that are not redesigned yet pick up the theme */
.pb-main .card { border: 1px solid var(--pb-line); border-radius: 16px; }
.pb-main .card-header { background: var(--pb-head); border-bottom-color: var(--pb-line); }
.pb-main .btn-primary { --bs-btn-bg: #146C4B; --bs-btn-border-color: #146C4B; --bs-btn-hover-bg: #0E3B2C; --bs-btn-hover-border-color: #0E3B2C; --bs-btn-active-bg: #0E3B2C; --bs-btn-active-border-color: #0E3B2C; }
.pb-main .btn-success { --bs-btn-bg: #146C4B; --bs-btn-border-color: #146C4B; --bs-btn-hover-bg: #0E3B2C; --bs-btn-hover-border-color: #0E3B2C; }
.pb-main .btn-outline-primary { --bs-btn-color: #146C4B; --bs-btn-border-color: #146C4B; --bs-btn-hover-bg: #146C4B; --bs-btn-hover-border-color: #146C4B; }
.pb-main .bg-primary { background-color: #146C4B !important; }
.pb-main .text-primary { color: #146C4B !important; }
.pb-main .table > :not(caption) > * > * { padding: 0.7rem 0.75rem; }
