:root {
    --portal-primary: #2563eb;
    --portal-primary-dark: #1d4ed8;
    --portal-navy: #0f172a;
    --portal-background: #f4f7fb;
    --portal-border: #e2e8f0;
    --portal-muted: #64748b;
}

body {
    background: var(--portal-background);
    color: #1e293b;
    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;
}

.portal-navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--portal-border);
    min-height: 70px;
}

.portal-navbar .navbar-brand {
    color: var(--portal-navy);
}

.portal-navbar .navbar-brand:hover {
    color: var(--portal-navy);
}

.brand-icon {
    align-items: center;
    background: linear-gradient(
        135deg,
        var(--portal-primary),
        #4f46e5
    );
    border-radius: 12px;
    color: #ffffff;
    display: inline-flex;
    font-size: 1.2rem;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.brand-subtitle {
    color: var(--portal-muted);
    display: block;
    font-size: 0.68rem;
    font-weight: 500;
    line-height: 1;
}

.portal-navbar .nav-link {
    border-radius: 8px;
    color: #475569;
    font-weight: 500;
    margin: 0 2px;
    padding: 0.65rem 0.8rem;
}

.portal-navbar .nav-link:hover {
    background: #eff6ff;
    color: var(--portal-primary);
}

.user-menu {
    align-items: center;
    border: 0;
    display: flex;
    gap: 8px;
}

.user-avatar {
    align-items: center;
    background: #dbeafe;
    border-radius: 50%;
    color: var(--portal-primary-dark);
    display: inline-flex;
    font-size: 0.85rem;
    font-weight: 700;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.page-shell {
    min-height: calc(100vh - 70px);
}

.page-title {
    color: var(--portal-navy);
    font-size: clamp(1.55rem, 3vw, 2rem);
    font-weight: 750;
}

.dashboard-date {
    background: #ffffff;
    border: 1px solid var(--portal-border);
    border-radius: 10px;
    color: #475569;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
}

.metric-card,
.content-card,
.progress-card {
    background: #ffffff;
    border: 1px solid var(--portal-border);
    border-radius: 14px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.035);
}

.metric-card {
    height: 100%;
    transition:
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.metric-card:hover {
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.metric-card-body {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 1.3rem;
}

.metric-label {
    color: var(--portal-muted);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.metric-value {
    color: var(--portal-navy);
    font-size: 2rem;
    font-weight: 750;
    margin: 0;
}

.metric-icon {
    align-items: center;
    border-radius: 12px;
    display: flex;
    font-size: 1.25rem;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.metric-blue {
    background: #dbeafe;
    color: #2563eb;
}

.metric-purple {
    background: #ede9fe;
    color: #7c3aed;
}

.metric-orange {
    background: #ffedd5;
    color: #ea580c;
}

.metric-green {
    background: #dcfce7;
    color: #16a34a;
}

.progress-card {
    align-items: center;
    display: flex;
    gap: 1rem;
    height: 100%;
    padding: 1rem 1.2rem;
}

.progress-card-icon {
    align-items: center;
    background: #f1f5f9;
    border-radius: 10px;
    color: var(--portal-primary);
    display: flex;
    font-size: 1.15rem;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.progress-card-value {
    color: var(--portal-navy);
    font-size: 1.25rem;
    font-weight: 750;
}

.progress-card-label {
    color: var(--portal-muted);
    font-size: 0.82rem;
}

.content-card {
    overflow: hidden;
}

.content-card-header {
    align-items: center;
    border-bottom: 1px solid var(--portal-border);
    display: flex;
    justify-content: space-between;
    padding: 1.2rem 1.3rem;
}

.portal-table thead th {
    background: #f8fafc;
    border-bottom: 1px solid var(--portal-border);
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 0.85rem 1rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.portal-table tbody td {
    border-color: #f1f5f9;
    font-size: 0.88rem;
    padding: 1rem;
}

.portal-table tbody tr:hover {
    background: #f8fafc;
}

.status-badge {
    background: #e2e8f0;
    border-radius: 999px;
    color: #475569;
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.35rem 0.6rem;
    white-space: nowrap;
}

.status-won {
    background: #dcfce7;
    color: #15803d;
}

.status-lost,
.status-rejected {
    background: #fee2e2;
    color: #b91c1c;
}

.status-partner_assigned,
.status-partner_accepted {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-meeting_scheduled,
.status-meeting_completed {
    background: #ede9fe;
    color: #6d28d9;
}

.status-pipeline_created,
.status-quotation_submitted {
    background: #fef3c7;
    color: #b45309;
}

.status-needs_clarification {
    background: #ffedd5;
    color: #c2410c;
}

.action-alert {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    color: #9a3412;
}

.action-alert-icon {
    align-items: center;
    background: #ffedd5;
    border-radius: 10px;
    display: flex;
    font-size: 1.1rem;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.login-page {
    background:
        radial-gradient(
            circle at top left,
            rgba(37, 99, 235, 0.14),
            transparent 32%
        ),
        radial-gradient(
            circle at bottom right,
            rgba(79, 70, 229, 0.12),
            transparent 28%
        ),
        #f8fafc;
    min-height: 100vh;
}

.login-brand-icon {
    align-items: center;
    background: linear-gradient(
        135deg,
        var(--portal-primary),
        #4f46e5
    );
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.22);
    color: #ffffff;
    display: inline-flex;
    font-size: 1.5rem;
    height: 58px;
    justify-content: center;
    margin-bottom: 1rem;
    width: 58px;
}

.login-card {
    border-radius: 18px;
}

.form-control {
    border-color: #cbd5e1;
    border-radius: 10px;
}

.form-control:focus {
    border-color: var(--portal-primary);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.btn-primary {
    background: var(--portal-primary);
    border-color: var(--portal-primary);
    border-radius: 10px;
}

.btn-primary:hover {
    background: var(--portal-primary-dark);
    border-color: var(--portal-primary-dark);
}

.empty-state-icon {
    color: #94a3b8;
    font-size: 2rem;
}

@media (max-width: 767.98px) {
    .content-card-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }

    .portal-table {
        min-width: 850px;
    }
}
.detail-label {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.detail-value {
    color: #1e293b;
    font-size: 0.95rem;
}

.detail-section {
    margin-bottom: 1.3rem;
}

.text-prewrap {
    white-space: pre-wrap;
}

.contact-card,
.comment-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
}

.comment-card + .comment-card {
    margin-top: 0.9rem;
}

.timeline-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1.4rem;
    position: relative;
}

.timeline-item:not(:last-child)::before {
    background: #dbeafe;
    content: "";
    height: 100%;
    left: 7px;
    position: absolute;
    top: 15px;
    width: 2px;
}

.timeline-marker {
    background: #2563eb;
    border: 3px solid #dbeafe;
    border-radius: 50%;
    flex: 0 0 auto;
    height: 16px;
    margin-top: 4px;
    position: relative;
    width: 16px;
    z-index: 1;
}

.timeline-content {
    flex-grow: 1;
}

.kpi-line {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 0.65rem 0;
}

.form-select {
    border-color: #cbd5e1;
    border-radius: 10px;
}

.form-select:focus {
    border-color: var(--portal-primary);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}