/* ── BJ Cooper Admin Panel ─────────────────────────────────────────────────
   Big text. Big buttons. Plain English. Built for BJ.
   ───────────────────────────────────────────────────────────────────────── */

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

:root {
    --black:   #0a0a0a;
    --red:     #A8281C;
    --gold:    #D4923A;
    --white:   #f5f0e8;
    --gray:    #2a2a2a;
    --gray-lt: #3d3d3d;
    --text:    #e8e0d0;
    --muted:   #888;
    --radius:  14px;
    --font:    Georgia, 'Times New Roman', serif;
}

body {
    background: var(--black);
    color: var(--text);
    font-family: var(--font);
    font-size: 20px;
    line-height: 1.5;
    min-height: 100vh;
}

/* ── Screen system ─────────────────────────────────────────────────────────── */
.screen { display: none !important; }
.screen.active { display: block !important; }
#screen-login.active { display: flex !important; }

/* ── LOGIN ─────────────────────────────────────────────────────────────────── */
#screen-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.login-box {
    background: var(--gray);
    border-radius: 24px;
    padding: 56px 48px;
    width: 100%;
    max-width: 480px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-logo {
    font-size: 2.4rem;
    font-weight: bold;
    color: var(--gold);
    letter-spacing: 0.03em;
}

.login-sub {
    font-size: 1.1rem;
    color: var(--muted);
}

.login-input {
    width: 100%;
    padding: 20px 24px;
    font-size: 1.3rem;
    font-family: var(--font);
    background: var(--gray-lt);
    border: 2px solid #555;
    border-radius: var(--radius);
    color: var(--text);
    text-align: center;
    letter-spacing: 0.2em;
    outline: none;
}

.login-input:focus {
    border-color: var(--gold);
}

.login-error {
    color: #ff6b6b;
    font-size: 1.1rem;
}

.hidden { display: none !important; }

/* ── Big button (reused everywhere) ───────────────────────────────────────── */
.big-btn {
    display: inline-block;
    padding: 20px 36px;
    font-size: 1.2rem;
    font-family: var(--font);
    font-weight: bold;
    background: var(--red);
    color: var(--white);
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    white-space: nowrap;
}

.big-btn:hover  { background: #c43020; }
.big-btn:active { transform: scale(0.97); }

.big-btn.small {
    padding: 12px 24px;
    font-size: 1rem;
}

/* ── Header (used on inner screens) ───────────────────────────────────────── */
.admin-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--black);
    border-bottom: 2px solid var(--gray);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 32px;
}

.admin-site-name {
    font-size: 1.2rem;
    color: var(--gold);
    font-weight: bold;
    flex: 1;
}

.admin-screen-title {
    font-size: 1.4rem;
    font-weight: bold;
    flex: 1;
    text-align: center;
}

.logout-btn {
    background: none;
    border: 2px solid #555;
    color: var(--muted);
    border-radius: 100px;
    padding: 10px 20px;
    font-size: 1rem;
    font-family: var(--font);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}
.logout-btn:hover { border-color: var(--text); color: var(--text); }

.back-btn {
    background: none;
    border: none;
    color: var(--gold);
    font-size: 1.2rem;
    font-family: var(--font);
    cursor: pointer;
    padding: 8px 0;
    min-width: 80px;
}
.back-btn:hover { text-decoration: underline; }

/* ── Dashboard ─────────────────────────────────────────────────────────────── */
.dash-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 60px 32px;
}

.dash-title {
    font-size: 2.6rem;
    color: var(--gold);
    margin-bottom: 48px;
    text-align: center;
}

.dash-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

@media (max-width: 600px) {
    .dash-cards { grid-template-columns: 1fr; }
}

.dash-card {
    background: var(--gray);
    border: 2px solid var(--gray-lt);
    border-radius: 20px;
    padding: 48px 32px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.1s, background 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
    font-family: var(--font);
    color: var(--text);
}

.dash-card:hover  { border-color: var(--gold); background: var(--gray-lt); }
.dash-card:active { transform: scale(0.98); }

.card-icon  { font-size: 3rem; }
.card-label { font-size: 1.5rem; font-weight: bold; }
.card-desc  { font-size: 1rem; color: var(--muted); }

.unread-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--red);
    color: white;
    font-size: 0.85rem;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 100px;
}

/* ── Messages screen ───────────────────────────────────────────────────────── */
.messages-main {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 32px;
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message-card {
    background: var(--gray);
    border: 2px solid var(--gray-lt);
    border-radius: 16px;
    padding: 28px 32px;
    transition: border-color 0.15s;
}

.message-card.unread {
    border-color: var(--gold);
}

.message-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: baseline;
    margin-bottom: 12px;
}

.message-name  { font-size: 1.3rem; font-weight: bold; color: var(--white); }
.message-email { font-size: 1rem; color: var(--gold); }
.message-date  { font-size: 0.9rem; color: var(--muted); margin-left: auto; }

.message-subject {
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 10px;
    font-style: italic;
}

.message-body {
    font-size: 1.1rem;
    line-height: 1.7;
    white-space: pre-wrap;
}

.message-new-tag {
    display: inline-block;
    background: var(--red);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 100px;
    margin-left: 10px;
    vertical-align: middle;
}

.no-messages {
    text-align: center;
    padding: 80px 0;
    color: var(--muted);
    font-size: 1.3rem;
}

.loading-text {
    text-align: center;
    color: var(--muted);
    padding: 60px 0;
    font-size: 1.2rem;
}

/* ── Updates screen ────────────────────────────────────────────────────────── */
.updates-main {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    gap: 52px;
}

.update-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.update-heading {
    font-size: 1.6rem;
    color: var(--gold);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-lt);
}

.update-hint {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.6;
}

/* Video title fields */
.video-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.video-filename {
    font-size: 0.95rem;
    color: var(--muted);
    font-style: italic;
}

.video-input, .link-input, .quote-input {
    width: 100%;
    padding: 18px 22px;
    font-size: 1.15rem;
    font-family: var(--font);
    background: var(--gray);
    border: 2px solid #555;
    border-radius: var(--radius);
    color: var(--text);
    outline: none;
    transition: border-color 0.15s;
    resize: vertical;
}

.video-input:focus, .link-input:focus, .quote-input:focus {
    border-color: var(--gold);
}

/* Link fields */
.link-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-label {
    font-size: 1.05rem;
    font-weight: bold;
    color: var(--text);
}

/* Quote / shows */
.quote-input {
    min-height: 90px;
    line-height: 1.6;
}

/* Video rows */
.video-row {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--gray-lt);
    border-radius: 16px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.video-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.video-row-num {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--gold);
}

.delete-video-btn {
    background: none;
    border: 2px solid rgba(255,80,80,0.35);
    color: rgba(255,120,120,0.8);
    border-radius: 100px;
    padding: 10px 20px;
    font-size: 1rem;
    font-family: var(--font);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.delete-video-btn:hover {
    background: rgba(255,80,80,0.12);
    border-color: rgba(255,80,80,0.7);
    color: #ff8080;
}

.video-drive-input {
    width: 100%;
    padding: 18px 22px;
    font-size: 1rem;
    font-family: var(--font);
    background: var(--gray);
    border: 2px solid #555;
    border-radius: var(--radius);
    color: var(--text);
    outline: none;
    transition: border-color 0.15s;
}
.video-drive-input:focus { border-color: var(--gold); }

.video-desc-input {
    width: 100%;
    padding: 14px 22px;
    font-size: 1rem;
    font-family: var(--font);
    background: var(--gray);
    border: 2px solid #555;
    border-radius: var(--radius);
    color: var(--text);
    outline: none;
    resize: vertical;
    transition: border-color 0.15s;
}
.video-desc-input:focus { border-color: var(--gold); }

.field-optional {
    font-weight: normal;
    font-size: 0.9rem;
    color: var(--muted);
}

.add-video-box {
    margin-top: 8px;
    background: rgba(212,146,58,0.06);
    border: 2px dashed rgba(212,146,58,0.3);
    border-radius: 16px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.add-video-label {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--gold);
}

.add-video-hint {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.6;
}

.add-video-submit-btn {
    align-self: flex-start;
    padding: 18px 36px;
    font-size: 1.1rem;
}

.no-videos-yet {
    text-align: center;
    padding: 40px 0 24px;
    color: var(--muted);
    font-size: 1.1rem;
    font-style: italic;
}

.video-count-note {
    font-size: 1rem;
    color: var(--muted);
    margin-top: 12px;
    text-align: right;
}

/* Fixed rows (shows + press) */
.fixed-rows {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fixed-row {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--gray-lt);
    border-radius: 16px;
    padding: 24px 28px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.fixed-row-num {
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--muted);
    min-width: 60px;
    padding-top: 22px;
}

.fixed-row-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Floating save button — fixed to right side of screen */
.float-save {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 90px;
    height: 90px;
    background: var(--red);
    color: var(--white);
    border: none;
    border-radius: 18px;
    font-size: 1.05rem;
    font-family: var(--font);
    font-weight: bold;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 100;
    box-shadow: 0 4px 28px rgba(168,40,28,0.6);
    line-height: 1.5;
    transition: background 0.15s;
}
.float-save:hover  { background: #c43020; }
.float-save:active { transform: translateY(-50%) scale(0.95); }
.float-save.visible { display: flex; }

/* Save row at bottom of updates form */
.save-row {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 0 80px;
    margin-top: 16px;
}

.save-btn { padding: 22px 60px; font-size: 1.3rem; }

.save-confirm {
    font-size: 1.2rem;
    color: #5cb85c;
    font-weight: bold;
}

.save-error {
    font-size: 1.1rem;
    color: #ff6b6b;
    font-weight: bold;
}
