/* ═══════════════════════════════════════════════════════════════════
   SoftyIT Admin — Custom CSS overrides for Jazzmin darkly theme
   ═══════════════════════════════════════════════════════════════════ */

/* ── Form controls: ensure text is always readable ─────────────── */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="time"],
textarea,
select {
    background-color: #2c3136 !important;
    color: #e9ecef !important;
    border-color: #4a5056 !important;
    border-radius: 6px !important;
}
.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: #6c757d !important;
    opacity: 1 !important;
}
.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    background-color: #343a40 !important;
    color: #f8f9fa !important;
    border-color: #45F248 !important;
    box-shadow: 0 0 0 0.2rem rgba(69, 242, 72, 0.18) !important;
    outline: none !important;
}

/* ── Select options ─────────────────────────────────────────────── */
select option {
    background-color: #2c3136 !important;
    color: #e9ecef !important;
}
select[multiple] {
    background-color: #2c3136 !important;
    color: #e9ecef !important;
}

/* ── Labels ─────────────────────────────────────────────────────── */
label,
.required,
.form-group label {
    color: #ced4da !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
}

/* ── Help text ──────────────────────────────────────────────────── */
.help,
p.help,
.help-inline,
.help-block,
.form-text {
    color: #8a9299 !important;
    font-size: 0.78rem !important;
    margin-top: 4px !important;
}

/* ── JSON / large text areas ────────────────────────────────────── */
textarea.vLargeTextField,
textarea.vTextField,
textarea {
    font-family: 'Courier New', 'Consolas', monospace !important;
    font-size: 12px !important;
    line-height: 1.6 !important;
    min-height: 90px !important;
}

/* ── Read-only display values ───────────────────────────────────── */
.readonly,
.field-box p,
.grp-readonly {
    color: #adb5bd !important;
}

/* ── List display table ─────────────────────────────────────────── */
#result_list td,
#result_list th {
    vertical-align: middle !important;
    padding: 10px 12px !important;
}
#result_list tbody tr:hover {
    background-color: rgba(255,255,255,0.04) !important;
}

/* ── Checkboxes ─────────────────────────────────────────────────── */
input[type="checkbox"] {
    accent-color: #45F248 !important;
    width: 16px !important;
    height: 16px !important;
}

/* ── Field errors ───────────────────────────────────────────────── */
.errorlist li,
.errornote {
    background-color: rgba(239, 68, 68, 0.15) !important;
    border-left: 3px solid #EF4444 !important;
    color: #fc8181 !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
}

/* ── Fieldset legends ───────────────────────────────────────────── */
fieldset.module h2,
fieldset legend,
.grp-collapse-handler {
    color: #45F248 !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
}

/* ── Submit / action buttons ────────────────────────────────────── */
.submit-row input[type="submit"],
.submit-row a.closelink {
    border-radius: 8px !important;
    font-weight: 600 !important;
    padding: 8px 20px !important;
}

/* ── Horizontal tabs (changeform) ───────────────────────────────── */
.nav-tabs .nav-link {
    color: #adb5bd !important;
    border-radius: 6px 6px 0 0 !important;
}
.nav-tabs .nav-link.active {
    background-color: #45F248 !important;
    color: #000 !important;
    border-color: #45F248 !important;
    font-weight: 700 !important;
}

/* ── Inline admin tables ────────────────────────────────────────── */
.inline-group .tabular td,
.inline-group .tabular th {
    border-color: rgba(255,255,255,0.08) !important;
    vertical-align: middle !important;
}
.inline-group h2 {
    color: #45F248 !important;
    font-size: 0.9rem !important;
}

/* ── List-editable inputs ───────────────────────────────────────── */
td .vIntegerField,
td .vTextField,
td input[type="text"],
td input[type="number"] {
    background-color: #2c3136 !important;
    color: #e9ecef !important;
    border: 1px solid #4a5056 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    width: auto !important;
    min-width: 60px !important;
}

/* ── Pagination ─────────────────────────────────────────────────── */
.paginator a,
.paginator span {
    border-radius: 6px !important;
}

/* ── Search bar ─────────────────────────────────────────────────── */
#changelist-search input[type="text"] {
    background-color: #2c3136 !important;
    color: #e9ecef !important;
    border-color: #4a5056 !important;
    border-radius: 8px !important;
    padding: 8px 14px !important;
}

/* ── Date/time widgets ──────────────────────────────────────────── */
.datetimeshortcuts a {
    color: #45F248 !important;
}
.calendar caption,
.calendarbox h2 {
    background-color: #45F248 !important;
    color: #000 !important;
}

/* ── Dashboard/index module headers ─────────────────────────────── */
.module caption,
.module h2 {
    background: linear-gradient(135deg, #45F248 0%, #00d4ff 100%) !important;
    color: #000 !important;
    font-weight: 700 !important;
    padding: 10px 14px !important;
    border-radius: 6px 6px 0 0 !important;
}

/* ── Actions dropdown ───────────────────────────────────────────── */
select#action-select {
    background-color: #2c3136 !important;
    color: #e9ecef !important;
}
