/* ============================================================
   876 PROMOTIONS — Campaign Management Theme
   ============================================================ */

:root {
    --promo-black: #111111;
    --promo-dark: #1b1b1b;
    --promo-gray: #6b6b6b;
    --promo-light-gray: #f5f6f4;
    --promo-border: #e5e7e3;
    --promo-green: #b8ff3d;
    --promo-green-dark: #8dcc16;
    --promo-white: #ffffff;
}


/* ============================================================
   PAGE
   ============================================================ */

.manage-entries-page {
    background: #f7f8f6;
    min-height: 100vh;
    padding-bottom: 60px;
}


/* ============================================================
   MAIN CONTAINER
   ============================================================ */

.manage-entries-page > .container {
    max-width: 1400px;
}


/* ============================================================
   CAMPAIGN HEADER
   ============================================================ */

.manage-entries-header {
    background: var(--promo-black);
    color: var(--promo-white);
    border-radius: 16px;
    padding: 28px 32px;
    margin-top: 24px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.manage-entries-header::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    background: var(--promo-green);
    opacity: 0.08;
    border-radius: 50%;
    right: -60px;
    top: -100px;
}

.manage-entries-header h2 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.manage-entries-header p {
    margin: 8px 0 0;
    color: #bdbdbd;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}


/* ============================================================
   GROUP CREATION AREA
   ============================================================ */

.creation-option {
    background: var(--promo-white);
    border: 1px solid var(--promo-border);
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 16px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
}

.creation-option h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--promo-black);
    margin-bottom: 14px;
}

.creation-option h5 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--promo-gray);
    margin-bottom: 12px;
}


/* Inputs */

.creation-option .form-control {
    border: 1px solid #dcded9;
    border-radius: 8px;
    min-height: 42px;
    box-shadow: none;
}

.creation-option .form-control:focus {
    border-color: var(--promo-green-dark);
    box-shadow: 0 0 0 3px rgba(184, 255, 61, 0.18);
}


/* ============================================================
   PRIMARY BUTTONS
   ============================================================ */

.creation-option .btn-primary,
.custom-button,
#create-group,
#createFromExisting {
    background: var(--promo-black) !important;
    border-color: var(--promo-black) !important;
    color: var(--promo-white) !important;
    font-weight: 600;
    border-radius: 8px;
    padding: 9px 16px;
    transition: all 0.2s ease;
}

.creation-option .btn-primary:hover,
.custom-button:hover,
#create-group:hover,
#createFromExisting:hover:not(:disabled) {
    background: var(--promo-green) !important;
    border-color: var(--promo-green) !important;
    color: var(--promo-black) !important;
    transform: translateY(-1px);
}

#createFromExisting:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}


/* ============================================================
   OR DIVIDER
   ============================================================ */

.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 12px 0;
    color: #999;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--promo-border);
}


/* ============================================================
   GROUP CHECKBOXES
   ============================================================ */

.available-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.group-checkbox {
    position: relative;
}

.group-checkbox-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.group-checkbox label {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border: 1px solid var(--promo-border);
    border-radius: 999px;
    background: #fafafa;
    color: #555;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.group-checkbox label:hover {
    border-color: var(--promo-green-dark);
}

.group-checkbox-input:checked + label {
    background: var(--promo-green);
    border-color: var(--promo-green);
    color: var(--promo-black);
    font-weight: 700;
}


/* ============================================================
   GROUP TABS
   ============================================================ */

#groupTabs {
    border-bottom: 2px solid var(--promo-black);
    gap: 5px;
    margin-top: 28px;
    padding-left: 4px;
    overflow-x: auto;
    flex-wrap: nowrap;
}

#groupTabs .nav-item {
    flex: 0 0 auto;
}

#groupTabs .nav-link {
    border: 0;
    border-radius: 9px 9px 0 0;
    color: #666;
    background: transparent;
    padding: 11px 17px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease;
}

#groupTabs .nav-link:hover {
    color: var(--promo-black);
    background: #eceeea;
}

#groupTabs .nav-link.active {
    background: var(--promo-black);
    color: var(--promo-white);
}


/* ============================================================
   TAB CONTENT
   ============================================================ */

.tab-content {
    background: transparent;
}

.tab-pane {
    padding-left: 0 !important;
    padding-right: 0 !important;
}


/* ============================================================
   WINNER TABLE PANELS
   ============================================================ */

.tab-pane > table {
    background: var(--promo-white);
    border: 1px solid var(--promo-border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
}


/* Captions */

.tab-pane table caption {
    caption-side: top;
    background: var(--promo-black);
    color: var(--promo-white);
    padding: 11px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: left;
}

.tab-pane table caption::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--promo-green);
    color: var(--promo-black);
    font-size: 0.7rem;
}


/* Table header */

.tab-pane table thead th {
    background: #f1f2ef;
    border-bottom: 1px solid var(--promo-border);
    color: #555;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    padding: 11px 12px;
}


/* Table cells */

.tab-pane table tbody td {
    padding: 10px 12px;
    font-size: 0.8rem;
    vertical-align: middle;
    border-color: #eeeeec;
}

.tab-pane table tbody tr:hover {
    background: #fafcf7;
}


/* Badge dropdown */

.badge-dropdown {
    min-width: 95px;
    border: 1px solid #d8dad5;
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 0.75rem;
    background: #fff;
}


/* ============================================================
   ENTRY SUMMARY
   ============================================================ */

.entry-summary {
    background: var(--promo-black);
    color: white;
    border-radius: 12px;
    padding: 18px 20px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.entry-summary h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.entry-summary strong {
    color: var(--promo-green);
    font-size: 1.15rem;
}


/* ============================================================
   ENTRY ARCHIVE
   ============================================================ */

[id$="-entry-archive"] {
    margin-top: 20px;
}

[id$="-entry-archive"] > div > .row {
    background: transparent;
    padding: 22px 0 !important;
    margin: 0;
    border-bottom: 1px solid var(--promo-border);
}

[id$="-entry-archive"] h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--promo-black);
    margin-bottom: 16px;
}


/* ============================================================
   ENTRY CARDS
   ============================================================ */

.entry-parent {
    padding: 8px !important;
}

.entry-parent .card {
    border: 1px solid var(--promo-border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--promo-white);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.entry-parent .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}


/* Image */

.entry-parent .card-img-top {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #4b4b4b;
}


/* Card body */

.entry-parent .card-body {
    padding: 15px;
}

.entry-parent .card-title {
    color: var(--promo-black);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.entry-parent .card-text {
    color: #666;
    font-size: 0.75rem;
    line-height: 1.5;
    margin-bottom: 5px;
}


/* ============================================================
   CARD BUTTONS
   ============================================================ */

.entry-parent .btn-primary {
    background: #f0f1ed;
    border: 1px solid #dfe1dc;
    color: var(--promo-black);
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 6px 9px;
    margin-right: 3px;
    transition: all 0.2s ease;
}

.entry-parent .btn-primary:hover {
    background: var(--promo-black);
    border-color: var(--promo-black);
    color: white;
}


/* Winner pill */

.pill {
    display: inline-flex;
    align-items: center;
    background: var(--promo-green);
    color: var(--promo-black);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.7rem;
    font-weight: 800;
}

.pill::before {
    content: "✓";
    margin-right: 5px;
}

.pill-text {
    font-size: inherit;
}


/* ============================================================
   GENERATE WINNERS SECTION
   ============================================================ */

.winner_count {
    max-width: 280px;
    display: inline-block;
    border: 1px solid #dcded9;
    border-radius: 8px;
}

.winner_count:focus {
    border-color: var(--promo-green-dark);
    box-shadow: 0 0 0 3px rgba(184, 255, 61, 0.18);
}


/* ============================================================
   HR
   ============================================================ */

.tab-pane hr {
    border: 0;
    border-top: 1px solid var(--promo-border);
    opacity: 1;
    margin: 28px 0;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 992px) {

    #groupTabs .nav-link {
        padding: 9px 12px;
    }

    .entry-parent .card-body {
        padding: 12px;
    }
}


@media (max-width: 768px) {

    .manage-entries-header {
        padding: 22px;
    }

    .manage-entries-header h2 {
        font-size: 1.35rem;
    }

    .available-groups {
        gap: 6px;
    }

    .entry-parent {
        width: 100%;
    }

    .winner_count {
        max-width: 100%;
        width: 100%;
        margin-bottom: 10px;
    }

    .entry-parent .card {
        max-width: 420px;
        margin: auto;
    }
}


/* ============================================================
   ADMIN MODAL
   ============================================================ */

.admin-modal {
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.admin-modal .modal-header {
    background: #111111;
    color: #ffffff;
    border-bottom: 0;
    padding: 20px 24px;
}

.admin-modal .modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}

.admin-modal .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.admin-modal .modal-body {
    padding: 28px 24px;
    background: #ffffff;
}

.submission-group-selector {
    display: flex;
    align-items: center;
    gap: 12px;
}

.submission-group-selector .form-select {
    flex: 1;
    width: auto;
    min-height: 46px;
    border: 1px solid #dcded9;
    border-radius: 8px;
    box-shadow: none;
}

.submission-group-selector .form-select:focus {
    border-color: #8dcc16;
    box-shadow: 0 0 0 3px rgba(184, 255, 61, 0.18);
}

.admin-confirm-btn {
    flex: 0 0 auto;
    min-height: 46px;
    padding: 0 22px;
    background: #111111;
    border: 1px solid #111111;
    color: #ffffff;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.admin-confirm-btn:hover {
    background: #b8ff3d;
    border-color: #b8ff3d;
    color: #111111;
}

.admin-modal .modal-footer {
    background: #f5f6f4;
    border-top: 1px solid #e5e7e3;
    padding: 14px 24px;
}

.admin-modal-close {
    background: #6b7280;
    border-color: #6b7280;
    color: #ffffff;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 0.8rem;
    font-weight: 600;
}

.admin-modal-close:hover {
    background: #111111;
    border-color: #111111;
    color: #ffffff;
}