/* ========================================
   Toylytics Admin — Modern Dark Theme
   Overrides for Jazzmin + Bootswatch Darkly
   ======================================== */

/* ── Brand logo area ── */
.brand-link .brand-image-xl {
    filter: drop-shadow(0 0 8px rgba(59,130,246,0.4));
}

/* ── Main content area ── */
.content-wrapper {
    background: #1a1d23 !important;
}

.content-header h1 {
    color: #e4e7eb;
    font-weight: 600;
    font-size: 1.5rem;
}

/* ── Cards ── */
.card {
    border: 1px solid #2d3039 !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    background: #22252d !important;
    border-bottom: 1px solid #2d3039 !important;
    padding: 14px 20px !important;
}

.card-title {
    color: #e4e7eb !important;
    font-weight: 600 !important;
}

.card-body {
    background: #1e2128 !important;
    padding: 20px !important;
}

.card-footer {
    background: #22252d !important;
    border-top: 1px solid #2d3039 !important;
}

/* ── Tables ── */
.table {
    color: #d1d5db !important;
    margin-bottom: 0;
}

.table th {
    border-top: none !important;
    border-bottom: 2px solid #2d3039 !important;
    color: #9ca3af !important;
    font-weight: 600 !important;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 8px !important;
}

.table td {
    border-top: 1px solid #2d3039 !important;
    padding: 10px 8px !important;
    vertical-align: middle !important;
}

.table tr:hover td {
    background: rgba(59,130,246,0.05);
}

/* ── Forms ── */
.form-group label {
    color: #d1d5db !important;
    font-weight: 500 !important;
    font-size: 0.85rem;
}

.form-control, .select2-container .select2-selection--single {
    background: #2d3039 !important;
    border: 1px solid #3b3f4a !important;
    color: #e4e7eb !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
}

.form-control:focus, .select2-container .select2-selection--single:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15) !important;
}

select.form-control {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    padding-right: 36px !important;
}

textarea.form-control {
    min-height: 100px;
}

/* ── Buttons ── */
.btn {
    border-radius: 8px !important;
    font-weight: 500 !important;
    padding: 8px 16px !important;
    transition: all 0.2s ease !important;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    border: none !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #60a5fa, #3b82f6) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border: none !important;
}

.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    border: none !important;
}

/* ── Action buttons (top bar) ── */
.submit-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ── Filters ── */
#changelist-filter {
    background: #22252d !important;
    border-radius: 12px !important;
    border: 1px solid #2d3039 !important;
    padding: 16px !important;
}

#changelist-filter h3 {
    border-bottom: 1px solid #2d3039 !important;
    color: #e4e7eb !important;
    font-size: 0.9rem;
    padding-bottom: 8px;
}

#changelist-filter li a {
    color: #9ca3af !important;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.15s;
}

#changelist-filter li a:hover {
    background: rgba(59,130,246,0.1);
    color: #60a5fa !important;
}

#changelist-filter li.selected a {
    background: rgba(59,130,246,0.15) !important;
    color: #3b82f6 !important;
    font-weight: 600;
}

/* ── Pagination ── */
.pagination {
    margin: 16px 0 !important;
}

.pagination .page-link {
    background: #2d3039 !important;
    border: 1px solid #3b3f4a !important;
    color: #d1d5db !important;
    border-radius: 6px !important;
    margin: 0 2px !important;
}

.pagination .page-item.active .page-link {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
}

/* ── Messages ── */
.alert-success {
    background: rgba(34,197,94,0.1) !important;
    border: 1px solid #22c55e !important;
    color: #86efac !important;
    border-radius: 8px !important;
}

.alert-error, .alert-danger {
    background: rgba(239,68,68,0.1) !important;
    border: 1px solid #ef4444 !important;
    color: #fca5a5 !important;
    border-radius: 8px !important;
}

.alert-warning {
    background: rgba(245,158,11,0.1) !important;
    border: 1px solid #f59e0b !important;
    color: #fbbf24 !important;
    border-radius: 8px !important;
}

/* ── Inline forms ── */
.inline-group .tabular {
    border: 1px solid #2d3039 !important;
    border-radius: 10px !important;
    overflow: hidden;
}

.inline-group .tabular .module {
    border: none !important;
}

.inline-group .tabular th {
    background: #22252d !important;
}

/* ── Login page ── */
.login-page {
    background: linear-gradient(135deg, #0f1117 0%, #1a1d23 50%, #22252d 100%) !important;
}

.login-box {
    width: 420px !important;
}

.login-card-body {
    background: #1e2128 !important;
    border: 1px solid #2d3039 !important;
    border-radius: 16px !important;
    padding: 32px !important;
}

.login-card-body .login-box-msg {
    color: #e4e7eb !important;
    font-size: 1.1rem;
    margin-bottom: 24px;
}

.login-card-body input {
    background: #2d3039 !important;
    border: 1px solid #3b3f4a !important;
    color: #e4e7eb !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
}

/* ── Tab styles ── */
.nav-tabs .nav-link {
    color: #9ca3af !important;
    border: none !important;
    padding: 10px 16px !important;
    border-radius: 8px 8px 0 0 !important;
}

.nav-tabs .nav-link.active {
    color: #3b82f6 !important;
    background: transparent !important;
    border-bottom: 2px solid #3b82f6 !important;
}

.nav-tabs .nav-link:hover {
    color: #e4e7eb !important;
}

/* ── Help text ── */
.help {
    color: #6b7280 !important;
    font-size: 0.8rem !important;
    margin-top: 4px !important;
}

/* ── Checkbox & Radio ── */
.form-check-input {
    border-color: #4b5563 !important;
    background-color: #2d3039 !important;
}

.form-check-input:checked {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
}

/* ── Inline action buttons ── */
.object-tools {
    margin-top: 8px;
}

.object-tools a {
    border-radius: 8px !important;
    padding: 6px 14px !important;
}

/* ── Custom admin page ── */
.custom-admin-page {
    max-width: 900px;
}

.custom-admin-page .card {
    margin-bottom: 20px;
}

/* ── Responsive tweaks ── */
@media (max-width: 768px) {
    .card-body {
        padding: 12px !important;
    }
    .content-wrapper {
        padding: 12px !important;
    }
}
