/* ---------------------------------------------------------
   Knights of Columbus – Unified Raffle System Theme
   Clean rebuild for consistent branding across all pages
--------------------------------------------------------- */

/* ---------------------------------------------------------
   COLOR PALETTE
--------------------------------------------------------- */
:root {
    --kofc-blue: #002f6c;
    --kofc-blue-dark: #001d44;
    --kofc-gold: #f2a900;
    --kofc-white: #ffffff;
    --kofc-gray: #f4f6f8;
    --kofc-text: #2b2b2b;
}

/* ---------------------------------------------------------
   GLOBAL BODY
--------------------------------------------------------- */
body {
    margin: 0;
    padding: 0;
    background-color: var(--kofc-gray);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    color: var(--kofc-text);
    line-height: 1.6;
}

/* ---------------------------------------------------------
   GLOBAL TYPOGRAPHY
--------------------------------------------------------- */
h1, h2, h3, h4 {
    color: var(--kofc-blue);
    margin-top: 0;
    font-weight: 600;
}

/* ---------------------------------------------------------
   GLOBAL HEADER (matches new header.php)
--------------------------------------------------------- */
.kofc-header {
    background: var(--kofc-blue);
    border-bottom: 4px solid var(--kofc-gold);
    padding: 1rem 1.5rem;
    color: var(--kofc-white);
}

.kofc-header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.kofc-logo {
    max-width: 300px;
    height: auto;
    display: block;
}

.kofc-title {
    font-size: 1.8rem;
    margin: 0;
    font-weight: 700;
}

.kofc-subtitle {
    font-size: 1.2rem;
    margin: 0;
    opacity: 0.9;
}

/* ---------------------------------------------------------
   PAGE CONTENT WRAPPER
--------------------------------------------------------- */
.page-content {
    padding: 2rem 1.5rem;
}

/* ---------------------------------------------------------
   CARDS / PANELS
--------------------------------------------------------- */
.page-card,
.container.dashboard {
    background: var(--kofc-white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(0,0,0,0.12);
    margin-bottom: 2rem;
}

/* ---------------------------------------------------------
   SECTIONS (info pages)
--------------------------------------------------------- */
section {
    background-color: var(--kofc-white);
    padding: 1.75rem;
    margin-bottom: 1.75rem;
    border-left: 6px solid var(--kofc-blue);
    border-radius: 4px;
}

/* ---------------------------------------------------------
   NOTICE BLOCKS
--------------------------------------------------------- */
.notice {
    background-color: #fff7e1;
    border-left: 6px solid var(--kofc-gold);
    padding: 1.25rem;
    margin-bottom: 2rem;
    font-weight: bold;
    border-radius: 4px;
}

/* ---------------------------------------------------------
   LOGIN BOX
--------------------------------------------------------- */
.login-box {
    max-width: 420px;
    margin: 3rem auto;
    padding: 2rem;
    background: var(--kofc-white);
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(0,0,0,0.15);
}

.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    padding: 0.6rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* ---------------------------------------------------------
   BUTTONS (Unified Bootstrap override)
--------------------------------------------------------- */
.btn,
button,
input[type="submit"] {
    background-color: var(--kofc-blue) !important;
    color: var(--kofc-white) !important;
    border: none !important;
    padding: 0.55rem 1.1rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

.btn:hover,
button:hover,
input[type="submit"]:hover {
    background-color: var(--kofc-blue-dark) !important;
}

/* Gold button */
.btn-gold {
    background-color: var(--kofc-gold) !important;
    color: var(--kofc-blue) !important;
    border: 2px solid var(--kofc-gold) !important;
}

.btn-gold:hover {
    background-color: var(--kofc-blue) !important;
    color: var(--kofc-white) !important;
}

.btn-group-sm .btn {
    white-space: nowrap;
}


/* ---------------------------------------------------------
   TABLES
--------------------------------------------------------- */
.table {
    background: var(--kofc-white);
}

.table th {
    background-color: var(--kofc-blue);
    color: var(--kofc-white);
}

.table td, .table th {
    vertical-align: middle;
    padding: 0.75rem;
}

/* Highlight for already-entered purchaser rows */
.already-entered {
    background-color: #e8ffe8 !important;
}

/* Prevent empty tables from collapsing */
.table tbody:empty::after {
    content: "No data available";
    display: table-row;
    text-align: center;
    color: #888;
}

/* ---------------------------------------------------------
   SUMMARY CARDS (Admin/Officer dashboards)
--------------------------------------------------------- */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.summary-card {
    background: var(--kofc-gray);
    padding: 1.25rem;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #ddd;
    font-weight: bold;
}

@media print {
    .no-print {
        display: none !important;
    }
}


/* ---------------------------------------------------------
   LEGACY ELEMENTS (kept but visually unified)
--------------------------------------------------------- */
.turnin-card {
    cursor: pointer;
    border: 1px solid #ccc;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 6px;
    background: #f9f9f9;
    transition: background 0.2s, box-shadow 0.2s;
}

.turnin-card:hover {
    background: #eef6ff;
    box-shadow: 0 0 4px rgba(0,0,0,0.15);
}

.ticket-item {
    padding: 6px;
    border-bottom: 1px solid #eee;
}

.ticket-item:last-child {
    border-bottom: none;
}

.winner-highlight {
    border: 2px solid gold !important;
    background: #fff8d1 !important;
    font-weight: bold;
}

.btn-group-sm .btn {
    white-space: nowrap;
}

/* Officer Turn-In Detail Page */

.section-card {
    background: #fff;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 22px;
    border: 1px solid #ddd;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.diff-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #eee;
}

.diff-changed {
    background: #fff3cd;
    font-weight: bold;
}

.audit-entry {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}

.audit-entry small {
    color: #666;
}

.btn-action {
    margin-right: 8px;
}

/* Row color coding */
.winner-row-unsold {
    background-color: #f0f0f0 !important; /* gray */
}
.winner-row-not-called {
    background-color: #fff7cc !important; /* yellow */
}
.winner-row-called {
    background-color: #d9f7d9 !important; /* green */
}

/* Empty-state card */
.empty-card {
    border: 2px dashed #ccc;
    padding: 40px;
    border-radius: 12px;
    background: #fafafa;
}
.empty-card h3 {
    font-weight: 600;
    margin-bottom: 10px;
}
.empty-card p {
    color: #666;
    margin: 0;
}

/* ---------------------------------------------------------
   STATUS MESSAGES
--------------------------------------------------------- */
.success { color: green; margin-top: 10px; }
.error { color: red; margin-top: 10px; }

/* ---------------------------------------------------------
   FOOTER (matches new footer.php)
--------------------------------------------------------- */
.kofc-footer {
    background-color: var(--kofc-blue);
    color: var(--kofc-white);
    text-align: center;
    padding: 1.25rem 1rem;
    font-size: 0.9rem;
    margin-top: 3rem;
    border-top: 4px solid var(--kofc-gold);
}

.kofc-footer p {
    margin: 0.3rem 0;
}
