/* =============================================================
   2027 Elections Hub — Frontend Manager & Forms Stylesheet
   ============================================================= */

/* ---- Manager wrapper ---- */
.elec-mgr {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 0 48px;
    font-family: inherit;
}

/* ---- Tab navigation ---- */
.elec-mgr-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 3px solid #e0e0e0;
    margin-bottom: 28px;
}
.elec-mgr-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
    color: #555;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
    transition: color .15s;
    border-radius: 4px 4px 0 0;
}
.elec-mgr-tab:hover { color: #c0392b; text-decoration: none; }
.elec-mgr-tab--active {
    color: #c0392b;
    border-bottom-color: #c0392b;
    background: #fdf6f5;
}
.elec-mgr-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
    color: #555;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
}
.elec-mgr-tab--active .elec-mgr-tab-count {
    background: #c0392b;
    color: #fff;
}

/* ---- Notices ---- */
.elec-mgr-notice {
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    line-height: 1.5;
}
.elec-mgr-notice--success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.elec-mgr-notice--error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.elec-mgr-notice a { color: inherit; font-weight: 700; }

/* ---- List header ---- */
.elec-mgr-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
}
.elec-mgr-list-title {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
}

/* ---- Buttons ---- */
.elec-mgr-btn {
    display: inline-block;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.elec-mgr-btn--primary {
    background: #c0392b;
    color: #fff;
    border: 2px solid #c0392b;
}
.elec-mgr-btn--primary:hover { background: #a93226; border-color: #a93226; color: #fff; text-decoration: none; }
.elec-mgr-btn--ghost {
    background: transparent;
    color: #555;
    border: 2px solid #d0d0d0;
}
.elec-mgr-btn--ghost:hover { border-color: #999; color: #333; text-decoration: none; }

/* ---- Empty state ---- */
.elec-mgr-empty {
    text-align: center;
    padding: 48px 20px;
    background: #fafafa;
    border: 2px dashed #e0e0e0;
    border-radius: 6px;
}
.elec-mgr-empty p { font-size: 15px; color: #777; margin-bottom: 16px; }

/* ---- Table ---- */
.elec-mgr-table-wrap { overflow-x: auto; }
.elec-mgr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.elec-mgr-table thead th {
    background: #1a1a2e;
    color: #e8c84a;
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
}
.elec-mgr-table tbody tr { border-bottom: 1px solid #f0f0f0; }
.elec-mgr-table tbody tr:hover td { background: #fdf6f5; }
.elec-mgr-table td { padding: 10px 14px; vertical-align: middle; color: #1a1a1a; }
.elec-mgr-td-main {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}
.elec-mgr-thumb {
    width: 32px !important;
    height: 32px !important;
    object-fit: cover;
    border-radius: 50%;
    flex-shrink: 0;
}
.elec-mgr-td-actions { white-space: nowrap; }

.elec-mgr-action-btn {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #c0392b;
    color: #c0392b;
    border-radius: 3px;
    text-decoration: none;
    margin-right: 6px;
    transition: background .15s;
}
.elec-mgr-action-btn:hover { background: #c0392b; color: #fff; text-decoration: none; }
.elec-mgr-action-btn--view { border-color: #aaa; color: #555; }
.elec-mgr-action-btn--view:hover { background: #555; border-color: #555; color: #fff; }

/* ---- Form header ---- */
.elec-mgr-form-header { margin-bottom: 24px; }
.elec-mgr-back {
    font-size: 13px;
    color: #c0392b;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 10px;
}
.elec-mgr-back:hover { text-decoration: underline; }
.elec-mgr-form-title {
    font-size: 22px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #c0392b;
}

/* ---- Form fields ---- */
.elec-form { display: flex; flex-direction: column; gap: 20px; }
.elec-form-row { display: flex; flex-direction: column; gap: 6px; }
.elec-form-row--half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.elec-form-row--half > div { display: flex; flex-direction: column; gap: 6px; }

.elec-form-label {
    font-size: 12px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.elec-form-required { color: #c0392b; }

.elec-form-input,
.elec-form-select,
.elec-form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 14px;
    color: #1a1a1a;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
}
.elec-form-input:focus,
.elec-form-select:focus,
.elec-form-textarea:focus {
    outline: none;
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192,57,43,.1);
}
.elec-form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%23666' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}
.elec-form-textarea { resize: vertical; line-height: 1.65; }
.elec-form-textarea--tall { min-height: 180px; }
.elec-form-file { font-size: 13px; color: #555; padding: 6px 0; cursor: pointer; }

.elec-form-current-image {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    padding: 10px 12px;
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}
.elec-form-current-image img {
    width: 48px !important;
    height: 48px !important;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}

.elec-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 8px;
}
.elec-form-submit {
    padding: 12px 28px;
    background: #c0392b;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background .15s;
    font-family: inherit;
}
.elec-form-submit:hover { background: #a93226; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .elec-mgr-tabs { gap: 0; flex-wrap: wrap; }
    .elec-mgr-tab  { padding: 8px 14px; font-size: 13px; }
    .elec-mgr-list-header { flex-direction: column; align-items: flex-start; }
    .elec-form-row--half  { grid-template-columns: 1fr; }
    .elec-form-actions { flex-direction: column; }
    .elec-form-submit { width: 100%; text-align: center; }
    .elec-mgr-btn { width: 100%; text-align: center; }
}
