@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --axon-blue: #2E54A3;
    --axon-dark-blue: #112045;
    --axon-bg: #eef3fb;
    --axon-blue-rgb: 46, 84, 163;
    --axon-blue-soft: #e8eef9;
    --axon-blue-soft-border: #c8d5ee;
    --quote-light-blue: #51BBE1;
    --quote-dark-blue: #2E54A3;
    --quote-very-dark-blue: #112045;
}

.forge-auth-screen {
    background:
        radial-gradient(circle at top, color-mix(in srgb, var(--quote-light-blue) 30%, transparent) 0%, transparent 25%),
        radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.08) 0%, transparent 20%),
        linear-gradient(180deg, var(--quote-very-dark-blue) 0%, var(--quote-dark-blue) 52%, var(--quote-very-dark-blue) 100%);
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(180deg, #f8fbff 0%, var(--axon-bg) 100%);
    color: #0f172a;
    font-size: 15px;
    line-height: 1.45;
}

/* CentralSIMDv base glass style */
.glass-panel,
header.no-print,
main .bg-white {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

aside.no-print,
aside.forge-sidebar {
    background: color-mix(in srgb, var(--quote-very-dark-blue) 92%, #000) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-link {
    font-size: 11px !important;
    letter-spacing: 0.04em !important;
    border: 1px solid transparent;
    line-height: 1.2;
    white-space: normal;
    text-align: left;
}

.sidebar-link svg {
    flex-shrink: 0;
}

.sidebar-link.active {
    background-color: var(--axon-blue) !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(var(--axon-blue-rgb), 0.3);
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
}

/* App shell — Polaris / CentralSIMDv-inspired framing */
.forge-app-shell {
    background: linear-gradient(155deg, #f8fafc 0%, #eef2ff 38%, #e2e8f0 100%);
}

.forge-app-body-row {
    min-height: 0;
}

.forge-main-scroll {
    background: transparent;
}

.forge-sidebar-nav::-webkit-scrollbar,
.forge-main-scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.forge-sidebar-nav::-webkit-scrollbar-thumb,
.forge-main-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.forge-sidebar-nav::-webkit-scrollbar-thumb:hover,
.forge-main-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.forge-sidebar-footer {
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12);
}

aside.forge-sidebar .forge-sidebar-footer {
    background: color-mix(in srgb, var(--quote-very-dark-blue) 95%, #000) !important;
}

.premium-list-subtitle.premium-list-subtitle-muted {
    text-transform: none;
    letter-spacing: 0.02em;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}

.premium-record-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #475569;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(203, 213, 225, 0.95);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.premium-table tbody tr.premium-table-row {
    transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.premium-table tbody tr.premium-table-row:hover {
    background: rgba(239, 246, 255, 0.75);
}

.premium-table tbody tr.premium-table-row:hover .premium-avatar {
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.premium-user-actions-inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.premium-block-btn-solid-amber {
    color: #fff !important;
    background: linear-gradient(180deg, #d97706, #b45309) !important;
    border-color: rgba(180, 83, 9, 0.85) !important;
    box-shadow: 0 6px 14px rgba(217, 119, 6, 0.28);
}

.premium-block-btn-solid-amber:hover {
    filter: brightness(1.05);
    box-shadow: 0 8px 18px rgba(217, 119, 6, 0.32);
}

.premium-block-btn-solid-emerald {
    color: #fff !important;
    background: linear-gradient(180deg, #059669, #047857) !important;
    border-color: rgba(4, 120, 87, 0.9) !important;
    box-shadow: 0 6px 14px rgba(5, 150, 105, 0.22);
}

.premium-block-btn-solid-emerald:hover {
    filter: brightness(1.05);
    box-shadow: 0 8px 18px rgba(5, 150, 105, 0.28);
}

.premium-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    background: rgba(255, 255, 255, 0.85);
    color: #475569;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.premium-icon-btn:hover {
    color: var(--axon-blue);
    border-color: rgba(var(--axon-blue-rgb), 0.35);
    background: rgba(239, 246, 255, 0.95);
    transform: translateY(-1px);
}

.premium-icon-btn-danger {
    color: #b91c1c;
    border-color: rgba(252, 165, 165, 0.75);
    background: rgba(254, 242, 242, 0.85);
}

.premium-icon-btn-danger:hover {
    color: #991b1b;
    border-color: rgba(248, 113, 113, 0.85);
    background: rgba(254, 226, 226, 0.95);
}

h1, h2, h3, h4 {
    letter-spacing: -0.02em;
}

label {
    font-size: 11px !important;
    letter-spacing: 0.08em;
}

input, select, textarea {
    font-size: 13px !important;
    background: rgba(255, 255, 255, 0.86) !important;
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
    border-radius: 10px !important;
}

input:focus, select:focus, textarea:focus {
    outline: none !important;
    border-color: rgba(var(--axon-blue-rgb), 0.55) !important;
    box-shadow: 0 0 0 3px rgba(var(--axon-blue-rgb), 0.14);
}

button { font-size: 12px !important; }
.text-\[8px\] { font-size: 10px !important; }
.text-\[9px\] { font-size: 11px !important; }
.text-\[10px\] { font-size: 12px !important; }
.text-xs { font-size: 13px !important; }
.text-sm { font-size: 14px !important; }
.fade-in { animation: fadeIn 0.25s ease-in-out; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* In-app confirm dialog (replaces window.confirm) */
.app-confirm-btn {
    min-width: 5.5rem;
    border-radius: 9999px;
    padding: 0.55rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
    cursor: pointer;
}

.app-confirm-btn:focus-visible {
    outline: 2px solid var(--axon-blue);
    outline-offset: 2px;
}

.app-confirm-btn-cancel {
    background: rgba(6, 182, 212, 0.12);
    color: #0f172a;
    border-color: rgba(6, 182, 212, 0.35);
}

.app-confirm-btn-cancel:hover {
    background: rgba(6, 182, 212, 0.22);
    border-color: rgba(6, 182, 212, 0.5);
}

.app-confirm-btn-ok {
    background: #0d9488;
    color: #fff;
    border-color: #0f766e;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
}

.app-confirm-btn-ok:hover {
    background: #0f766e;
}

.app-confirm-btn-ok--danger {
    background: #b91c1c;
    border-color: #991b1b;
}

.app-confirm-btn-ok--danger:hover {
    background: #991b1b;
}

body.app-confirm-modal-open {
    overflow: hidden;
}

.customer-table {
    border-collapse: collapse;
    min-width: 980px;
}

.customer-table th {
    text-align: left;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.customer-table td {
    font-size: 12px;
    padding: 12px 10px;
    vertical-align: top;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.report-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.report-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    text-align: left;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    font-weight: 800;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.report-table tbody tr.report-row td {
    font-size: 11px;
    padding: 11px 14px;
    color: #1f2937;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    vertical-align: middle;
    transition: background-color 120ms ease;
}

.report-table tbody tr.report-row:nth-child(even) td {
    background: rgba(248, 250, 252, 0.55);
}

.report-table tbody tr.report-row:hover td {
    background: rgba(219, 234, 254, 0.45);
}

.report-table tbody tr.report-row:last-child td {
    border-bottom: none;
}

.report-section {
    position: relative;
}

.report-section .report-section-bar {
    height: 3px;
    width: 100%;
}

.customer-pager-btn {
    background: rgba(226, 232, 240, 0.7);
    color: #334155;
    border: 1px solid rgba(148, 163, 184, 0.35);
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 10px !important;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.customer-pager-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 9999px;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.action-btn svg {
    width: 15px;
    height: 15px;
    stroke-width: 2;
}

.action-btn-edit {
    color: var(--axon-blue);
    background: rgba(var(--axon-blue-rgb), 0.1);
    border-color: rgba(var(--axon-blue-rgb), 0.25);
}

.action-btn-edit:hover {
    color: var(--axon-dark-blue);
    background: rgba(var(--axon-blue-rgb), 0.16);
    border-color: rgba(var(--axon-blue-rgb), 0.4);
    transform: translateY(-1px);
}

.action-btn-delete {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
}

.action-btn-delete:hover {
    color: #991b1b;
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.38);
    transform: translateY(-1px);
}

.actions-cell {
    white-space: nowrap;
    text-align: center;
    width: 88px;
    min-width: 88px;
    vertical-align: middle;
}

.premium-list-shell {
    overflow: hidden;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(203, 213, 225, 0.72);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.09), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.premium-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 24px 26px 20px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.76));
}

.premium-list-title-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.premium-list-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    color: var(--axon-blue);
    background: linear-gradient(135deg, rgba(var(--axon-blue-rgb), 0.14), rgba(81, 187, 225, 0.14));
    border: 1px solid rgba(var(--axon-blue-rgb), 0.12);
}

.premium-list-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.premium-list-title {
    font-size: 18px;
    font-weight: 850;
    color: #162033;
    letter-spacing: -0.035em;
}

.premium-list-subtitle {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #64748b;
    text-transform: uppercase;
}

.premium-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 10px;
    padding: 0.72rem 1.05rem;
    color: #fff;
    background: linear-gradient(135deg, #315aa9, #25488f);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 10px 20px rgba(var(--axon-blue-rgb), 0.24);
    font-size: 11px !important;
    font-weight: 850;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.premium-add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(var(--axon-blue-rgb), 0.3);
}

.premium-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 13px 24px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.82);
    background: rgba(248, 250, 252, 0.72);
}

.premium-toolbar-bottom {
    border-top: 1px solid rgba(226, 232, 240, 0.82);
    border-bottom: none;
}

.premium-toolbar-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.premium-rows-control {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.premium-rows-control select {
    width: auto;
    padding: 6px 28px 6px 10px !important;
    border-radius: 8px !important;
    color: #334155;
    font-weight: 800;
}

.premium-pager {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.premium-pager-btn {
    min-width: 86px;
    padding: 0.62rem 0.85rem;
    border-radius: 9px;
    color: #334155;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(203, 213, 225, 0.8);
    font-size: 11px !important;
    font-weight: 850;
    letter-spacing: 0.02em;
    transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.premium-pager-btn:not(:disabled):hover {
    color: var(--axon-blue);
    border-color: rgba(var(--axon-blue-rgb), 0.35);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.premium-pager-btn:disabled {
    color: #94a3b8;
    cursor: not-allowed;
    background: rgba(248, 250, 252, 0.7);
}

.premium-search-row {
    padding: 14px 24px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.72);
    background: rgba(255, 255, 255, 0.62);
}

.premium-search-wrap {
    position: relative;
}

.premium-search-wrap input {
    width: 100%;
    height: 48px;
    padding: 0 5.8rem 0 1rem !important;
    border-radius: 13px !important;
    background: rgba(255, 255, 255, 0.88) !important;
    border-color: rgba(148, 163, 184, 0.34) !important;
    color: #334155;
    font-weight: 700;
}

.premium-search-label {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.filter-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 14px;
    border-radius: 9999px;
    border: 1.5px solid rgba(203, 213, 225, 0.8);
    background: rgba(255, 255, 255, 0.8);
    color: #64748b;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-pill:hover {
    border-color: #94a3b8;
    color: #334155;
    background: #f8fafc;
}

.filter-pill-active {
    background: #1e293b;
    border-color: #1e293b;
    color: #fff;
}

.filter-pill-active:hover {
    background: #334155;
    border-color: #334155;
    color: #fff;
}

.premium-table-wrap {
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.82);
}

.premium-table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 980px;
}

.premium-table th {
    text-align: left;
    text-transform: uppercase;
    padding: 17px 24px;
    background: rgba(248, 250, 252, 0.92);
    border-bottom: 1px solid rgba(203, 213, 225, 0.75);
    color: #64748b;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.premium-table td {
    padding: 18px 24px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(226, 232, 240, 0.78);
    color: #172033;
    font-size: 12px;
}

.premium-table tbody tr {
    transition: background-color 0.15s ease;
}

.premium-table tbody tr:hover {
    background: rgba(239, 246, 255, 0.58);
}

.premium-table tbody tr:last-child td {
    border-bottom: none;
}

.premium-name-btn {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
    color: #172033;
    font-weight: 850;
    transition: color 0.15s ease;
}

.premium-name-btn:hover {
    color: var(--axon-blue);
}

.premium-muted {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.premium-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.34rem 0.68rem;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.premium-badge-admin {
    color: #b45309;
    background: #fffbeb;
    border-color: #fcd34d;
}

.premium-badge-all {
    color: #047857;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.premium-badge-neutral {
    color: #475569;
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.premium-badge-paid {
    color: #4338ca;
    background: #eef2ff;
    border-color: #c7d2fe;
}

.premium-empty {
    padding: 3rem 1.5rem !important;
    text-align: center;
    color: #64748b;
    font-weight: 700;
}

.premium-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 9999px;
    border: 1px solid rgba(203, 213, 225, 0.8);
    background: linear-gradient(135deg, #fff, #f8fafc);
    color: #475569;
    font-size: 12px;
    font-weight: 900;
    overflow: hidden;
    flex: 0 0 auto;
}

.premium-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.premium-identity {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 220px;
}

.premium-block-btn {
    border-radius: 9999px;
    padding: 0.42rem 0.72rem;
    border: 1px solid transparent;
    font-size: 10px !important;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.premium-block-btn-danger {
    color: #b91c1c;
    background: #fff1f2;
    border-color: #fecdd3;
}

.premium-block-btn-safe {
    color: #047857;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.premium-user-actions {
    width: auto;
    min-width: 210px;
}

.quote-workspace-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quote-workspace-tab {
    appearance: none;
    border: 1px solid rgba(var(--axon-blue-rgb), 0.22);
    background: rgba(var(--axon-blue-rgb), 0.08);
    color: var(--axon-blue);
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 11px !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.18s ease;
}

.quote-workspace-tab:hover {
    background: rgba(var(--axon-blue-rgb), 0.14);
}

.quote-workspace-tab.active {
    background: linear-gradient(135deg, var(--axon-blue) 0%, #3a67c2 100%);
    color: white;
    border-color: rgba(var(--axon-blue-rgb), 0.95);
    box-shadow: 0 12px 24px rgba(var(--axon-blue-rgb), 0.18);
}

.record-shell {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.record-hero {
    position: relative;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.record-hero-banner {
    height: 158px;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.32) 0, rgba(255, 255, 255, 0.32) 1px, transparent 1px),
        linear-gradient(135deg, #2563eb 0%, #365eea 55%, #5b6cf7 100%);
    background-size: 18px 18px, cover;
    border-bottom: 1px solid rgba(191, 219, 254, 0.55);
}

.record-accent-customer .record-hero-banner {
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.32) 0, rgba(255, 255, 255, 0.32) 1px, transparent 1px),
        linear-gradient(135deg, #2563eb 0%, #365eea 55%, #5b6cf7 100%);
    background-size: 18px 18px, cover;
}

.record-accent-supplier .record-hero-banner {
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.3) 0, rgba(255, 255, 255, 0.3) 1px, transparent 1px),
        linear-gradient(135deg, #0f766e 0%, #0891b2 52%, #2563eb 100%);
    background-size: 18px 18px, cover;
}

.record-hero-body {
    position: relative;
    z-index: 1;
    margin-top: -56px;
    padding: 0 40px 28px;
    display: flex;
    justify-content: space-between;
    gap: 28px;
    align-items: flex-start;
}

.record-hero-main {
    display: flex;
    gap: 22px;
    align-items: flex-end;
    min-width: 0;
}

.record-avatar {
    width: 116px;
    height: 116px;
    border-radius: 28px;
    background: linear-gradient(180deg, #ffffff 0%, #dbeafe 100%);
    border: 5px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 18px 32px rgba(37, 99, 235, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #1e3a8a;
    flex-shrink: 0;
}

.record-hero-copy {
    min-width: 0;
    padding-top: 60px;
}

.record-eyebrow {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #cbd5e1;
}

.record-title {
    margin: 0;
    font-size: 24px;
    line-height: 1.1;
    font-weight: 800;
    color: #1e293b;
}

.record-subtitle {
    margin: 8px 0 0;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
}

.record-meta-row {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.record-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.98);
    border: 1px solid rgba(203, 213, 225, 0.85);
    color: #334155;
    min-height: 38px;
}

.record-chip-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #94a3b8;
}

.record-chip-value {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}

.record-hero-actions {
    min-width: 220px;
    padding-top: 84px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
}

.record-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border-radius: 12px;
    background: rgba(220, 252, 231, 0.88);
    color: #15803d;
    border: 1px solid rgba(134, 239, 172, 0.9);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.record-action-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.record-tabs-row {
    display: flex;
    gap: 8px;
    padding: 0 40px;
    border-top: 1px solid rgba(241, 245, 249, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.96);
    background: rgba(255, 255, 255, 0.9);
}

.record-tab {
    appearance: none;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 16px 14px 13px;
    color: #64748b;
    font-size: 11px !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.record-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.record-tab:hover {
    color: #1e293b;
}

.record-body {
    padding: 28px 40px 34px;
}

.record-panel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.record-panel {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.78) 0%, rgba(255, 255, 255, 0.92) 100%);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 18px;
    padding: 22px 24px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.record-panel-full {
    grid-column: 1 / -1;
}

.record-panel-heading {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.92);
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.record-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
}

.record-field-wide {
    grid-column: 1 / -1;
}

.record-field-label {
    margin-bottom: 6px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.record-field-value {
    color: #1e293b;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
    word-break: break-word;
}

.record-field-multiline {
    white-space: pre-wrap;
}

.record-empty {
    color: #64748b;
    font-size: 12px;
}

.record-form-wrap .rounded-xl {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* The Premium Quote Look */
.proposal-preview {
    background-color: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 210mm;
    max-width: 210mm;
    min-height: 297mm;
    margin: 18px auto 0;
    color: #0f172a;
    padding: 50px;
    border-radius: 12px;
    box-sizing: border-box;
    overflow: hidden;
}

.section-header {
    color: #0f172a;
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header span {
    color: var(--axon-blue);
}

.proposal-theme .section-header span {
    color: var(--quote-dark-blue);
}

.proposal-theme .quote-grid-header {
    border-collapse: separate !important;
    border-spacing: 0;
    overflow: hidden;
}

.proposal-theme .quote-grid-header th {
    background: var(--quote-dark-blue);
    color: white;
    text-align: left;
    padding: 10px 12px;
    font-size: 10px;
    font-weight: 700;
    border-top: 1px solid var(--quote-dark-blue);
    border-bottom: 1px solid var(--quote-dark-blue);
    border-right: 1px solid rgba(255, 255, 255, 0.18);
    text-transform: uppercase;
}

.proposal-theme .quote-grid-header th:first-child {
    border-left: 1px solid var(--quote-dark-blue);
    border-top-left-radius: 12px;
}

.proposal-theme .quote-grid-header th:last-child {
    border-right: 1px solid var(--quote-dark-blue);
    border-top-right-radius: 12px;
}

.proposal-theme .quote-grid-header td {
    padding: 8px 10px;
    font-size: 10px;
    border: 1px solid #e2e8f0;
    vertical-align: top;
}

.table-axon {
    border-collapse: separate !important;
    border-spacing: 0;
}

.proposal-theme .table-axon thead th {
    background: var(--quote-dark-blue);
    color: white;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 11px 12px;
    border-top: 1px solid var(--quote-dark-blue);
    border-bottom: 1px solid var(--quote-dark-blue);
    border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.proposal-theme .table-axon thead th:first-child {
    border-left: 1px solid var(--quote-dark-blue);
    border-top-left-radius: 12px;
}

.proposal-theme .table-axon thead th:last-child {
    border-top-right-radius: 12px;
    border-right: 1px solid var(--quote-dark-blue);
}

.table-axon tbody td {
    padding: 10px;
    border: 1px solid #f1f5f9;
    font-size: 10px;
}

.table-axon tbody tr:first-child td:first-child {
    border-top-left-radius: 10px;
}

.table-axon tbody tr:first-child td:last-child {
    border-top-right-radius: 10px;
}

.proposal-theme .table-axon tfoot .grand-total-row {
    background: var(--quote-dark-blue);
    color: white;
}

.proposal-theme .table-axon tfoot td {
    padding: 10px;
    border: 1px solid #f1f5f9;
    font-size: 10px;
}

.proposal-theme .table-axon tfoot .totals-summary-spacer td {
    padding: 8px 0;
    border: none;
    background: transparent;
}

.proposal-theme .table-axon tfoot .totals-summary-header td {
    padding: 10px 12px;
    border: 1px solid var(--quote-dark-blue);
    background: var(--quote-dark-blue);
    color: white;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.proposal-theme .table-axon tfoot .totals-summary-row td {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.proposal-theme .table-axon tfoot .totals-summary-section-row td {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.proposal-theme .table-axon tfoot .totals-summary-shipping td {
    background: #fff7ed;
    border-color: #fde6bf;
}

.proposal-theme .table-axon tfoot .grand-total-row td {
    padding-top: 12px;
    padding-bottom: 12px;
    border-color: var(--quote-dark-blue);
}

.proposal-theme .table-axon tfoot .grand-total-row td:first-child {
    font-size: 11px;
    letter-spacing: 0.18em;
}

.proposal-theme .table-axon tfoot .grand-total-row td:last-child {
    font-size: 15px;
}

.proposal-theme .text-blue-600,
.proposal-theme .text-blue-700 {
    color: var(--quote-dark-blue) !important;
}

.proposal-theme .border-blue-600 {
    border-color: var(--quote-dark-blue) !important;
}

.proposal-theme .proposal-doc-accent {
    border-left: 4px solid var(--quote-dark-blue);
}

.proposal-theme .template-two-card-header {
    background: var(--quote-dark-blue);
    border-bottom: 1px solid var(--quote-dark-blue);
}

.proposal-theme .template-two-card-header-title {
    color: white;
}

.proposal-theme .template-two-grand-total {
    background: var(--quote-dark-blue);
    color: white;
}

.text-blue-600 { color: var(--axon-blue) !important; }
.text-blue-700 { color: var(--axon-blue) !important; }
.bg-blue-50 { background-color: var(--axon-blue-soft) !important; }
.bg-blue-50\/60 { background-color: rgba(var(--axon-blue-rgb), 0.08) !important; }
.bg-blue-50\/70 { background-color: rgba(var(--axon-blue-rgb), 0.1) !important; }
.bg-blue-50\/80 { background-color: rgba(var(--axon-blue-rgb), 0.12) !important; }
.bg-blue-100 { background-color: rgba(var(--axon-blue-rgb), 0.14) !important; }
.bg-blue-600 { background-color: var(--axon-blue) !important; }
.border-blue-100 { border-color: rgba(var(--axon-blue-rgb), 0.18) !important; }
.border-blue-200 { border-color: rgba(var(--axon-blue-rgb), 0.24) !important; }
.border-blue-300 { border-color: rgba(var(--axon-blue-rgb), 0.34) !important; }
.border-blue-600 { border-color: var(--axon-blue) !important; }
.hover\:bg-blue-700:hover { background-color: #27478a !important; }

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Quote cover page - hidden on screen by default, always shown when printing */
.quote-cover-page-wrap {
    display: none;
    margin: -50px -50px 40px -50px;
}

.quote-cover-page-wrap.is-visible {
    display: block;
}

.quote-cover-page {
    position: relative;
    height: 297mm;
    min-height: 297mm;
    box-sizing: border-box;
    color: #0f172a;
    background: #51bbe1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.quote-cover-basic-header {
    background: #112045;
    height: 40%;
    flex-shrink: 0;
    padding: 56px 72px;
    box-sizing: border-box;
    position: relative;
    z-index: 5;
}

.quote-cover-basic-header-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
}

.quote-cover-basic-logo {
    width: 180px;
    max-width: 40%;
    height: auto;
}

.quote-cover-basic-header-meta {
    text-align: right;
    color: #ffffff;
    max-width: 50%;
}

.quote-cover-basic-header-meta .quote-cover-basic-label {
    color: #ffffff;
    opacity: 0.5;
    margin-bottom: 4px;
    letter-spacing: 0.22em;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    display: block;
}

.quote-cover-basic-number {
    font-size: 18px;
    font-weight: 700;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    letter-spacing: -0.03em;
    line-height: 1;
    white-space: nowrap;
}

.quote-cover-basic-ref {
    font-size: 10px;
    font-weight: 500;
    opacity: 0.7;
    margin-top: 4px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.quote-cover-basic-body {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.quote-cover-basic-card {
    margin: -145px 50px 0;
    background: linear-gradient(
        to bottom,
        #112045 0%,
        #112045 34%,
        #7fcde9 34%,
        #7fcde9 100%
    );
    border-radius: 16px;
    padding: 54px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
    z-index: 20;
}

.quote-cover-basic-section {
    display: block;
}

.quote-cover-basic-label {
    color: rgba(255, 255, 255, 0.78);
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.15em;
    margin-bottom: 10px;
    display: block;
}

.quote-cover-basic-customer {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1;
    color: #ffffff;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.quote-cover-basic-sub {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.45;
    white-space: pre-wrap;
}

.quote-cover-basic-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.24);
    margin: 30px 0;
}

.quote-cover-basic-subject {
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
    color: #ffffff;
}

.quote-cover-basic-date-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.quote-cover-basic-date {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
}

.quote-cover-basic-bottom-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.quote-cover-basic-prepared-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
}

.quote-cover-basic-avatar {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    flex-shrink: 0;
}

.quote-cover-basic-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quote-cover-basic-prepared-name {
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    color: #ffffff;
}

.quote-cover-basic-prepared-contact {
    margin-top: 4px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.quote-cover-basic-signature {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
}

.quote-cover-basic-signature-line {
    width: 32px;
    height: 1px;
    background: #0f172a;
}

.quote-cover-basic-signature-text {
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #0f172a;
}

.quote-cover-basic-footer {
    margin-top: auto;
    padding: 44px 64px 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    position: relative;
    z-index: 10;
}

.quote-cover-basic-footer-bars {
    display: flex;
    gap: 16px;
}

.quote-cover-basic-footer-bars span {
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
}

.quote-cover-basic-footer-bars span:last-child {
    background: rgba(255, 255, 255, 0.4);
}

.cover-template-sample {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    height: 145px;
    background: #51bbe1;
}

.cover-template-sample-header {
    height: 50px;
    background: #112045;
}

.cover-template-sample-card {
    margin: -18px 14px 0;
    padding: 12px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.86);
}

.cover-template-sample-line {
    height: 8px;
    border-radius: 6px;
    background: #cbd5e1;
    margin-bottom: 7px;
}

.cover-template-sample-line--short {
    width: 52%;
}

.cover-template-sample-line:last-child {
    margin-bottom: 0;
}

@media print {
    @page { size: A4; margin: 8mm; }

    body * {
        visibility: hidden !important;
    }

    #proposal-render,
    #proposal-render * {
        visibility: visible !important;
    }

    .no-print,
    header,
    aside,
    #quotes-list-view,
    #view-customers,
    #view-products,
    #view-suppliers,
    #view-users,
    #view-companies,
    #view-terms {
        display: none !important;
    }

    html, body {
        background: white !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }

    body {
        display: block !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body > .flex,
    main,
    #view-quotes,
    #quotes-editor-view,
    #quotes-editor-view > .grid,
    #quotes-editor-view > .grid > :last-child {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
        overflow: visible !important;
        position: static !important;
    }

    body > .flex {
        display: block !important;
        height: auto !important;
    }

    main {
        padding: 0 !important;
    }

    #view-quotes,
    #quotes-editor-view,
    #proposal-render {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #proposal-render {
        position: static !important;
        left: auto !important;
        top: auto !important;
    }

    #quotes-editor-view > .grid {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    #quotes-editor-view > .grid > :last-child,
    #quotes-editor-view > .grid > :last-child > .sticky {
        position: static !important;
        top: auto !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
        scale: 1 !important;
        overflow: visible !important;
    }

    .proposal-preview {
        box-shadow: none !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: none !important;
        min-height: auto !important;
        border-radius: 0 !important;
        border: none !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    #proposal-render img:first-child,
    #quotes-editor-view > .grid > :last-child img {
        max-width: 100% !important;
    }

    .page-break { page-break-before: always; }

    .quote-cover-page-wrap {
        display: block !important;
        margin: 0 !important;
        page-break-after: always;
        break-after: page;
    }

    .quote-cover-page {
        height: calc(297mm - 16mm);
        min-height: calc(297mm - 16mm);
        page-break-after: always;
        break-after: page;
    }

    /* Prevent tfoot (Commercial Summary) from repeating on every printed page */
    .proposal-theme .table-axon tfoot {
        display: table-row-group;
    }
}

@media (max-width: 960px) {
    .premium-list-header,
    .premium-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .premium-list-header,
    .premium-toolbar,
    .premium-search-row {
        padding-left: 18px;
        padding-right: 18px;
    }

    .premium-pager {
        width: 100%;
    }

    .premium-pager-btn {
        flex: 1;
    }

    .record-hero-body {
        padding: 0 20px 22px;
        flex-direction: column;
        gap: 18px;
        margin-top: -42px;
    }

    .record-hero-main {
        align-items: flex-start;
    }

    .record-avatar {
        width: 92px;
        height: 92px;
        border-radius: 24px;
        font-size: 28px;
    }

    .record-hero-copy {
        padding-top: 46px;
    }

    .record-hero-actions {
        min-width: 0;
        width: 100%;
        padding-top: 0;
        align-items: flex-start;
    }

    .record-action-row {
        justify-content: flex-start;
    }

    .record-tabs-row,
    .record-body {
        padding-left: 20px;
        padding-right: 20px;
    }

    .record-panel-grid,
    .record-fields-grid {
        grid-template-columns: 1fr;
    }
}

/* CentralSIMDv custom scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Contract preview ─────────────────────────────────────────────────── */

/* Sidebar type/entity pills — mirrored from contracts.html */
.type-pill { transition: all .2s; cursor: pointer; border: 1px solid #e2e8f0; }
.type-pill.active { background-color: #2563eb; color: white; border-color: #2563eb; box-shadow: 0 2px 4px rgba(37,99,235,.2); }
.sidebar-item { cursor: pointer; transition: all .2s; border-left: 4px solid transparent; }
.sidebar-item.active { background-color: #eff6ff; border-left-color: #2563eb; color: #1e40af; }

/* Document page — white paper on grey background */
.contract-doc {
    font-family: 'Inter', sans-serif;
    background: white;
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem;
    box-shadow: 0 10px 25px rgba(0,0,0,.05);
    border: 1px solid #e2e8f0;
}

/* Clause structure */
.clause-title {
    font-weight: 800;
    text-transform: uppercase;
    font-size: .85rem;
    letter-spacing: .05em;
    margin-top: 1.75rem;
    margin-bottom: .5rem;
    color: #1e293b;
    border-left: 4px solid #2563eb;
    padding-left: .75rem;
}
.sub-clause {
    margin-left: 1.5rem;
    margin-bottom: .75rem;
    font-size: .9rem;
    line-height: 1.6;
    color: #334155;
}
.sub-sub {
    margin-left: 3rem;
    margin-bottom: .5rem;
    font-size: .88rem;
    line-height: 1.6;
    color: #334155;
}

/* Inline editable fields */
.editable-field {
    border: none;
    border-bottom: 1px dashed #cbd5e0;
    background-color: #f8fafc;
    padding: 1px 4px;
    transition: all .2s;
    color: #1e40af;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    font-size: inherit;
}
.editable-field:focus {
    outline: none;
    border-bottom: 2px solid #2563eb;
    background-color: #eff6ff;
}

/* Tables inside contract */
.contract-doc table { border-collapse: collapse; width: 100%; margin-top: 1rem; margin-bottom: 1rem; }
.contract-doc th, .contract-doc td { border: 1px solid #e2e8f0; padding: 10px; text-align: left; font-size: .8rem; vertical-align: top; }
.contract-doc th { background-color: #112045; color: #fff; font-weight: 800; text-transform: uppercase; }

/* Print */
@media print {
    .contract-doc { box-shadow: none; border: none; padding: 1.5cm; margin: 0; max-width: 100%; }
    .editable-field { border-bottom: none !important; background-color: transparent !important; color: black !important; }
    input::placeholder, textarea::placeholder { color: transparent !important; }
}
