/* =====================================================
       PAGE HEADER
    ===================================================== */

.priority-page {
    padding-bottom: 1rem;
}

.page-icon-badge {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #0F766E 0%, #14B8A6 100%);
    box-shadow: 0 10px 22px rgba(15, 118, 110, .28);
    flex-shrink: 0;
}

.page-title {
    font-weight: 800;
    letter-spacing: -.4px;
    color: var(--text-main, #0f172a);
    font-size: 1.45rem;
}

.page-subtitle {
    color: var(--text-muted, #64748b);
    font-size: .88rem;
    max-width: 720px;
}

.header-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: .55rem 1rem;
    border-radius: 12px;
    background: #ECFDF5;
    color: #0F766E;
    border: 1px solid #BBF7D0;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .3px;
}

.meta-chip i {
    font-size: .95rem;
}

/* =====================================================
       FORM CARD & SECTION CARD
    ===================================================== */

.form-card,
.section-card {
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .05);
}

.form-card-header,
.section-card-header {
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
    padding: 1rem 1.25rem;
}

.form-card-header h5,
.section-card-header h5 {
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -.3px;
}

/* =====================================================
       BUTTON
    ===================================================== */

.btn-gradient {
    background: linear-gradient(135deg, #0F766E 0%, #14B8A6 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: .9rem;
    padding: .8rem 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    box-shadow: 0 8px 20px rgba(15, 118, 110, .28);
    transition: all .2s ease;
}

.btn-gradient:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(15, 118, 110, .35);
}

.btn-gradient:disabled {
    opacity: .7;
    transform: none;
}

/* =====================================================
       EMPTY STATE
    ===================================================== */

.empty-state {
    text-align: center;
    color: #94A3B8;
    padding: 2.5rem 1rem;
}

.prediction-placeholder {
    font-size: 3.5rem;
    font-weight: 800;
    color: #CBD5E1;
    line-height: 1;
    margin-bottom: .75rem;
    letter-spacing: -2px;
}

/* =====================================================
       PRIORITY LEGEND
    ===================================================== */

.priority-box {
    border-radius: 14px;
    padding: 1rem 1.1rem;
    height: 100%;
    border-left: 5px solid;
    transition: all .25s ease;
}

.priority-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
}

.priority-box h5 {
    margin-bottom: .5rem;
    font-weight: 800;
    font-size: .95rem;
    letter-spacing: -.2px;
}

.priority-box p {
    font-size: .82rem;
    margin-bottom: .5rem;
    line-height: 1.45;
}

.priority-box small {
    font-size: .74rem;
    font-weight: 600;
    opacity: .85;
}

.priority-p1 {
    background: #FEF2F2;
    border-color: #DC2626;
    color: #7F1D1D;
}

.priority-p1 h5 {
    color: #B91C1C;
}

.priority-p2 {
    background: #FEF3C7;
    border-color: #F59E0B;
    color: #78350F;
}

.priority-p2 h5 {
    color: #B45309;
}

.priority-p3 {
    background: #DBEAFE;
    border-color: #2563EB;
    color: #1E3A8A;
}

.priority-p3 h5 {
    color: #1D4ED8;
}

.priority-p4 {
    background: #F1F5F9;
    border-color: #64748B;
    color: #334155;
}

.priority-p4 h5 {
    color: #475569;
}

/* =====================================================
       PREDICTION RESULT CARD
    ===================================================== */

.prediction-card {
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all .25s ease;
    border: 1px solid transparent;
}

.prediction-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, .10);
}

.prediction-card .prediction-label {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
}

.prediction-card .prediction-hint {
    font-size: .82rem;
    color: #64748B;
    margin-top: 1rem;
}

.prediction-p1 {
    background: #FEF2F2;
    border-color: #FECACA;
}

.prediction-p2 {
    background: #FEF3C7;
    border-color: #FDE68A;
}

.prediction-p3 {
    background: #DBEAFE;
    border-color: #BFDBFE;
}

.prediction-p4 {
    background: #F1F5F9;
    border-color: #E2E8F0;
}

/* =====================================================
       PROBABILITY BAR
    ===================================================== */

.probability-bar {
    height: 22px;
    border-radius: 999px;
    background: #E2E8F0;
    overflow: hidden;
}

.probability-bar .progress-bar {
    font-weight: 700;
    font-size: .78rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

.probability-bar .progress-bar.bg-danger {
    background: #DC2626 !important;
}

.probability-bar .progress-bar.bg-warning {
    background: #F59E0B !important;
}

.probability-bar .progress-bar.bg-primary {
    background: #2563EB !important;
}

.probability-bar .progress-bar.bg-secondary {
    background: #64748B !important;
}

.probability-row .prob-label {
    font-weight: 700;
    font-size: .85rem;
    color: #334155;
}

.probability-row .prob-value {
    font-weight: 700;
    font-size: .85rem;
    color: #0f172a;
}

/* =====================================================
       DETAIL TABLE
    ===================================================== */

.detail-table {
    width: 100%;
    font-size: .86rem;
}

.detail-table th {
    color: #64748B;
    font-weight: 600;
    padding: .6rem 0;
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 1px solid #F1F5F9;
}

.detail-table td {
    padding: .6rem 0;
    color: #0f172a;
    font-weight: 600;
    text-align: right;
    border-bottom: 1px solid #F1F5F9;
}

.detail-table tr:last-child th,
.detail-table tr:last-child td {
    border-bottom: none;
}

/* =====================================================
       SLA BOX
    ===================================================== */

.sla-box {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: .9rem 1rem;
    transition: all .2s ease;
}

.sla-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
}

.sla-label {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: #94A3B8;
    margin-bottom: .35rem;
}

.sla-value {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -.3px;
}

/* =====================================================
       DARK MODE
    ===================================================== */

body.dark-mode .form-card,
body.dark-mode .section-card {
    background: #1E293B;
    border-color: #334155;
}

body.dark-mode .page-title,
body.dark-mode .form-card-header h5,
body.dark-mode .section-card-header h5,
body.dark-mode .probability-row .prob-label,
body.dark-mode .probability-row .prob-value,
body.dark-mode .detail-table td,
body.dark-mode .sla-value {
    color: #F1F5F9;
}

body.dark-mode .form-card-header,
body.dark-mode .section-card-header {
    background: #0F172A;
    border-bottom-color: #334155;
}

body.dark-mode .empty-state {
    color: #64748B;
}

body.dark-mode .prediction-placeholder {
    color: #334155;
}

body.dark-mode .probability-bar {
    background: #334155;
}

body.dark-mode .detail-table th {
    color: #94A3B8;
    border-bottom-color: #1E293B;
}

body.dark-mode .detail-table td {
    border-bottom-color: #1E293B;
}

body.dark-mode .sla-box {
    background: #0F172A;
    border-color: #334155;
}

body.dark-mode .sla-label {
    color: #94A3B8;
}

body.dark-mode .form-control,
body.dark-mode .form-select {
    background: #0F172A;
    border-color: #334155;
    color: #F1F5F9;
}

body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus {
    background: #0F172A;
    border-color: #14B8A6;
    color: #F1F5F9;
    box-shadow: 0 0 0 .2rem rgba(20, 184, 166, .25);
}

body.dark-mode .meta-chip {
    background: #052E2B;
    color: #2DD4BF;
    border-color: #0F766E;
}

body.dark-mode .priority-p1 {
    background: #2A0E0E;
    border-color: #7F1D1D;
    color: #FCA5A5;
}

body.dark-mode .priority-p1 h5 {
    color: #F87171;
}

body.dark-mode .priority-p2 {
    background: #2A1A05;
    border-color: #854D0E;
    color: #FCD34D;
}

body.dark-mode .priority-p2 h5 {
    color: #FBBF24;
}

body.dark-mode .priority-p3 {
    background: #0B1224;
    border-color: #1E40AF;
    color: #93C5FD;
}

body.dark-mode .priority-p3 h5 {
    color: #60A5FA;
}

body.dark-mode .priority-p4 {
    background: #1E293B;
    border-color: #475569;
    color: #CBD5E1;
}

body.dark-mode .priority-p4 h5 {
    color: #94A3B8;
}

body.dark-mode .prediction-p1 {
    background: #2A0E0E;
    border-color: #7F1D1D;
}

body.dark-mode .prediction-p2 {
    background: #2A1A05;
    border-color: #854D0E;
}

body.dark-mode .prediction-p3 {
    background: #0B1224;
    border-color: #1E40AF;
}

body.dark-mode .prediction-p4 {
    background: #1E293B;
    border-color: #334155;
}

/* =====================================================
       RESPONSIVE
    ===================================================== */

@media (max-width: 575.98px) {
    .page-icon-badge {
        width: 46px;
        height: 46px;
        font-size: 1.25rem;
    }

    .page-title {
        font-size: 1.15rem;
    }

    .btn-gradient {
        width: 100%;
    }

    .prediction-card .prediction-label {
        font-size: 1.85rem;
    }
}