/* MASA Vendor Portal — Phase 3 */
.masa-vendor-content {
    min-height: calc(100vh - 70px);
}

.masa-vendor-content .page-content {
    padding-bottom: 2rem;
}

.masa-eyebrow {
    display: inline-block;
    margin-bottom: .45rem;
    color: #c8102e;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.masa-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.masa-page-title {
    margin: 0 0 .4rem;
    color: #172033;
    font-size: clamp(1.55rem, 2vw, 2rem);
    font-weight: 750;
    letter-spacing: -.03em;
}

.masa-page-subtitle {
    max-width: 720px;
    margin: 0;
    color: #687386;
    line-height: 1.65;
}

.vendor-page-header {
    padding: 1.4rem 1.5rem;
    background: linear-gradient(135deg, rgba(200,16,46,.07), rgba(255,255,255,.92));
    border: 1px solid rgba(200,16,46,.13);
    border-radius: 18px;
}

.vendor-stat-card {
    position: relative;
    overflow: hidden;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid #e7eaf0;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(23,32,51,.05);
}

.vendor-stat-card::after {
    content: "";
    position: absolute;
    top: -24px;
    right: -24px;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: rgba(200,16,46,.035);
}

.vendor-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 1rem;
    border-radius: 12px;
}

.vendor-stat-icon svg { width: 20px; height: 20px; }
.vendor-stat-icon.is-primary { color: #c8102e; background: rgba(200,16,46,.09); }
.vendor-stat-icon.is-info { color: #0369a1; background: rgba(3,105,161,.09); }
.vendor-stat-icon.is-warning { color: #b45309; background: rgba(180,83,9,.1); }
.vendor-stat-icon.is-success { color: #15803d; background: rgba(21,128,61,.09); }

.vendor-stat-label {
    color: #748094;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.vendor-stat-value {
    margin: .3rem 0 .35rem;
    color: #172033;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.04em;
}

.vendor-stat-meta {
    color: #748094;
    font-size: .82rem;
    font-weight: 500;
}

.vendor-dot,
.status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: .35rem;
    border-radius: 50%;
    background: currentColor;
    vertical-align: middle;
}

.masa-panel {
    overflow: hidden;
    border: 1px solid #e7eaf0 !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 25px rgba(23,32,51,.045) !important;
}

.masa-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid #edf0f4;
}

.masa-table thead th {
    padding: .9rem 1.15rem;
    color: #687386;
    background: #f8f9fb;
    border-bottom: 1px solid #e8ebf0;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
    white-space: nowrap;
}

.masa-table tbody td {
    padding: 1rem 1.15rem;
    border-color: #eef0f4;
    vertical-align: middle;
}

.masa-table tbody tr:hover { background: #fcfcfd; }
.table-index { width: 54px; }

.vendor-list-icon,
.vendor-detail-icon,
.vendor-section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    color: #c8102e;
    background: rgba(200,16,46,.075);
    border-radius: 10px;
}

.vendor-list-icon svg,
.vendor-detail-icon svg,
.vendor-section-icon svg { width: 17px; height: 17px; }
.vendor-inline-icon { width: 15px; height: 15px; color: #8892a3; }

.masa-status-badge {
    display: inline-flex;
    align-items: center;
    padding: .36rem .62rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.status-success { color: #166534; background: #ecfdf3; border: 1px solid #bbf7d0; }
.status-warning { color: #92400e; background: #fffbeb; border: 1px solid #fde68a; }
.status-danger { color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; }
.status-neutral { color: #475569; background: #f8fafc; border: 1px solid #e2e8f0; }

.vendor-activity-list { min-height: 100%; }
.vendor-activity-item {
    display: flex;
    gap: .85rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #eef0f4;
}
.vendor-activity-item:last-child { border-bottom: 0; }

.vendor-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    color: #9f0c24;
    background: rgba(200,16,46,.085);
    border-radius: 12px;
    font-weight: 800;
}
.vendor-avatar.small-avatar { width: 36px; height: 36px; border-radius: 10px; }
.min-w-0 { min-width: 0; }

.vendor-summary-pill {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    padding: .7rem .9rem;
    color: #3b4657;
    background: #fff;
    border: 1px solid #e4e8ee;
    border-radius: 12px;
    box-shadow: 0 5px 16px rgba(23,32,51,.04);
}
.vendor-summary-pill svg { width: 18px; color: #c8102e; }
.vendor-text-chip {
    display: inline-block;
    padding: .35rem .58rem;
    color: #475569;
    background: #f7f8fa;
    border: 1px solid #e7eaf0;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 600;
}
.vendor-remarks { max-width: 280px; color: #5d6879; line-height: 1.5; }

.masa-empty-state {
    padding: 3.2rem 1.5rem;
    text-align: center;
}
.masa-empty-state.compact { padding: 2.2rem 1.25rem; }
.masa-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: .9rem;
    color: #c8102e;
    background: rgba(200,16,46,.07);
    border-radius: 16px;
}
.masa-empty-icon svg { width: 23px; height: 23px; }
.masa-empty-state h5,
.masa-empty-state h6 { color: #273143; }
.masa-empty-state p { max-width: 430px; margin: .4rem auto 0; color: #7a8596; }

.vendor-profile-summary .card-body { padding: 1.7rem; }
.vendor-profile-photo-wrap { position: relative; display: inline-block; }
.vendor-profile-photo,
.vendor-security-avatar {
    width: 112px;
    height: 112px;
    object-fit: cover;
    border: 5px solid #fff;
    border-radius: 28px;
    box-shadow: 0 8px 28px rgba(23,32,51,.14);
}
.vendor-profile-status {
    position: absolute;
    right: -3px;
    bottom: 2px;
    width: 18px;
    height: 18px;
    background: #22c55e;
    border: 3px solid #fff;
    border-radius: 50%;
}
.vendor-profile-details { border-top: 1px solid #edf0f4; }
.vendor-detail-row {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    padding: .95rem 0;
    border-bottom: 1px solid #edf0f4;
}
.vendor-detail-row:last-child { border-bottom: 0; }
.vendor-detail-row small { display: block; margin-bottom: .12rem; color: #8791a2; }
.vendor-detail-row strong { display: block; color: #313c4e; font-size: .88rem; overflow-wrap: anywhere; }

.vendor-form-section {
    padding-bottom: 1.65rem;
    margin-bottom: 1.65rem;
    border-bottom: 1px solid #edf0f4;
}
.vendor-section-heading {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    margin-bottom: 1.15rem;
}
.vendor-section-heading h6 { margin: .1rem 0 .25rem; color: #273143; font-weight: 750; }
.vendor-section-heading p { margin: 0; color: #7a8596; font-size: .82rem; }
.vendor-photo-upload {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    padding: 1rem;
    background: #fafbfc;
    border: 1px dashed #d8dde6;
    border-radius: 14px;
}
.vendor-upload-preview { width: 80px; height: 80px; object-fit: cover; border-radius: 18px; }

.masa-alert { border: 0; border-radius: 12px; }
.masa-alert svg { width: 20px; height: 20px; flex-shrink: 0; }

.vendor-security-profile { background: linear-gradient(180deg, #fff, #fbfbfc); }
.vendor-security-avatar { width: 96px; height: 96px; border-radius: 24px; }
.vendor-security-note {
    display: flex;
    gap: .8rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(200,16,46,.055);
    border: 1px solid rgba(200,16,46,.11);
    border-radius: 12px;
}
.vendor-security-note h6 { margin: 0 0 .25rem; color: #273143; }
.vendor-security-note p { margin: 0; color: #6f7a8b; font-size: .8rem; line-height: 1.55; }
.vendor-password-rules { padding: 0; margin: 0; list-style: none; }
.vendor-password-rules li { display: flex; align-items: center; gap: .55rem; padding: .48rem 0; color: #667184; font-size: .82rem; }
.vendor-password-rules svg { width: 15px; height: 15px; color: #15803d; }

.vendor-password-field { position: relative; }
.vendor-password-field .form-control { padding-right: 3rem; }
.vendor-password-toggle {
    position: absolute;
    top: 50%;
    right: .75rem;
    transform: translateY(-50%);
    display: inline-flex;
    padding: .2rem;
    color: #7e8899;
    background: transparent;
    border: 0;
}
.vendor-password-toggle svg { width: 18px; height: 18px; }
.vendor-password-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; }
.vendor-password-meter span { height: 5px; background: #e5e8ed; border-radius: 99px; transition: .2s ease; }
.vendor-password-meter[data-score="1"] span:nth-child(-n+1) { background: #dc2626; }
.vendor-password-meter[data-score="2"] span:nth-child(-n+2) { background: #d97706; }
.vendor-password-meter[data-score="3"] span:nth-child(-n+3) { background: #65a30d; }
.vendor-password-meter[data-score="4"] span:nth-child(-n+4) { background: #15803d; }

@media (max-width: 991.98px) {
    .vendor-profile-summary { position: static; }
    .vendor-remarks { max-width: 220px; }
}

@media (max-width: 767.98px) {
    .masa-page-header { align-items: flex-start; }
    .masa-page-header > * { width: 100%; }
    .masa-page-header .btn { width: 100%; justify-content: center; }
    .vendor-page-header { padding: 1.15rem; }
    .vendor-photo-upload { align-items: flex-start; flex-direction: column; }
    .vendor-summary-pill { width: 100%; justify-content: center; }
    .masa-panel-header { align-items: flex-start; flex-direction: column; }
    .masa-panel-header .btn { width: 100%; }
}
