:root {
    --bg-page: #f6eff0;
    --bg-panel: #ffffff;
    --bg-side: #17090b;
    --bg-topbar: #fcf7f7;
    --border: #e4dadd;
    --text-main: #101b22;
    --text-muted: #66757f;
    --accent: #b95564;
    --accent-dark: #903847;
    --accent-soft: #f8e7ea;
    --danger: #cb4f45;
    --warning: #e5a53c;
    --shadow-soft: 0 8px 24px rgba(14, 32, 34, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    color: var(--text-main);
    background: linear-gradient(180deg, #fbf5f6 0%, var(--bg-page) 100%);
}

body.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background:
        linear-gradient(rgba(17, 9, 11, 0.5), rgba(17, 9, 11, 0.5)),
        url('/img/wallpaper.jpeg') center center / cover no-repeat;
}

a {
    text-decoration: none;
}

.auth-page-shell {
    width: min(100%, 540px);
}

.auth-card {
    width: 100%;
    padding: 30px;
}

.auth-card-head {
    display: grid;
    gap: 10px;
    margin-bottom: 24px;
    justify-items: center;
}

.auth-card-head h1 {
    margin: 0;
    font-size: 31px;
    font-weight: 800;
}

.auth-login-logo {
    display: block;
    width: min(100%, 240px);
    height: auto;
}

.auth-card-head p {
    margin: 0;
    color: var(--text-muted);
}

.auth-form-grid {
    display: grid;
    gap: 16px;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 250px 1fr;
}

.app-sidebar {
    background: radial-gradient(circle at top, #321116 0%, var(--bg-side) 52%);
    color: #f2dde0;
    padding: 28px 18px;
    border-right: 1px solid #4b1d24;
    transition: transform 0.25s ease;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 34px;
    color: #f2dde0;
}

.brand-badge {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, #cb6a78 0%, var(--accent-dark) 100%);
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #fff;
}

.brand-text strong {
    display: block;
    font-size: 16px;
    letter-spacing: 0.2px;
}

.brand-text span {
    color: #d7b2b8;
    font-size: 12px;
}

.menu-title {
    color: #bb8d94;
    font-size: 11px;
    letter-spacing: 1.5px;
    margin: 18px 10px 10px;
}

.menu-link {
    display: block;
    color: #e5c9ce;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 6px;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.menu-link:hover {
    background: rgba(194, 94, 108, 0.18);
    color: #fff8f8;
    transform: translateX(2px);
}

.menu-link.active {
    background: linear-gradient(90deg, rgba(185, 85, 100, 0.28), rgba(185, 85, 100, 0.04));
    color: #ffffff;
    border: 1px solid rgba(185, 85, 100, 0.35);
}

.app-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.app-topbar {
    margin: 20px 26px 0;
    padding: 14px 18px;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(228, 218, 221, 0.94);
    border-radius: 22px;
    box-shadow: 0 16px 36px rgba(12, 30, 30, 0.07);
    backdrop-filter: blur(14px);
}

.topbar-start {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1 1 0;
    min-width: 0;
}

.sidebar-toggle {
    display: none;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(185, 85, 100, 0.18);
    border-radius: 14px;
    padding: 10px 13px;
    background: linear-gradient(180deg, rgba(248, 231, 234, 0.96) 0%, rgba(255, 255, 255, 0.96) 100%);
    color: var(--text-main);
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(185, 85, 100, 0.12);
}

.sidebar-toggle-icon {
    width: 18px;
    display: grid;
    gap: 3px;
}

.sidebar-toggle-icon span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.sidebar-toggle-text {
    font-size: 14px;
}

.sidebar-overlay {
    display: none;
}

.topbar-context {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    gap: 4px;
}

.topbar-label {
    color: var(--text-muted);
    font-size: 11px;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    white-space: nowrap;
}

.topbar-context strong {
    display: block;
    min-width: 0;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    margin-left: auto;
    justify-content: flex-end;
}

.profile-menu {
    position: relative;
}

.profile-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(185, 85, 100, 0.16);
    border-radius: 18px;
    padding: 7px 10px 7px 7px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 239, 241, 0.98) 100%);
    color: var(--text-main);
    box-shadow: 0 14px 28px rgba(12, 30, 30, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.profile-toggle:hover,
.profile-toggle:focus-visible {
    border-color: rgba(185, 85, 100, 0.28);
    box-shadow: 0 18px 32px rgba(12, 30, 30, 0.11);
    transform: translateY(-1px);
    color: var(--text-main);
}

.profile-toggle-copy {
    display: grid;
    gap: 2px;
    text-align: left;
}

.profile-toggle-copy strong {
    font-size: 13px;
    line-height: 1.2;
}

.profile-toggle-copy span {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.2;
}

.profile-avatar,
.profile-summary-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(185, 85, 100, 0.18) 0%, rgba(111, 38, 51, 0.2) 100%);
    color: #7a2f3d;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.profile-avatar.has-photo,
.profile-summary-avatar.has-photo {
    padding: 0;
    overflow: hidden;
    background: #f3eaec;
}

.profile-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.dictation-field {
    display: flex;
    align-items: stretch;
    gap: 10px;
    width: 100%;
}

.dictation-field-textarea {
    align-items: flex-start;
}

.dictation-input-slot {
    flex: 1 1 auto;
    min-width: 0;
}

.dictation-input-slot > .form-control,
.dictation-input-slot > .iti {
    width: 100%;
}

.dictation-button {
    flex: 0 0 46px;
    width: 46px;
    min-width: 46px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dictation-button.is-listening {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.dictation-button-icon {
    width: 18px;
    height: 18px;
    display: block;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 15a3 3 0 0 0 3-3V7a3 3 0 1 0-6 0v5a3 3 0 0 0 3 3Zm5-3a1 1 0 1 1 2 0a7 7 0 0 1-6 6.92V21h3a1 1 0 1 1 0 2H8a1 1 0 1 1 0-2h3v-2.08A7 7 0 0 1 5 12a1 1 0 1 1 2 0a5 5 0 0 0 10 0Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 15a3 3 0 0 0 3-3V7a3 3 0 1 0-6 0v5a3 3 0 0 0 3 3Zm5-3a1 1 0 1 1 2 0a7 7 0 0 1-6 6.92V21h3a1 1 0 1 1 0 2H8a1 1 0 1 1 0-2h3v-2.08A7 7 0 0 1 5 12a1 1 0 1 1 2 0a5 5 0 0 0 10 0Z'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.dictation-feedback {
    margin-top: 6px;
}

.profile-dropdown {
    min-width: 270px;
    padding: 10px;
    border: 1px solid rgba(228, 218, 221, 0.96);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 22px 48px rgba(12, 30, 30, 0.14);
}

.profile-dropdown .dropdown-divider {
    margin: 10px 0;
    border-top-color: rgba(16, 27, 34, 0.08);
}

.profile-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px;
}

.profile-summary-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.profile-summary-copy strong {
    font-size: 14px;
    line-height: 1.3;
}

.profile-summary-copy span,
.profile-summary-copy small {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.3;
}

.profile-logout-button {
    justify-content: center;
}

.topbar-form {
    margin: 0;
}

.btn-order {
    border: 0;
    border-radius: 11px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    padding: 10px 16px;
    box-shadow: 0 7px 20px rgba(185, 85, 100, 0.34);
}

.btn-order:hover {
    background: var(--accent-dark);
    color: #fff;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 0;
    background: #f0dfe2;
    color: #7a2f3d;
    font-weight: 700;
}

.page-content {
    padding: 22px 26px 26px;
    flex: 1;
    min-height: 0;
}

.page-heading {
    margin-bottom: 18px;
}

.page-heading h1 {
    margin: 0 0 5px;
    font-size: 34px;
    font-weight: 800;
}

.page-heading p {
    margin: 0;
    color: var(--text-muted);
}

.page-heading-inline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.worklist-page {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

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

.dashboard-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(253, 248, 249, 0.98) 100%);
    border: 1px solid rgba(228, 218, 221, 0.95);
    border-radius: 26px;
    padding: 22px;
    box-shadow: 0 20px 42px rgba(12, 30, 30, 0.08);
}

.dashboard-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.dashboard-card-head h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
}

.dashboard-card-head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.5;
    max-width: 320px;
}

.dashboard-card-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(185, 85, 100, 0.1);
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-card-body {
    background: linear-gradient(180deg, rgba(241, 220, 224, 0.9) 0%, rgba(252, 247, 248, 0.94) 100%);
    border: 1px solid rgba(218, 182, 190, 0.28);
    border-radius: 20px;
    padding: 14px;
    min-height: 300px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.dashboard-list {
    display: grid;
    gap: 12px;
    max-height: 340px;
    overflow: auto;
    padding-right: 2px;
}

.dashboard-list-item {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 18px;
    padding: 14px 16px;
    box-shadow: 0 14px 26px rgba(167, 117, 127, 0.15);
    backdrop-filter: blur(8px);
}

.dashboard-list-item h3 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}

.dashboard-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 9px;
    margin-top: 9px;
    border-top: 1px solid rgba(16, 27, 34, 0.08);
}

.dashboard-list-row:first-of-type {
    padding-top: 0;
    margin-top: 0;
    border-top: 0;
}

.dashboard-list-row span {
    color: var(--text-muted);
    font-size: 13px;
}

.dashboard-list-row strong {
    color: var(--text-main);
    font-size: 13px;
    text-align: right;
}

.dashboard-empty-state {
    min-height: 272px;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--text-muted);
    font-weight: 600;
    padding: 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.48);
}

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

.stat-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 16px 14px;
    box-shadow: var(--shadow-soft);
    animation: reveal 0.45s ease;
}

.stat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 700;
}

.stat-value {
    margin: 0 0 7px;
    font-size: 33px;
    font-weight: 800;
}

.trend-positive,
.trend-negative {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
}

.trend-positive {
    color: var(--accent);
}

.trend-negative {
    color: var(--danger);
}

.sparkline {
    width: 100%;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(185, 85, 100, 0.14), rgba(185, 85, 100, 0.01));
    border: 1px solid #f0e5e7;
}

.detail-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 14px;
}

.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    padding: 18px;
}

.panel-tight {
    padding: 16px;
}

.worklist-table-panel {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.panel h2 {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
}

.panel p {
    margin: 0;
    color: var(--text-muted);
}

.panel-title {
    margin: 0 0 14px;
    font-size: 20px;
}

.empty-text {
    color: var(--text-muted);
}

.placeholder-chart {
    margin-top: 16px;
    height: 260px;
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(185, 85, 100, 0.2), rgba(185, 85, 100, 0.03)),
        repeating-linear-gradient(
            to bottom,
            rgba(103, 123, 128, 0.16) 0px,
            rgba(103, 123, 128, 0.16) 1px,
            transparent 1px,
            transparent 52px
        );
}

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

.source-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f2e9ea;
}

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

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.dot-green { background: #b95564; }
.dot-blue { background: #1f8fc5; }
.dot-gold { background: #bd8f2f; }
.dot-red { background: #cb4f45; }

.table-theme {
    margin-bottom: 0;
}

.table-theme > :not(caption) > * > * {
    background: transparent;
    border-color: #f1e7e8;
    color: var(--text-main);
    font-size: 14px;
    vertical-align: middle;
}

.table-theme thead th {
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
}

.user-table-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.user-table-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: linear-gradient(135deg, rgba(185, 85, 100, 0.18) 0%, rgba(111, 38, 51, 0.2) 100%);
    color: #7a2f3d;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.user-table-avatar.has-photo {
    padding: 0;
    overflow: hidden;
    background: #f3eaec;
}

.user-table-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.user-table-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.user-table-copy strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-table-copy span {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.3;
}

.user-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 78px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.user-status-active {
    color: #134e1d;
    background: #d9f2df;
}

.user-status-passive {
    color: #5a636b;
    background: #e8ecef;
}

.user-form-note {
    color: var(--text-muted);
    font-size: 12px;
}

.worklist-table-wrap {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.action-buttons {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.status-badge {
    display: inline-block;
    min-width: 88px;
    text-align: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.status-new {
    color: #fff;
    background: #7b8991;
}

.status-continues {
    color: #2d230f;
    background: #f5c56d;
}

.cari-status-active {
    color: #fff;
    background: #2f9e44;
}

.status-finished {
    color: #fff;
    background: var(--accent);
}

.btn-theme-outline {
    border: 1px solid #decbce;
    background: #fff;
    color: #5a3d45;
}

.btn-theme-outline:hover {
    border-color: #d8bcc0;
    background: #fdf7f8;
}

.btn-theme-info {
    border: 1px solid #e3c0c6;
    background: #fae9ec;
    color: #903847;
    font-weight: 600;
}

.btn-theme-info:hover {
    border-color: #dfabb2;
    background: #f6dde1;
    color: #7a2f3d;
}

.modal-theme {
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
    min-height: 0;
}

.modal-theme .modal-header,
.modal-theme .modal-footer {
    border-color: #f1e7e8;
}

.modal-theme .form-control,
.modal-theme .form-select {
    border-color: #e1ced1;
}

.modal-theme .form-control:focus,
.modal-theme .form-select:focus {
    border-color: #d39ea7;
    box-shadow: 0 0 0 0.2rem rgba(185, 85, 100, 0.18);
}

.surec-modal-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.surec-modal-form .modal-body {
    overflow-y: auto;
    min-height: 0;
}

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

.info-row {
    border: 1px solid #f0e5e7;
    border-radius: 10px;
    background: #fff9fa;
    padding: 10px 12px;
}

.info-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.info-value {
    margin: 0;
    color: var(--text-main);
    font-weight: 600;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 1160px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

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

    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 800px) {
    body.sidebar-open-mobile {
        overflow: hidden;
    }

    .app-shell {
        grid-template-columns: 1fr;
        position: relative;
    }

    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(82vw, 320px);
        border-right: 1px solid #4b1d24;
        border-bottom: 0;
        z-index: 30;
        overflow-y: auto;
        transform: translateX(-100%);
        box-shadow: 0 18px 40px rgba(33, 13, 17, 0.24);
    }

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

    .sidebar-toggle {
        display: inline-flex;
        flex: 0 0 auto;
    }

.sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        border: 0;
        padding: 0;
        background: rgba(33, 13, 17, 0.42);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.25s ease, visibility 0.25s ease;
        z-index: 20;
    }

    .app-shell.sidebar-open .sidebar-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .app-topbar {
        margin: 16px 16px 0;
        padding: 12px 14px;
        justify-content: space-between;
        gap: 12px;
    }

    .page-content {
        padding: 16px;
    }

    .topbar-start {
        flex: 1 1 auto;
        min-width: 0;
    }

    .top-actions {
        width: auto;
        flex: 0 0 auto;
        margin-left: auto;
        justify-content: flex-end;
    }

    .topbar-context strong {
        font-size: 15px;
    }

    .page-heading h1 {
        font-size: 28px;
    }

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

    .dashboard-card-body {
        min-height: 240px;
    }

    .dashboard-list-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-list-row strong {
        text-align: left;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .app-topbar {
        padding: 10px 12px;
    }

    .topbar-start {
        gap: 10px;
    }

    .topbar-label {
        letter-spacing: 1px;
    }

    .topbar-context strong {
        font-size: 14px;
    }

    .profile-toggle-copy {
        display: none;
    }

    .profile-toggle {
        padding-right: 7px;
    }

    .profile-dropdown {
        min-width: min(280px, calc(100vw - 32px));
    }
}

@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.proposal-muted {
    color: var(--text-muted);
}

.proposal-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 700;
}

.proposal-chip-soft {
    background: #faf1f2;
    color: var(--text-muted);
}

.proposal-list-header,
.proposal-section-header,
.proposal-wizard-section-header,
.proposal-preview-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.document-search-shell {
    width: min(100%, 260px);
}

.document-search-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.document-search-input {
    min-height: 38px;
    width: min(100%, 240px);
    border-color: #e3cfd3;
    border-radius: 999px;
    padding: 8px 14px;
    background: #fffafb;
    box-shadow: none;
}

.document-search-input:focus {
    border-color: #d39ea7;
    background: #fff;
    box-shadow: 0 0 0 0.2rem rgba(185, 85, 100, 0.14);
}

.document-list-filter-form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.document-filter-date-input {
    min-height: 38px;
    width: min(100%, 150px);
    border-color: #e3cfd3;
    border-radius: 999px;
    padding: 8px 14px;
    background: #fffafb;
    box-shadow: none;
}

.document-filter-date-input:focus {
    border-color: #d39ea7;
    background: #fff;
    box-shadow: 0 0 0 0.2rem rgba(185, 85, 100, 0.14);
}

.notes-page-shell {
    min-height: calc(100vh - 168px);
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 0;
}

.notes-feed-panel {
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 12px;
    min-height: 0;
}

.notes-filter-form {
    gap: 6px;
}

.notes-filter-date-input {
    width: min(100%, 138px);
    min-height: 36px;
    padding: 7px 12px;
}

.notes-compose-form {
    padding-top: 8px;
    border-top: 1px solid #f0e0e3;
}

.notes-compose-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
}

.notes-compose-textarea {
    min-height: 44px;
    resize: none;
    border-color: #e3cfd3;
    background: #fffafb;
    box-shadow: none;
    border-radius: 14px;
    padding: 9px 12px;
    line-height: 1.35;
}

.notes-compose-textarea:focus {
    border-color: #d39ea7;
    background: #fff;
    box-shadow: 0 0 0 0.2rem rgba(185, 85, 100, 0.14);
}

.notes-message-list {
    display: grid;
    gap: 8px;
    align-content: start;
    min-height: 0;
}

.notes-message-row {
    display: flex;
    justify-content: flex-start;
}

.notes-message-row.is-own {
    justify-content: flex-end;
}

.notes-message-card {
    width: min(80%, 760px);
    border: 1px solid #ecdfe1;
    border-radius: 16px;
    padding: 10px 12px;
    background: linear-gradient(180deg, #ffffff 0%, #fdf8f9 100%);
    box-shadow: 0 10px 24px rgba(16, 27, 34, 0.05);
    position: relative;
}

.notes-message-card.is-own {
    border-color: rgba(185, 85, 100, 0.26);
    background: linear-gradient(180deg, rgba(248, 231, 234, 0.9) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.notes-message-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 5px;
}

.notes-message-author {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.notes-message-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: linear-gradient(135deg, rgba(185, 85, 100, 0.18) 0%, rgba(111, 38, 51, 0.2) 100%);
    color: #7a2f3d;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.4px;
    overflow: hidden;
}

.notes-message-avatar.has-photo {
    background: #f3eaec;
    padding: 0;
}

.notes-message-meta strong {
    font-size: 13px;
    min-width: 0;
}

.notes-message-meta span {
    color: var(--text-muted);
    font-size: 11px;
}

.notes-message-body {
    margin: 0;
    color: var(--text-main);
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.42;
    font-size: 14px;
}

.notes-message-status {
    margin-top: 4px;
    display: flex;
    justify-content: flex-end;
    color: var(--accent-dark);
    font-size: 11px;
    font-weight: 800;
    opacity: 0.85;
}

.notes-unread-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.notes-unread-divider::before,
.notes-unread-divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: rgba(185, 85, 100, 0.22);
}

@media (max-width: 768px) {
    .notes-page-shell {
        min-height: auto;
    }

    .notes-message-card {
        width: min(92%, 760px);
    }

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

    .notes-compose-actions {
        display: flex;
        justify-content: flex-end;
    }
}

.musteri-phone-field .iti {
    display: block;
    width: 100%;
    --iti-path-flags-1x: url('/lib/intl-tel-input/build/img/flags.webp');
    --iti-path-flags-2x: url('/lib/intl-tel-input/build/img/flags@2x.webp');
    --iti-path-globe-1x: url('/lib/intl-tel-input/build/img/globe.webp');
    --iti-path-globe-2x: url('/lib/intl-tel-input/build/img/globe@2x.webp');
}

.musteri-phone-field .iti__tel-input {
    width: 100%;
}

.proposal-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.proposal-template-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fdf8f9 100%);
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 14px;
}

.proposal-template-card-compact {
    min-height: 100%;
}

.proposal-template-card-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.proposal-template-card-top h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.proposal-template-card-top p {
    margin: 0;
    color: var(--text-muted);
}

.proposal-template-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.proposal-template-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.proposal-template-actions form {
    margin: 0;
}

.proposal-editor-form {
    display: grid;
    gap: 16px;
}

.proposal-editor-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    position: sticky;
    top: 16px;
    z-index: 3;
}

.proposal-toolbar-title {
    margin: 10px 0 6px;
    font-size: 26px;
}

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

.proposal-editor-shell {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) minmax(300px, 340px);
    gap: 16px;
    align-items: start;
}

.proposal-editor-sidebar,
.proposal-editor-settings,
.proposal-editor-canvas-panel,
.proposal-wizard-panel {
    display: grid;
    gap: 16px;
    align-content: start;
}

.proposal-editor-group {
    margin-bottom: 14px;
}

.proposal-editor-group:last-child,
.proposal-editor-group.mb-0,
.proposal-editor-group-end {
    margin-bottom: 0;
}

.proposal-editor-list {
    display: grid;
    gap: 12px;
}

.proposal-editor-section,
.proposal-editor-subsection {
    display: grid;
    gap: 12px;
}

.proposal-editor-section {
    border: 1px solid #ebdcdf;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #fdf8f9 100%);
    box-shadow: var(--shadow-soft);
    padding: 18px;
}

.proposal-editor-subsection h3,
.proposal-inspector-group h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.proposal-editor-item {
    border: 1px solid #ebdcdf;
    border-radius: 14px;
    background: #fff9fa;
    padding: 12px;
}

.proposal-editor-item-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.proposal-editor-note {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.proposal-editor-empty,
.proposal-canvas-empty,
.proposal-block-settings-empty,
.proposal-review-empty {
    border: 1px dashed #e2c6cb;
    border-radius: 14px;
    padding: 18px;
    color: var(--text-muted);
    background: #fdf8f8;
    text-align: center;
}

.proposal-reserved-fields {
    display: grid;
    gap: 10px;
}

.proposal-reserved-field-item {
    display: grid;
    gap: 2px;
    border: 1px solid #ebdcdf;
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff9fa;
}

.proposal-reserved-field-item span {
    color: var(--text-muted);
    font-size: 13px;
}

.proposal-page-item {
    border: 1px solid #ebdcdf;
    border-radius: 14px;
    background: #fff;
    padding: 12px;
    text-align: left;
    display: grid;
    gap: 10px;
    cursor: pointer;
}

.proposal-page-item.is-active {
    border-color: #dfabb2;
    box-shadow: 0 0 0 3px rgba(185, 85, 100, 0.12);
}

.proposal-page-item-summary {
    display: grid;
    gap: 4px;
}

.proposal-page-item strong,
.proposal-page-item span {
    display: block;
}

.proposal-page-item span {
    color: var(--text-muted);
    font-size: 13px;
}

.proposal-page-item-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
}

.proposal-page-item-background {
    display: grid;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #f3ebec;
}

.proposal-page-item-background-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.proposal-page-item-background-head span {
    color: var(--text-muted);
    font-size: 12px;
}

.proposal-page-item-file {
    background: #fff;
}

.proposal-image-settings-head,
.proposal-image-settings-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.proposal-image-settings-preview-shell {
    display: grid;
    gap: 10px;
}

.proposal-layer-item {
    width: 100%;
    text-align: left;
    border: 1px solid #ebdcdf;
    border-radius: 14px;
    background: #fff;
    padding: 12px;
    display: grid;
    gap: 4px;
}

.proposal-layer-item.is-active {
    border-color: #dfabb2;
    box-shadow: 0 0 0 3px rgba(185, 85, 100, 0.12);
    background: #fdf6f7;
}

.proposal-layer-item span {
    color: var(--text-muted);
    font-size: 12px;
}

.proposal-background-preview {
    width: 100%;
    aspect-ratio: 1 / 1.414;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #ebdcdf;
    background: #f5edef;
}

.proposal-background-preview-compact {
    aspect-ratio: 4 / 3;
    max-height: 150px;
}

.proposal-image-preview {
    object-fit: contain;
}

.proposal-page-preview-empty {
    border: 1px dashed #e2c6cb;
    border-radius: 12px;
    padding: 12px;
    color: var(--text-muted);
    background: #fdf8f8;
    font-size: 13px;
    text-align: center;
}

.proposal-canvas-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.proposal-canvas-frame {
    border-radius: 20px;
    padding: 18px;
    background: radial-gradient(circle at top left, rgba(185, 85, 100, 0.14), rgba(185, 85, 100, 0.03));
    border: 1px solid #ebdcdf;
}

.proposal-canvas-page {
    position: relative;
    width: min(100%, 760px);
    margin: 0 auto;
    aspect-ratio: 1 / 1.414;
    background-color: #ffffff;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 18px;
    border: 1px solid #ebdcdf;
    box-shadow: 0 18px 40px rgba(10, 31, 33, 0.12);
    overflow: hidden;
}

.proposal-canvas-block {
    position: absolute;
    border: 1px dashed rgba(16, 27, 34, 0.45);
    background: rgba(255, 255, 255, 0.82);
    padding: 0;
    overflow: hidden;
    border-radius: 8px;
    cursor: move;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    line-height: 1.1;
    font-family: inherit;
    appearance: none;
}

.proposal-canvas-block.is-active {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(185, 85, 100, 0.15);
}

.proposal-canvas-block.is-image {
    background: rgba(255, 255, 255, 0.92);
}

.proposal-canvas-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: linear-gradient(180deg, #fffefe 0%, #faf1f3 100%);
}

.proposal-canvas-image-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
}

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

.proposal-inspector-group {
    display: grid;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #f3ebec;
}

.proposal-inspector-group:first-child {
    padding-top: 0;
    border-top: 0;
}

.proposal-toggle-row {
    padding-top: 34px;
}

.proposal-editor-footer {
    display: flex;
    justify-content: flex-end;
}

.proposal-wizard-form {
    display: grid;
}

.proposal-wizard-panel {
    padding: 20px;
}

.proposal-wizard-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.proposal-step {
    border: 1px solid #ebdcdf;
    border-radius: 14px;
    padding: 12px;
    background: #fff9fa;
    color: var(--text-muted);
    font-weight: 600;
    text-align: center;
}

.proposal-step.is-active {
    border-color: var(--accent);
    background: #f8ecef;
    color: var(--accent-dark);
}

.proposal-step.is-complete {
    border-color: #e3b6bd;
    background: #fbf1f3;
    color: var(--accent-dark);
}

.proposal-wizard-body {
    display: grid;
}

.proposal-wizard-step {
    display: none;
}

.proposal-wizard-step.is-active {
    display: block;
}

.proposal-wizard-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.proposal-wizard-actions-start,
.proposal-wizard-actions-end {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.proposal-wizard-actions-end {
    margin-left: auto;
}

.proposal-wizard-save-customer {
    margin-bottom: 0;
    padding: 10px 14px;
    border: 1px solid #ebdcdf;
    border-radius: 12px;
    background: #fff9fa;
}

.proposal-review-card {
    display: grid;
    gap: 10px;
}

.proposal-review-item {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #ebdcdf;
    background: #fff9fa;
}

.proposal-review-item span {
    font-size: 12px;
    color: var(--text-muted);
}

.proposal-process-overview,
.proposal-process-people-shell {
    border: 1px solid #ebdcdf;
    border-radius: 18px;
    background: #fff9fa;
    padding: 18px;
}

.proposal-process-overview {
    display: grid;
    gap: 18px;
}

.proposal-process-overview-head,
.proposal-process-document-header,
.proposal-process-people-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.proposal-process-overview-head h3,
.proposal-process-people-header h3,
.proposal-process-document-header h2,
.proposal-process-document-total strong {
    margin: 0;
}

.proposal-process-overview-head p,
.proposal-process-people-header p,
.proposal-process-document-header p {
    margin: 6px 0 0;
    color: var(--text-muted);
}

.proposal-process-steps-shell {
    display: grid;
    gap: 10px;
}

.proposal-process-steps-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.proposal-process-step-card {
    min-width: 170px;
    flex: 1 1 170px;
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #ead8db;
    background: #fff;
}

.proposal-process-step-card span {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.proposal-process-step-card strong {
    color: var(--accent-dark);
    font-size: 15px;
}

.proposal-process-step-arrow {
    width: 32px;
    height: auto;
    flex: 0 0 32px;
    opacity: 0.72;
}

.proposal-process-price-grid,
.proposal-process-document-prices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.proposal-process-price-item,
.proposal-process-document-price-card,
.proposal-process-total-card {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #ead8db;
    background: #fff;
}

.proposal-process-price-item span,
.proposal-process-document-price-card span,
.proposal-process-total-card span,
.proposal-process-document-kicker {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.proposal-process-price-item strong,
.proposal-process-document-price-card strong,
.proposal-process-total-card strong {
    font-size: 18px;
    color: var(--accent-dark);
}

.proposal-process-people-shell {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.proposal-process-discount-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
    gap: 16px;
    padding: 16px;
    border-radius: 16px;
    border: 1px dashed #ead8db;
    background: #fff;
}

.proposal-process-discount-copy {
    display: grid;
    gap: 6px;
}

.proposal-process-discount-copy h4,
.proposal-process-discount-copy p {
    margin: 0;
}

.proposal-process-discount-copy p {
    color: var(--text-muted);
    font-size: 13px;
}

.proposal-process-people-list {
    display: grid;
    gap: 14px;
}

.proposal-process-selection-shell {
    display: grid;
    gap: 12px;
}

.proposal-process-step-select-card {
    border: 1px solid #ead8db;
    border-radius: 14px;
    background: #fff;
    padding: 12px;
    display: grid;
    gap: 12px;
}

.proposal-process-step-select-card.is-disabled {
    background: #fcf6f7;
}

.proposal-process-step-toggle,
.proposal-process-operation-toggle {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: flex-start;
}

.proposal-process-step-toggle-copy,
.proposal-process-operation-toggle-copy {
    display: grid;
    gap: 4px;
}

.proposal-process-step-toggle-copy span,
.proposal-process-operation-toggle-copy span {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.proposal-process-step-toggle-copy strong,
.proposal-process-operation-toggle-copy strong {
    color: var(--text-main);
    font-size: 14px;
}

.proposal-process-step-toggle-price,
.proposal-process-operation-toggle-price {
    align-self: center;
    color: var(--accent-dark);
    font-size: 14px;
    white-space: nowrap;
}

.proposal-process-operation-toggle-list {
    display: grid;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px dashed #ead8db;
}

.proposal-process-operation-toggle {
    padding: 10px 12px;
    border: 1px solid #f0e4e6;
    border-radius: 12px;
    background: #fff9fa;
}

.proposal-process-operation-toggle.is-disabled {
    opacity: 0.55;
}

.proposal-process-step-toggle .form-check-input,
.proposal-process-operation-toggle .form-check-input {
    margin-top: 2px;
}

.proposal-person-card {
    border: 1px solid #ebdcdf;
    border-radius: 16px;
    background: #fff;
    padding: 16px;
    display: grid;
    gap: 16px;
}

.proposal-person-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.proposal-person-card-title {
    display: grid;
    gap: 6px;
}

.proposal-person-card-title h4,
.proposal-person-card-title p {
    margin: 0;
}

.proposal-person-card-title p {
    color: var(--text-muted);
    font-size: 13px;
}

.proposal-person-type-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 700;
}

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

.proposal-process-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.proposal-process-total-card {
    justify-self: end;
    min-width: 220px;
}

.proposal-document-shell {
    display: grid;
    gap: 24px;
}

.finance-transaction-flow,
.finance-form-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.finance-transaction-party,
.finance-form-party {
    min-width: 0;
}

.finance-transaction-party {
    padding: 11px 14px;
    border: 1px solid #ebdcdf;
    border-radius: 14px;
    background: #fff9fa;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.finance-transaction-arrow,
.finance-form-arrow {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: 20px;
    font-weight: 800;
}

.finance-transaction-meta {
    display: grid;
    gap: 4px;
}

.finance-placeholder-panel {
    min-height: 280px;
    display: grid;
    place-items: center;
    text-align: center;
}

.finance-placeholder-copy {
    display: grid;
    gap: 10px;
    max-width: 460px;
}

.finance-placeholder-copy h2,
.finance-placeholder-copy p {
    margin: 0;
}

.finance-placeholder-copy p {
    color: var(--text-muted);
}

.surec-step-meta {
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

.surec-step-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.surec-step-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #ead8db;
    background: #fcf6f7;
    color: #7c3d49;
    font-size: 12px;
    font-weight: 600;
}

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

.surec-price-panel {
    border: 1px solid #e3d1d5;
    border-radius: 12px;
    background: #fffafb;
}

.surec-price-panel[open] {
    background: #fff7f8;
    border-color: #d7bbc1;
}

.surec-price-panel-toggle {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.surec-price-panel-toggle::-webkit-details-marker {
    display: none;
}

.surec-price-panel-toggle::after {
    content: "+";
    color: var(--accent-dark);
    font-size: 18px;
    line-height: 1;
}

.surec-price-panel[open] .surec-price-panel-toggle::after {
    content: "-";
}

.surec-price-panel-body {
    padding: 0 12px 12px;
}

.surec-step-editor-card {
    border: 2px solid #dfc2c8;
    border-radius: 14px;
    background: #fcf7f8;
    padding: 12px;
}

.surec-step-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.surec-step-editor-copy {
    font-size: 12px;
    line-height: 1.4;
}

.surec-step-editor {
    display: grid;
    gap: 10px;
}

.surec-step-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #eedfe2;
    border-radius: 14px;
    background: #fff;
}

.surec-step-row-order {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-weight: 800;
}

.surec-step-row-input {
    min-width: 0;
}

.surec-step-row-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.surec-step-row-actions .btn {
    padding: 4px 8px;
    font-size: 12px;
}

.surec-card-list {
    display: grid;
    gap: 12px;
}

.surec-card {
    border: 2px solid #d8bbc1;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(10, 31, 33, 0.04);
    padding: 14px;
}

.surec-card-head,
.surec-step-card-head,
.surec-operation-card-head,
.surec-step-builder-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.surec-card-head {
    margin-bottom: 12px;
}

.surec-card-copy h3 {
    margin: 0;
    font-size: 19px;
}

.surec-card-description {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--text-muted);
}

.surec-card-body,
.surec-steps-shell,
.surec-operation-shell,
.surec-builder-shell,
.surec-operation-editor-shell {
    display: grid;
    gap: 10px;
}

.surec-steps-shell,
.surec-operation-shell {
    border: 1px solid #e7d4d8;
    border-radius: 14px;
    background: #fff9fa;
    padding: 10px;
}

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

.surec-price-card {
    border: 1px solid #ddc9ce;
    border-radius: 12px;
    background: #fdf8f9;
    padding: 10px;
    display: grid;
    gap: 4px;
}

.surec-price-card span {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.surec-price-card strong {
    font-size: 16px;
    color: var(--text-primary);
}

.surec-steps-grid,
.surec-operation-list,
.surec-operation-editor-list {
    display: grid;
    gap: 8px;
}

.surec-step-card {
    border: 2px solid #e1c4ca;
    border-radius: 14px;
    background: #fff7f8;
    padding: 12px;
    display: grid;
    gap: 10px;
}

.surec-step-card-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.surec-step-card-title-row {
    justify-content: space-between;
    width: 100%;
    flex-wrap: nowrap;
    min-width: 0;
}

.surec-step-card-title strong {
    font-size: 15px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.surec-operation-card {
    border: 2px solid #e7d2d7;
    border-radius: 12px;
    background: #fff;
    padding: 10px;
    display: grid;
    gap: 10px;
}

.surec-empty-note {
    margin: 0;
    padding: 8px 10px;
    border: 1px dashed #dcc7cc;
    border-radius: 10px;
    background: #fff;
    font-size: 12px;
    color: var(--text-muted);
}

.surec-step-builder-card {
    display: grid;
    gap: 10px;
    background: #fff;
}

.surec-icon-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

.surec-icon-button {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #d6bcc2;
    border-radius: 8px;
    background: #fff;
    color: #6a2e39;
    display: inline-grid;
    place-items: center;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.surec-icon-button:hover,
.surec-icon-button:focus {
    border-color: #bf8f98;
    background: #f9ecef;
    color: #5a2630;
    box-shadow: none;
}

.surec-icon-button-danger {
    border-color: #e0c0c0;
    color: #a53f3f;
}

.surec-icon-button-danger:hover,
.surec-icon-button-danger:focus {
    border-color: #cb9c9c;
    background: #fff1f1;
    color: #8d2f2f;
}

.surec-modal-form .form-control::placeholder {
    color: #91a0a9;
}

.surec-list-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.surec-add-button {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #ca949d;
    border-radius: 10px;
    background: #fff4f6;
    color: #7d3642;
    display: inline-grid;
    place-items: center;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    flex: 0 0 auto;
}

.surec-add-button:hover,
.surec-add-button:focus {
    border-color: #b87a84;
    background: #fae8ec;
    color: #6a2e39;
    box-shadow: none;
}

.proposal-document-page-wrap {
    display: grid;
    gap: 10px;
    justify-items: center;
}

.proposal-document-page {
    position: relative;
    width: min(100%, 840px);
    aspect-ratio: 1 / 1.414;
    background-color: #ffffff;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 20px;
    border: 1px solid #ebdcdf;
    box-shadow: 0 18px 40px rgba(10, 31, 33, 0.12);
    overflow: hidden;
}

.proposal-document-block {
    position: absolute;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    line-height: 1.1;
}

.proposal-document-image-block {
    justify-content: center;
    align-items: center;
}

.proposal-document-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.proposal-block-content {
    display: block;
    width: 100%;
    margin: 0;
    white-space: nowrap;
}

.proposal-document-block-multiline,
.proposal-block-content.is-multiline {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.proposal-document-page-caption {
    font-size: 13px;
    color: var(--text-muted);
}

.proposal-document-process-page {
    box-sizing: border-box;
    padding: 34px;
    background: linear-gradient(180deg, #fffefe 0%, #fff6f7 100%);
}

.proposal-process-document {
    display: grid;
    gap: 18px;
    height: 100%;
}

.proposal-process-steps-flow-document {
    flex-wrap: wrap;
}

.proposal-process-step-card-document {
    min-width: 180px;
    flex: 1 1 180px;
}

.proposal-process-document-total {
    min-width: 180px;
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid #ebdcdf;
    background: #fff;
}

.proposal-process-document-total strong {
    font-size: 28px;
    color: var(--accent-dark);
}

.proposal-process-document-table-wrap {
    border: 1px solid #ebdcdf;
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
}

.proposal-process-document-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.proposal-process-document-table th,
.proposal-process-document-table td {
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #f1e5e7;
}

.proposal-process-document-table th {
    background: #fff4f6;
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

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

.proposal-process-document-selection-cell {
    display: grid;
    gap: 8px;
    min-width: 220px;
}

.proposal-process-document-step-group {
    display: grid;
    gap: 3px;
}

.proposal-process-document-step-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-dark);
    line-height: 1.25;
}

.proposal-process-document-sublist {
    margin: 0;
    padding-left: 14px;
    display: grid;
    gap: 2px;
    font-size: 11px;
    line-height: 1.2;
    color: var(--text-muted);
}

.proposal-process-document-sublist li::marker {
    color: #b98b94;
}

.proposal-process-document-sublist span {
    color: var(--text-main);
}

.no-print {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
}

@media (max-width: 1320px) {
    .proposal-editor-toolbar {
        position: static;
    }

    .proposal-editor-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    body.auth-body {
        padding: 16px;
    }

    .auth-card {
        padding: 24px 18px;
    }

    .proposal-grid-two,
    .proposal-wizard-steps,
    .finance-transaction-flow,
    .finance-form-flow,
    .surec-price-grid,
    .surec-display-price-grid,
    .proposal-process-price-grid,
    .proposal-process-document-prices,
    .proposal-person-grid,
    .proposal-process-discount-shell {
        grid-template-columns: 1fr;
    }

    .finance-transaction-arrow,
    .finance-form-arrow {
        justify-self: center;
        transform: rotate(90deg);
    }

    .proposal-page-item-actions {
        grid-template-columns: 1fr;
    }

    .proposal-toolbar-actions {
        width: 100%;
        justify-content: stretch;
    }

    .proposal-toolbar-actions .btn {
        width: 100%;
    }

    .proposal-template-actions,
    .proposal-preview-actions {
        width: 100%;
    }

    .proposal-template-actions .btn,
    .proposal-template-actions form,
    .proposal-template-actions form button,
    .proposal-preview-actions .btn,
    .proposal-preview-actions form,
    .proposal-preview-actions form button {
        width: 100%;
    }

    .proposal-document-page,
    .proposal-canvas-page {
        width: 100%;
    }

    .proposal-canvas-frame {
        padding: 12px;
    }

    .surec-step-editor-header,
    .surec-step-row {
        grid-template-columns: 1fr;
    }

    .surec-card-head,
    .surec-step-card-head,
    .surec-operation-card-head,
    .surec-step-builder-head {
        flex-direction: column;
    }

    .proposal-process-overview-head,
    .proposal-process-document-header,
    .proposal-person-card-head,
    .proposal-process-people-header {
        flex-direction: column;
    }

    .proposal-process-steps-flow,
    .proposal-process-steps-flow-document {
        display: grid;
        grid-template-columns: 1fr;
    }

    .proposal-process-step-toggle,
    .proposal-process-operation-toggle {
        grid-template-columns: auto 1fr;
    }

    .proposal-process-step-toggle-price,
    .proposal-process-operation-toggle-price {
        grid-column: 2 / -1;
    }

    .proposal-process-step-arrow {
        margin: 0 auto;
        transform: rotate(90deg);
    }

    .proposal-process-actions .btn,
    .proposal-process-total-card {
        width: 100%;
    }

    .proposal-document-process-page {
        padding: 20px;
    }

    .proposal-process-document-total {
        width: 100%;
    }

    .surec-step-row-order {
        width: 100%;
        height: auto;
        padding: 10px;
    }

    .surec-step-row-actions {
        justify-content: stretch;
    }

    .surec-step-row-actions .btn {
        width: 100%;
    }
}

.cari-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.cari-detail-card {
    display: grid;
    gap: 14px;
    min-height: 100%;
}

.cari-detail-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.cari-finance-summary {
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 4px;
}

.cari-process-shell {
    display: grid;
    gap: 12px;
}

.cari-process-title {
    font-size: 15px;
    font-weight: 700;
}

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

.cari-process-step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid #eadfe2;
    border-radius: 14px;
    background: #fcf7f8;
}

.cari-process-step.is-complete {
    border-color: rgba(47, 158, 68, 0.28);
    background: #f3fbf5;
}

.cari-process-toggle-form {
    margin: 0;
}

.cari-process-toggle {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    border: 1px solid #d8c9cd;
    background: #fff;
    color: transparent;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.cari-process-step.is-complete .cari-process-toggle {
    border-color: #2f9e44;
    background: #2f9e44;
    color: #fff;
}

.cari-process-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.cari-process-copy strong {
    font-size: 14px;
}

.cari-process-copy span {
    color: var(--text-muted);
    font-size: 12px;
}

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

.cari-linked-item {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid #efe4e6;
    border-radius: 14px;
    background: #fcf7f8;
}

.cari-linked-item-top,
.cari-linked-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cari-linked-item-top strong,
.cari-linked-item-bottom strong {
    margin: 0;
    font-size: 14px;
}

.cari-linked-item-top span,
.cari-linked-item-bottom span {
    color: var(--text-muted);
    font-size: 13px;
}

@media (max-width: 900px) {
    .cari-detail-grid,
    .cari-detail-summary {
        grid-template-columns: 1fr;
    }

    .cari-linked-item-top,
    .cari-linked-item-bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}

.customer-login-copy {
    margin-top: 0.75rem;
}

.customer-login-copy h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
}

.customer-login-copy p {
    margin: 0.35rem 0 0;
    color: rgba(71, 85, 105, 0.95);
    font-size: 0.95rem;
}

.customer-login-company {
    display: grid;
    gap: 0.2rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.customer-login-company span {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(100, 116, 139, 0.95);
}

.customer-login-company strong {
    font-size: 1rem;
    color: #0f172a;
}

.customer-portal-body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.14), transparent 28%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    color: #0f172a;
}

.customer-portal-shell {
    min-height: 100vh;
    width: min(100%, 1080px);
    margin: 0 auto;
    padding: 2rem 1.25rem 2.5rem;
}

.customer-portal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.customer-portal-label {
    margin-bottom: 0.2rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(100, 116, 139, 0.95);
}

.customer-portal-header-actions {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.customer-portal-user {
    font-weight: 700;
    color: #0f172a;
}

.customer-portal-main {
    display: grid;
    gap: 1rem;
}

.customer-portal-heading {
    margin-bottom: 0;
}

.customer-portal-heading h1 {
    margin-bottom: 0.35rem;
}

.customer-portal-heading p {
    margin: 0;
    color: rgba(71, 85, 105, 0.95);
}

.customer-portal-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.customer-portal-summary-card {
    display: grid;
    gap: 0.35rem;
    padding: 1.15rem 1.2rem;
}

.customer-portal-summary-card span {
    color: rgba(100, 116, 139, 0.95);
    font-size: 0.82rem;
}

.customer-portal-summary-card strong {
    font-size: 1.1rem;
    color: #0f172a;
}

.customer-portal-tracking-card {
    padding: 1.15rem 1.2rem 1.35rem;
}

.customer-portal-subtitle {
    margin: 0.3rem 0 0;
    color: rgba(71, 85, 105, 0.95);
}

.customer-tracking-list {
    position: relative;
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.customer-tracking-step {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: start;
}

.customer-tracking-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 2.65rem;
    left: 1.05rem;
    width: 2px;
    height: calc(100% + 0.45rem);
    background: rgba(148, 163, 184, 0.35);
}

.customer-tracking-marker {
    display: grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 999px;
    border: 2px solid rgba(148, 163, 184, 0.6);
    background: #fff;
    font-size: 0.9rem;
    font-weight: 800;
    color: rgba(71, 85, 105, 0.95);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.customer-tracking-copy {
    display: grid;
    gap: 0.25rem;
    padding: 0.45rem 0 0.1rem;
}

.customer-tracking-copy strong {
    font-size: 1rem;
    color: #0f172a;
}

.customer-tracking-copy span {
    font-size: 0.86rem;
    color: rgba(100, 116, 139, 0.95);
}

.customer-tracking-step.is-complete .customer-tracking-marker {
    border-color: rgba(16, 185, 129, 0.95);
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
}

.customer-tracking-step.is-complete:not(:last-child)::after {
    background: rgba(16, 185, 129, 0.45);
}

.customer-tracking-step.is-current .customer-tracking-marker {
    border-color: rgba(59, 130, 246, 0.95);
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.customer-tracking-step.is-pending .customer-tracking-marker {
    background: rgba(248, 250, 252, 0.95);
}

.cari-portal-summary {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.cari-portal-link {
    display: block;
    word-break: break-word;
    line-height: 1.45;
}

.cari-portal-share-cell {
    display: grid;
    gap: 0.4rem;
    align-content: start;
}

.cari-portal-share-feedback {
    min-height: 1rem;
    color: rgba(71, 85, 105, 0.95);
    font-size: 0.78rem;
}

@media (max-width: 767.98px) {
    .customer-portal-shell {
        padding: 1rem 0.85rem 1.5rem;
    }

    .customer-portal-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .customer-portal-header-actions {
        width: 100%;
        justify-content: space-between;
    }
}

@media print {
    body {
        background: #fff;
    }

    .app-sidebar,
    .app-topbar,
    .page-heading,
    .no-print,
    .proposal-document-page-caption {
        display: none !important;
    }

    .app-shell,
    .app-main,
    .page-content,
    .proposal-document-shell {
        display: block;
        padding: 0;
        margin: 0;
        min-height: auto;
    }

    .proposal-document-page-wrap {
        break-after: page;
        page-break-after: always;
        margin: 0;
    }

    .proposal-document-page-wrap:last-child {
        break-after: auto;
        page-break-after: auto;
    }

    .proposal-document-page {
        width: 210mm;
        height: 297mm;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
}
