:root {
    --app-bg: #f4f6fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-hover: #f3f5f9;
    --ink: #111827;
    --ink-soft: #344054;
    --muted: #667085;
    --muted-light: #98a2b3;
    --line: #e4e7ec;
    --line-strong: #d0d5dd;
    --sidebar: #111827;
    --sidebar-soft: #1f2937;
    --brand: #4f46e5;
    --brand-hover: #4338ca;
    --brand-soft: #eef2ff;
    --cyan: #0891b2;
    --success: #15803d;
    --success-soft: #ecfdf3;
    --warning: #b54708;
    --warning-soft: #fffaeb;
    --danger: #b42318;
    --danger-soft: #fef3f2;
    --info: #175cd3;
    --info-soft: #eff8ff;
    --shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);
    --shadow-sm: 0 4px 14px rgba(16, 24, 40, .06);
    --shadow-md: 0 14px 34px rgba(16, 24, 40, .08);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --sidebar-width: 268px;
    --topbar-height: 76px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--app-bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

/* Application shell */

.app-shell {
    min-height: 100vh;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    display: flex;
    width: var(--sidebar-width);
    padding: 22px 16px 18px;
    flex-direction: column;
    background:
        radial-gradient(circle at 20% 4%, rgba(99, 102, 241, .22), transparent 26%),
        var(--sidebar);
    color: #f8fafc;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    min-height: 54px;
    margin-bottom: 26px;
    align-items: center;
    justify-content: space-between;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 13px;
    background: linear-gradient(145deg, #6366f1, #4338ca);
    box-shadow: 0 10px 28px rgba(79, 70, 229, .35);
    font-size: 20px;
    font-weight: 800;
}

.brand-link strong,
.brand-link small {
    display: block;
}

.brand-link strong {
    font-size: 16px;
    letter-spacing: -.02em;
}

.brand-link small {
    margin-top: 2px;
    color: #98a2b3;
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.sidebar-close {
    display: none;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 24px;
    line-height: 1;
}

.sidebar-section-label {
    margin: 10px 12px 8px;
    color: #667085;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.sidebar-nav {
    display: grid;
    gap: 4px;
}

.sidebar-link {
    position: relative;
    display: flex;
    min-height: 46px;
    padding: 8px 12px;
    align-items: center;
    gap: 12px;
    border-radius: 12px;
    color: #cbd5e1;
    text-decoration: none;
    transition: .18s ease;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, .07);
    color: #fff;
}

.sidebar-link.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, .28), rgba(79, 70, 229, .16));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(129, 140, 248, .18);
}

.sidebar-link.active::before {
    position: absolute;
    left: -16px;
    width: 3px;
    height: 25px;
    border-radius: 0 4px 4px 0;
    background: #818cf8;
    content: "";
}

.nav-icon {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 9px;
    background: rgba(255, 255, 255, .06);
    color: #e2e8f0;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.sidebar-link.active .nav-icon {
    border-color: rgba(165, 180, 252, .28);
    background: rgba(99, 102, 241, .3);
    color: #fff;
}

.nav-pill {
    margin-left: auto;
    padding: 3px 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, #818cf8, #4f46e5);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .05em;
}

.sidebar-spacer {
    flex: 1;
    min-height: 24px;
}

.sidebar-promo {
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 16px;
    background: rgba(255, 255, 255, .045);
}

.promo-badge {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(129, 140, 248, .2);
    color: #c7d2fe;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
}

.sidebar-promo strong {
    display: block;
    font-size: 14px;
}

.sidebar-promo p {
    margin: 6px 0 10px;
    color: #98a2b3;
    font-size: 12px;
    line-height: 1.55;
}

.sidebar-promo a {
    color: #c7d2fe;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.sidebar-version {
    display: flex;
    margin-top: 14px;
    padding: 8px 10px;
    align-items: center;
    gap: 8px;
    color: #667085;
    font-size: 11px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, .1);
}

.sidebar-backdrop {
    display: none;
}

.app-main {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    height: var(--topbar-height);
    padding: 0 34px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(228, 231, 236, .9);
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(18px);
}

.topbar-left,
.topbar-actions,
.user-menu {
    display: flex;
    align-items: center;
}

.topbar-left {
    gap: 14px;
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}

.mobile-menu-button span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 4px 0;
    border-radius: 10px;
    background: var(--ink);
}

.topbar-context small,
.topbar-context strong {
    display: block;
}

.topbar-context small {
    margin-bottom: 1px;
    color: var(--muted-light);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.topbar-context strong {
    max-width: 460px;
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-actions {
    gap: 14px;
}

.topbar-quick-action {
    display: inline-flex;
    height: 40px;
    padding: 0 14px;
    align-items: center;
    gap: 8px;
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    background: var(--brand-soft);
    color: #3730a3;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.quick-action-spark {
    color: var(--brand);
    font-size: 16px;
}

.user-menu {
    min-width: 240px;
    padding-left: 14px;
    gap: 10px;
    border-left: 1px solid var(--line);
}

.user-avatar {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(145deg, #1f2937, #111827);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.user-copy {
    min-width: 0;
    flex: 1;
}

.user-copy strong,
.user-copy small {
    display: block;
}

.user-copy strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-copy small {
    color: var(--muted);
    font-size: 11px;
}

.logout-form { margin: 0; }

.logout-link {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.logout-link:hover {
    color: var(--danger);
}

.app-content {
    width: min(100%, 1460px);
    min-height: calc(100vh - var(--topbar-height));
    margin: 0 auto;
    padding: 30px 34px 48px;
}

/* Generic components */

.page-header {
    display: flex;
    margin-bottom: 24px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.page-eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 5px 9px;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: #4338ca;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.page-heading {
    margin: 0;
    color: var(--ink);
    font-size: clamp(27px, 3vw, 38px);
    font-weight: 760;
    letter-spacing: -.045em;
    line-height: 1.08;
}

.page-subtitle {
    max-width: 690px;
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.muted {
    color: var(--muted) !important;
}

.app-card,
.card {
    border: 1px solid rgba(228, 231, 236, .9);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.app-card {
    overflow: hidden;
}

.card {
    overflow: visible;
}

.card-header-clean {
    display: flex;
    padding: 20px 22px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--line);
}

.card-header-clean h2,
.card-header-clean h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 740;
    letter-spacing: -.02em;
}

.card-header-clean p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.card-body-spacious {
    padding: 22px;
}

.section-card {
    margin-bottom: 18px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.section-header {
    display: flex;
    margin-bottom: 20px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.section-title-wrap {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.section-number {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 11px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
}

.section-header h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 740;
    letter-spacing: -.025em;
}

.section-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.btn {
    min-height: 42px;
    padding: 9px 15px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13px;
    box-shadow: none !important;
}

.btn-sm {
    min-height: 36px;
    padding: 7px 11px;
    border-radius: 10px;
    font-size: 12px;
}

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

.btn-dark:hover,
.btn-dark:focus,
.btn-primary:hover,
.btn-primary:focus {
    border-color: var(--brand-hover);
    background: var(--brand-hover);
}

.btn-outline-dark {
    border-color: var(--line-strong);
    background: var(--surface);
    color: var(--ink-soft);
}

.btn-outline-dark:hover {
    border-color: #98a2b3;
    background: var(--surface-soft);
    color: var(--ink);
}

.btn-soft {
    border: 1px solid #c7d2fe;
    background: var(--brand-soft);
    color: #3730a3;
}

.btn-soft:hover {
    border-color: #a5b4fc;
    background: #e0e7ff;
    color: #312e81;
}

.form-label {
    margin-bottom: 7px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 720;
}

.form-control,
.form-select {
    min-height: 46px;
    padding: 10px 13px;
    border-color: var(--line-strong);
    border-radius: 12px;
    background-color: var(--surface);
    color: var(--ink);
    font-size: 13px;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

textarea.form-control {
    min-height: auto;
    line-height: 1.55;
}

.form-control:hover,
.form-select:hover {
    border-color: #98a2b3;
}

.form-control:focus,
.form-select:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .11);
}

.form-control::placeholder {
    color: #98a2b3;
}

.form-text {
    margin-top: 7px;
    color: var(--muted);
    font-size: 11px;
}

.input-with-icon {
    position: relative;
}

.input-with-icon .input-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    color: var(--muted-light);
    font-size: 12px;
    transform: translateY(-50%);
    pointer-events: none;
}

.input-with-icon .form-control {
    padding-left: 40px;
}

.app-alert {
    display: flex;
    margin-bottom: 18px;
    padding: 13px 15px;
    align-items: center;
    gap: 10px;
    border-width: 1px;
    border-radius: 13px;
    font-size: 13px;
}

.alert-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: currentColor;
}

.badge {
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .01em;
}

/* Dashboard */

.hero-panel {
    position: relative;
    display: grid;
    margin-bottom: 22px;
    padding: 26px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    overflow: hidden;
    border: 1px solid #d9dcff;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 88% 20%, rgba(99, 102, 241, .16), transparent 30%),
        linear-gradient(135deg, #ffffff 15%, #f5f6ff 100%);
    box-shadow: var(--shadow-sm);
}

.hero-panel::after {
    position: absolute;
    right: -60px;
    bottom: -110px;
    width: 230px;
    height: 230px;
    border: 36px solid rgba(99, 102, 241, .07);
    border-radius: 50%;
    content: "";
}

.hero-copy {
    position: relative;
    z-index: 1;
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(27px, 3vw, 38px);
    font-weight: 780;
    letter-spacing: -.05em;
}

.hero-copy p {
    max-width: 660px;
    margin: 9px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.hero-actions {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
}

.metric-grid {
    display: grid;
    margin-bottom: 22px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.metric-card {
    padding: 19px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.metric-top {
    display: flex;
    margin-bottom: 17px;
    align-items: center;
    justify-content: space-between;
}

.metric-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.metric-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 11px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 11px;
    font-weight: 850;
}

.metric-value {
    font-size: 28px;
    font-weight: 780;
    letter-spacing: -.045em;
}

.metric-foot {
    margin-top: 5px;
    color: var(--muted-light);
    font-size: 11px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, .75fr);
    gap: 18px;
}

.quick-actions-grid {
    display: grid;
    margin-bottom: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.quick-action-card {
    position: relative;
    display: block;
    min-height: 140px;
    padding: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    color: inherit;
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.quick-action-card:hover {
    border-color: #c7d2fe;
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.quick-action-card.ai {
    border-color: #d9dcff;
    background: linear-gradient(135deg, #ffffff, #f4f2ff);
}

.quick-card-tag {
    display: inline-flex;
    margin-bottom: 16px;
    padding: 5px 8px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .07em;
}

.quick-action-card.ai .quick-card-tag {
    background: #e0e7ff;
    color: #4338ca;
}

.quick-action-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 17px;
    letter-spacing: -.025em;
}

.quick-action-card p {
    max-width: 85%;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.quick-arrow {
    position: absolute;
    right: 18px;
    bottom: 17px;
    color: var(--brand);
    font-size: 20px;
    font-weight: 700;
}

.pipeline-row {
    display: grid;
    padding: 13px 0;
    grid-template-columns: 116px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--line);
}

.pipeline-row:last-child {
    border-bottom: 0;
}

.pipeline-label {
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 650;
}

.pipeline-track {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef0f4;
}

.pipeline-fill {
    height: 100%;
    min-width: 6px;
    border-radius: inherit;
    background: linear-gradient(90deg, #818cf8, #4f46e5);
}

.pipeline-count {
    text-align: right;
    font-size: 12px;
    font-weight: 800;
}

.followup-list,
.activity-list {
    display: grid;
}

.followup-item,
.activity-item {
    display: flex;
    padding: 14px 0;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    color: inherit;
    text-decoration: none;
}

.followup-item:last-child,
.activity-item:last-child {
    border-bottom: 0;
}

.followup-date {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    border-radius: 13px;
    background: var(--surface-soft);
    color: var(--ink-soft);
}

.followup-date strong,
.followup-date small {
    display: block;
    text-align: center;
}

.followup-date strong {
    font-size: 15px;
    line-height: 1;
}

.followup-date small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
    text-transform: uppercase;
}

.followup-date.overdue {
    background: var(--danger-soft);
    color: var(--danger);
}

.followup-content {
    min-width: 0;
    flex: 1;
}

.followup-content strong {
    display: block;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.followup-content small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.followup-amount {
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

/* Tables and lists */

.filter-panel {
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.table-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.table {
    margin: 0;
    color: var(--ink-soft);
}

.table > :not(caption) > * > * {
    padding: 15px 16px;
    border-bottom-color: var(--line);
    vertical-align: middle;
}

.table thead th {
    border-bottom-width: 1px;
    background: #fafbfc;
    color: var(--muted);
    font-size: 10px;
    font-weight: 820;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table tbody tr {
    transition: background .14s ease;
}

.table tbody tr:hover {
    background: #fafbff;
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.table-primary-text {
    color: var(--ink);
    font-weight: 740;
    letter-spacing: -.01em;
}

.table-secondary-text {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.status-badge {
    display: inline-flex;
    padding: 6px 9px;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}

.status-badge::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.status-draft {
    background: #f2f4f7;
    color: #475467;
}

.status-sent {
    background: var(--info-soft);
    color: var(--info);
}

.status-follow_up,
.status-warning {
    background: var(--warning-soft);
    color: var(--warning);
}

.status-negotiation {
    background: #ecfdff;
    color: #0e7090;
}

.status-won {
    background: var(--success-soft);
    color: var(--success);
}

.status-lost,
.status-overdue {
    background: var(--danger-soft);
    color: var(--danger);
}

.status-expired {
    background: #f2f4f7;
    color: #344054;
}

.table-actions {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
}

.empty-state {
    padding: 52px 24px;
    text-align: center;
}

.empty-state-icon {
    display: grid;
    width: 54px;
    height: 54px;
    margin: 0 auto 14px;
    place-items: center;
    border-radius: 17px;
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 850;
}

.empty-state h3 {
    margin: 0 0 6px;
    font-size: 16px;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

/* Quotation form */

.form-progress {
    display: flex;
    margin-bottom: 20px;
    padding: 12px 16px;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface);
}

.progress-step {
    display: flex;
    min-width: max-content;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.progress-step span {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 10px;
    font-weight: 850;
}

.progress-step.active {
    color: var(--brand);
}

.progress-step.active span {
    background: var(--brand);
    color: #fff;
}

.progress-divider {
    width: 36px;
    height: 1px;
    flex: 0 0 36px;
    background: var(--line);
}

.quotation-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 355px;
    align-items: start;
    gap: 18px;
}

.quotation-summary {
    position: sticky;
    top: calc(var(--topbar-height) + 18px);
}

.summary-card {
    padding: 22px;
    border: 1px solid #d9dcff;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 100% 0, rgba(99, 102, 241, .1), transparent 32%),
        var(--surface);
    box-shadow: var(--shadow-sm);
}

.summary-card h2 {
    margin: 0 0 18px;
    font-size: 17px;
    font-weight: 760;
    letter-spacing: -.025em;
}

.summary-fields {
    display: grid;
    gap: 13px;
}

.summary-divider {
    height: 1px;
    margin: 20px 0;
    background: var(--line);
}

.summary-line {
    display: flex;
    margin-bottom: 10px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: var(--muted);
    font-size: 12px;
}

.summary-line strong {
    color: var(--ink-soft);
    white-space: nowrap;
}

.summary-total {
    display: flex;
    margin-top: 4px;
    padding-top: 16px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--line);
}

.summary-total span {
    font-size: 13px;
    font-weight: 700;
}

.summary-total strong {
    color: var(--brand);
    font-size: 24px;
    font-weight: 820;
    letter-spacing: -.045em;
}

.summary-note {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
    text-align: center;
}

.quotation-item {
    position: relative;
    margin-bottom: 12px !important;
    padding: 18px !important;
    border: 1px solid var(--line) !important;
    border-radius: 16px !important;
    background: #fcfcfd;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.quotation-item:hover {
    border-color: #c7d2fe !important;
    box-shadow: 0 8px 22px rgba(79, 70, 229, .05);
}

.item-number {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 9px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 10px;
    font-weight: 850;
}

.item-total-text.form-control {
    display: flex;
    align-items: center;
    border-color: #d9dcff;
    background: var(--brand-soft) !important;
    color: #3730a3;
    font-weight: 800;
}

.add-item-button {
    border-style: dashed;
}

/* AI RFQ */

.ai-hero {
    position: relative;
    margin-bottom: 18px;
    padding: 26px;
    overflow: hidden;
    border: 1px solid #d9dcff;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 88% 35%, rgba(99, 102, 241, .22), transparent 28%),
        linear-gradient(135deg, #111827, #20254a);
    color: #fff;
}

.ai-hero::after {
    position: absolute;
    right: 40px;
    bottom: -70px;
    width: 180px;
    height: 180px;
    border: 28px solid rgba(255, 255, 255, .05);
    border-radius: 50%;
    content: "";
}

.ai-hero .page-eyebrow {
    background: rgba(129, 140, 248, .18);
    color: #c7d2fe;
}

.ai-hero h1 {
    margin: 0;
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 800;
    letter-spacing: -.05em;
}

.ai-hero p {
    max-width: 680px;
    margin: 10px 0 0;
    color: #cbd5e1;
    line-height: 1.65;
}

.ai-input-grid {
    display: grid;
    margin-bottom: 18px;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, .5fr);
    gap: 18px;
}

.ai-input-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.ai-textarea {
    min-height: 280px !important;
    padding: 17px !important;
    border-radius: 15px !important;
    background: #fbfcff;
    font-family: inherit;
    line-height: 1.65;
    resize: vertical;
}

.ai-control-bar {
    display: flex;
    margin-top: 14px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.ai-safety-note {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
}

.ai-safety-icon {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 8px;
    background: var(--success-soft);
    color: var(--success);
    font-size: 10px;
    font-weight: 850;
}

.ai-guide-card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.ai-guide-card h3 {
    margin: 0 0 15px;
    font-size: 15px;
    font-weight: 750;
}

.ai-guide-list {
    display: grid;
    gap: 13px;
}

.ai-guide-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.ai-guide-number {
    display: grid;
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    place-items: center;
    border-radius: 9px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 10px;
    font-weight: 850;
}

.ai-guide-item strong {
    display: block;
    margin-bottom: 2px;
    color: var(--ink-soft);
    font-size: 12px;
}

.ai-guide-item p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.analysis-summary {
    display: grid;
    margin-bottom: 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.analysis-field {
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
}

.analysis-field small {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.analysis-field strong {
    display: block;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-product-match {
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fcfcfd;
}

/* Authentication */

.auth-body {
    background:
        radial-gradient(circle at 12% 14%, rgba(99, 102, 241, .15), transparent 28%),
        #f4f6fb;
}

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

.login-layout {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(420px, .95fr) minmax(440px, 1.05fr);
}

.login-brand-panel {
    position: relative;
    display: flex;
    padding: 54px;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 10%, rgba(99, 102, 241, .35), transparent 30%),
        linear-gradient(145deg, #111827 20%, #24284e 100%);
    color: #fff;
}

.login-brand-panel::after {
    position: absolute;
    right: -170px;
    bottom: -190px;
    width: 520px;
    height: 520px;
    border: 80px solid rgba(255, 255, 255, .035);
    border-radius: 50%;
    content: "";
}

.login-logo {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 13px;
}

.login-logo .brand-mark {
    width: 48px;
    height: 48px;
}

.login-logo strong {
    display: block;
    font-size: 18px;
}

.login-logo small {
    display: block;
    margin-top: 2px;
    color: #98a2b3;
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.login-message {
    position: relative;
    z-index: 1;
    max-width: 590px;
}

.login-message .page-eyebrow {
    background: rgba(129, 140, 248, .16);
    color: #c7d2fe;
}

.login-message h1 {
    margin: 0;
    font-size: clamp(38px, 5vw, 64px);
    font-weight: 820;
    letter-spacing: -.065em;
    line-height: .98;
}

.login-message p {
    max-width: 540px;
    margin: 20px 0 0;
    color: #cbd5e1;
    font-size: 15px;
    line-height: 1.75;
}

.login-feature-row {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.login-feature {
    padding: 8px 11px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 999px;
    background: rgba(255, 255, 255, .05);
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 650;
}

.login-form-panel {
    display: grid;
    padding: 34px;
    place-items: center;
}

.login-form-wrap {
    width: min(100%, 470px);
}

.login-mobile-brand {
    display: none;
    margin-bottom: 28px;
    align-items: center;
    gap: 12px;
}

.login-form-wrap h2 {
    margin: 0;
    font-size: 32px;
    font-weight: 790;
    letter-spacing: -.045em;
}

.login-form-wrap > p {
    margin: 9px 0 26px;
    color: var(--muted);
    line-height: 1.6;
}

.login-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.password-help {
    display: flex;
    margin-top: 18px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--muted);
    font-size: 11px;
}

.password-help span {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 50%;
    background: var(--success-soft);
    color: var(--success);
    font-size: 9px;
    font-weight: 850;
}

/* Existing old-page compatibility */

.card-body {
    padding: 22px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 780;
    letter-spacing: -.045em;
}

/* Responsive */

@media (max-width: 1260px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid,
    .quotation-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .quotation-summary {
        position: static;
    }

    .analysis-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1099px) {
    .app-sidebar {
        width: min(310px, 88vw);
        transform: translateX(-105%);
        transition: transform .22s ease;
        box-shadow: 20px 0 50px rgba(16, 24, 40, .22);
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close,
    .mobile-menu-button {
        display: block;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1030;
        display: block;
        background: rgba(15, 23, 42, .42);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }

    .sidebar-backdrop.show {
        opacity: 1;
        pointer-events: auto;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .app-main {
        margin-left: 0;
    }

    .app-topbar {
        padding: 0 22px;
    }

    .app-content {
        padding: 26px 22px 42px;
    }
}

@media (max-width: 820px) {
    .topbar-quick-action,
    .user-copy {
        display: none;
    }

    .user-menu {
        min-width: auto;
        padding-left: 10px;
    }

    .page-header {
        flex-direction: column;
    }

    .page-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .hero-panel {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-actions {
        flex-wrap: wrap;
    }

    .dashboard-grid,
    .ai-input-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .quick-actions-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .login-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .login-brand-panel {
        display: none;
    }

    .login-mobile-brand {
        display: flex;
    }

    .login-form-panel {
        padding: 24px;
    }
}

@media (max-width: 620px) {
    :root {
        --topbar-height: 68px;
    }

    .app-topbar {
        padding: 0 14px;
    }

    .app-content {
        padding: 20px 14px 34px;
    }

    .topbar-context small {
        display: none;
    }

    .topbar-context strong {
        max-width: 180px;
        font-size: 13px;
    }

    .logout-link {
        display: none;
    }

    .metric-grid,
    .analysis-summary {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-panel,
    .section-card,
    .ai-hero,
    .ai-input-card,
    .ai-guide-card {
        padding: 19px;
        border-radius: 18px;
    }

    .page-heading {
        font-size: 29px;
    }

    .hero-copy h1 {
        font-size: 29px;
    }

    .page-actions .btn,
    .hero-actions .btn {
        flex: 1;
    }

    .form-progress {
        padding: 10px 12px;
    }

    .progress-divider {
        width: 18px;
        flex-basis: 18px;
    }

    .quotation-item {
        padding: 14px !important;
    }

    .table > :not(caption) > * > * {
        padding: 13px 12px;
    }

    .ai-control-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .ai-control-bar .btn {
        width: 100%;
    }

    .login-form-panel {
        padding: 18px 14px;
    }

    .login-card {
        padding: 22px 18px;
        border-radius: 18px;
    }
}


/* RFQ file upload v1 */

.rfq-dropzone {
    display: grid;
    min-height: 185px;
    padding: 24px;
    place-items: center;
    align-content: center;
    gap: 7px;
    border: 1.5px dashed #c7d2fe;
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 0, rgba(99, 102, 241, .08), transparent 45%),
        #fbfbff;
    color: var(--ink);
    cursor: pointer;
    text-align: center;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.rfq-dropzone:hover,
.rfq-dropzone.dragging {
    border-color: var(--brand);
    background: #f4f2ff;
    transform: translateY(-1px);
}

.rfq-dropzone.has-file {
    border-style: solid;
    border-color: #86efac;
    background: #f0fdf4;
}

.dropzone-icon {
    display: grid;
    width: 46px;
    height: 46px;
    margin-bottom: 4px;
    place-items: center;
    border-radius: 15px;
    background: var(--brand);
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    box-shadow: 0 10px 26px rgba(79, 70, 229, .22);
}

.rfq-dropzone.has-file .dropzone-icon {
    background: var(--success);
}

.rfq-dropzone strong {
    font-size: 15px;
    letter-spacing: -.02em;
}

.rfq-dropzone > span:not(.dropzone-icon) {
    color: var(--muted);
    font-size: 12px;
}

.rfq-dropzone small {
    color: var(--muted-light);
    font-size: 10px;
}

.rfq-source-divider {
    display: flex;
    margin: 18px 0;
    align-items: center;
    gap: 12px;
    color: var(--muted-light);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.rfq-source-divider::before,
.rfq-source-divider::after {
    height: 1px;
    flex: 1;
    background: var(--line);
    content: "";
}

.ai-format-list {
    display: grid;
    gap: 14px;
}

.ai-format-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.format-icon {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border-radius: 12px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 9px;
    font-weight: 850;
}

.ai-format-item strong {
    display: block;
    margin-bottom: 3px;
    color: var(--ink-soft);
    font-size: 12px;
}

.ai-format-item p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.upload-security-card {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    background: var(--success-soft);
}

.upload-security-card strong {
    display: block;
    margin-bottom: 5px;
    color: var(--success);
    font-size: 12px;
}

.upload-security-card p {
    margin: 0;
    color: #166534;
    font-size: 10px;
    line-height: 1.55;
}

.source-file-chip {
    display: inline-flex;
    max-width: 100%;
    padding: 8px 11px;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
}

.source-file-chip span {
    padding: 3px 6px;
    border-radius: 6px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 8px;
    font-weight: 850;
}

.source-file-chip strong {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 620px) {
    .rfq-dropzone {
        min-height: 160px;
        padding: 19px;
    }
}


/* AI Product Draft Workflow */

.unmatched-product {
    border-color: #f7c86b;
    background: linear-gradient(135deg, #fffdf8, #fffaf0);
}

.unmatched-product.draft-selected {
    border-color: #f59e0b;
    box-shadow: 0 8px 24px rgba(245, 158, 11, .08);
}

.draft-product-option {
    display: flex;
    padding: 14px 15px;
    align-items: flex-start;
    gap: 11px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    cursor: pointer;
}

.draft-product-option.recommended {
    border-color: #f7c86b;
    background: var(--warning-soft);
}

.draft-product-option .form-check-input {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    flex: 0 0 18px;
}

.draft-option-copy {
    min-width: 0;
    flex: 1;
}

.draft-option-copy strong,
.draft-option-copy small {
    display: block;
}

.draft-option-copy strong {
    color: var(--ink-soft);
    font-size: 12px;
}

.draft-option-copy small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.draft-recommended-badge {
    padding: 4px 7px;
    border-radius: 999px;
    background: #fef0c7;
    color: #b54708;
    font-size: 9px;
    font-weight: 850;
}

.draft-product-item {
    border-color: #f7c86b !important;
    background: linear-gradient(135deg, #fffdf8, #fffaf0);
}

.draft-item-badge {
    padding: 5px 8px;
    border-radius: 999px;
    background: #fef0c7;
    color: #b54708;
    font-size: 9px;
    font-weight: 850;
}

.ai-draft-metric {
    border-color: #f7c86b;
    background: linear-gradient(135deg, #fff, #fffaf0);
}

.draft-inbox-banner {
    display: flex;
    margin-bottom: 20px;
    padding: 22px;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    border: 1px solid #f7c86b;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 88% 25%, rgba(245, 158, 11, .12), transparent 30%),
        linear-gradient(135deg, #fff, #fffaf0);
    box-shadow: var(--shadow-xs);
}

.draft-inbox-banner h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 760;
    letter-spacing: -.03em;
}

.draft-inbox-banner p {
    max-width: 720px;
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.ai-draft-row {
    background: #fffdf8;
}

.ai-draft-row:hover {
    background: #fffaf0 !important;
}

.draft-product-edit-notice {
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid #f7c86b;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #fff, #fffaf0);
}

.draft-product-edit-notice h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 760;
    letter-spacing: -.025em;
}

.draft-product-edit-notice p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

@media (max-width: 720px) {
    .draft-inbox-banner {
        align-items: stretch;
        flex-direction: column;
    }

    .draft-inbox-banner .btn {
        width: 100%;
    }

    .draft-recommended-badge {
        display: none;
    }
}


/* Quotation PDF template settings */

.settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 355px;
    align-items: start;
    gap: 18px;
}

.settings-sidebar {
    position: sticky;
    top: calc(var(--topbar-height) + 18px);
}

.branding-preview {
    display: flex;
    min-height: 108px;
    margin-top: 12px;
    padding: 13px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background:
        linear-gradient(45deg, #f8fafc 25%, transparent 25%),
        linear-gradient(-45deg, #f8fafc 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f8fafc 75%),
        linear-gradient(-45deg, transparent 75%, #f8fafc 75%);
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
}

.branding-preview img {
    display: block;
    max-width: 150px;
    max-height: 78px;
    object-fit: contain;
}

.color-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-input-row .form-control-color {
    width: 58px;
    min-height: 46px;
    padding: 5px;
}

.color-input-row code {
    padding: 7px 9px;
    border-radius: 9px;
    background: var(--surface-soft);
    color: var(--ink-soft);
    font-size: 11px;
}

@media (max-width: 1260px) {
    .settings-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .settings-sidebar {
        position: static;
    }
}

@media (max-width: 620px) {
    .branding-preview {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* Multi-Sales Workspace v1 */

.owner-chip {
    display: inline-flex;
    max-width: 180px;
    padding: 6px 9px;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 10px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.owner-chip::before {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: #6366f1;
    content: "";
}

.team-security-banner {
    display: flex;
    margin-bottom: 20px;
    padding: 18px 20px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid #c7d2fe;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #fff, #f5f6ff);
}

.team-security-banner h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 760;
}

.team-security-banner p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 720px) {
    .team-security-banner {
        align-items: stretch;
        flex-direction: column;
    }
}


/* Shared Customer Master v1 */

.owner-chip-mine {
    border: 1px solid #bbf7d0;
    background: #ecfdf3;
    color: #15803d;
}

.owner-chip-mine::before {
    background: #22c55e;
}


/* Quotation Approval + Activity Log v1 */

.approval-workflow-card,
.approval-dashboard-banner {
    display: flex;
    margin-bottom: 18px;
    padding: 20px;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    border: 1px solid #c7d2fe;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 90% 10%, rgba(99,102,241,.10), transparent 28%),
        linear-gradient(135deg, #fff, #f7f7ff);
    box-shadow: var(--shadow-xs);
}

.approval-workflow-main,
.approval-dashboard-banner > div {
    min-width: 0;
    flex: 1;
}

.approval-workflow-main h2,
.approval-dashboard-banner h2 {
    margin: 0;
    color: var(--ink);
    font-size: 20px;
    font-weight: 780;
    letter-spacing: -.03em;
}

.approval-workflow-main p,
.approval-dashboard-banner p {
    max-width: 760px;
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.approval-workflow-actions {
    display: flex;
    min-width: 270px;
    align-items: stretch;
    justify-content: flex-end;
    gap: 10px;
}

.approval-decision-form {
    display: grid;
    min-width: 340px;
    gap: 10px;
}

.activity-timeline {
    position: relative;
    display: grid;
    gap: 0;
}

.activity-entry {
    position: relative;
    display: grid;
    min-height: 76px;
    padding: 0 0 22px 30px;
    grid-template-columns: minmax(0, 1fr);
}

.activity-entry:not(:last-child)::before {
    position: absolute;
    top: 13px;
    bottom: -1px;
    left: 7px;
    width: 1px;
    background: var(--line);
    content: "";
}

.activity-marker {
    position: absolute;
    z-index: 2;
    top: 5px;
    left: 0;
    width: 15px;
    height: 15px;
    border: 4px solid #eef2ff;
    border-radius: 50%;
    background: var(--brand);
}

.activity-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.activity-heading strong {
    color: var(--ink-soft);
    font-size: 12px;
}

.activity-heading span,
.activity-copy small {
    color: var(--muted-light);
    font-size: 10px;
}

.activity-copy p {
    margin: 6px 0 4px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

@media (max-width: 840px) {
    .approval-workflow-card,
    .approval-dashboard-banner {
        align-items: stretch;
        flex-direction: column;
    }

    .approval-workflow-actions,
    .approval-decision-form {
        width: 100%;
        min-width: 0;
    }

    .approval-workflow-actions {
        justify-content: stretch;
    }

    .approval-workflow-actions form,
    .approval-workflow-actions .btn {
        width: 100%;
    }

    .activity-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }
}


/* ============================================================
   RFQ COPILOT CRM CORE v1
   Icon-led interface, record views, Kanban, activities
   ============================================================ */

.nav-icon svg,
.metric-visual svg,
.module-hero-icon svg,
.section-number svg,
.btn svg,
.input-icon svg,
.brand-mark svg,
.quick-action-spark svg,
.empty-state-icon svg {
    display: block;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.sidebar-link {
    min-height: 44px;
}

.module-hero {
    position: relative;
    display: flex;
    min-height: 150px;
    margin-bottom: 22px;
    padding: 26px;
    align-items: center;
    gap: 18px;
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(135deg, #111827, #1f2937);
    color: #fff;
    box-shadow: 0 18px 42px rgba(17, 24, 39, .16);
}

.module-hero::after {
    position: absolute;
    top: -76px;
    right: -42px;
    width: 260px;
    height: 260px;
    border: 42px solid rgba(255, 255, 255, .06);
    border-radius: 50%;
    content: "";
}

.module-hero.compact {
    min-height: 124px;
}

.module-hero-icon {
    position: relative;
    z-index: 2;
    display: grid;
    width: 62px;
    height: 62px;
    flex: 0 0 62px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 19px;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(12px);
}

.module-hero-copy {
    position: relative;
    z-index: 2;
    min-width: 0;
    flex: 1;
}

.module-hero-copy h1 {
    margin: 2px 0 7px;
    font-size: clamp(27px, 4vw, 39px);
    font-weight: 790;
    letter-spacing: -.045em;
}

.module-hero-copy p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, .74);
    font-size: 13px;
    line-height: 1.65;
}

.module-hero .page-eyebrow {
    color: rgba(255, 255, 255, .62);
}

.module-hero-actions {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 9px;
}

.module-hero .btn-outline-light {
    border-color: rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .07);
}

.leads-hero {
    background: linear-gradient(135deg, #172554, #312e81 52%, #4338ca);
}

.deals-hero {
    background: linear-gradient(135deg, #172033, #344054 45%, #475467);
}

.pipeline-hero {
    background: linear-gradient(135deg, #0f172a, #312e81 55%, #4f46e5);
}

.contacts-hero {
    background: linear-gradient(135deg, #083344, #155e75 50%, #0891b2);
}

.activities-hero {
    background: linear-gradient(135deg, #3f1d0b, #92400e 52%, #d97706);
}

.customers-hero {
    background: linear-gradient(135deg, #052e16, #166534 50%, #16a34a);
}

.crm-hero {
    background: linear-gradient(135deg, #111827, #312e81 55%, #4f46e5);
}

.metric-card-icon {
    display: flex;
    align-items: center;
    gap: 15px;
}

.metric-visual {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    place-items: center;
    border-radius: 15px;
    background: #eef2ff;
    color: #4f46e5;
}

.metric-blue {
    background: #eff8ff;
    color: #175cd3;
}

.metric-amber {
    background: #fffaeb;
    color: #b54708;
}

.metric-green {
    background: #ecfdf3;
    color: #15803d;
}

.metric-violet {
    background: #f4f3ff;
    color: #6941c6;
}

.metric-money {
    font-size: 21px !important;
}

.mini-contact-row {
    display: flex;
    margin-top: 6px;
    flex-wrap: wrap;
    gap: 8px 13px;
    color: var(--muted);
    font-size: 10px;
}

.mini-contact-row span,
.crm-record-counts a,
.contact-company,
.contact-methods span,
.record-info-list span,
.dashboard-activity-item,
.quick-record-action,
.activity-card-meta span,
.activity-card-meta a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.form-two-column,
.record-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
    gap: 18px;
}

.sticky-panel {
    position: sticky;
    top: calc(var(--topbar-height) + 18px);
}

.owner-profile-card {
    display: flex;
    padding: 13px;
    align-items: center;
    gap: 11px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
}

.owner-avatar,
.contact-avatar {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(135deg, #6366f1, #4338ca);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
}

.owner-profile-card strong,
.owner-profile-card small {
    display: block;
}

.owner-profile-card small {
    color: var(--muted);
    font-size: 10px;
}

.record-hero {
    display: flex;
    margin-bottom: 20px;
    padding: 22px;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        radial-gradient(circle at 90% 15%, rgba(79, 70, 229, .09), transparent 28%),
        #fff;
    box-shadow: var(--shadow-sm);
}

.record-avatar {
    display: grid;
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    place-items: center;
    border-radius: 18px;
    color: #fff;
}

.lead-avatar {
    background: linear-gradient(135deg, #6366f1, #4338ca);
}

.deal-avatar {
    background: linear-gradient(135deg, #344054, #111827);
}

.record-hero-copy {
    min-width: 0;
    flex: 1;
}

.record-hero-copy h1 {
    margin: 7px 0 3px;
    font-size: 27px;
    font-weight: 780;
    letter-spacing: -.035em;
}

.record-hero-copy p {
    margin: 0;
    color: var(--muted);
}

.record-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-stat-grid,
.deal-kpi-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.detail-stat,
.deal-kpi-strip > div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
}

.detail-stat small,
.detail-stat strong,
.deal-kpi-strip small,
.deal-kpi-strip strong {
    display: block;
}

.detail-stat small,
.deal-kpi-strip small {
    color: var(--muted);
    font-size: 10px;
}

.detail-stat strong,
.deal-kpi-strip strong {
    margin-top: 5px;
    color: var(--ink);
    font-size: 14px;
}

.deal-kpi-strip {
    margin-bottom: 18px;
}

.deal-kpi-strip > div {
    display: grid;
    grid-template-columns: 38px 1fr;
    align-items: center;
    column-gap: 9px;
}

.deal-kpi-strip > div > span:first-child {
    display: grid;
    width: 38px;
    height: 38px;
    grid-row: 1 / 3;
    place-items: center;
    border-radius: 12px;
    background: var(--brand-soft);
    color: var(--brand);
}

.record-info-list {
    display: grid;
    margin-top: 16px;
    border-top: 1px solid var(--line);
}

.record-info-list > div {
    display: grid;
    padding: 12px 0;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 16px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
}

.record-info-list span {
    color: var(--muted);
}

.record-note {
    display: flex;
    margin-top: 16px;
    padding: 15px;
    align-items: flex-start;
    gap: 11px;
    border: 1px solid #c7d2fe;
    border-radius: 14px;
    background: #f7f7ff;
}

.record-note > span {
    color: var(--brand);
}

.record-note strong,
.record-note p {
    display: block;
}

.record-note p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

.danger-note {
    border-color: #fecdca;
    background: #fef3f2;
}

.danger-note > span {
    color: var(--danger);
}

.crm-timeline {
    display: grid;
}

.crm-timeline-item {
    position: relative;
    display: grid;
    min-height: 82px;
    padding: 0 0 24px 40px;
}

.crm-timeline-item:not(:last-child)::before {
    position: absolute;
    top: 18px;
    bottom: -1px;
    left: 14px;
    width: 1px;
    background: var(--line);
    content: "";
}

.timeline-icon {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    display: grid;
    width: 29px;
    height: 29px;
    place-items: center;
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    background: #eef2ff;
    color: var(--brand);
}

.timeline-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.timeline-head strong {
    color: var(--ink-soft);
    font-size: 12px;
}

.timeline-head span,
.timeline-meta {
    color: var(--muted-light);
    font-size: 10px;
}

.timeline-meta {
    display: flex;
    margin-top: 3px;
    flex-wrap: wrap;
    gap: 5px;
}

.timeline-body p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

.quick-record-action {
    margin-top: 9px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    text-decoration: none;
    transition: .16s ease;
}

.quick-record-action:hover {
    border-color: #c7d2fe;
    background: var(--brand-soft);
    transform: translateY(-1px);
}

.quick-record-action > span {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 11px;
    background: var(--surface-soft);
    color: var(--brand);
}

.quick-record-action strong,
.quick-record-action small {
    display: block;
}

.quick-record-action strong {
    color: var(--ink-soft);
    font-size: 11px;
}

.quick-record-action small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
}

.quick-record-action.accent {
    border-color: #c7d2fe;
    background: #f7f7ff;
}

.contact-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.contact-empty,
.activity-empty {
    grid-column: 1 / -1;
    padding: 50px 20px;
    border: 1px dashed var(--line-strong);
    border-radius: 18px;
    background: #fff;
}

.contact-profile-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-xs);
    transition: .18s ease;
}

.contact-profile-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.contact-profile-head {
    display: flex;
    align-items: center;
    gap: 11px;
}

.contact-profile-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 750;
}

.contact-profile-head p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 10px;
}

.contact-company {
    margin-top: 15px;
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.contact-methods {
    display: grid;
    margin-top: 13px;
    gap: 7px;
    color: var(--muted);
    font-size: 10px;
}

.contact-card-footer {
    display: flex;
    margin-top: 16px;
    padding-top: 13px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid var(--line);
}

.crm-record-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.crm-record-counts a {
    padding: 5px 8px;
    border-radius: 9px;
    background: var(--surface-soft);
    color: var(--ink-soft);
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
}

.deal-stage-pill {
    display: inline-flex;
    padding: 6px 9px;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}

.stage-slate {
    background: #f2f4f7;
    color: #475467;
}

.stage-indigo {
    background: #eef2ff;
    color: #4338ca;
}

.stage-blue {
    background: #eff8ff;
    color: #175cd3;
}

.stage-cyan {
    background: #ecfdff;
    color: #0e7090;
}

.stage-violet {
    background: #f4f3ff;
    color: #6941c6;
}

.stage-amber {
    background: #fffaeb;
    color: #b54708;
}

.stage-sky {
    background: #f0f9ff;
    color: #0369a1;
}

.stage-orange {
    background: #fff6ed;
    color: #c4320a;
}

.stage-purple {
    background: #f9f5ff;
    color: #7f56d9;
}

.stage-green {
    background: #ecfdf3;
    color: #15803d;
}

.stage-red {
    background: #fef3f2;
    color: #b42318;
}

.deal-value-preview {
    padding: 15px;
    border-radius: 14px;
    background: linear-gradient(135deg, #111827, #344054);
    color: #fff;
}

.deal-value-preview small,
.deal-value-preview strong,
.deal-value-preview span {
    display: block;
}

.deal-value-preview small {
    color: #98a2b3;
    font-size: 9px;
    text-transform: uppercase;
}

.deal-value-preview strong {
    margin-top: 5px;
    font-size: 21px;
}

.deal-value-preview span {
    margin-top: 3px;
    color: #cbd5e1;
    font-size: 9px;
}

.conversion-choice {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.choice-card {
    position: relative;
    display: flex;
    padding: 14px;
    align-items: center;
    gap: 11px;
    border: 1px solid var(--line);
    border-radius: 14px;
    cursor: pointer;
}

.choice-card:has(input:checked) {
    border-color: #a5b4fc;
    background: #f5f6ff;
    box-shadow: inset 0 0 0 1px #c7d2fe;
}

.choice-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-card > span {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    background: var(--brand-soft);
    color: var(--brand);
}

.choice-card strong,
.choice-card small {
    display: block;
}

.choice-card strong {
    font-size: 11px;
}

.choice-card small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
}

.conversion-result-list {
    display: grid;
    gap: 10px;
}

.conversion-result-list > div {
    display: flex;
    padding: 11px;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.conversion-result-list > div > span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--brand);
}

.conversion-result-list strong,
.conversion-result-list small {
    display: block;
}

.conversion-result-list strong {
    font-size: 10px;
}

.conversion-result-list small {
    color: var(--muted);
    font-size: 9px;
}

.kanban-shell {
    display: flex;
    padding: 2px 2px 18px;
    gap: 13px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
}

.kanban-column {
    width: 305px;
    min-width: 305px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #eef1f6;
    scroll-snap-align: start;
}

.kanban-column-head {
    display: flex;
    padding: 4px 3px 11px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.kanban-column-head > div {
    display: grid;
    grid-template-columns: 8px 1fr;
    align-items: center;
    column-gap: 7px;
}

.kanban-column-head strong {
    font-size: 11px;
}

.kanban-column-head small {
    grid-column: 2;
    color: var(--muted);
    font-size: 8px;
}

.kanban-column-head > span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
}

.kanban-dot {
    width: 8px;
    height: 8px;
    grid-row: 1 / 3;
    border-radius: 50%;
    background: #667085;
}

.stage-indigo .kanban-dot {
    background: #4f46e5;
}

.stage-blue .kanban-dot {
    background: #175cd3;
}

.stage-cyan .kanban-dot {
    background: #0891b2;
}

.stage-violet .kanban-dot {
    background: #7f56d9;
}

.stage-amber .kanban-dot {
    background: #f79009;
}

.stage-sky .kanban-dot {
    background: #0ea5e9;
}

.stage-orange .kanban-dot {
    background: #f97316;
}

.stage-purple .kanban-dot {
    background: #9333ea;
}

.stage-green .kanban-dot {
    background: #16a34a;
}

.stage-red .kanban-dot {
    background: #dc2626;
}

.kanban-dropzone {
    display: grid;
    min-height: 120px;
    gap: 10px;
    border-radius: 13px;
    transition: .15s ease;
}

.kanban-dropzone.drag-over {
    padding: 7px;
    outline: 2px dashed #818cf8;
    background: rgba(99, 102, 241, .07);
}

.deal-kanban-card {
    padding: 13px;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(16, 24, 40, .05);
    cursor: grab;
}

.deal-kanban-card.dragging {
    opacity: .48;
    transform: rotate(1deg);
}

.deal-card-top,
.deal-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.deal-card-probability,
.deal-card-quote {
    display: inline-flex;
    padding: 4px 6px;
    align-items: center;
    gap: 4px;
    border-radius: 8px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 8px;
    font-weight: 800;
}

.deal-card-quote {
    background: var(--surface-soft);
    color: var(--muted);
}

.deal-card-title {
    display: block;
    margin-top: 11px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 760;
    line-height: 1.35;
    text-decoration: none;
}

.deal-card-company {
    display: flex;
    margin-top: 7px;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: 9px;
}

.deal-card-value {
    margin-top: 12px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.deal-card-footer {
    margin-top: 12px;
    padding-top: 9px;
    border-top: 1px solid var(--line);
    color: var(--muted-light);
    font-size: 8px;
}

.kanban-toast {
    position: fixed;
    z-index: 1080;
    right: 24px;
    bottom: 24px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #111827;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: .18s ease;
    box-shadow: var(--shadow-md);
    font-size: 11px;
}

.kanban-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.kanban-toast.error {
    background: var(--danger);
}

.kanban-toast.success {
    background: var(--success);
}

.activity-tabs {
    display: inline-flex;
    margin-bottom: 16px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
}

.activity-tabs a {
    padding: 8px 13px;
    border-radius: 9px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    text-decoration: none;
}

.activity-tabs a.active {
    background: var(--ink);
    color: #fff;
}

.activity-board {
    display: grid;
    gap: 11px;
}

.activity-card {
    display: grid;
    padding: 15px;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: start;
    gap: 13px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: #fff;
    box-shadow: var(--shadow-xs);
}

.activity-overdue {
    border-color: #fecdca;
    box-shadow: inset 3px 0 0 var(--danger);
}

.activity-card-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 14px;
    background: var(--surface-soft);
    color: var(--brand);
}

.type-call {
    background: #eff8ff;
    color: #175cd3;
}

.type-meeting {
    background: #f4f3ff;
    color: #6941c6;
}

.type-whatsapp {
    background: #ecfdf3;
    color: #15803d;
}

.type-email {
    background: #ecfdff;
    color: #0e7090;
}

.type-note {
    background: #fffaeb;
    color: #b54708;
}

.type-task {
    background: #eef2ff;
    color: #4f46e5;
}

.activity-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.activity-card-head h2 {
    margin: 2px 0 0;
    font-size: 13px;
    font-weight: 750;
}

.activity-type {
    color: var(--muted-light);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.activity-card-meta {
    display: flex;
    margin-top: 8px;
    flex-wrap: wrap;
    gap: 8px 15px;
    color: var(--muted);
    font-size: 9px;
}

.activity-card-meta a {
    color: var(--brand);
    text-decoration: none;
}

.activity-card-main > p {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.55;
}

.activity-card-actions {
    align-self: center;
}

.activity-type-picker {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.activity-type-choice {
    position: relative;
    display: grid;
    padding: 13px 8px;
    place-items: center;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 13px;
    cursor: pointer;
}

.activity-type-choice input {
    position: absolute;
    opacity: 0;
}

.activity-type-choice:has(input:checked) {
    border-color: #a5b4fc;
    background: #eef2ff;
    color: var(--brand);
    box-shadow: inset 0 0 0 1px #c7d2fe;
}

.activity-type-choice strong {
    font-size: 9px;
}

.crm-dashboard-grid {
    display: grid;
    margin-bottom: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.card-header-clean h2 svg {
    display: inline-block;
    margin-right: 6px;
    vertical-align: -4px;
}

.dashboard-activity-list {
    display: grid;
}

.dashboard-activity-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
}

.dashboard-activity-item:last-child {
    border-bottom: 0;
}

.dashboard-activity-icon {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 11px;
    background: var(--brand-soft);
    color: var(--brand);
}

.dashboard-activity-copy {
    min-width: 0;
    flex: 1;
}

.dashboard-activity-copy strong,
.dashboard-activity-copy small {
    display: block;
}

.dashboard-activity-copy strong {
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-activity-copy small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px;
}

.dashboard-activity-item > span:last-child {
    color: var(--muted);
    font-size: 8px;
}

.pipeline-snapshot {
    display: grid;
    gap: 8px;
}

.pipeline-snapshot-row {
    display: grid;
    padding: 9px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    text-decoration: none;
}

.pipeline-snapshot-row > span:nth-child(2) {
    color: var(--muted);
    font-size: 9px;
}

.pipeline-snapshot-row strong {
    font-size: 10px;
}

@media (max-width: 1180px) {
    .contact-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .activity-type-picker {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .module-hero {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .module-hero-actions {
        width: 100%;
    }

    .form-two-column,
    .record-grid,
    .crm-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .sticky-panel {
        position: static;
    }

    .detail-stat-grid,
    .deal-kpi-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .module-hero {
        padding: 20px;
    }

    .module-hero-icon {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
    }

    .module-hero-actions,
    .record-hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .module-hero-actions .btn,
    .record-hero-actions .btn {
        width: 100%;
    }

    .record-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-stat-grid,
    .deal-kpi-strip,
    .contact-card-grid,
    .conversion-choice {
        grid-template-columns: 1fr;
    }

    .record-info-list > div {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .activity-card {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .activity-card-actions {
        grid-column: 2;
        justify-self: start;
    }

    .activity-type-picker {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* ============================================================
   PROSPECT TEMPERATURE v1
   ============================================================ */

.temperature-hero {
    background:
        radial-gradient(circle at 85% 20%, rgba(251, 146, 60, .2), transparent 30%),
        linear-gradient(135deg, #172554, #7c2d12 58%, #c2410c);
}

.prospect-badge {
    display: inline-flex;
    min-height: 27px;
    padding: 5px 8px;
    align-items: center;
    gap: 5px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 760;
    white-space: nowrap;
}

.prospect-badge strong {
    padding-left: 3px;
    border-left: 1px solid currentColor;
    font-size: 9px;
}

.prospect-cold {
    border-color: #bae6fd !important;
    background: #f0f9ff !important;
    color: #0369a1 !important;
}

.prospect-warm {
    border-color: #fde68a !important;
    background: #fffbeb !important;
    color: #b45309 !important;
}

.prospect-hot {
    border-color: #fdba74 !important;
    background: #fff7ed !important;
    color: #c2410c !important;
}

.prospect-closing {
    border-color: #c4b5fd !important;
    background: #f5f3ff !important;
    color: #6d28d9 !important;
}

.prospect-won {
    border-color: #86efac !important;
    background: #f0fdf4 !important;
    color: #15803d !important;
}

.lead-score-preview {
    display: flex;
    margin-top: 18px;
    padding: 14px;
    align-items: center;
    gap: 11px;
    border: 1px solid;
    border-radius: 15px;
}

.lead-score-preview > span:first-child {
    display: grid;
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 13px;
    background: rgba(255,255,255,.55);
}

.lead-score-preview small,
.lead-score-preview strong,
.lead-score-preview span {
    display: block;
}

.lead-score-preview small {
    opacity: .72;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.lead-score-preview strong {
    margin-top: 3px;
    font-size: 14px;
}

.lead-score-preview div > span {
    margin-top: 3px;
    font-size: 9px;
    line-height: 1.45;
}

.temperature-rule-grid,
.temperature-overview-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.temperature-rule {
    display: grid;
    padding: 14px;
    grid-template-columns: 30px 1fr auto;
    align-items: center;
    gap: 5px 8px;
    border: 1px solid;
    border-radius: 15px;
}

.temperature-rule > svg {
    grid-row: 1 / 3;
}

.temperature-rule strong {
    font-size: 11px;
}

.temperature-rule > span {
    font-size: 10px;
    font-weight: 800;
}

.temperature-rule small {
    grid-column: 2 / 4;
    opacity: .72;
    font-size: 8px;
    line-height: 1.4;
}

.prospect-temperature-panel {
    margin-bottom: 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow-xs);
}

.temperature-panel-header {
    display: flex;
    margin-bottom: 14px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.temperature-panel-header h2 {
    margin: 2px 0 3px;
    font-size: 18px;
    font-weight: 780;
    letter-spacing: -.03em;
}

.temperature-panel-header p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
}

.temperature-overview-card {
    display: grid;
    padding: 13px;
    grid-template-columns: 37px 1fr auto;
    align-items: center;
    gap: 9px;
    border: 1px solid;
    border-radius: 15px;
}

.temperature-overview-icon {
    display: grid;
    width: 37px;
    height: 37px;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 11px;
    background: rgba(255,255,255,.55);
}

.temperature-overview-card small,
.temperature-overview-card strong,
.temperature-overview-card span {
    display: block;
}

.temperature-overview-card small {
    opacity: .72;
    font-size: 8px;
    font-weight: 800;
}

.temperature-overview-card strong {
    margin-top: 1px;
    font-size: 12px;
}

.temperature-overview-card div > span {
    margin-top: 2px;
    opacity: .75;
    font-size: 8px;
}

.temperature-overview-card > b {
    font-size: 22px;
    letter-spacing: -.04em;
}

.deal-card-temperature {
    padding: 4px 6px;
    font-size: 8px;
}

.deal-card-temperature strong {
    font-size: 8px;
}

.detail-stat-grid-five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 1260px) {
    .temperature-rule-grid,
    .temperature-overview-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .detail-stat-grid-five {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .temperature-rule-grid,
    .temperature-overview-grid,
    .detail-stat-grid-five {
        grid-template-columns: 1fr;
    }

    .temperature-panel-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ============================================================
   RFQ COPILOT SALES AI TOOLS v1
   Business Card AI + Uploaded Audio MOM
   ============================================================ */

.sales-ai-hero {
    background:
        radial-gradient(circle at 88% 20%, rgba(125, 211, 252, .16), transparent 28%),
        linear-gradient(135deg, #0f172a, #312e81 55%, #4338ca);
}

.business-card-hero {
    background:
        radial-gradient(circle at 88% 22%, rgba(110, 231, 183, .18), transparent 30%),
        linear-gradient(135deg, #052e16, #065f46 52%, #0f766e);
}

.meeting-mom-hero {
    background:
        radial-gradient(circle at 86% 18%, rgba(251, 191, 36, .17), transparent 30%),
        linear-gradient(135deg, #3f1d0b, #78350f 50%, #b45309);
}

.department-hero {
    background:
        radial-gradient(circle at 88% 18%, rgba(196, 181, 253, .18), transparent 30%),
        linear-gradient(135deg, #1e1b4b, #4c1d95 54%, #6d28d9);
}

.sales-ai-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.sales-ai-feature-card {
    display: flex;
    padding: 20px;
    align-items: flex-start;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-xs);
}

.sales-ai-feature-card > span {
    display: grid;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    place-items: center;
    border-radius: 16px;
    background: var(--brand-soft);
    color: var(--brand);
}

.sales-ai-feature-card strong,
.sales-ai-feature-card p {
    display: block;
}

.sales-ai-feature-card strong {
    font-size: 14px;
}

.sales-ai-feature-card p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.6;
}

.department-chip {
    display: inline-flex;
    min-height: 25px;
    padding: 5px 8px;
    align-items: center;
    gap: 5px;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 9px;
    font-weight: 750;
    white-space: nowrap;
}

.business-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.business-card-empty {
    grid-column: 1 / -1;
    padding: 54px 20px;
    border: 1px dashed var(--line-strong);
    border-radius: 20px;
    background: #fff;
}

.business-card-result {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 19px;
    background: #fff;
    box-shadow: var(--shadow-xs);
    transition: .18s ease;
}

.business-card-result:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.business-card-image {
    display: block;
    height: 190px;
    overflow: hidden;
    background: #eef2f6;
}

.business-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.business-card-result-body {
    padding: 16px;
}

.business-card-result-body h2 {
    margin: 13px 0 3px;
    font-size: 15px;
    font-weight: 780;
    letter-spacing: -.02em;
}

.business-card-result-body p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
}

.business-card-result-body > strong {
    display: block;
    margin-top: 9px;
    color: var(--ink-soft);
    font-size: 11px;
}

.business-card-meta {
    display: grid;
    margin-top: 12px;
    gap: 6px;
    color: var(--muted);
    font-size: 9px;
}

.business-card-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.matched-customer-note {
    margin-top: 11px;
    padding: 8px 10px;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    background: #ecfdf5;
    color: #047857;
    font-size: 9px;
}

.upload-drop-card {
    display: grid;
    min-height: 320px;
    padding: 28px;
    place-items: center;
    align-content: center;
    border: 2px dashed #cbd5e1;
    border-radius: 20px;
    background: #f8fafc;
    text-align: center;
}

.upload-drop-card:hover {
    border-color: #818cf8;
    background: #f7f7ff;
}

.upload-drop-icon {
    display: grid;
    width: 66px;
    height: 66px;
    place-items: center;
    border-radius: 20px;
    background: #eef2ff;
    color: #4f46e5;
}

.upload-drop-card h2 {
    margin: 15px 0 3px;
    font-size: 16px;
    font-weight: 780;
}

.upload-drop-card p {
    margin: 0 0 17px;
    color: var(--muted);
    font-size: 10px;
}

.upload-drop-card .form-control {
    max-width: 520px;
}

.business-card-upload-preview,
.business-card-review-image {
    width: 100%;
    max-height: 390px;
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fff;
    object-fit: contain;
}

.business-card-review-image {
    margin: 0;
}

.privacy-note,
.consent-note {
    display: flex;
    padding: 12px;
    align-items: flex-start;
    gap: 9px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: #eff6ff;
    color: #1d4ed8;
}

.privacy-note p,
.consent-note p {
    margin: 0;
    color: #475569;
    font-size: 9px;
    line-height: 1.5;
}

.consent-note strong {
    display: block;
    margin-bottom: 2px;
    color: #1e3a8a;
    font-size: 10px;
}

.duplicate-row {
    display: grid;
    margin-top: 6px;
    padding: 7px 0;
    grid-template-columns: auto 1fr 1fr 1fr;
    align-items: center;
    gap: 8px;
    border-top: 1px solid rgba(146, 64, 14, .14);
    font-size: 9px;
}

.business-card-avatar {
    background: linear-gradient(135deg, #059669, #0f766e);
}

.business-card-converted-profile {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    align-items: center;
    gap: 22px;
}

.business-card-converted-profile img {
    width: 100%;
    max-height: 260px;
    border: 1px solid var(--line);
    border-radius: 15px;
    object-fit: contain;
}

.business-card-converted-profile h2 {
    margin: 0;
    font-size: 24px;
}

.business-card-converted-profile p {
    margin: 4px 0;
    color: var(--muted);
}

.department-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.department-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: #fff;
    box-shadow: var(--shadow-xs);
}

.department-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.department-card-head > span {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    background: #f4f3ff;
    color: #6941c6;
}

.department-card-head > div {
    min-width: 0;
    flex: 1;
}

.department-card-head strong,
.department-card-head small {
    display: block;
}

.department-card-head strong {
    font-size: 12px;
}

.department-card-head small {
    color: var(--muted);
    font-size: 8px;
}

.audio-drop-card {
    min-height: 280px;
}

.audio-file-preview {
    display: flex;
    width: 100%;
    max-width: 520px;
    margin-top: 12px;
    padding: 10px 12px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 11px;
    background: #fff;
    color: var(--muted);
    font-size: 9px;
}

.audio-file-preview strong {
    overflow: hidden;
    color: var(--ink-soft);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.processing-hint {
    display: flex;
    margin-top: 12px;
    padding: 10px;
    align-items: center;
    gap: 8px;
    border-radius: 11px;
    background: #fffbeb;
    color: #92400e;
    font-size: 9px;
}

.meeting-list {
    display: grid;
    gap: 11px;
}

.meeting-empty {
    padding: 55px 20px;
    border: 1px dashed var(--line-strong);
    border-radius: 20px;
    background: #fff;
}

.meeting-list-card {
    display: grid;
    padding: 16px;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: #fff;
    box-shadow: var(--shadow-xs);
}

.meeting-list-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 15px;
    background: #fff7ed;
    color: #c2410c;
}

.meeting-list-title {
    display: block;
    margin-top: 7px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 770;
    text-decoration: none;
}

.meeting-list-main > p {
    display: -webkit-box;
    max-width: 880px;
    margin: 5px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.meeting-list-meta {
    display: flex;
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 7px 14px;
    color: var(--muted-light);
    font-size: 8px;
}

.meeting-list-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.meeting-avatar {
    background: linear-gradient(135deg, #d97706, #92400e);
}

.meeting-kpi-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-help {
    margin: 0;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.5;
}

.stage-suggestion-box {
    padding: 12px;
    border: 1px solid #ddd6fe;
    border-radius: 13px;
    background: #f5f3ff;
}

.stage-suggestion-box p {
    margin: 8px 0;
    color: #5b21b6;
    font-size: 9px;
    line-height: 1.5;
}

.mom-action-list {
    display: grid;
    gap: 10px;
}

.mom-action-row {
    display: grid;
    padding: 12px;
    grid-template-columns: 32px minmax(180px, 2fr) minmax(130px, 1fr) minmax(130px, 1fr) 125px 105px auto;
    align-items: end;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
}

.mom-action-number {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    align-self: center;
    border-radius: 10px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 10px;
    font-weight: 800;
}

.transcript-panel {
    padding: 0;
    overflow: hidden;
}

.transcript-panel summary {
    display: flex;
    padding: 16px;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 760;
}

.speaker-transcript,
.plain-transcript {
    max-height: 620px;
    padding: 0 16px 18px;
    overflow-y: auto;
}

.speaker-transcript article {
    display: grid;
    padding: 10px 0;
    grid-template-columns: 80px 52px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    border-top: 1px solid var(--line);
}

.speaker-label {
    display: inline-flex;
    padding: 4px 7px;
    justify-content: center;
    border-radius: 8px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 8px;
    font-weight: 800;
}

.speaker-transcript time {
    padding-top: 4px;
    color: var(--muted-light);
    font-size: 8px;
}

.speaker-transcript p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.55;
}

.plain-transcript {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.65;
}

@media (max-width: 1260px) {
    .business-card-grid,
    .department-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mom-action-row {
        grid-template-columns: 32px repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .sales-ai-feature-grid,
    .business-card-grid,
    .department-grid,
    .business-card-converted-profile {
        grid-template-columns: 1fr;
    }

    .meeting-list-card {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .meeting-list-card > .btn {
        grid-column: 2;
        justify-self: start;
    }

    .meeting-kpi-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mom-action-row {
        grid-template-columns: 32px minmax(0, 1fr);
    }

    .mom-action-row > *:not(.mom-action-number) {
        grid-column: 2;
    }
}

@media (max-width: 620px) {
    .business-card-grid,
    .department-grid,
    .meeting-kpi-strip {
        grid-template-columns: 1fr;
    }

    .duplicate-row {
        grid-template-columns: 1fr;
    }

    .speaker-transcript article {
        grid-template-columns: 70px 1fr;
    }

    .speaker-transcript p {
        grid-column: 1 / -1;
    }
}

.meeting-audio-player {
    display: grid;
    margin-bottom: 16px;
    grid-template-columns: minmax(220px, 1fr) minmax(320px, 2fr);
    align-items: center;
    gap: 18px;
}

.meeting-audio-player > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.meeting-audio-player > div > span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    background: #fff7ed;
    color: #c2410c;
}

.meeting-audio-player strong,
.meeting-audio-player small {
    display: block;
}

.meeting-audio-player strong {
    font-size: 11px;
}

.meeting-audio-player small {
    color: var(--muted);
    font-size: 8px;
}

.meeting-audio-player audio {
    width: 100%;
}

@media (max-width: 760px) {
    .meeting-audio-player {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   MULTI-SOURCE MOM v1.1
   ============================================================ */

.multi-source-upload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.source-upload-card {
    display: flex;
    min-height: 230px;
    padding: 20px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px dashed #94a3b8;
    border-radius: 18px;
    background:
        radial-gradient(circle at top, rgba(99,102,241,.08), transparent 50%),
        #f8fafc;
    text-align: center;
    cursor: pointer;
    transition: .18s ease;
}

.source-upload-card:hover {
    border-color: #475569;
    transform: translateY(-2px);
}

.source-upload-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 1px solid #dbe4ef;
    border-radius: 16px;
    background: #fff;
    color: #334155;
}

.source-upload-card strong {
    font-size: 14px;
}

.source-upload-card small {
    min-height: 32px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.5;
}

.source-upload-card .form-control {
    margin-top: 8px;
    font-size: 10px;
}

.source-file-preview {
    min-height: 18px;
    color: #334155;
    font-size: 9px;
    font-weight: 700;
}

.source-example-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.source-example-strip span {
    display: inline-flex;
    padding: 6px 9px;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-size: 8px;
    font-weight: 700;
}

.meeting-source-list {
    display: grid;
    gap: 8px;
}

.meeting-source-card {
    display: grid;
    padding: 10px 11px;
    grid-template-columns: 34px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #f8fafc;
}

.meeting-source-card > span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid #dbe4ef;
    border-radius: 10px;
    background: #fff;
    color: #475569;
}

.meeting-source-card strong,
.meeting-source-card small {
    display: block;
}

.meeting-source-card strong {
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.meeting-source-card small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px;
}

.source-note-list {
    margin: 0;
    padding: 15px 20px 17px 38px;
}

.source-note-list li {
    margin: 6px 0;
    color: #334155;
    font-size: 10px;
    line-height: 1.55;
}

@media (max-width: 760px) {
    .multi-source-upload-grid {
        grid-template-columns: 1fr;
    }

    .meeting-source-card {
        grid-template-columns: 34px minmax(0, 1fr) auto;
    }

    .meeting-source-card form {
        grid-column: 3;
    }
}


/* SHARED MASTER DATA + EXCEL IMPORT v1 */
.import-hero{background:radial-gradient(circle at 84% 18%,rgba(34,197,94,.20),transparent 28%),linear-gradient(135deg,#0f172a,#14532d 58%,#166534)}
.import-feature-grid,.import-module-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.import-feature-grid article{display:grid;padding:16px;grid-template-columns:40px 1fr;align-items:center;gap:4px 12px;border:1px solid var(--line);border-radius:16px;background:#f8fafc}.import-feature-grid article>svg{grid-row:1/3;color:#166534}.import-feature-grid strong{font-size:12px}.import-feature-grid span{color:var(--muted);font-size:9px;line-height:1.45}
.import-module-card{display:grid;min-height:245px;padding:22px;grid-template-columns:54px minmax(0,1fr);gap:14px;border:1px solid var(--line);border-radius:22px;background:#fff;box-shadow:var(--shadow-xs)}.import-module-icon{display:grid;width:54px;height:54px;place-items:center;border:1px solid;border-radius:17px}.customers-import-card .import-module-icon{border-color:#a7f3d0;background:#ecfdf5;color:#047857}.products-import-card .import-module-icon{border-color:#c7d2fe;background:#eef2ff;color:#4338ca}.import-module-card small{color:var(--muted);font-size:8px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.import-module-card h2{margin:4px 0 7px;font-size:20px;letter-spacing:-.04em}.import-module-card p{margin:0;color:var(--muted);font-size:10px;line-height:1.6}.import-module-actions{display:flex;grid-column:1/3;flex-wrap:wrap;gap:8px;align-self:end}.compact-page-header{margin-bottom:12px}
.import-result-pills{display:flex;flex-wrap:wrap;gap:4px}.import-result-pills span{display:inline-flex;min-width:32px;padding:4px 6px;justify-content:center;border-radius:999px;font-size:8px;font-weight:800}.import-result-pills .imported{background:#dcfce7;color:#15803d}.import-result-pills .updated{background:#dbeafe;color:#1d4ed8}.import-result-pills .skipped{background:#f1f5f9;color:#475569}.import-result-pills .error{background:#fee2e2;color:#b91c1c}
.import-dropzone{display:flex;min-height:285px;padding:24px;flex-direction:column;align-items:center;justify-content:center;gap:8px;border:1px dashed #64748b;border-radius:20px;background:radial-gradient(circle at top,rgba(34,197,94,.08),transparent 50%),#f8fafc;text-align:center;cursor:pointer}.import-dropzone>span{display:grid;width:68px;height:68px;place-items:center;border:1px solid #bbf7d0;border-radius:20px;background:#ecfdf5;color:#15803d}.import-dropzone strong{font-size:16px}.import-dropzone small{color:var(--muted);font-size:9px}.import-dropzone .form-control{max-width:430px;margin-top:10px;font-size:10px}.import-dropzone b{min-height:18px;color:#334155;font-size:9px}
.mapping-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.mapping-row{display:grid;padding:10px;grid-template-columns:minmax(0,1fr) 22px minmax(0,1fr);align-items:center;gap:8px;border:1px solid var(--line);border-radius:13px;background:#f8fafc}.mapping-row small,.mapping-row strong{display:block}.mapping-row small{color:var(--muted);font-size:7px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}.mapping-row strong{overflow:hidden;margin-top:2px;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.mapping-row>svg{color:#94a3b8}.mapping-row .form-select{font-size:9px}
.table-card-header{display:flex;padding:14px 16px;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line)}.table-card-header h2{margin:2px 0 0;font-size:14px}.import-preview-table{min-width:920px}.import-row-error{background:#fff7f7}.import-row-duplicate{background:#fffbeb}.import-error-text{color:#b91c1c;font-size:8px;line-height:1.4}
.import-confirm-bar{display:flex;position:sticky;z-index:20;bottom:12px;margin-top:15px;padding:14px 16px;align-items:center;justify-content:space-between;gap:15px;border:1px solid #cbd5e1;border-radius:16px;background:rgba(255,255,255,.96);box-shadow:0 18px 50px rgba(15,23,42,.16);backdrop-filter:blur(12px)}.import-confirm-bar strong,.import-confirm-bar span{display:block}.import-confirm-bar strong{font-size:12px}.import-confirm-bar span{margin-top:2px;color:var(--muted);font-size:9px}.shared-master-chip{display:inline-flex;padding:5px 8px;align-items:center;gap:5px;border:1px solid #bbf7d0;border-radius:999px;background:#ecfdf5;color:#15803d;font-size:8px;font-weight:800}
@media(max-width:950px){.import-feature-grid,.import-module-grid,.mapping-grid{grid-template-columns:1fr}}@media(max-width:760px){.import-confirm-bar{align-items:stretch;flex-direction:column}.import-confirm-bar .btn{width:100%}}


/* ============================================================
   AI IMPORT SUMMARY v1
   ============================================================ */

.ai-import-summary-card {
    margin: 18px 0;
    padding: 18px;
    border: 1px solid #c7d2fe;
    border-radius: 20px;
    background:
        radial-gradient(circle at 92% 8%, rgba(99,102,241,.12), transparent 28%),
        linear-gradient(145deg, #ffffff, #f8faff);
    box-shadow: var(--shadow-xs);
}

.ai-import-summary-header,
.ai-import-summary-title,
.ai-summary-score-row {
    display: flex;
    align-items: center;
    gap: 13px;
}

.ai-import-summary-header {
    justify-content: space-between;
    margin-bottom: 15px;
}

.ai-import-summary-title {
    align-items: flex-start;
}

.ai-import-summary-icon {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    border: 1px solid #c7d2fe;
    border-radius: 15px;
    background: #eef2ff;
    color: #4338ca;
}

.ai-import-summary-title h2 {
    margin: 2px 0 3px;
    font-size: 17px;
    letter-spacing: -.03em;
}

.ai-import-summary-title p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.5;
}

.ai-summary-empty {
    display: flex;
    padding: 16px;
    align-items: center;
    gap: 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 15px;
    background: rgba(255,255,255,.72);
}

.ai-summary-empty.warning {
    border-color: #fde68a;
    background: #fffbeb;
}

.ai-summary-empty.error {
    border-color: #fecaca;
    background: #fef2f2;
}

.ai-summary-empty strong,
.ai-summary-empty p {
    display: block;
    margin: 0;
}

.ai-summary-empty strong {
    font-size: 11px;
}

.ai-summary-empty p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

.ai-summary-score-row {
    align-items: stretch;
}

.ai-quality-score {
    display: flex;
    width: 150px;
    min-height: 145px;
    flex: 0 0 150px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid;
    border-radius: 18px;
    text-align: center;
}

.ai-quality-score.good {
    border-color: #86efac;
    background: #f0fdf4;
    color: #15803d;
}

.ai-quality-score.medium {
    border-color: #fde68a;
    background: #fffbeb;
    color: #b45309;
}

.ai-quality-score.low {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.ai-quality-score small {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ai-quality-score strong {
    margin: 5px 0 2px;
    font-size: 38px;
    line-height: 1;
    letter-spacing: -.06em;
}

.ai-quality-score strong span {
    font-size: 11px;
    letter-spacing: 0;
}

.ai-quality-score b {
    font-size: 9px;
}

.ai-summary-main-copy {
    padding: 16px 18px;
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: rgba(255,255,255,.78);
}

.ai-summary-main-copy h3 {
    margin: 9px 0 5px;
    font-size: 15px;
    line-height: 1.45;
}

.ai-summary-main-copy p {
    margin: 0;
    color: #475569;
    font-size: 10px;
    line-height: 1.65;
}

.ai-summary-main-copy > small {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-size: 8px;
}

.ai-summary-grid {
    display: grid;
    margin-top: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ai-summary-grid > article {
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: rgba(255,255,255,.78);
}

.ai-summary-grid h3,
.ai-anomaly-list > h3 {
    display: flex;
    margin: 0 0 10px;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.ai-summary-grid ul {
    margin: 0;
    padding-left: 18px;
}

.ai-summary-grid li {
    margin: 6px 0;
    color: #334155;
    font-size: 9px;
    line-height: 1.55;
}

.ai-advice-reason {
    margin: 0 0 10px;
    color: #475569;
    font-size: 9px;
    line-height: 1.55;
}

.ai-recommendation-list {
    display: grid;
    gap: 7px;
}

.ai-recommendation-list > div {
    display: grid;
    padding: 9px;
    grid-template-columns: 42px minmax(0,1fr);
    gap: 3px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    background: #f8fafc;
}

.ai-recommendation-list span {
    grid-row: 1 / 3;
    align-self: start;
    padding: 4px;
    border-radius: 7px;
    text-align: center;
    font-size: 7px;
    font-weight: 900;
}

.priority-now { background:#fee2e2; color:#b91c1c; }
.priority-next { background:#fef3c7; color:#a16207; }
.priority-later { background:#e0e7ff; color:#4338ca; }

.ai-recommendation-list strong { font-size: 9px; }
.ai-recommendation-list small { color:var(--muted); font-size:8px; line-height:1.45; }

.ai-anomaly-list {
    margin-top: 12px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: rgba(255,255,255,.78);
}

.ai-anomaly-item {
    display: grid;
    padding: 9px 0;
    grid-template-columns: 62px minmax(0,1fr) 55px;
    align-items: start;
    gap: 9px;
    border-top: 1px solid #e2e8f0;
}

.ai-anomaly-item:first-of-type { border-top: 0; }
.ai-anomaly-item > span { padding:4px; border-radius:7px; text-align:center; font-size:7px; font-weight:900; }
.ai-anomaly-item.severity-high > span { background:#fee2e2; color:#b91c1c; }
.ai-anomaly-item.severity-medium > span { background:#fef3c7; color:#a16207; }
.ai-anomaly-item.severity-low > span { background:#e0f2fe; color:#0369a1; }
.ai-anomaly-item strong { display:block; font-size:9px; }
.ai-anomaly-item p { margin:3px 0 0; color:var(--muted); font-size:8px; line-height:1.45; }
.ai-anomaly-item > b { color:#475569; font-size:8px; text-align:right; }

@media (max-width: 850px) {
    .ai-import-summary-header,
    .ai-summary-score-row {
        align-items: stretch;
        flex-direction: column;
    }

    .ai-import-summary-header form .btn,
    .ai-quality-score {
        width: 100%;
    }

    .ai-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* Notifications & Reminders Core v1 */
.notification-bell {
    position: relative;
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe4ef;
    border-radius: 13px;
    background: #fff;
    color: #172033;
    text-decoration: none;
    transition: .18s ease;
}
.notification-bell:hover { transform: translateY(-1px); border-color:#a8b7cc; color:#111827; }
.notification-badge,
.nav-count-badge {
    display: inline-flex;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
}
.notification-badge { position:absolute; top:-7px; right:-7px; }
.nav-count-badge { margin-left:auto; border-width:0; }
.notification-toast-host {
    position: fixed;
    z-index: 1085;
    top: calc(var(--topbar-height) + 14px);
    right: 18px;
    display: grid;
    width: min(390px, calc(100vw - 30px));
    gap: 10px;
    pointer-events: none;
}
.notification-toast {
    padding: 16px;
    border: 1px solid #dbe4ef;
    border-left: 5px solid #4f46e5;
    border-radius: 16px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 18px 55px rgba(15,23,42,.18);
    pointer-events: auto;
    animation: notification-slide-in .22s ease-out;
}
.notification-toast.priority-high { border-left-color:#f59e0b; }
.notification-toast.priority-urgent { border-left-color:#dc2626; }
.notification-toast-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.notification-toast-head strong { font-size:14px; line-height:1.35; }
.notification-toast p { margin:8px 0 12px; color:#475569; font-size:12px; line-height:1.55; }
.notification-toast-close { padding:0; border:0; background:transparent; color:#64748b; font-size:22px; line-height:1; }
.notification-toast-actions { display:flex; flex-wrap:wrap; gap:7px; }
@keyframes notification-slide-in { from { opacity:0; transform:translateY(-8px) translateX(10px); } to { opacity:1; transform:none; } }
.reminder-alarm-layer {
    position: fixed;
    z-index: 1090;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15,23,42,.56);
    backdrop-filter: blur(5px);
}
.reminder-alarm-layer[hidden] { display:none; }
.reminder-alarm-panel {
    width: min(560px, 100%);
    padding: 28px;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 26px 90px rgba(15,23,42,.32);
}
.reminder-alarm-panel h2 { margin:8px 0 4px; font-size:26px; }
.reminder-alarm-panel > p { color:#64748b; }
.reminder-alarm-note { margin:18px 0; padding:16px; border-radius:15px; background:#fff7ed; color:#9a3412; line-height:1.6; }
.reminder-alarm-actions,
.reminder-snooze-group { display:flex; flex-wrap:wrap; gap:8px; }
.reminder-snooze-group { margin-top:14px; padding-top:14px; border-top:1px solid #e2e8f0; }
.notification-list { display:grid; gap:10px; }
.notification-list-item {
    display:grid;
    grid-template-columns: 46px minmax(0,1fr) auto;
    gap:14px;
    align-items:start;
    padding:16px;
    border:1px solid #e2e8f0;
    border-radius:18px;
    background:#fff;
}
.notification-list-item.unread { border-color:#c7d2fe; background:#f8faff; }
.notification-list-icon { display:grid; width:46px; height:46px; place-items:center; border-radius:14px; background:#eef2ff; color:#4338ca; }
.notification-list-item h2 { margin:0 0 5px; font-size:15px; }
.notification-list-item p { margin:0; color:#64748b; font-size:12px; line-height:1.55; }
.notification-list-meta { margin-top:8px; color:#94a3b8; font-size:10px; }
.reminder-grid { display:grid; gap:12px; }
.reminder-card {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:16px;
    padding:18px;
    border:1px solid #e2e8f0;
    border-radius:18px;
    background:#fff;
}
.reminder-card.overdue { border-color:#fecaca; background:#fffafa; }
.reminder-card h2 { margin:0 0 7px; font-size:16px; }
.reminder-card p { margin:8px 0 0; color:#64748b; font-size:12px; }
.reminder-card-meta { display:flex; flex-wrap:wrap; gap:12px; color:#475569; font-size:11px; }
.whatsapp-draft-box { width:100%; min-height:330px; padding:18px; border:1px solid #dbe4ef; border-radius:16px; background:#f8fafc; font:14px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.share-link-box { display:flex; gap:8px; align-items:center; padding:12px; border:1px solid #dbe4ef; border-radius:14px; background:#f8fafc; }
.share-link-box code { flex:1; overflow-wrap:anywhere; font-size:11px; }
@media (max-width: 760px) {
    .notification-toast-host { top: calc(var(--topbar-height) + 8px); right:10px; }
    .notification-list-item,
    .reminder-card { grid-template-columns:1fr; }
    .reminder-alarm-panel { padding:22px; border-radius:20px; }
    .reminder-alarm-actions .btn { flex:1 1 46%; }
}

/* Activity Reminder Hotfix v1 */
.activity-reminder-options {
    padding: 16px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: #f8fbff;
}
.activity-reminder-options .form-check-label strong { color: #0f172a; }
.activity-card-actions { align-items: flex-start; }

/* WhatsApp Automation & Web Push PWA v2 */
.push-device-card {
    border: 1px solid rgba(79, 70, 229, .18);
    background: linear-gradient(135deg, rgba(79, 70, 229, .05), rgba(16, 185, 129, .05));
}
.pwa-install-chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    border-radius: 999px;
    padding: .45rem .75rem;
    background: rgba(17, 24, 39, .06);
    font-size: .82rem;
    font-weight: 700;
}
.delivery-error-cell {
    max-width: 280px;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Public account access v2.4 */
.auth-action-row {
    display: flex;
    margin-top: 18px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-action-button {
    min-height: 42px;
    flex: 1 1 220px;
    font-size: 12px;
    font-weight: 750;
}

.auth-text-link {
    color: var(--brand);
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}

.auth-text-link:hover {
    color: var(--brand-dark);
    text-decoration: underline;
}

.auth-wide-wrap {
    width: min(100%, 690px);
}

.auth-wide-card {
    padding: 30px;
}

.auth-simple-shell {
    display: grid;
    min-height: 100vh;
    padding: 24px;
    place-items: center;
}

.auth-simple-card {
    width: min(100%, 680px);
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.auth-simple-card h1 {
    margin: 8px 0 12px;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 790;
    letter-spacing: -.045em;
}

.auth-simple-card > p {
    margin-bottom: 24px;
    color: var(--muted);
    line-height: 1.7;
}

.readiness-list {
    display: grid;
    gap: 10px;
}

.readiness-list > div {
    display: flex;
    padding: 12px 14px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
    font-size: 12px;
}

.reset-code-input {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: .32em;
    text-align: center;
}

@media (max-width: 620px) {
    .auth-action-row {
        align-items: stretch;
        flex-direction: column;
    }

    .auth-action-button,
    .auth-action-row .auth-text-link {
        width: 100%;
        text-align: center;
    }

    .auth-wide-card,
    .auth-simple-card {
        padding: 22px 18px;
        border-radius: 18px;
    }
}

/* AI Maker-first Sourcing v2.5.4 */
.sourcing-ai-quick-card {
    overflow: hidden;
}

.sourcing-maker-picker {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-soft);
}

.sourcing-ai-result-header,
.sourcing-quick-rfq-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.sourcing-ai-result-header > div,
.sourcing-quick-rfq-title > div {
    display: grid;
    gap: 3px;
}

.sourcing-ai-result-header span,
.sourcing-quick-rfq-title > span {
    color: var(--muted);
    font-size: 12px;
}

.supplier-selection-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.supplier-selection-card {
    position: relative;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 12px;
    min-height: 100%;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.supplier-selection-card:hover {
    border-color: #8b83ff;
    box-shadow: 0 12px 28px rgba(42, 37, 102, .08);
    transform: translateY(-1px);
}

.supplier-selection-card > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.supplier-checkmark {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    border: 1.5px solid #a8adc0;
    border-radius: 6px;
    background: #fff;
}

.supplier-selection-card > input:checked + .supplier-checkmark {
    border-color: #5546e8;
    background: #5546e8;
    box-shadow: inset 0 0 0 4px #5546e8;
}

.supplier-selection-card > input:checked + .supplier-checkmark::after {
    content: "✓";
    display: grid;
    height: 100%;
    place-items: center;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.supplier-selection-card:has(> input:checked) {
    border-color: #6b5ef3;
    background: #f8f7ff;
    box-shadow: 0 12px 28px rgba(75, 63, 213, .09);
}

.supplier-selection-card.email-missing {
    opacity: .72;
}

.supplier-selection-content {
    min-width: 0;
}

.supplier-selection-content p {
    margin-top: 10px;
    color: var(--text);
    font-size: 12px;
    line-height: 1.55;
}

.sourcing-quick-rfq {
    padding: 20px;
    border: 1px solid #dcd9ff;
    border-radius: 18px;
    background: linear-gradient(180deg, #fbfaff 0%, #f7f7fb 100%);
}

.sourcing-quick-rfq-title {
    margin-bottom: 16px;
}

.sourcing-quick-rfq-title h3 {
    margin: 2px 0 0;
    font-size: 18px;
}

.sourcing-ai-empty {
    min-height: 210px;
}

@media (max-width: 900px) {
    .supplier-selection-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .sourcing-ai-result-header,
    .sourcing-quick-rfq-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .sourcing-maker-picker,
    .sourcing-quick-rfq {
        padding: 15px;
        border-radius: 14px;
    }
}

/* v2.5.7 — searchable product picker */
.product-picker {
    position: relative;
    width: 100%;
}
.product-picker-input-wrap {
    position: relative;
}
.product-picker-input {
    padding-left: 2.55rem;
    padding-right: 2.35rem;
}
.product-picker-search-icon {
    position: absolute;
    z-index: 2;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #7c8499;
    pointer-events: none;
    display: inline-flex;
}
.product-picker-clear {
    position: absolute;
    z-index: 3;
    right: .62rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.8rem;
    height: 1.8rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #687086;
    font-size: 1.35rem;
    line-height: 1;
    display: grid;
    place-items: center;
}
.product-picker-clear:hover,
.product-picker-clear:focus-visible {
    background: #eef0ff;
    color: #3730a3;
    outline: none;
}
.product-picker-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
}
.product-picker-dropdown {
    display: none;
    position: absolute;
    z-index: 1080;
    top: calc(100% + .45rem);
    left: 0;
    right: 0;
    max-height: 22rem;
    overflow-y: auto;
    padding: .4rem;
    border: 1px solid #dfe3ef;
    border-radius: .85rem;
    background: #fff;
    box-shadow: 0 18px 45px rgba(31, 41, 74, .16);
}
.product-picker.is-open .product-picker-dropdown {
    display: block;
}
.product-picker-option {
    width: 100%;
    border: 0;
    border-radius: .65rem;
    background: transparent;
    color: #111827;
    padding: .72rem .78rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.product-picker-option:hover,
.product-picker-option.is-active,
.product-picker-option[aria-selected="true"] {
    background: #f0f1ff;
}
.product-picker-option-title {
    font-weight: 700;
    font-size: .9rem;
}
.product-picker-option-meta {
    color: #6b7280;
    font-size: .76rem;
    line-height: 1.35;
}
.product-picker-empty {
    color: #6b7280;
    padding: .85rem;
    font-size: .86rem;
    text-align: center;
}

/* v2.5.7 — password eye toggle */
.password-toggle-field {
    position: relative;
    width: 100%;
}
.password-toggle-field > .form-control {
    padding-right: 3rem;
}
.password-toggle-button {
    position: absolute;
    z-index: 5;
    right: .62rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: .55rem;
    background: transparent;
    color: #687086;
}
.password-toggle-button:hover,
.password-toggle-button:focus-visible {
    background: #eef0ff;
    color: #3730a3;
    outline: none;
}
.password-toggle-field .password-eye-closed,
.password-toggle-field.is-visible .password-eye-open {
    display: none;
}
.password-toggle-field.is-visible .password-eye-closed {
    display: block;
}

/* v2.6.0 — SaaS subscription banners */
.subscription-banner {
    padding: .65rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .6rem;
    font-size: .78rem;
    font-weight: 700;
    border-bottom: 1px solid transparent;
}
.subscription-banner a { color: inherit; text-decoration: underline; }
.subscription-banner-trial { background: #eef0ff; color: #3730a3; border-color: #d9ddff; }
.subscription-banner-grace { background: #fff4d6; color: #8a4b00; border-color: #f4d58d; }
.subscription-banner-expired,
.subscription-banner-suspended { background: #fee4e2; color: #b42318; border-color: #fecdca; }
