/* MeroSite Partner Portal - shared styles (dashboard shell + auth screens) */

:root {
    --p-brand: #3730a3;
    --p-brand-2: #6366f1;
    --p-brand-light: #eef2ff;
    --p-bg: #f5f6fb;
    --bs-offcanvas-width: 260px;
}

body {
    min-height: 100vh;
    background: var(--p-bg);
}

/* ---------- Dashboard shell ---------- */

.p-sidebar {
    background: #fff;
    border-right: 1px solid #eceef5;
    width: 260px;
}

.p-sidebar .offcanvas-header {
    border-bottom: 1px solid #eceef5;
}

.p-sidebar .brand {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--p-brand);
}

.p-sidebar .nav-link {
    color: #4b5563;
    border-radius: .5rem;
    padding: .55rem .9rem;
    font-weight: 500;
}

.p-sidebar .nav-link i {
    width: 1.3rem;
}

.p-sidebar .nav-link.active,
.p-sidebar .nav-link:hover {
    background: var(--p-brand-light);
    color: var(--p-brand);
}

.p-topbar {
    background: #fff;
    border-bottom: 1px solid #eceef5;
}

.p-avatar {
    width: 2.25rem;
    height: 2.25rem;
    flex: none;
    border-radius: 50%;
    background: var(--p-brand-light);
    color: var(--p-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ---------- Cards & stats ---------- */

.stat-card {
    background: #fff;
    border: 1px solid #eceef5;
    border-radius: .75rem;
    padding: 1.1rem 1.25rem;
    height: 100%;
}

.stat-card .stat-label {
    font-size: .8rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 600;
}

.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111827;
}

.stat-card .stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--p-brand-light);
    color: var(--p-brand);
    font-size: 1.2rem;
}

.p-card {
    background: #fff;
    border: 1px solid #eceef5;
    border-radius: .75rem;
}

/* ---------- Status badges ---------- */

.badge-status-NEW, .badge-status-PENDING { background: #e0e7ff; color: #3730a3; }
.badge-status-CONTACTED { background: #fef3c7; color: #92400e; }
.badge-status-CONVERTED, .badge-status-ACTIVE, .badge-status-PAID { background: #d1fae5; color: #065f46; }
.badge-status-LOST, .badge-status-REJECTED, .badge-status-SUSPENDED { background: #fee2e2; color: #991b1b; }

/* ---------- Tables ---------- */

.table > :not(caption) > * > * {
    vertical-align: middle;
}

.p-card table thead th {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #6b7280;
    font-weight: 600;
    border-bottom-width: 1px;
}

/* ---------- Empty states ---------- */

.p-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #6b7280;
}

.p-empty .p-empty-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto .75rem;
    border-radius: 50%;
    background: var(--p-brand-light);
    color: var(--p-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* ---------- Lead pipeline widget ---------- */

.pipeline-bar {
    display: flex;
    height: .6rem;
    border-radius: .35rem;
    overflow: hidden;
    background: #eceef5;
}

.pipeline-seg {
    height: 100%;
    transition: width .2s ease;
}

.pipeline-legend {
    font-size: .85rem;
    color: #4b5563;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.pipeline-legend .dot {
    width: .6rem;
    height: .6rem;
    border-radius: 50%;
    display: inline-block;
}

/* ---------- Auth screens ---------- */

.auth-wrap {
    min-height: 100vh;
}

.auth-side {
    background: radial-gradient(circle at 20% 20%, var(--p-brand-2), var(--p-brand) 65%);
    color: #fff;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-side .brand {
    font-weight: 700;
    font-size: 1.3rem;
}

.auth-side h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 1.5rem;
}

.auth-side p.lead {
    color: rgba(255, 255, 255, .85);
}

.auth-feature {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin-top: 1.25rem;
}

.auth-feature .icon {
    width: 2.25rem;
    height: 2.25rem;
    flex: none;
    border-radius: .6rem;
    background: rgba(255, 255, 255, .15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-feature .text .title {
    font-weight: 600;
}

.auth-feature .text .desc {
    color: rgba(255, 255, 255, .75);
    font-size: .875rem;
}

.auth-form-col {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-card .form-control {
    padding: .6rem .85rem;
}

.auth-card .btn-primary {
    background: var(--p-brand);
    border-color: var(--p-brand);
    padding: .6rem 1rem;
    font-weight: 600;
    color: #fff;
}

.auth-card .btn-primary:hover {
    background: #2e2a86;
    border-color: #2e2a86;
    color: #fff;
}

.auth-card a {
    color: var(--p-brand);
}

.password-toggle {
    cursor: pointer;
}

.strength-meter {
    height: 4px;
    border-radius: 2px;
    background: #e5e7eb;
    overflow: hidden;
    margin-top: .4rem;
}

.strength-meter .bar {
    height: 100%;
    width: 0%;
    background: #dc2626;
    transition: width .2s ease, background-color .2s ease;
}

.strength-label {
    font-size: .78rem;
    color: #6b7280;
}

/* ---------- Shared buttons ---------- */

.btn-primary {
    background: var(--p-brand);
    border-color: var(--p-brand);
}

.btn-primary:hover,
.btn-primary:focus {
    background: #2e2a86;
    border-color: #2e2a86;
}
