﻿.tab-btn.active {
    border-bottom: 2px solid #10b981;
    color: #10b981;
}

.tab-panel {
    display: none;
}

    .tab-panel.active {
        display: block;
    }

/* ── Collapsible Section Card ───────────────────────────── */
.section-card {
    border: 1px solid #374151;
    border-radius: .5rem;
    overflow: hidden;
    background: #1f2937;
}

.section-toggle {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .625rem .875rem;
    background: #111827;
    border-bottom: 1px solid #374151;
    transition: background 0.15s ease;
}

    .section-toggle:hover {
        background: #1a2535;
    }

.section-toggle-left {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.section-toggle-chevron {
    font-size: .75rem;
    color: #6b7280;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.section-card.collapsed .section-toggle-chevron {
    transform: rotate(-90deg);
}

.section-collapse-hint {
    font-size: .6rem;
    color: #4b5563;
    font-style: italic;
    margin-left: .25rem;
}

.collapsible {
    overflow: hidden;
    transition: max-height 0.2s ease;
    padding: .875rem;
}

    .collapsible.collapsed {
        max-height: 0 !important;
        padding-top: 0;
        padding-bottom: 0;
    }
/* ──────────────────────────────────────────────────────── */

.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    padding: .75rem 1.25rem;
    border-radius: .5rem;
    font-weight: 600;
    font-size: .875rem;
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
    max-width: 42rem;
    word-break: break-word;
}

    .toast.show {
        opacity: 1;
    }

    .toast.show.toast-error {
        pointer-events: auto;
        user-select: text;
        cursor: text;
    }

input[type=text]:not(.no-upper), input[id$="Id"], input[id$="ID"] {
    text-transform: uppercase;
}

.field {
    width: 100%;
    background: #374151;
    border: 1px solid #4B5563;
    border-radius: .375rem;
    padding: .5rem .625rem;
    color: #fff;
    font-size: .875rem;
}

    .field:focus {
        outline: none;
        border-color: #10b981;
    }

.field-label {
    display: block;
    font-size: .7rem;
    color: #9CA3AF;
    margin-bottom: .2rem;
}

.flag-label {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8rem;
    color: #D1D5DB;
    cursor: pointer;
}

    .flag-label input[type=checkbox] {
        accent-color: #10b981;
        width: 14px;
        height: 14px;
    }

.req {
    color: #f87171;
}

.smelter-card {
    border-radius: .5rem;
    padding: 1rem;
    margin-bottom: .75rem;
}

.severity-ok {
    border-left: 4px solid #10b981;
    background: #064e3b22;
}

.severity-warning {
    border-left: 4px solid #f59e0b;
    background: #78350f22;
}

.severity-error {
    border-left: 4px solid #ef4444;
    background: #7f1d1d22;
}

.severity-info {
    border-left: 4px solid #3b82f6;
    background: #1e3a5f22;
}

.edit-mode-banner {
    background: #1e3a5f;
    border: 1px solid #3b82f6;
    border-radius: .375rem;
    padding: .5rem .875rem;
    font-size: .8rem;
    color: #93c5fd;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .75rem;
}

.edit-mode-banner.hidden {
    display: none !important;
}

/* ── Primary action buttons ───────────────────────────── */
.btn-action {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .625rem 1rem;
    border-radius: .375rem;
    font-size: .875rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .1s ease;
    user-select: none;
}

.btn-action:hover {
    filter: brightness(1.15);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .08);
    transform: translateY(-1px);
}

.btn-action:active {
    filter: brightness(.95);
    transform: translateY(0);
    box-shadow: none;
}

.btn-action:disabled,
.btn-action[disabled] {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-action.btn-emerald  { background: #059669; border-color: #047857; }
.btn-action.btn-blue     { background: #2563eb; border-color: #1d4ed8; }
.btn-action.btn-purple   { background: #7c3aed; border-color: #6d28d9; }
.btn-action.btn-orange   { background: #c2410c; border-color: #9a3412; }
.btn-action.btn-yellow   { background: #b45309; border-color: #92400e; }
