* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    color: #172033;
    background: #f5f7fb;
}

body {
    min-height: 100vh;
}

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

.sidebar {
    width: 250px;
    background: #101a2b;
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
}

.brand {
    height: 76px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 22px;
    border-bottom:
        1px solid rgba(255,255,255,.08);
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #2878ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.brand-name {
    font-size: 19px;
    font-weight: 750;
}

.brand-subtitle {
    color: #8793a8;
    font-size: 12px;
}

nav {
    padding: 14px 12px;
    flex: 1;
}

.nav-section {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #627089;
    padding: 18px 12px 7px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    margin: 3px 0;
    border-radius: 8px;
    text-decoration: none;
    color: #c6d0df;
    font-size: 14px;
}

.nav-item:hover {
    background: rgba(255,255,255,.05);
}

.nav-item.active {
    background: #2878ff;
    color: white;
}

.nav-item.disabled {
    opacity: .55;
    cursor: default;
}

.soon {
    margin-left: auto;
    font-size: 9px;
    border:
        1px solid rgba(255,255,255,.2);
    padding: 2px 5px;
    border-radius: 5px;
}

.sidebar-bottom {
    padding: 18px 22px;
    color: #657289;
    font-size: 11px;
}

.main {
    margin-left: 250px;
    width: calc(100% - 250px);
}

.topbar {
    height: 76px;
    background: white;
    border-bottom: 1px solid #e7eaf0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e4efff;
    color: #2878ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.user-name {
    font-size: 13px;
    font-weight: 650;
}

.user-role {
    color: #8993a4;
    font-size: 11px;
}

.logout-button {
    border: 0;
    background: none;
    color: #8993a4;
    cursor: pointer;
    margin-left: 10px;
}

.content {
    padding: 30px 34px 60px;
    max-width: 1600px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 26px;
}

.page-header h1 {
    margin: 0 0 5px;
    font-size: 28px;
}

.page-header p {
    margin: 0;
    color: #778195;
}

.master-pill {
    background: white;
    border: 1px solid #e2e6ed;
    border-radius: 9px;
    padding: 10px 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

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

.metric-card,
.panel,
.admin-card {
    background: white;
    border: 1px solid #e3e7ee;
    border-radius: 12px;
}

.metric-card {
    padding: 20px;
}

.metric-label {
    color: #717c90;
    font-size: 13px;
}

.metric-value {
    font-size: 29px;
    font-weight: 750;
    margin: 8px 0 4px;
}

.metric-note {
    color: #8993a4;
    font-size: 12px;
}

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

.panel {
    padding: 20px;
    margin-bottom: 18px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
}

.panel-header h2 {
    margin: 0 0 4px;
    font-size: 17px;
}

.panel-header p {
    margin: 0;
    color: #8993a4;
    font-size: 12px;
}

.readiness-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
}

.readiness-row strong {
    font-size: 13px;
    margin-right: 8px;
}

.readiness-row span {
    color: #8993a4;
    font-size: 12px;
}

.progress {
    height: 7px;
    background: #edf0f5;
    border-radius: 6px;
    margin-bottom: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
}

.progress-fill.ready {
    background: #2eaa63;
}

.bi-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.bi-preview div {
    background: #f7f9fc;
    border-radius: 8px;
    padding: 14px;
}

.bi-preview span {
    display: block;
    color: #8993a4;
    font-size: 11px;
}

.bi-preview strong {
    display: block;
    font-size: 22px;
    margin-top: 6px;
}

.empty-info {
    color: #8993a4;
    font-size: 12px;
    margin-top: 14px;
    line-height: 1.6;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 11px 12px;
    font-size: 11px;
    text-transform: uppercase;
    color: #8b95a7;
    border-bottom: 1px solid #e7eaf0;
}

.table td {
    padding: 13px 12px;
    font-size: 13px;
    border-bottom: 1px solid #eef1f5;
}

.badge {
    display: inline-flex;
    padding: 4px 7px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
}

.badge.green {
    color: #1f8a4d;
    background: #e6f7ed;
}

.badge.blue {
    color: #216fe5;
    background: #e8f1ff;
}

.good {
    color: #27945a !important;
}

.bad {
    color: #d44a4a !important;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.status-dot.green {
    background: #25a85a;
}

.status-text {
    font-size: 12px;
}

.url-cell {
    color: #4771b8;
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.primary-button,
.secondary-button {
    border-radius: 7px;
    padding: 9px 14px;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
}

.primary-button {
    border: 0;
    background: #2878ff;
    color: white;
}

.primary-button:disabled {
    opacity: .5;
}

.secondary-button {
    background: white;
    border: 1px solid #d9dee7;
    color: #334158;
}

.full {
    width: 100%;
}

.notice {
    background: #edf4ff;
    border: 1px solid #ccddfa;
    padding: 14px 16px;
    border-radius: 9px;
    color: #4e678d;
    font-size: 13px;
}

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

.admin-card {
    padding: 22px;
}

.admin-card h3 {
    margin-top: 0;
}

.admin-card p {
    color: #7c879a;
    line-height: 1.5;
    margin-bottom: 0;
}

/* AUTH */

.auth-body {
    background: #eff3f8;
    min-height: 100vh;
}

.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 430px 1fr;
}

.auth-card {
    background: white;
    padding: 90px 58px;
}

.auth-logo {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 28px;
}

.auth-title {
    font-size: 18px;
    margin-bottom: 25px;
}

.auth-card label,
.setup-card label {
    display: block;
    font-size: 12px;
    margin: 14px 0 6px;
    color: #566176;
}

.auth-card input,
.setup-card input {
    width: 100%;
    height: 42px;
    border: 1px solid #d6dce6;
    border-radius: 7px;
    padding: 0 11px;
    font-size: 14px;
}

.auth-card button,
.setup-card button {
    margin-top: 20px;
    height: 42px;
}

.auth-hero {
    background:
        linear-gradient(
            135deg,
            #101b2f,
            #172c50
        );
    color: white;
    padding: 100px;
    display: flex;
    align-items: center;
}

.auth-hero h1 {
    font-size: 42px;
    margin: 0 0 12px;
}

.auth-hero p {
    color: #b9c7dc;
    font-size: 17px;
    margin-bottom: 35px;
}

.hero-point {
    padding: 8px 0;
    color: #d9e5f4;
}

.setup-card {
    width: 460px;
    margin: 70px auto;
    background: white;
    padding: 38px;
    border-radius: 14px;
    border: 1px solid #e0e5ed;
}

.setup-card h1 {
    margin-bottom: 5px;
}

.muted {
    color: #8590a2;
}

.alert {
    padding: 11px 13px;
    border-radius: 7px;
    margin: 14px 0;
    font-size: 13px;
}

.alert.error {
    background: #fff0f0;
    color: #b93939;
}

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

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

.breadcrumbs {
    color: #8a96a9;
    font-size: 12px;
    margin-bottom: 7px;
}

.title-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-line h1 {
    margin: 0;
}

.wizard-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 820px);
    gap: 22px;
    align-items: start;
}

.wizard-steps {
    background: white;
    border: 1px solid #e3e7ee;
    border-radius: 12px;
    padding: 12px;
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px;
    font-size: 13px;
    color: #8894a8;
}

.wizard-step span {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #eef1f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.wizard-step.active {
    color: #1b2a43;
    font-weight: 650;
}

.wizard-step.active span {
    background: #2878ff;
    color: white;
}

.wizard-panel {
    padding: 26px;
}

.form-section {
    margin-bottom: 30px;
}

.form-section h2 {
    font-size: 17px;
    margin: 0 0 17px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 7px;
}

.field input,
.field select {
    width: 100%;
    height: 42px;
    border: 1px solid #d7dde7;
    border-radius: 7px;
    background: white;
    padding: 0 11px;
    font-size: 13px;
}

.field small {
    display: block;
    color: #8c97a9;
    margin-top: 6px;
    font-size: 11px;
}

.full-field {
    grid-column: 1 / -1;
}

.security-note {
    background: #f1f6ff;
    border: 1px solid #d9e6fb;
    color: #536b90;
    font-size: 12px;
    padding: 11px 13px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.wizard-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #edf0f4;
    padding-top: 20px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.detail-row,
.capability-row {
    min-height: 46px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #edf0f4;
    font-size: 13px;
}

.detail-row span {
    color: #8290a5;
}

.capability-ok {
    color: #239557;
    font-weight: 600;
}

.capability-bad {
    color: #cc4e4e;
    font-weight: 600;
}

.sync-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.sync-card {
    background: #f7f9fc;
    border-radius: 9px;
    padding: 16px;
}

.sync-card span,
.sync-card small {
    display: block;
    color: #8490a3;
}

.sync-card span {
    font-size: 12px;
}

.sync-card strong {
    display: block;
    font-size: 24px;
    margin: 7px 0;
}

.sync-card small {
    font-size: 10px;
}

@media (max-width: 1100px) {
    .wizard-layout,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .sync-cards {
        grid-template-columns: 1fr 1fr;
    }
}

.probe-panel {
    margin-top: 18px;
}

.probe-message {
    color: #66758b;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.capabilities-list {
    margin-top: 10px;
}

.probe-button {
    background: #f7f9fc;
}

.badge.red {
    color: #b83f3f;
    background: #ffeded;
}

.chain-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.chain-actions form {
    margin: 0;
}

.danger-zone {
    border-color: #f0cccc;
}

.danger-zone h2 {
    color: #a63737;
}

.delete-confirm {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.delete-confirm .field {
    flex: 1;
    max-width: 420px;
}

.danger-button {
    height: 42px;
    border: 1px solid #d34c4c;
    background: #fff;
    color: #bd3535;
    border-radius: 7px;
    padding: 0 16px;
    cursor: pointer;
    font-weight: 600;
}

.danger-button:hover {
    background: #fff0f0;
}

.chain-link {
    color: #172033;
    text-decoration: none;
}

.chain-link:hover {
    color: #2878ff;
}

.compact-button {
    display: inline-flex;
    padding: 6px 10px;
    font-size: 12px;
}

.back-link {
    color: #2878ff;
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: #a3adbd;
}

.sync-status-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 44px;
    border-bottom: 1px solid #edf0f4;
    font-size: 13px;
}

.sync-status-line span {
    color: #8290a5;
}

.compare-chain-strip {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 18px;
    align-items: center;
    margin-bottom: 22px;
}

.compare-chain {
    background: #fff;
    border: 1px solid #e2e7ef;
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.compare-chain span,
.cell-muted {
    color: #8a96a9;
    font-size: 12px;
}

.compare-label {
    color: #2878ff;
    font-size: 11px;
    font-weight: 700;
}

.compare-arrow {
    font-size: 26px;
    color: #8a96a9;
}

.compare-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 22px;
}

.compare-stat {
    background: #fff;
    border: 1px solid #e2e7ef;
    border-radius: 12px;
    padding: 15px;
    text-decoration: none;
    color: #172033;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.compare-stat strong {
    font-size: 24px;
}

.compare-stat.selected {
    border-color: #2878ff;
    box-shadow: 0 0 0 1px #2878ff;
}

.compare-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.compare-filters input {
    flex: 1;
    min-width: 240px;
}

.table-scroll {
    overflow-x: auto;
}

.compare-badge {
    display: inline-flex;
    white-space: nowrap;
    padding: 4px 7px;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 700;
}

.status-same {
    background: #e8f7ee;
    color: #23934d;
}

.status-different {
    background: #fff3d9;
    color: #9a6a00;
}

.status-candidate {
    background: #eaf2ff;
    color: #2878ff;
}

.status-missing_in_target,
.status-broken_mapping {
    background: #feecec;
    color: #b43b3b;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 10px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
}

.compare-note {
    margin-top: 20px;
}

/* Compare table v2 */

.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.data-table th,
.data-table td {
    padding: 12px 14px;
    vertical-align: top;
    border-bottom: 1px solid #edf0f4;
}

.data-table th {
    font-size: 12px;
    color: #7f8ba0;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

.col-status {
    width: 155px;
}

.col-master {
    width: 28%;
}

.col-code {
    width: 110px;
}

.col-type {
    width: 100px;
}

.col-match {
    width: 90px;
}

.col-target {
    width: 28%;
}

.col-diff {
    width: 180px;
}

.entity-main {
    font-weight: 600;
    color: #172033;
    line-height: 1.35;
}

.entity-id {
    margin-top: 4px;
    color: #9aa5b5;
    font-size: 10px;
    line-height: 1.25;
    word-break: break-all;
}

.match-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 7px;
    background: #eef4ff;
    color: #2878ff;
    font-size: 10px;
    font-weight: 700;
}

.diff-chip {
    display: inline-flex;
    margin: 0 4px 4px 0;
    padding: 4px 7px;
    border-radius: 7px;
    background: #fff3d9;
    color: #8f6500;
    font-size: 10px;
    font-weight: 600;
}

.cell-empty {
    color: #a3adbd;
    font-size: 12px;
}

.compare-badge {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Compare table header alignment fix */

.col-status {
    width: 150px;
}

.col-master {
    width: 24%;
}

.col-code {
    width: 115px;
}

.col-type {
    width: 110px;
}

.col-match {
    width: 150px;
    min-width: 150px;
}

.col-target {
    width: 24%;
}

.col-diff {
    width: 170px;
}

.data-table th.col-match,
.data-table td.col-match {
    padding-left: 18px;
    padding-right: 18px;
}

.data-table th {
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-badge {
    white-space: nowrap;
    padding: 4px 9px;
}

.compare-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.detail-list {
    display: flex;
    flex-direction: column;
}

.detail-list > div {
    min-height: 48px;
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid #edf0f4;
}

.detail-list > div:last-child {
    border-bottom: 0;
}

.detail-list span {
    color: #8491a5;
    font-size: 12px;
}

.detail-list strong {
    color: #172033;
    font-size: 13px;
    overflow-wrap: anywhere;
}

@media (max-width: 1000px) {
    .compare-detail-grid {
        grid-template-columns: 1fr;
    }
}

.compare-row {
    cursor: pointer;
}

.compare-row:hover td {
    background: #f8fbff;
}

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

.decision-actions form {
    margin: 0;
}

.decision-current {
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #f6f8fb;
    border-radius: 9px;
    font-size: 13px;
}

.dry-run-stats {
    grid-template-columns: repeat(4, 1fr);
}

.dry-run-badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 8px;
    background: #eef4ff;
    color: #2878ff;
    font-size: 11px;
    font-weight: 800;
}

.operation-badge {
    display: inline-flex;
    white-space: nowrap;
    padding: 5px 8px;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 700;
}

.op-create {
    background: #e8f7ee;
    color: #218848;
}

.op-update {
    background: #fff3d9;
    color: #916500;
}

.op-link_only {
    background: #eaf2ff;
    color: #2878ff;
}

.op-skip {
    background: #f0f2f5;
    color: #758093;
}

.dry-run-warning {
    margin-top: 20px;
}

.dry-run-table td:nth-child(5) {
    font-size: 10px;
    word-break: break-all;
}

.preflight-stats {
    grid-template-columns: repeat(4, 1fr);
}

.preflight-ready,
.preflight-blocked {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
}

.preflight-ready {
    background: #e8f7ee;
    color: #218848;
}

.preflight-blocked {
    background: #feecec;
    color: #b43b3b;
}

.preflight-status {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 700;
}

.pf-ready {
    background: #e8f7ee;
    color: #218848;
}

.pf-warning {
    background: #fff3d9;
    color: #916500;
}

.pf-blocked {
    background: #feecec;
    color: #b43b3b;
}

.preflight-error-text {
    color: #b43b3b;
    font-size: 11px;
    margin-bottom: 3px;
}

.preflight-warning-text {
    color: #916500;
    font-size: 11px;
    margin-bottom: 3px;
}

.preflight-ok-text {
    color: #218848;
    font-size: 11px;
}

.publication-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.decision-panel {
    margin-top: 20px;
}

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

.decision-actions form {
    margin: 0;
}

.decision-current {
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #f6f8fb;
    border-radius: 9px;
    font-size: 13px;
}


/* Change monitoring */

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

.changes-filter-panel {
    margin-bottom: 22px;
}

.changes-filters {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.changes-filters > div {
    min-width: 180px;
}

.changes-filters label {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 600;
    color: #7f8da3;
}

.changes-filters select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #dbe2ec;
    border-radius: 9px;
    background: #fff;
    font: inherit;
    color: #172033;
}

.changes-filter-action {
    min-width: auto !important;
}

.changes-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.changes-table {
    width: 100%;
    border-collapse: collapse;
}

.changes-table th {
    padding: 12px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #8190a6;
    border-bottom: 1px solid #e7ebf1;
    white-space: nowrap;
}

.changes-table td {
    padding: 15px 14px;
    vertical-align: top;
    border-bottom: 1px solid #edf0f4;
    font-size: 13px;
}

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

.changes-time {
    white-space: nowrap;
    color: #39465a;
}

.changes-time span {
    color: #8b98aa;
    font-size: 12px;
}

.change-object-meta {
    margin-top: 4px;
    color: #738198;
    font-size: 12px;
}

.change-object-id {
    margin-top: 4px;
    color: #9aa5b6;
    font-size: 10px;
    font-family: monospace;
}

.change-source,
.change-type,
.change-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.change-source.source-master {
    background: #eaf2ff;
    color: #2f78e9;
}

.change-source.source-target {
    background: #fff2e5;
    color: #b86816;
}

.change-type.type-create {
    background: #eaf8ef;
    color: #25844b;
}

.change-type.type-update {
    background: #fff4df;
    color: #a56a08;
}

.change-type.type-delete {
    background: #ffebea;
    color: #c74740;
}

.change-type.type-restore {
    background: #edf2ff;
    color: #506ac9;
}

.change-status.open {
    background: #fff0e8;
    color: #bd5f25;
}

.change-status.resolved {
    background: #eaf8ef;
    color: #25844b;
}

.change-fields {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.change-fields span {
    padding: 4px 7px;
    border-radius: 6px;
    background: #f1f4f8;
    color: #5c697d;
    font-size: 11px;
}

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


/* Change event detail */

.change-row {
    cursor: pointer;
    transition: background .15s ease;
}

.change-row:hover {
    background: #f8fafc;
}

.change-row:focus {
    outline: 2px solid #d9e5ff;
    outline-offset: -2px;
}

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

.change-diff-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.change-diff-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.change-diff-table th {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid #e7ebf1;
    color: #8390a4;
    font-size: 12px;
    font-weight: 600;
}

.change-diff-table th:first-child {
    width: 180px;
}

.change-diff-table td {
    padding: 14px;
    vertical-align: top;
    border-bottom: 1px solid #edf0f4;
    font-size: 13px;
    word-break: break-word;
}

.change-diff-field {
    font-weight: 700;
    color: #283548;
}

.change-diff-before {
    background: #fff9f7;
}

.change-diff-after {
    background: #f6fbf8;
}

.change-diff-table pre {
    margin: 0;
    max-height: 300px;
    overflow: auto;
    white-space: pre-wrap;
    font-size: 11px;
    line-height: 1.5;
}

.change-empty {
    color: #a1abba;
}

.change-actions-panel {
    margin-top: 20px;
}

.change-detail-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.change-detail-actions button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.change-actions-note {
    margin-top: 12px;
    color: #8491a4;
    font-size: 12px;
}

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


/* Change journal actor */

.change-actor-name {
    display: block;
    max-width: 190px;
    line-height: 1.35;
}

.change-actor-source {
    margin-top: 3px;
    color: #8a96a8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.changes-time {
    white-space: nowrap;
}


/* Manual Franchise sync */

.changes-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.changes-header-actions form {
    margin: 0;
}

.sync-notice {
    margin-bottom: 18px;
    padding: 13px 16px;
    border: 1px solid #e3e8ef;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
}

.sync-notice.success {
    background: #f5faf7;
    border-color: #d7eadf;
}

.sync-notice.error {
    background: #fff7f7;
    border-color: #efdada;
}

@media (max-width: 700px) {
    .changes-header-actions {
        width: 100%;
        justify-content: flex-start;
        margin-top: 12px;
    }
}


/* TARGET synchronization live status */

.target-sync-summary {
    margin-bottom: 18px;
    padding: 12px 15px;
    border: 1px solid #e4e9f0;
    border-radius: 10px;
    background: #ffffff;
}

.target-sync-summary-main {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #657287;
    font-size: 13px;
}

.target-sync-summary strong {
    color: #273448;
}

.target-sync-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: 0 0 auto;
    background: #aeb7c5;
}

.target-sync-dot.status-running {
    background: #e5a72f;
    animation: target-sync-pulse 1.3s infinite;
}

.target-sync-dot.status-success {
    background: #35a76f;
}

.target-sync-dot.status-failed {
    background: #d45c5c;
}

@keyframes target-sync-pulse {
    0% {
        opacity: .35;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: .35;
    }
}

.changes-header-actions button:disabled {
    opacity: .65;
    cursor: wait;
}


/* ==========================================================
   FoodHub notifications
   ========================================================== */

.notification-bell-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.notification-bell {
    position: relative;
    width: 40px;
    height: 40px;
    border: 1px solid #dfe5ef;
    border-radius: 12px;
    background: #fff;
    color: #526079;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition:
        background .15s ease,
        border-color .15s ease;
}

.notification-bell:hover {
    background: #f7f9fc;
    border-color: #cfd8e7;
}

.notification-bell svg {
    width: 21px;
    height: 21px;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 10px;
    background: #e5484d;
    color: #fff;
    border: 2px solid #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 14px;
    text-align: center;
}

.notification-dropdown {
    position: absolute;
    z-index: 1000;
    top: calc(100% + 12px);
    right: 0;
    width: min(420px, calc(100vw - 32px));
    max-height: 520px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dfe5ef;
    border-radius: 16px;
    box-shadow:
        0 18px 50px
        rgba(24, 37, 66, .16);
}

.notification-dropdown-head {
    min-height: 58px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #edf0f5;
}

.notification-dropdown-head strong {
    color: #172238;
    font-size: 16px;
}

.notification-dropdown-head button {
    border: 0;
    background: transparent;
    color: #2878f0;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
}

.notification-list {
    overflow-y: auto;
    max-height: 460px;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f0f2f6;
    background: #fff;
}

.notification-item:hover {
    background: #f8fafe;
}

.notification-item.unread {
    background: #f6f9ff;
}

.notification-severity-dot {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    margin-top: 6px;
    border-radius: 50%;
    background: #8a96a8;
}

.notification-item.severity-warning
.notification-severity-dot {
    background: #e99519;
}

.notification-item.severity-critical
.notification-severity-dot {
    background: #e5484d;
}

.notification-item-body {
    min-width: 0;
    flex: 1;
}

.notification-item-title {
    color: #182338;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.notification-item-message {
    margin-top: 4px;
    color: #69778f;
    font-size: 13px;
    line-height: 1.4;
}

.notification-item-time {
    margin-top: 7px;
    color: #9aa6b8;
    font-size: 12px;
}

.notification-empty,
.notification-loading {
    padding: 28px 20px;
    text-align: center;
    color: #8b98ac;
    font-size: 14px;
}

@media (max-width: 720px) {
    .notification-dropdown {
        position: fixed;
        top: 64px;
        right: 12px;
        left: 12px;
        width: auto;
    }
}

/* Standard delivery/readback views. Legacy editors keep their existing styles. */
.std-notice { display:flex; flex-wrap:wrap; gap:8px 20px; padding:16px 20px; margin-bottom:24px; background:#eaf1ff; color:#28476f; border-radius:10px; font-size:13px; }
.std-notice span { color:#516781; }
.std-metrics { margin-bottom:26px; }
.std-status { display:inline-block; padding:7px 10px; border-radius:7px; font-size:12px; font-weight:650; white-space:normal; }
.std-info { background:#eaf1ff; color:#245aa4; }
.std-success { background:#e8f6ee; color:#236741; }
.std-neutral { background:#f0f2f6; color:#526078; }
.std-warning { background:#fff4db; color:#805713; }
.std-danger { background:#ffeded; color:#ab3535; }
.std-muted, .std-footnote { color:#6b7890; font-size:13px; line-height:1.5; }
.std-footnote { margin:22px 0 0; }
.std-block { display:block; margin-top:5px; }
.std-list { display:grid; }
.std-summary { display:flex; justify-content:space-between; gap:24px; padding:22px 0; border-top:1px solid #e7eaf0; color:inherit; text-decoration:none; }
.std-summary:hover strong { color:#245aa4; }
.std-summary p { margin:7px 0; color:#67758b; font-size:14px; }
.std-summary-status { display:flex; flex-direction:column; align-items:flex-end; justify-content:center; gap:10px; flex-shrink:0; }
.std-empty { padding:32px; }
.std-empty p { color:#68768b; line-height:1.6; margin-bottom:0; }
.std-eyebrow { display:block; font-size:12px; color:#66758d; margin-bottom:10px; }
.std-publication { scroll-margin-top:24px; }
.std-publication .panel-header { align-items:flex-start; gap:24px; }
.std-publication h2, .std-finding h2 { overflow-wrap:anywhere; }
.std-hint { padding:13px 16px; background:#f3f6fb; border-radius:8px; color:#536883; font-size:14px; line-height:1.5; }
.std-table { width:100%; min-width:650px; }
.working-recipients { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr)); gap:20px; margin:20px 0; }
.working-recipient { padding:20px; border:1px solid #e7eaf0; border-radius:12px; min-width:0; }
.working-recipient h3 { margin:0; }
.working-price-list { list-style:none; padding:0; margin:0; }
.working-price-list li { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px 16px; padding:14px 0; border-top:1px solid #e7eaf0; line-height:1.5; }
.working-price-list li>span { overflow-wrap:anywhere; }
.working-price-list strong { white-space:nowrap; }
.working-price-list .std-block { grid-column:1 / -1; }
@media(max-width:760px) { .working-recipients { grid-template-columns:minmax(0,1fr); } .working-recipient { padding:16px; } }
.std-table td { vertical-align:top; }
.std-table th { white-space:nowrap; }
.std-details summary, .std-history summary { cursor:pointer; color:#345577; }
.std-details li { margin-bottom:7px; overflow-wrap:anywhere; }
.std-details ul { padding-left:18px; max-width:400px; }
.std-panel-bottom { display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-top:20px; align-items:center; }
.std-panel-bottom a { color:#245aa4; text-decoration:none; font-size:14px; }
.std-technical { margin-top:20px; padding-top:16px; border-top:1px solid #edf0f4; font-size:13px; }
.std-technical code { overflow-wrap:anywhere; }
.std-filter { display:flex; gap:12px; align-items:center; margin-bottom:24px; flex-wrap:wrap; }
.std-filter label { color:#51627c; font-size:14px; }
.std-filter select { padding:11px 12px; border:1px solid #d8e0eb; border-radius:8px; background:white; max-width:100%; min-width:260px; color:#253952; font:inherit; }
.std-read-error { background:#fff4db; color:#805713; padding:18px 22px; border-radius:10px; margin-bottom:20px; font-size:14px; }
.std-read-error p { margin:8px 0; }
.std-read-error span { font-size:12px; }
.std-comparison { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.std-comparison > div { padding:20px; border-radius:8px; background:#f3f6fb; }
.std-comparison > div:last-child { background:#fff3f1; }
.std-comparison span { display:block; font-size:13px; color:#647189; margin-bottom:10px; }
.std-comparison strong { display:block; white-space:pre-line; overflow-wrap:anywhere; font-size:16px; line-height:1.6; }
.std-history > summary { font-weight:600; }
.std-history .table-scroll { margin-top:20px; }
@media (max-width:760px) {
    .standard-interface .app-shell { display:block; }
    .standard-interface .sidebar { position:static; width:100%; }
    .standard-interface .brand { height:60px; }
    .standard-interface .sidebar nav { display:flex; overflow-x:auto; padding:8px 12px; }
    .standard-interface .nav-item { flex-shrink:0; white-space:nowrap; }
    .standard-interface .nav-section, .standard-interface .sidebar-bottom { display:none; }
    .standard-interface .main { margin-left:0; width:100%; }
    .standard-interface .content { padding:24px 16px; }
    .standard-interface .topbar { height:60px; padding:0 16px; }
    .standard-interface .page-header { flex-wrap:wrap; gap:16px; }
    .standard-interface .page-header h1 { font-size:25px; }
    .standard-interface .page-header p { line-height:1.5; }
    .standard-interface .panel { padding:20px; }
    .std-summary { flex-direction:column; gap:12px; }
    .std-summary-status { align-items:flex-start; }
    .std-comparison { grid-template-columns:1fr; }
    .std-publication .panel-header, .std-finding .panel-header { flex-wrap:wrap; }
}

/* Founder demo: read-only saved sales, separated from standard delivery. */
.founders-eyebrow { color:#5269a5; font-size:12px; font-weight:700; letter-spacing:.09em; margin-bottom:8px; }
.founders-meta { display:flex; flex-wrap:wrap; gap:12px 24px; align-items:center; margin:0 0 18px; color:#667085; font-size:14px; }
.founders-meta strong { color:#25334d; font-size:18px; }
.founders-metric { font-size:clamp(18px,1.6vw,28px); font-variant-numeric:tabular-nums; white-space:nowrap; }
.founders-chart { display:grid; gap:16px; margin:22px 0; }
.founders-chart-row { display:grid; grid-template-columns:50px 1fr 160px; gap:16px; align-items:center; font-size:14px; font-variant-numeric:tabular-nums; }
.founders-chart-row strong { text-align:right; }
.founders-bar-track { height:22px; background:#f1f4fb; border-radius:5px; overflow:hidden; }
.founders-bar { height:100%; background:#3d6fe8; border-radius:5px; }
@media(max-width:600px) { .founders-chart-row { grid-template-columns:42px 1fr 120px; gap:8px; font-size:12px; } }

/* Real sales overview and project drilldown. */
.std-page-actions { display:flex; gap:10px; flex-wrap:wrap; flex-shrink:0; }
.standard-interface .page-header { gap:20px; flex-wrap:wrap; }
.founders-section-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:28px 0 16px; }
.founders-section-heading h2 { font-size:19px; margin:0; }
.founders-section-heading p { margin:7px 0 0; color:#728098; font-size:13px; }
.founders-section-heading a { font-size:14px; color:#2863c7; text-decoration:none; }
.founders-projects { display:grid; grid-template-columns:repeat(auto-fit,minmax(155px,1fr)); gap:14px; }
.founders-project { display:flex; flex-direction:column; gap:12px; padding:20px; background:white; border:1px solid #dce4ef; border-radius:12px; text-decoration:none; color:#24324a; }
.founders-project span { font-size:15px; font-weight:650; }
.founders-project strong { font-size:clamp(17px,1.5vw,25px); font-variant-numeric:tabular-nums; }
.founders-project small { color:#77849a; }
.founders-project:hover, .founders-project.selected { border-color:#3475eb; background:#f0f5ff; box-shadow:inset 0 3px #3475eb; }
.founders-caption { font-size:12px; line-height:1.6; color:#78869a; margin:12px 0 24px; }
.founders-filters { display:flex; flex-wrap:wrap; align-items:flex-end; gap:16px; padding:22px; margin-top:24px; }
.founders-filters label { display:flex; flex-direction:column; gap:8px; color:#66768d; font-size:12px; }
.founders-filters input, .founders-filters select { font:inherit; font-size:14px; color:#28364d; background:white; border:1px solid #dce3ef; border-radius:7px; height:42px; padding:8px 10px; min-width:0; width:100%; }
.founders-filter-restaurant { flex:1; min-width:200px; }
.founders-filters .primary-button { height:42px; margin:0; }
.founders-filter-note { flex-basis:100%; font-size:12px; color:#7a879b; }
.founders-card-change { display:flex; gap:8px; align-items:center; flex-wrap:wrap; font-size:11px; color:#7a879b; margin:12px 0; }
.founders-delta { display:inline-block; font-size:12px; font-weight:600; color:#748298; }
.founders-delta.positive { color:#288761; }
.founders-delta.negative { color:#c0514b; }
.founders-metric { font-size:clamp(18px,1.55vw,28px); letter-spacing:-.03em; }
.founders-tabs { display:flex; gap:24px; border-bottom:1px solid #dce4ef; margin:32px 0 24px; }
.founders-tabs a { color:#566882; text-decoration:none; font-size:14px; padding:0 0 14px; }
.founders-tabs a:first-child { color:#2969d2; border-bottom:2px solid #3475eb; }
.founders-panel { scroll-margin-top:24px; }
.founders-legend { display:flex; flex-wrap:wrap; gap:22px; font-size:12px; color:#6a768a; margin:0 0 20px; }
.founders-legend span { display:flex; align-items:center; gap:8px; }
.founders-legend i { display:inline-block; width:24px; height:9px; border-radius:2px; }
.founders-legend .actual, .founders-bar.actual { background:#f58c70; }
.founders-legend .previous, .founders-bar.previous { background:#b9c3d0; }
.founders-rank-row { display:grid; grid-template-columns:minmax(150px,26%) 1fr; gap:22px; align-items:center; padding:15px 0; border-top:1px solid #eef1f6; }
.founders-rank-name { display:flex; flex-direction:column; gap:7px; font-size:13px; font-weight:550; line-height:1.4; }
.founders-rank-name a { text-decoration:none; color:#30445f; }
.founders-rank-name a:hover { color:#286bde; }
.founders-pair { display:grid; gap:6px; }
.founders-pair-line { display:grid; grid-template-columns:minmax(30px,1fr) 136px; gap:16px; align-items:center; font-size:12px; font-variant-numeric:tabular-nums; }
.founders-pair-line strong, .founders-pair-line > span { text-align:right; white-space:nowrap; }
.founders-pair-line > span { color:#7c8899; }
.founders-track { height:13px; background:repeating-linear-gradient(to right,#f3f5f9 0,#f3f5f9 1px,transparent 1px,transparent 25%); }
.founders-track .founders-bar { border-radius:0 3px 3px 0; }
.founders-rank.daily .founders-rank-row { grid-template-columns:65px 1fr; padding:11px 0; }
.founders-details { scroll-margin-top:24px; }
.founders-restaurant { margin-bottom:12px; padding:22px 26px; }
.founders-restaurant summary { cursor:pointer; font-size:14px; color:#30445f; }
.founders-restaurant summary strong { float:right; font-variant-numeric:tabular-nums; }
.founders-detail-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; border-top:1px solid #edf0f5; margin-top:22px; padding-top:24px; }
.founders-detail-grid > div { display:flex; flex-direction:column; gap:12px; }
.founders-detail-grid span { font-size:13px; color:#6c7c93; }
.founders-detail-grid strong { font-size:21px; color:#283b57; }
.founders-detail-grid small { color:#7b889b; line-height:1.5; }
.founders-olap-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
.founders-method { margin-top:30px; line-height:1.7; }
@media(max-width:1200px) {
 .founders-projects { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .founders-project strong { font-size:21px; }
 .std-metrics.metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .founders-metric { font-size:26px; }
}
@media(max-width:600px) {
 .founders-projects { gap:10px; }
 .founders-project { padding:15px; }
 .founders-project strong { font-size:17px; }
 .founders-filters { gap:12px; }
 .founders-filters label { flex:1; min-width:120px; }
 .founders-filters .founders-filter-restaurant { flex-basis:100%; }
 .founders-section-heading { flex-wrap:wrap; }
 .std-metrics.metric-grid.founders-olap-metrics { grid-template-columns:1fr; }
 .founders-metric { font-size:20px; }
 .founders-rank-row { grid-template-columns:1fr; gap:10px; }
 .founders-rank-name { flex-direction:row; justify-content:space-between; }
 .founders-pair-line { grid-template-columns:minmax(30px,1fr) 116px; gap:8px; font-size:11px; }
 .founders-detail-grid { grid-template-columns:1fr; }
 .founders-restaurant summary strong { float:none; display:block; margin:10px 0 0 16px; }
}

/* Founders history and ABC: shared filters, readable numeric comparisons. */
.founders-report-nav {display:flex;gap:8px;flex-wrap:wrap;margin:0 0 24px;padding:6px;border:1px solid #dfe6f0;border-radius:14px;background:#fff;}
.founders-report-nav a {padding:11px 16px;border-radius:9px;text-decoration:none;color:#52637d;font-weight:600;}
.founders-report-nav a[aria-current="page"] {background:#eaf1ff;color:#2368d7;}
.founders-report-nav a:hover {background:#f1f5fa;}
.founders-table-scroll {overflow-x:auto;max-width:100%;}
.founders-data-table {width:100%;border-collapse:collapse;font-size:14px;font-variant-numeric:tabular-nums;}
.founders-data-table th,.founders-data-table td {padding:14px 12px;border-bottom:1px solid #e8edf4;text-align:right;white-space:nowrap;}
.founders-data-table th:first-child {text-align:left;white-space:normal;min-width:180px;max-width:310px;}
.founders-data-table thead th {color:#718096;font-weight:600;background:#f7f9fc;}
.founders-data-table tbody th {font-weight:600;}
.founders-data-table tbody tr:hover {background:#f8faff;}
.founders-data-table small {display:block;color:#8090a6;margin-top:4px;font-weight:400;}
.founders-data-table a {color:#2468d7;text-decoration:none;}
.founders-abc-badge {display:inline-block;border-radius:7px;background:#f0f3f8;color:#66758c;min-width:30px;padding:4px 8px;text-align:center;font-weight:700;}
.founders-abc-badge.abc-A {background:#e6f6ee;color:#197348;}
.founders-abc-badge.abc-B {background:#eaf1ff;color:#2468d7;}
.founders-abc-badge.abc-C {background:#fff3dc;color:#946600;}
.founders-pagination {display:flex;justify-content:center;gap:24px;align-items:center;padding:20px 0 0;color:#718096;font-size:14px;}
.founders-pagination a {color:#2468d7;text-decoration:none;}
.founders-rank-name small {display:block;color:#718096;margin-top:4px;}
@media(max-width:600px) {.founders-report-nav a{font-size:13px;padding:10px;flex:1 0 40%;text-align:center}.founders-data-table{font-size:13px}.founders-pagination{gap:12px}}

/* Keep report navigation and table headings available while reading long reports. */
.founders-interface .main { min-width:0; }
.founders-report-nav { position:sticky; top:0; z-index:20; box-shadow:0 5px 18px #182c4910; }
.founders-report-nav a { display:flex; align-items:center; justify-content:center; min-height:44px; }
.founders-table-scroll { max-height:72vh; max-height:calc(100dvh - 180px); overflow:auto; scrollbar-gutter:stable; scroll-padding-top:80px; border-radius:9px; }
.founders-table-scroll:focus-visible { outline:2px solid #3475eb; outline-offset:4px; }
.founders-data-table { border-collapse:separate; border-spacing:0; }
.founders-data-table thead th { position:sticky; top:var(--founders-heading-offset, 0px); z-index:3; box-shadow:0 1px #dce4ef; }
.founders-data-table th:first-child { position:sticky; left:0; z-index:2; background:white; box-shadow:1px 0 #e8edf4; }
.founders-data-table thead th:first-child { z-index:4; background:#f7f9fc; }
.founders-data-table tbody tr:hover th { background:#f8faff; }
.founders-filter-drawer { margin-top:24px; }
.founders-filter-drawer summary { cursor:pointer; color:#30445f; font-size:15px; font-weight:650; padding:16px; }
.founders-filter-drawer summary span { display:block; margin-top:7px; font-size:13px; font-weight:400; overflow-wrap:anywhere; }
.founders-filter-drawer .founders-filters { margin-top:0; }
@media(min-width:761px) { .founders-filter-drawer[open] > summary { display:none; } }

@media(max-width:760px) {
    .founders-viewer .sidebar nav { display:none; }
    .founders-viewer .brand { padding:0 16px; }
    .founders-viewer .topbar { position:absolute; top:0; right:0; width:auto; background:transparent; border:0; }
    .founders-viewer .topbar .user-area > div { display:none; }
    .founders-viewer .logout-button { color:#d3deed; font-size:14px; min-height:44px; padding:0 8px; margin:0; }
    .founders-interface .content { padding:20px 12px 40px; }
    .founders-interface .page-header { margin-bottom:18px; gap:12px; }
    .founders-interface .page-header h1 { font-size:24px; line-height:1.2; }
    .founders-interface .page-header p { font-size:14px; }
    .founders-report-nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; margin:0 -4px 18px; padding:5px; border-radius:0 0 12px 12px; }
    .founders-report-nav a { min-width:0; padding:9px 8px; font-size:13px; line-height:1.25; text-align:center; }
    .founders-meta { font-size:12px; gap:6px; margin-bottom:14px; }
    .founders-meta strong { font-size:14px; overflow-wrap:anywhere; }
    .founders-filter-drawer { border:1px solid #dce4ef; border-radius:12px; background:white; margin-top:16px; }
    .founders-filter-drawer .founders-filters { border:0; border-top:1px solid #edf1f6; border-radius:0 0 12px 12px; padding:16px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 12px; }
    .founders-interface .founders-filters label { min-width:0; max-width:100%; }
    .founders-filter-drawer .founders-filter-restaurant, .founders-filter-drawer label:first-of-type, .founders-filter-drawer .primary-button { grid-column:1 / -1; }
    .founders-interface .founders-filters input, .founders-interface .founders-filters select { font-size:16px; height:46px; }
    .founders-interface .founders-filters .primary-button { min-height:46px; width:100%; }
    .founders-interface .metric-grid { gap:10px; }
    .founders-interface .metric-card { padding:16px; min-width:0; }
    .founders-interface .metric-note { font-size:12px; overflow-wrap:anywhere; }
    .founders-section-heading { margin-top:22px; gap:10px; flex-wrap:wrap; }
    .founders-section-heading h2 { font-size:17px; line-height:1.4; }
    .founders-interface .panel.founders-table-panel { padding:0; border:0; background:transparent; }
    .founders-table-panel .panel-header { padding:0 4px; }
    .founders-table-scroll { max-height:none; overflow:visible; scrollbar-gutter:auto; border-radius:0; }
    .founders-data-table, .founders-data-table tbody { display:block; width:100%; }
    .founders-data-table thead { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
    .founders-data-table tbody tr { position:relative; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 18px; margin-bottom:14px; padding:18px; background:white; border:1px solid #dce4ef; border-radius:14px; }
    .founders-data-table tbody th:first-child { position:static; z-index:auto; grid-column:1 / -1; order:-2; min-width:0; max-width:none; padding:0; background:transparent; box-shadow:none; border:0; font-size:16px; line-height:1.4; overflow-wrap:anywhere; }
    .founders-abc-table tbody th:first-child { padding-right:44px; }
    .founders-data-table tbody td { display:block; padding:0; border:0; min-width:0; text-align:left; font-size:15px; line-height:1.45; white-space:normal; overflow-wrap:anywhere; }
    .founders-data-table tbody td[data-label]::before { content:attr(data-label); display:block; color:#708099; font-size:12px; line-height:1.35; margin-bottom:4px; font-weight:400; }
    .founders-data-table tbody td[data-label="Выручка"] { grid-column:1 / -1; order:-1; font-size:22px; font-weight:700; letter-spacing:-.02em; padding-bottom:12px; border-bottom:1px solid #edf1f6; }
    .founders-abc-table td[data-label="Группа"] { position:absolute; top:18px; right:18px; }
    .founders-abc-table tbody td[data-label="Группа"]::before { display:none; }
    .founders-data-table .founders-abc-combined, .founders-data-table .founders-table-empty { grid-column:1 / -1; }
    .founders-pagination { flex-wrap:wrap; gap:12px; padding-top:8px; }
    .founders-pagination a { padding:12px 16px; min-height:44px; background:white; border:1px solid #dce4ef; border-radius:9px; }
    .founders-pagination span { flex-basis:100%; order:1; text-align:center; font-size:12px; }
    .founders-interface .founders-method { font-size:13px; margin-top:24px; }
    .founders-interface .founders-panel, .founders-interface .founders-details { scroll-margin-top:112px; }
}

.working-delivery-form { display:flex; flex-wrap:wrap; gap:16px; align-items:end; }
.working-delivery-form label { display:flex; flex-direction:column; gap:8px; flex:1 1 220px; min-width:0; }
.working-delivery-form input, .working-delivery-form select { width:100%; min-height:44px; font-size:16px; }
@media (max-width:640px) { .working-delivery-form .primary-button { width:100%; } }
