/* ═══════════════════════════════════════════
   MTS Voting — voter.css  (black + gold theme)
   ═══════════════════════════════════════════ */
:root {
    --gold:          #C9A84C;
    --gold-light:    #E8C96A;
    --gold-dark:     #A07830;
    --black:         #0A0A0A;
    --black-card:    #141414;
    --black-deep:    #0D0D0D;
    --black-input:   #1E1E1E;
    --border:        #2A2A2A;
    --border-light:  #333333;
    --text-primary:  #F0F0F0;
    --text-muted:    #666666;
    --radius-lg:     1rem;
    --radius-md:     0.5rem;
    --shadow-card:   0 8px 32px rgba(0,0,0,0.5);
    --shadow-gold:   0 6px 24px rgba(201,168,76,0.25);
}

/* ── Body ── */
body.voter-body {
    background-color: var(--black) !important;
    font-family: 'Poppins', sans-serif;
    color: var(--text-primary);
}

/* ── Cards ── */
.modern-card {
    background: var(--black-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.modern-card:hover {
    transform: translateY(-3px);
    border-color: rgba(201,168,76,0.25);
    box-shadow: var(--shadow-card), 0 0 0 1px rgba(201,168,76,0.08);
}

.modern-card .box-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modern-card .box-title .gradient-text {
    font-size: 1.8rem;
}

/* ── Accent text ── */
.gradient-text {
    color: var(--gold) !important;
    -webkit-text-fill-color: var(--gold) !important;
    background: none !important;
    font-weight: 800;
}

/* ── Buttons ── */
.btn-modern {
    border-radius: var(--radius-md);
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    transition: all 0.2s ease;
    border: none;
    letter-spacing: 0.04em;
    font-size: 0.9rem;
}

.btn-modern-primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #0A0A0A !important;
}

.btn-modern-primary:hover, .btn-modern-primary:focus {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
    box-shadow: var(--shadow-gold);
    transform: translateY(-1px);
    color: #0A0A0A !important;
}

.btn-modern-secondary {
    background: var(--black-input);
    color: var(--gold) !important;
    border: 1px solid var(--border-light);
}

.btn-modern-secondary:hover {
    background: #252525;
    border-color: var(--gold);
    color: var(--gold-light) !important;
}

/* ── Candidate Grid ── */
#candidate_list ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    padding: 0;
}

#candidate_list li.candidate-item {
    list-style: none;
    background: var(--black-card);
    border-radius: 1rem;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
    transition: all 0.25s ease;
    position: relative;
    margin: 0 !important;
    cursor: pointer;
    user-select: none;
}

#candidate_list li.candidate-item:hover {
    transform: translateY(-4px);
    border-color: rgba(201,168,76,0.4);
    box-shadow: 0 12px 28px rgba(0,0,0,0.5);
}

#candidate_list li.candidate-item.selected {
    border-color: var(--gold) !important;
    background-color: #1A1500 !important;
    box-shadow: 0 0 0 3px rgba(201,168,76,0.15), 0 12px 28px rgba(0,0,0,0.5) !important;
}

.candidate-photo {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 3px solid var(--border-light);
    transition: border-color 0.2s;
}

.candidate-item.selected .candidate-photo {
    border-color: var(--gold);
}

.candidate-name {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
}

.selection-control {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
}

/* ── Instruction banner ── */
.instruction-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: var(--black-input);
    border: 1px solid var(--border);
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
}

.instruction-banner p {
    margin: 0 !important;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── Navbar & Sidebar (voter) ── */
.voter-body .main-header .navbar,
.voter-body .main-header .logo {
    background: var(--black-card) !important;
    border-bottom: 1px solid var(--border) !important;
}

.voter-body .main-header .logo {
    color: var(--gold) !important;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.voter-body .main-header .navbar .sidebar-toggle:hover {
    background: rgba(201,168,76,0.08) !important;
}

.voter-body .main-sidebar {
    background-color: var(--black-deep) !important;
    border-right: 1px solid var(--border) !important;
    box-shadow: none;
}

.voter-body .sidebar-menu > li.header {
    background: transparent !important;
    color: rgba(201,168,76,0.35) !important;
    padding: 20px 25px 10px 25px;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.voter-body .sidebar-menu > li > a {
    border-left: 3px solid transparent !important;
    padding: 12px 20px 12px 25px !important;
    transition: all 0.2s ease;
    color: #888 !important;
}

.voter-body .sidebar-menu > li:hover > a,
.voter-body .sidebar-menu > li.active > a {
    background: rgba(201,168,76,0.06) !important;
    color: var(--gold) !important;
    border-left-color: var(--gold) !important;
}

.voter-body .user-panel {
    border-bottom: 1px solid var(--border);
    padding: 20px 15px;
}

.voter-body .user-panel > .info > p {
    font-weight: 600;
    color: var(--text-primary);
}

.voter-body .content-wrapper {
    background-color: var(--black) !important;
}

/* ── Verify page inputs ── */
.voter-body .form-control {
    background: var(--black-input) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    color: var(--text-primary) !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.voter-body .form-control:focus {
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 3px rgba(201,168,76,0.15) !important;
    background: var(--black-input) !important;
    color: var(--text-primary) !important;
    outline: none;
}

/* ── Bootstrap alerts (inline) ── */
.voter-body .alert-danger {
    background: rgba(220,38,38,0.12) !important;
    border: 1px solid rgba(220,38,38,0.35) !important;
    color: #FCA5A5 !important;
    border-radius: 8px !important;
}

/* ── Bootstrap Modals — dark gold theme ── */
.modal-content {
    background: var(--black-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 14px !important;
    box-shadow: 0 24px 60px rgba(0,0,0,0.8), 0 0 0 1px rgba(201,168,76,0.1) !important;
    color: var(--text-primary) !important;
}

.modal-header {
    background: var(--black-deep) !important;
    border-bottom: 1px solid var(--border) !important;
    border-radius: 14px 14px 0 0 !important;
    padding: 1.25rem 1.5rem !important;
}

.modal-header .modal-title,
.modal-header h4 {
    color: var(--gold) !important;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
}

.modal-header .close {
    color: var(--text-muted) !important;
    opacity: 1;
    font-size: 1.4rem;
    text-shadow: none;
    transition: color 0.15s;
}

.modal-header .close:hover {
    color: var(--gold) !important;
}

.modal-body {
    background: var(--black-card) !important;
    color: var(--text-primary) !important;
    padding: 1.5rem !important;
}

.modal-footer {
    background: var(--black-deep) !important;
    border-top: 1px solid var(--border) !important;
    border-radius: 0 0 14px 14px !important;
    padding: 1rem 1.5rem !important;
}

/* Table inside modals */
.modal-body .table {
    color: var(--text-primary) !important;
}

.modal-body .table-bordered,
.modal-body .table-bordered th,
.modal-body .table-bordered td {
    border-color: var(--border) !important;
}

.modal-body .table th {
    color: var(--gold) !important;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--black-deep) !important;
}

.modal-body .table tr:hover td {
    background: rgba(201,168,76,0.04) !important;
}

/* ── Toastr notifications — dark gold ── */
#toast-container > div {
    border-radius: 10px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04) !important;
    padding: 14px 18px 14px 52px !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 0.9rem !important;
    opacity: 1 !important;
    min-width: 280px;
    max-width: 380px;
}

#toast-container > .toast-success {
    background-color: #0D1F10 !important;
    border: 1px solid #2D6A33 !important;
    color: #86EFAC !important;
}

#toast-container > .toast-error {
    background-color: #1F0D0D !important;
    border: 1px solid #7F1D1D !important;
    color: #FCA5A5 !important;
}

#toast-container > .toast-warning {
    background-color: #1A1100 !important;
    border: 1px solid var(--gold-dark) !important;
    color: var(--gold-light) !important;
}

#toast-container > .toast-info {
    background-color: #0D1420 !important;
    border: 1px solid #1E3A5F !important;
    color: #93C5FD !important;
}

#toast-container > div .toast-title {
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 3px;
}

#toast-container > div .toast-message {
    font-size: 0.9rem !important;
    line-height: 1.45;
}

#toast-container > div .toast-close-button {
    color: inherit !important;
    opacity: 0.5;
    font-size: 1.1rem;
    text-shadow: none !important;
}

#toast-container > div .toast-close-button:hover {
    opacity: 1;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .modern-card {
        padding: 1.25rem;
    }

    .candidate-photo {
        width: 80px;
        height: 80px;
    }

    #candidate_list ul {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.75rem;
    }

    #candidate_list li.candidate-item {
        padding: 1.25rem 1rem;
    }

    #toast-container > div {
        min-width: calc(100vw - 2rem);
        max-width: calc(100vw - 2rem);
        margin: 0 1rem;
    }
}
