/* =====================================================
       PAGE HEADER
    ===================================================== */

.similarity-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, #B45309 0%, #F59E0B 100%);
    box-shadow: 0 10px 22px rgba(245, 158, 11, .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: #FEF3C7;
    color: #B45309;
    border: 1px solid #FDE68A;
    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 {
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
    padding: 1rem 1.25rem;
}

.form-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: .88rem;
    padding: .7rem 1.1rem;
    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-warning {
    background: linear-gradient(135deg, #B45309 0%, #F59E0B 100%);
    box-shadow: 0 8px 20px rgba(245, 158, 11, .28);
}

.btn-gradient-warning:hover {
    box-shadow: 0 12px 26px rgba(245, 158, 11, .35);
}

.btn-gradient:disabled {
    opacity: .7;
    transform: none;
}

/* =====================================================
       EMPTY STATE
    ===================================================== */

.empty-state {
    text-align: center;
    color: #94A3B8;
    padding: 2.5rem 1rem;
}

.empty-state i {
    color: #CBD5E1;
}

/* =====================================================
       RESULT HEADER
    ===================================================== */

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem;
    padding: 1rem 1.25rem;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    margin-bottom: 1rem;
}

.result-header h5 {
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -.3px;
    margin: 0;
}

.result-header .badge {
    font-weight: 700;
    font-size: .78rem;
    letter-spacing: .3px;
    padding: .5rem .9rem;
    border-radius: 10px;
}

/* =====================================================
       RESULT ITEM
    ===================================================== */

.duplicate-item {
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 14px;
    background: #fff;
    padding: 1rem 1.25rem;
    margin-bottom: .75rem;
    transition: all .25s ease;
    position: relative;
    overflow: hidden;
}

.duplicate-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #94A3B8;
}

.duplicate-item.score-danger::before {
    background: #DC2626;
}

.duplicate-item.score-warning::before {
    background: #F59E0B;
}

.duplicate-item.score-info::before {
    background: #0EA5E9;
}

.duplicate-item.score-secondary::before {
    background: #64748B;
}

.duplicate-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
    border-color: #CBD5E1;
}

.duplicate-item:last-child {
    margin-bottom: 0;
}

.duplicate-item .item-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #F1F5F9;
    color: #475569;
    font-size: .72rem;
    font-weight: 800;
}

.duplicate-item .item-ticket {
    font-weight: 800;
    color: #0f172a;
    font-size: .95rem;
    letter-spacing: -.2px;
}

.duplicate-item .item-title {
    color: #334155;
    font-size: .88rem;
    font-weight: 600;
    margin: .35rem 0 0;
}

.duplicate-item .item-desc {
    color: #64748B;
    font-size: .8rem;
    line-height: 1.5;
    margin: .35rem 0 0;
}

.duplicate-item .item-score {
    text-align: right;
    min-width: 100px;
    flex-shrink: 0;
}

.duplicate-item .score-value {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 10px;
    font-weight: 800;
    font-size: .86rem;
    color: #fff;
    letter-spacing: -.2px;
}

.duplicate-item .score-value.bg-danger {
    background: #DC2626 !important;
}

.duplicate-item .score-value.bg-warning {
    background: #F59E0B !important;
    color: #fff;
}

.duplicate-item .score-value.bg-info {
    background: #0EA5E9 !important;
}

.duplicate-item .score-value.bg-secondary {
    background: #64748B !important;
}

.duplicate-item .score-label {
    display: block;
    font-size: .72rem;
    color: #94A3B8;
    font-weight: 600;
    margin-top: .3rem;
    letter-spacing: .2px;
}

/* =====================================================
       ALERT
    ===================================================== */

.similarity-page .alert {
    border-radius: 14px;
    border: 1px solid transparent;
    font-size: .88rem;
}

/* =====================================================
       DARK MODE
    ===================================================== */

body.dark-mode .form-card,
body.dark-mode .section-card,
body.dark-mode .duplicate-item {
    background: #1E293B;
    border-color: #334155;
}

body.dark-mode .page-title,
body.dark-mode .form-card-header h5,
body.dark-mode .duplicate-item .item-ticket,
body.dark-mode .result-header h5 {
    color: #F1F5F9;
}

body.dark-mode .form-card-header,
body.dark-mode .result-header {
    background: #0F172A;
    border-color: #334155;
}

body.dark-mode .duplicate-item .item-title {
    color: #E2E8F0;
}

body.dark-mode .duplicate-item .item-desc {
    color: #94A3B8;
}

body.dark-mode .duplicate-item .item-index {
    background: #0F172A;
    color: #CBD5E1;
}

body.dark-mode .duplicate-item:hover {
    border-color: #475569;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .35);
}

body.dark-mode .empty-state {
    color: #64748B;
}

body.dark-mode .empty-state i {
    color: #475569;
}

body.dark-mode .form-control {
    background: #0F172A;
    border-color: #334155;
    color: #F1F5F9;
}

body.dark-mode .form-control:focus {
    background: #0F172A;
    border-color: #F59E0B;
    color: #F1F5F9;
    box-shadow: 0 0 0 .2rem rgba(245, 158, 11, .25);
}

body.dark-mode .meta-chip {
    background: #422006;
    color: #FCD34D;
    border-color: #854D0E;
}

/* =====================================================
       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%;
    }

    .duplicate-item .item-score {
        text-align: left;
        min-width: 0;
    }

    .duplicate-item>.d-flex {
        flex-direction: column;
        gap: .5rem !important;
    }
}