:root {
    --bg: #f4f6f5;
    --surface: #ffffff;
    --surface-2: #eef3f1;
    --text: #17201c;
    --muted: #607069;
    --line: #d8e0dd;
    --primary: #147c72;
    --primary-strong: #0f625b;
    --warning: #b7791f;
    --danger: #b42318;
    --success: #237a3b;
    --shadow: 0 12px 30px rgba(25, 40, 35, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
    background: #182522;
    color: #f7fbf9;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: sticky;
    top: 0;
    height: 100vh;
}

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

.sidebar-menu {
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    background: #49b6a8;
    color: #0d201d;
    border-radius: 8px;
}

.brand-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 8px;
    background: #ffffff;
    padding: 4px;
}

.mobile-menu-button {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font: inherit;
    font-weight: 800;
}

.nav {
    display: grid;
    gap: 8px;
}

.nav a,
.logout button {
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #c9d8d3;
    padding: 11px 12px;
    font: inherit;
    text-align: left;
}

.nav a.active,
.nav a:hover,
.logout button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.logout {
    margin-top: auto;
    display: grid;
    gap: 8px;
    color: #9fb2ac;
    font-size: 14px;
}

.content {
    padding: 32px;
    max-width: 1320px;
    width: 100%;
}

.page-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 22px;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1 {
    font-size: 34px;
    line-height: 1.12;
}

h2 {
    font-size: 18px;
}

h3 {
    font-size: 15px;
}

.eyebrow {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    margin-bottom: 8px;
}

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

.exchange-rates {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 22px;
}

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

.exchange-rates-head .eyebrow {
    margin-bottom: 4px;
}

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

.exchange-rate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-height: 70px;
    padding: 12px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.exchange-rate-item span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.exchange-rate-item strong {
    display: block;
    margin-top: 3px;
    font-size: 18px;
}

.exchange-rate-values {
    text-align: right;
    white-space: nowrap;
}

.exchange-rate-values strong {
    color: var(--primary-strong);
    font-size: 16px;
}

.exchange-rate-empty {
    color: var(--muted);
    font-weight: 700;
}

.compact-rates {
    margin-bottom: 0;
    padding: 14px 0;
    border-width: 1px 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.compact-rates .exchange-rates-head {
    margin-bottom: 10px;
}

.compact-rates .exchange-rate-grid {
    gap: 8px;
}

.compact-rates .exchange-rate-item {
    min-height: auto;
    padding: 10px;
    background: #f4fbf9;
}

.stat,
.panel,
.login-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.stat {
    padding: 18px;
}

.stat span {
    color: var(--muted);
    font-size: 13px;
}

.stat strong {
    display: block;
    margin-top: 8px;
    font-size: 30px;
}

.stat.warning strong {
    color: var(--warning);
}

.stat.danger strong {
    color: var(--danger);
}

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

.panel.narrow {
    max-width: 640px;
}

.panel.narrow-form {
    max-width: 680px;
}

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

.link {
    color: var(--primary);
    font-weight: 700;
}

.toolbar,
.inline-form {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    align-items: center;
}

.toolbar input {
    min-width: 280px;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 40px;
    border-radius: 8px;
    border: 1px solid var(--line);
    padding: 0 14px;
    background: var(--surface);
    color: var(--text);
    font-weight: 750;
    cursor: pointer;
    white-space: nowrap;
}

.button.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.button.primary:hover {
    background: var(--primary-strong);
}

.button:disabled,
button:disabled,
input[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.button[aria-busy="true"],
button[aria-busy="true"],
input[type="submit"][aria-busy="true"] {
    cursor: wait;
}

.button.secondary {
    background: var(--surface-2);
}

.button.small {
    min-height: 34px;
    padding: 0 10px;
    font-size: 13px;
}

.button.danger {
    color: var(--danger);
}

.button.full {
    width: 100%;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    padding: 10px 12px;
    font: inherit;
}

textarea {
    resize: vertical;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.field-help {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.form-grid {
    display: grid;
    gap: 14px;
}

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

.form-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.span-2 {
    grid-column: span 2;
}

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

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

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

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

td span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-top: 3px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 0 10px;
    font-weight: 800;
    font-size: 12px;
    color: #23302b;
    background: #e7ece9;
}

.badge.due_soon {
    background: #fff3cf;
    color: #765112;
}

.badge.overdue {
    background: #ffe2df;
    color: #9c2117;
}

.badge.urgency-overdue,
.badge.urgency-today {
    background: #ffe2df;
    color: #9c2117;
}

.badge.urgency-critical {
    background: #ffe8d7;
    color: #9a3412;
}

.badge.urgency-warning {
    background: #fff3cf;
    color: #765112;
}

.badge.urgency-watch {
    background: #e0f2fe;
    color: #075985;
}

.badge.active {
    background: #dff4e6;
    color: #1d6732;
}

.badge.renewed {
    background: #ddeaff;
    color: #214f8f;
}

.badge.cancelled {
    background: #e9e8e6;
    color: #635f5a;
}

td.actions {
    text-align: right;
    white-space: nowrap;
}

.actions form {
    display: inline-flex;
    margin: 0;
    margin-left: 8px;
}

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

.renewal-item {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
    position: relative;
}

.renewal-item.urgency-watch {
    border-left: 5px solid #38bdf8;
    --pulse-color: rgba(56, 189, 248, 0.24);
    animation: renewal-pulse 3.2s ease-out infinite;
}

.renewal-item.urgency-warning {
    border-left: 5px solid #f59e0b;
    --pulse-color: rgba(245, 158, 11, 0.28);
    animation: renewal-pulse 2.6s ease-out infinite;
}

.renewal-item.urgency-critical {
    border-left: 5px solid #f97316;
    --pulse-color: rgba(249, 115, 22, 0.34);
    animation: renewal-pulse 2s ease-out infinite;
}

.renewal-item.urgency-today,
.renewal-item.urgency-overdue {
    border-left: 5px solid #dc2626;
    background: #fffafa;
    --pulse-color: rgba(220, 38, 38, 0.38);
    animation: renewal-pulse 1.55s ease-out infinite;
}

.renewal-item.urgency-today .renewal-summary,
.renewal-item.urgency-overdue .renewal-summary {
    background: #fff5f5;
}

.badge.urgency-critical,
.badge.urgency-today,
.badge.urgency-overdue {
    animation: badge-pulse 1.45s ease-in-out infinite;
}

@keyframes renewal-pulse {
    0% {
        box-shadow: 0 0 0 0 var(--pulse-color);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

@keyframes badge-pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.06);
    }
}

.renewal-summary {
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) minmax(220px, 1.2fr) 120px 120px 80px;
    gap: 14px;
    align-items: center;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
}

.renewal-summary-readonly {
    grid-template-columns: minmax(260px, 1.6fr) minmax(220px, 1.2fr) 120px 120px;
    cursor: default;
}

.renewal-summary::-webkit-details-marker {
    display: none;
}

.renewal-summary small,
.detail-grid span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.renewal-summary strong {
    display: block;
    line-height: 1.22;
}

.renewal-company strong,
.renewal-title strong {
    overflow-wrap: anywhere;
}

.renewal-toggle {
    justify-self: end;
    color: var(--primary);
    font-weight: 850;
}

.renewal-toggle::after {
    content: " +";
}

.renewal-item[open] .renewal-toggle::after {
    content: " -";
}

.renewal-details {
    display: grid;
    gap: 16px;
    padding: 0 18px 18px;
    border-top: 1px solid var(--line);
    background: #fbfcfb;
}

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

.detail-grid strong {
    display: block;
    line-height: 1.25;
}

.detail-grid em {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

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

.renewal-item > .renewal-actions {
    padding: 0 18px 16px;
}

.renewal-actions form {
    margin: 0;
}

.empty,
.alert {
    border-radius: 8px;
    padding: 14px 16px;
}

.empty {
    background: var(--surface-2);
    color: var(--muted);
}

.alert {
    margin-bottom: 16px;
    border: 1px solid var(--line);
    background: #eef7f5;
    color: var(--primary-strong);
}

.alert.error {
    background: #fff0ee;
    color: var(--danger);
}

.alert.success {
    background: #edf8ef;
    color: var(--success);
}

.grid-2 {
    display: grid;
    grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
    gap: 20px;
}

.customers-layout {
    grid-template-columns: minmax(360px, 500px) minmax(0, 1fr);
    align-items: start;
}

.single-panel {
    display: grid;
    gap: 20px;
}

.stack {
    display: grid;
    gap: 10px;
}

.customer-row {
    display: grid;
    gap: 4px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.customer-row-head,
.customer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.customer-actions form {
    margin: 0;
}

.customer-row span,
.muted {
    color: var(--muted);
}

.definition-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
}

.definition-edit-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(110px, 150px) auto;
    gap: 10px;
    align-items: end;
}

.period-edit-form {
    grid-template-columns: minmax(130px, 1fr) 92px minmax(90px, 120px) auto;
}

.group-edit-form {
    grid-template-columns: minmax(0, 1fr) auto;
}

.definition-delete-form {
    margin: 0;
}

.log-board {
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.log-file-row {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.log-file-row.active,
.log-file-row:hover {
    border-color: rgba(20, 124, 114, 0.45);
    background: #eef7f5;
}

.log-file-row span {
    color: var(--muted);
    font-size: 13px;
}

.log-detail-panel {
    min-width: 0;
}

.log-lines {
    max-height: 560px;
    overflow: auto;
    margin: 16px 0 0;
    padding: 14px;
    border-radius: 8px;
    background: #111c1a;
    color: #dff3ef;
    font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

.contact-editor {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfb;
}

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

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

.contact-entry {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.reminder-entry {
    grid-template-columns: minmax(120px, 1fr) auto auto;
    align-items: end;
}

.reminder-entry .badge {
    align-self: center;
}

.reminder-entry button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.checkline {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.checkline input {
    width: auto;
    min-height: 0;
}

.user-board {
    align-items: start;
}

.user-active-check {
    align-self: end;
    min-height: 48px;
}

.permission-box {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfb;
}

.permission-groups {
    display: grid;
    gap: 12px;
}

.permission-group {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.permission-group legend {
    padding: 0 6px;
    color: var(--text);
    font-weight: 850;
}

.user-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.customer-contacts {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.customer-contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    background: var(--surface-2);
}

.customer-contact span:first-child {
    display: grid;
    gap: 2px;
}

.parasut-search {
    display: grid;
    gap: 10px;
    margin: 14px 0 18px;
    padding: 14px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.customer-create-panel {
    display: grid;
    gap: 16px;
    align-content: start;
}

.customer-create-panel > h2 {
    font-size: 21px;
}

.customer-create-panel .form-grid {
    gap: 12px;
}

.customer-request-box {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(20, 124, 114, 0.2);
    border-radius: 8px;
    background: #f4fbf9;
}

.customer-request-copy {
    display: grid;
    gap: 5px;
}

.customer-request-copy strong {
    color: var(--text);
    font-size: 16px;
    line-height: 1.25;
}

.customer-request-copy span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.42;
}

.request-inline-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.request-inline-form label {
    gap: 5px;
    font-size: 12px;
}

.request-inline-form input,
.request-inline-form select {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 14px;
}

.request-inline-form .button {
    width: 100%;
    min-height: 40px;
}

.customer-parasut-search {
    margin: 0 0 2px;
    padding: 12px;
    background: #fbfcfb;
}

.customer-parasut-search label {
    gap: 6px;
}

.customer-parasut-search label > span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
}

.customer-parasut-search label > small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.customer-parasut-search input {
    min-height: 42px;
    font-size: 14px;
}

.suggestions {
    display: grid;
    gap: 8px;
}

.suggestions a,
.suggestion-empty,
.suggestion-item {
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #ffffff;
    padding: 10px 12px;
}

.suggestions a {
    color: var(--primary);
    font-weight: 800;
}

.suggestion-item {
    display: grid;
    gap: 4px;
    width: 100%;
    text-align: left;
    color: var(--text);
    cursor: pointer;
    font: inherit;
}

.suggestion-item:hover {
    border-color: var(--primary);
}

.suggestion-main {
    font-weight: 800;
}

.suggestion-meta,
.suggestion-empty {
    color: var(--muted);
    font-size: 13px;
}

.integration-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 14px 0 18px;
    color: var(--muted);
}

.disconnect-form {
    margin-top: 12px;
}

.settings-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    grid-template-areas:
        "brand brand"
        "mail side";
    gap: 18px;
}

.settings-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 20px;
}

.settings-card-brand {
    grid-area: brand;
}

.settings-card-mail {
    grid-area: mail;
}

.settings-side {
    grid-area: side;
    display: grid;
    gap: 18px;
    align-content: start;
}

.settings-form {
    margin-top: 16px;
}

.settings-section {
    display: grid;
    gap: 14px;
    padding-top: 18px;
    margin-top: 4px;
    border-top: 1px solid var(--line);
}

.logo-area {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(280px, 420px) 180px;
    gap: 14px;
    align-items: end;
    margin-top: 16px;
}

.logo-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px;
    gap: 12px;
    align-items: end;
}

.logo-remove {
    margin: 0;
}

.logo-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 82px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.settings-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.settings-note {
    display: grid;
    gap: 6px;
    padding: 14px;
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--muted);
}

.settings-note strong {
    color: var(--text);
}

.settings-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.settings-meta strong {
    color: var(--text);
}

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

.grapesjs-form {
    display: grid;
    gap: 0;
}

.grapesjs-toolbar {
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.grapesjs-save-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.grapesjs-enabled {
    min-height: 44px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.grapesjs-test-card {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(260px, 360px) auto;
    gap: 14px;
    align-items: end;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    background: #fbfcfb;
}

.grapesjs-test-card strong,
.grapesjs-test-card span {
    display: block;
}

.grapesjs-test-card strong {
    font-size: 15px;
}

.grapesjs-test-card span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.grapesjs-test-card input {
    min-height: 44px;
}

.grapesjs-fields {
    display: grid;
    gap: 14px;
    margin: 16px 20px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.placeholder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}

.placeholder-card,
.grapesjs-fields .gjs-block {
    display: grid;
    gap: 7px;
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    text-align: left;
    box-shadow: none;
    cursor: grab;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.placeholder-card:hover,
.grapesjs-fields .gjs-block:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.placeholder-card strong,
.gjs-field-block strong {
    display: block;
    font-size: 13px;
    font-weight: 850;
}

.placeholder-card code,
.gjs-field-block code {
    display: inline-flex;
    width: fit-content;
    padding: 4px 7px;
    border-radius: 6px;
    background: #e8f7f4;
    color: var(--primary-strong);
    font-size: 12px;
    font-weight: 800;
}

.placeholder-card span,
.gjs-field-block small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.35;
}

.grapesjs-fields .gjs-block-label {
    font: inherit;
    color: inherit;
}

.grapesjs-fields .gjs-blocks-c {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
    min-height: 0;
}

.grapesjs-fields .gjs-block-category,
.grapesjs-fields .gjs-title,
.grapesjs-fields .gjs-caret-icon {
    display: none;
}

.grapesjs-shell {
    min-height: 720px;
    border-top: 1px solid var(--line);
    background: #2f3a36;
}

.grapesjs-editor {
    min-height: 720px;
}

.gjs-one-bg {
    background-color: #182522;
}

.gjs-two-color {
    color: #dbe7e3;
}

.gjs-three-bg {
    background-color: #147c72;
}

.gjs-four-color,
.gjs-four-color-h:hover {
    color: #43b8aa;
}

.logo-preview img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--surface-2);
    padding: 8px;
}

.compact {
    font-size: 13px;
}

.public {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #eef3f1;
}

.public-stack {
    width: min(100%, 460px);
    display: grid;
    gap: 16px;
}

.public-stack:has(.customer-info-public) {
    width: min(100%, 860px);
}

.login-panel {
    width: 100%;
    padding: 28px;
    display: grid;
    gap: 24px;
}

.customer-info-public {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.login-heading {
    display: grid;
    gap: 10px;
}

.login-fish-icon {
    width: 48px;
    height: 48px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(20, 124, 114, 0.28);
    border-radius: 999px;
    color: var(--primary);
    background: #f4fbf9;
}

.login-fish-icon svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-panel h1 {
    font-size: 30px;
}

.login-help-link {
    color: var(--primary);
    font-weight: 800;
    text-align: center;
}

.login-help-link:hover {
    color: var(--primary-strong);
}

.info-request-list {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    padding: 12px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.info-request-list div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(100px, auto);
    align-items: center;
    gap: 8px;
}

.info-request-list strong,
.info-request-list small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: sticky;
        z-index: 30;
        height: auto;
        top: 0;
        padding: 12px 16px;
        gap: 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 10px 24px rgba(10, 24, 20, 0.18);
    }

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

    .brand {
        min-width: 0;
        gap: 10px;
    }

    .brand span:last-child {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-menu-button {
        display: inline-flex;
        flex: 0 0 auto;
    }

    .sidebar-menu {
        display: none;
        gap: 12px;
        padding-top: 4px;
    }

    .sidebar.is-open .sidebar-menu {
        display: grid;
    }

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

    .nav a,
    .logout button {
        min-height: 44px;
        text-align: center;
    }

    .logout {
        margin-top: 0;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
    }

    .logout span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .logout button {
        padding-inline: 16px;
    }

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

    .exchange-rate-grid {
        grid-template-columns: 1fr;
    }

    .compact-rates .exchange-rate-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-2,
    .form-grid.two,
    .form-grid.three,
    .grapesjs-test-card,
    .request-inline-form {
        grid-template-columns: 1fr;
    }

    .definition-row,
    .definition-edit-form,
    .period-edit-form,
    .group-edit-form {
        grid-template-columns: 1fr;
    }

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

    .renewal-toggle {
        justify-self: start;
    }

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

    .settings-board {
        grid-template-columns: 1fr;
        grid-template-areas:
            "brand"
            "mail"
            "side";
    }

    .logo-area,
    .logo-form {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: span 1;
    }
}

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

    .sidebar {
        padding: 10px 12px;
    }

    .brand-logo,
    .brand-mark {
        width: 34px;
        height: 34px;
    }

    .brand span:last-child {
        font-size: 15px;
    }

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

    .page-title,
    .toolbar,
    .inline-form {
        align-items: stretch;
        flex-direction: column;
    }

    .toolbar input {
        min-width: 0;
    }

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

    .exchange-rates-head,
    .exchange-rate-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .exchange-rate-values {
        text-align: left;
        white-space: normal;
    }

    .compact-rates .exchange-rate-grid {
        grid-template-columns: 1fr;
    }

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

    .renewal-actions {
        justify-content: stretch;
    }

    .renewal-actions .button,
    .renewal-actions form {
        width: 100%;
    }

    .info-request-list div {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    h1 {
        font-size: 28px;
    }
}
