html, body {
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f4f0e8;
    color: #1f2a26;
}

/* Critical shell styles are global so the panel layout survives scoped CSS cache mismatches. */
.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

main {
    flex: 1;
}

.sidebar {
    background: #173b36;
    box-shadow: 1px 0 18px rgba(20, 32, 28, 0.12);
}

.sidebar .top-row {
    background-color: rgba(0, 0, 0, 0.18);
    min-height: 3.5rem;
}

.sidebar .navbar-brand {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0;
    text-decoration: none;
}

.sidebar .navbar-toggler {
    appearance: none;
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    height: 2.5rem;
    position: absolute;
    right: 1rem;
    top: 0.5rem;
    width: 3.5rem;
}

.sidebar .navbar-toggler:checked {
    background-color: rgba(255, 255, 255, 0.5);
}

.sidebar .nav-scrollable {
    display: none;
}

.sidebar .navbar-toggler:checked ~ .nav-scrollable {
    display: block;
}

.sidebar .bi {
    background-size: cover;
    display: inline-block;
    height: 1.25rem;
    margin-right: 0.75rem;
    position: relative;
    top: -1px;
    width: 1.25rem;
}

.sidebar .bi-house-door-fill-nav-menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-house-door-fill' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z'/%3E%3C/svg%3E");
}

.sidebar .bi-list-nested-nav-menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-list-nested' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4.5 11.5A.5.5 0 0 1 5 11h10a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 1 3h10a.5.5 0 0 1 0 1H1a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E");
}

.sidebar .bi-people-fill-nav-menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M7 14s-1 0-1-1 1-4 5-4 5 3 5 4-1 1-1 1H7Zm4-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm-5.216 6A2.238 2.238 0 0 1 5 13c0-1.355.68-2.75 1.936-3.72A6.325 6.325 0 0 0 5 9c-4 0-5 3-5 4s1 1 1 1h4.784ZM4.5 8a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z'/%3E%3C/svg%3E");
}

.sidebar .nav-item,
.sidebar .nav-section {
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
}

.sidebar .nav-item:first-of-type {
    padding-top: 1rem;
}

.sidebar .nav-link,
.sidebar .nav-group-toggle {
    align-items: center;
    background: none;
    border: none;
    border-radius: 4px;
    color: #d7d7d7;
    display: flex;
    min-height: 3rem;
    line-height: 1.2;
    text-align: left;
    text-decoration: none;
    width: 100%;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active,
.sidebar .nav-group-toggle:hover,
.sidebar .nav-group-toggle[aria-expanded="true"] {
    background-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.sidebar .nav-group-toggle span:nth-child(2) {
    flex: 1;
}

.sidebar .chevron {
    border-bottom: 2px solid currentColor;
    border-right: 2px solid currentColor;
    display: inline-block;
    height: 0.5rem;
    margin-left: auto;
    transform: rotate(45deg);
    width: 0.5rem;
}

.sidebar .chevron.open {
    transform: rotate(225deg);
}

.sidebar .submenu {
    border-left: 1px solid rgba(255, 255, 255, 0.22);
    display: none;
    margin: 0.15rem 0 0.25rem 1.6rem;
    padding-left: 0.7rem;
}

.sidebar .submenu.show {
    display: grid;
    gap: 0.25rem;
}

.sidebar .submenu-link {
    border-radius: 4px;
    color: #cbd8d4;
    display: block;
    font-size: 0.86rem;
    line-height: 1.2;
    padding: 0.65rem 0.75rem;
    text-decoration: none;
}

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

.sidebar .logout-form {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
}

.sidebar .logout-button {
    background: none;
    border: none;
    border-radius: 4px;
    color: #f1d7d2;
    min-height: 2.75rem;
    text-align: left;
    width: 100%;
}

main > .top-row {
    align-items: center;
    backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid #e4e0d7;
    display: flex;
    gap: 0.75rem;
    height: 3.5rem;
    justify-content: flex-end;
}

@media (min-width: 641px) {
    .page {
        flex-direction: row;
    }

    .sidebar {
        height: 100vh;
        position: sticky;
        top: 0;
        width: 250px;
    }

    .sidebar .navbar-toggler {
        display: none;
    }

    .sidebar .nav-scrollable {
        display: block;
        height: calc(100vh - 3.5rem);
        overflow-y: auto;
    }

    main > .top-row {
        position: sticky;
        top: 0;
        z-index: 1;
    }
}

input{
    border:1px solid silver!important;
}

a, .btn-link {
    color: #176b5d;
}

.btn-primary {
    color: #fff;
    background-color: #c95f2d;
    border-color: #b65125;
}

.btn-primary:hover {
    background-color: #ac4821;
    border-color: #9b3f1d;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #64b6a6;
}

.content {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

h1:focus {
    outline: none;
}

h1 {
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 0.7rem;
}

.lead {
    color: #59645f;
    max-width: 58rem;
}

.eyebrow {
    color: #c95f2d;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08rem;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
}

.hero-panel,
.tool-panel {
    display: grid;
    gap: 1.5rem;
    align-items: center;
    background: #fffaf2;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    padding: clamp(1.25rem, 3vw, 2.5rem);
    box-shadow: 0 18px 45px rgba(46, 35, 21, 0.08);
}

.hero-panel {
    grid-template-columns: minmax(0, 1fr) auto;
}

.hero-actions,
.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.metric-card {
    background: #ffffff;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    padding: 1rem;
}

.metric-card span,
.counter-readout span {
    display: block;
    color: #6c756f;
    font-size: 0.85rem;
}

.metric-card strong {
    display: block;
    font-size: 1.25rem;
    margin-top: 0.2rem;
}

.counter-readout {
    background: #173b36;
    border-radius: 8px;
    color: #fff;
    max-width: 18rem;
    padding: 1.25rem;
}

.counter-readout strong {
    display: block;
    font-size: 3rem;
    line-height: 1;
    margin-top: 0.35rem;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.language-selector,
.domain-selector {
    align-items: center;
    display: inline-flex;
    gap: 0.4rem;
}

.language-label,
.domain-label {
    color: #59645f;
    font-size: 0.8rem;
    font-weight: 800;
    margin: 0;
}

.language-select,
.domain-select {
    background: #fffaf2;
    border: 1px solid #d9d1c3;
    border-radius: 8px;
    color: #1f2a26;
    font-size: 0.82rem;
    font-weight: 800;
    min-height: 2rem;
    padding: 0.25rem 0.5rem;
}

.domain-select {
    min-width: 12rem;
    max-width: 16rem;
}

.domain-picker-button {
    text-align: left;
}

.login-language-row {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.login-language-row .eyebrow {
    margin-bottom: 0;
}

.table {
    background: #fff;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    overflow: hidden;
}

.customer-table {
    box-shadow: 0 18px 45px rgba(46, 35, 21, 0.06);
}

.customer-table th {
    color: #59645f;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.data-grid-panel {
    background: #fffaf2;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(46, 35, 21, 0.06);
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
    padding: 1rem;
}

.data-grid-toolbar {
    align-items: end;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.data-grid-toolbar h2 {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0;
}

.grid-search {
    min-width: min(100%, 22rem);
}

.product-toolbar-actions {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.data-grid-meta {
    align-items: center;
    color: #59645f;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.86rem;
    gap: 0.65rem;
    justify-content: space-between;
}

.data-grid-scroll {
    overflow-x: auto;
}

.professional-grid {
    margin: 0;
    min-width: 58rem;
}

.professional-grid tbody tr:hover {
    background: #f6f1e8;
}

.grid-sort-button {
    align-items: center;
    background: transparent;
    border: 0;
    color: inherit;
    display: inline-flex;
    font: inherit;
    gap: 0.25rem;
    padding: 0;
    text-align: left;
    text-transform: inherit;
}

.grid-sort-button:hover {
    color: #176b5d;
}

.grid-type-pill {
    background: #dceee7;
    border-radius: 999px;
    color: #176b5d;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.3rem 0.65rem;
}

.seo-url-cell {
    color: #42504a;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.86rem;
    overflow-wrap: anywhere;
}

.muted-line {
    color: #6c756f;
    display: block;
    font-size: 0.82rem;
    margin-top: 0.2rem;
}

.customer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}

.status-pill {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.3rem 0.65rem;
}

.status-pill.active {
    background: #dceee7;
    color: #176b5d;
}

.status-pill.passive {
    background: #ece7dd;
    color: #6b6256;
}

.status-pill.danger {
    background: #f7dddd;
    color: #9d2f2f;
}

.status-pill.success {
    background: #dcfce7;
    color: #166534;
}

.json-import-panel {
    border-top: 1px solid #e2e8f0;
    display: grid;
    gap: 0.7rem;
    margin-top: 1rem;
    padding-top: 1rem;
}

.panel-title.compact h3 {
    font-size: 1rem;
}

.json-import-textarea {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    min-height: 220px;
    resize: vertical;
}

.json-import-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.json-import-panel small {
    color: #64748b;
    line-height: 1.45;
}

.admin-question-review {
    align-items: stretch;
}

.admin-review-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.admin-review-toolbar .form-select {
    max-width: 220px;
}

.admin-question-review-list {
    display: grid;
    gap: 0.85rem;
}

.admin-question-card {
    border: 1px solid #d8e2ef;
    border-radius: 8px;
    background: #ffffff;
    padding: 1rem;
}

.admin-question-card header,
.admin-question-card footer,
.admin-question-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    justify-content: space-between;
}

.admin-question-actions {
    justify-content: flex-end;
}

.admin-question-prompt {
    margin-top: 0.85rem;
}

.question-visual {
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #ffffff;
    margin-bottom: 0.8rem;
    overflow: hidden;
    padding: 0.75rem;
}

.question-visual svg {
    display: block;
    height: auto;
    max-height: 320px;
    max-width: 100%;
    width: 100%;
}

.admin-choice-list {
    display: grid;
    gap: 0.45rem;
    margin-top: 0.85rem;
}

.admin-choice {
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: 0.55rem;
    align-items: start;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.65rem;
    background: #f8fafc;
}

.admin-choice span {
    display: inline-grid;
    place-items: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #0f172a;
    font-weight: 800;
}

.admin-choice.correct {
    border-color: #86efac;
    background: #f0fdf4;
}

.admin-choice.correct span {
    background: #22c55e;
    color: #ffffff;
}

.admin-question-explanation {
    margin-top: 0.85rem;
    border-left: 4px solid #2563eb;
    background: #eff6ff;
    padding: 0.75rem;
}

.admin-question-card footer {
    justify-content: flex-start;
    color: #64748b;
    font-size: 0.86rem;
    margin-top: 0.85rem;
}

.form-panel {
    align-items: stretch;
}

.filter-panel {
    align-items: stretch;
    gap: 0.75rem;
}

.filter-panel h1 {
    font-size: 1.25rem;
}

.filter-count {
    align-items: center;
    color: #59645f;
    display: inline-flex;
    font-size: 0.92rem;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.form-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.login-shell {
    display: grid;
    min-height: calc(100vh - 7rem);
    place-items: center;
}

.login-panel {
    background: #fffaf2;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(46, 35, 21, 0.08);
    max-width: 28rem;
    padding: 2rem;
    width: 100%;
}

.permission-grid {
    background: #fff;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

.permission-grid label {
    align-items: center;
    display: flex;
    gap: 0.55rem;
}

.permission-title {
    color: #59645f;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.user-switches {
    display: grid;
    gap: 0.8rem;
    align-content: center;
}

.image-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
}

.image-grid.compact {
    grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
    margin-top: 1rem;
}

.image-card {
    background: #fff;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    overflow: hidden;
}

.image-card img {
    aspect-ratio: 4 / 3;
    background: #ece7dd;
    display: block;
    object-fit: cover;
    width: 100%;
}

.image-card div {
    display: grid;
    gap: 0.25rem;
    padding: 0.75rem;
}

.image-card span {
    color: #6c756f;
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}

.image-actions {
    margin-top: 0.35rem;
}

.inline-editor {
    background: #f6f1e8;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    display: grid;
    gap: 0.75rem;
    margin-top: 0.5rem;
    padding: 0.75rem;
}

.image-select {
    max-width: 20rem;
}

.media-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
    margin-bottom: 1rem;
}

.upload-drop {
    align-items: center;
    background: #fff;
    border: 1px dashed #b9ad9b;
    border-radius: 8px;
    display: grid;
    gap: 0.65rem;
    padding: 1rem;
}

.upload-drop span {
    color: #59645f;
    font-size: 0.9rem;
}

.selected-file {
    background: #f6f1e8;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    display: grid;
    gap: 0.2rem;
    padding: 0.75rem;
}

.selected-file strong {
    overflow-wrap: anywhere;
}

.selected-file span {
    color: #59645f;
    font-size: 0.85rem;
}

.category-picker,
.category-tree {
    background: #fff;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    display: grid;
    gap: 0.55rem;
    padding: 1rem;
}

.category-picker label {
    align-items: center;
    display: flex;
    gap: 0.5rem;
}

.media-choice {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
}

.primary-choice {
    color: #176b5d;
    font-size: 0.8rem;
    font-weight: 800;
}

.content-media-panel {
    background: #fff;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

.content-edit-panel {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.content-type-step {
    background: #fffaf2;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(46, 35, 21, 0.06);
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.content-type-step-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.content-type-step-header h2 {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0;
}

.content-type-card-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
}

.content-type-card {
    background: #fff;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    color: #1f2a26;
    display: grid;
    gap: 0.35rem;
    min-height: 6rem;
    padding: 1rem;
    text-align: left;
}

.content-type-card:hover {
    background: #dceee7;
    border-color: #a7d2c2;
}

.content-type-card span {
    font-size: 1rem;
    font-weight: 800;
}

.content-type-card strong {
    color: #59645f;
    font-size: 0.86rem;
}

.content-media-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
}

.selected-media-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.selected-media-thumb {
    align-items: center;
    background: #f6f1e8;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    display: flex;
    gap: 0.5rem;
    max-width: 16rem;
    padding: 0.45rem 0.6rem;
}

.selected-media-thumb.primary {
    border-color: #176b5d;
    box-shadow: 0 0 0 2px rgba(23, 107, 93, 0.12);
}

.selected-media-thumb img {
    aspect-ratio: 1;
    border-radius: 6px;
    height: 2.5rem;
    object-fit: cover;
    width: 2.5rem;
}

.selected-media-thumb span {
    font-size: 0.85rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.modal-backdrop-custom {
    align-items: center;
    background: rgba(23, 29, 27, 0.55);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 1.25rem;
    position: fixed;
    z-index: 1050;
}

.edit-modal {
    background: #fffaf2;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    box-shadow: 0 1.5rem 4rem rgba(23, 29, 27, 0.24);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    max-height: min(92vh, 60rem);
    max-width: 76rem;
    overflow: hidden;
    width: min(100%, 76rem);
}

.edit-modal-header,
.edit-modal-footer {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1.1rem;
}

.edit-modal-header {
    border-bottom: 1px solid #e6dac9;
}

    .edit-modal-header h2 {
        font-size: 1.3rem;
        font-weight: 800;
        margin: 0;
    }

.edit-modal-body {
    display: grid;
    gap: 1rem;
    min-height: 0;
    overflow: auto;
    padding: 1rem 1.1rem 1.1rem;
}




.media-modal {
    background: #fffaf2;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    box-shadow: 0 1.5rem 4rem rgba(23, 29, 27, 0.24);
    display: grid;
    gap: 1rem;
    max-height: min(88vh, 58rem);
    max-width: 72rem;
    overflow: hidden;
    width: min(100%, 72rem);
}

.media-modal-header,
.media-modal-footer {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1.1rem;
}

.media-modal-header {
    border-bottom: 1px solid #e6dac9;
}

.media-modal-header h2 {
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0;
}

.media-modal-body {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(12rem, 16rem) 1fr;
    min-height: 0;
    overflow: hidden;
    padding: 0 1.1rem;
}

.media-category-sidebar {
    border-right: 1px solid #e6dac9;
    display: grid;
    gap: 0.4rem;
    max-height: 58vh;
    overflow: auto;
    padding-right: 1rem;
}

.media-upload-toggle {
    width: 100%;
}

.media-category-button {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #42504a;
    font-weight: 700;
    padding: 0.55rem 0.7rem;
    text-align: left;
}

.media-category-button.active,
.media-category-button:hover {
    background: #dceee7;
    border-color: #a7d2c2;
    color: #176b5d;
}

.media-modal-gallery {
    max-height: 58vh;
    overflow: auto;
    padding-right: 0.25rem;
}

.modal-upload-panel {
    background: #fff;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    display: grid;
    gap: 0.8rem;
    margin-bottom: 1rem;
    padding: 1rem;
}

.upload-preview-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
}

.upload-preview-card {
    background: #f6f1e8;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    display: grid;
    gap: 0.4rem;
    overflow: hidden;
}

.upload-preview-card img {
    aspect-ratio: 4 / 3;
    background: #ece7dd;
    object-fit: cover;
    width: 100%;
}

.upload-preview-card strong,
.upload-preview-card span {
    padding: 0 0.55rem;
}

.upload-preview-card span {
    color: #59645f;
    font-size: 0.8rem;
    padding-bottom: 0.55rem;
}

.media-modal-footer {
    border-top: 1px solid #e6dac9;
}

.media-choice-card {
    border: 1px solid #e6dac9;
    border-radius: 8px;
    display: grid;
    overflow: hidden;
}

.media-choice-card.selected {
    border-color: #176b5d;
    box-shadow: 0 0 0 2px rgba(23, 107, 93, 0.14);
}

.media-choice-card img {
    aspect-ratio: 4 / 3;
    background: #ece7dd;
    object-fit: cover;
    width: 100%;
}

.media-choice-card div {
    display: grid;
    gap: 0.35rem;
    padding: 0.65rem;
}

.empty-state {
    background: #f6f1e8;
    border: 1px dashed #b9ad9b;
    border-radius: 8px;
    display: grid;
    gap: 0.5rem;
    padding: 1rem;
}

.empty-state span {
    color: #59645f;
}

.table-media-summary {
    align-items: center;
    display: flex;
    gap: 0.5rem;
}

.table-media-summary img {
    aspect-ratio: 1;
    border-radius: 6px;
    height: 2.5rem;
    object-fit: cover;
    width: 2.5rem;
}

.toast-stack {
    display: grid;
    gap: 0.75rem;
    max-width: min(26rem, calc(100vw - 2rem));
    position: fixed;
    right: 1rem;
    top: 1rem;
    z-index: 1200;
}

.app-toast {
    align-items: stretch;
    background: #fffaf2;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    box-shadow: 0 1rem 2.2rem rgba(23, 29, 27, 0.18);
    display: grid;
    grid-template-columns: 0.32rem minmax(0, 1fr) auto;
    min-height: 4rem;
    overflow: hidden;
}

.toast-accent {
    background: #176b5d;
}

.app-toast.success .toast-accent {
    background: #176b5d;
}

.app-toast.error .toast-accent {
    background: #b32121;
}

.app-toast.warning .toast-accent {
    background: #c95f2d;
}

.app-toast.info .toast-accent {
    background: #325f8f;
}

.toast-content {
    display: grid;
    gap: 0.15rem;
    padding: 0.75rem 0.85rem;
}

.toast-content strong {
    color: #1f2a26;
    font-size: 0.92rem;
}

.toast-content span {
    color: #59645f;
    font-size: 0.86rem;
}

.toast-close {
    align-self: start;
    background: transparent;
    border: 0;
    color: #6c756f;
    font-size: 1rem;
    line-height: 1;
    padding: 0.75rem;
}

.toast-close:hover {
    color: #1f2a26;
}

.selection-drawer-backdrop {
    background: rgba(23, 29, 27, 0.38);
    inset: 0;
    position: fixed;
    z-index: 1090;
}

.selection-drawer {
    background: #fffaf2;
    border-left: 1px solid #e6dac9;
    box-shadow: -1rem 0 2.5rem rgba(23, 29, 27, 0.2);
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    height: 100vh;
    max-width: min(100vw, 34rem);
    position: fixed;
    right: 0;
    top: 0;
    transform: translateX(100%);
    transition: transform 180ms ease;
    width: min(34rem, 100vw);
    z-index: 1100;
}

.selection-drawer.open {
    transform: translateX(0);
}

.selection-drawer-header,
.selection-drawer-footer {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem;
}

.selection-drawer-header {
    border-bottom: 1px solid #e6dac9;
}

.selection-drawer-header h2 {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0;
}

.selection-drawer-search {
    padding: 1rem 1rem 0;
}

.selection-drawer-meta {
    color: #59645f;
    display: flex;
    font-size: 0.86rem;
    font-weight: 800;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.75rem 1rem;
}

.selection-drawer-list {
    display: grid;
    gap: 0.5rem;
    overflow: auto;
    padding: 0 1rem 1rem;
}

.selection-drawer-item {
    align-items: center;
    background: #fff;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    color: #1f2a26;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 2rem minmax(0, 1fr);
    padding: 0.75rem;
    text-align: left;
}

.selection-drawer-item:hover,
.selection-drawer-item.selected {
    background: #dceee7;
    border-color: #a7d2c2;
}

.selection-check {
    align-items: center;
    background: #f6f1e8;
    border: 1px solid #d9d1c3;
    border-radius: 999px;
    color: #176b5d;
    display: inline-flex;
    font-weight: 900;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.selection-drawer-item strong,
.selection-drawer-item small,
.selection-drawer-item em {
    display: block;
}

.selection-drawer-item small {
    color: #59645f;
    font-size: 0.82rem;
    margin-top: 0.1rem;
}

.selection-drawer-item em {
    color: #176b5d;
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 800;
    margin-top: 0.25rem;
}

.selection-drawer-footer {
    border-top: 1px solid #e6dac9;
}

.selected-summary {
    background: #f6f1e8;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    color: #59645f;
    display: grid;
    gap: 0.25rem;
    padding: 0.7rem 0.75rem;
}

.selected-summary strong {
    color: #1f2a26;
}

.note-panel {
    background: #fff;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
}

.note-panel-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.note-panel-header h2 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
}

.note-panel-header span {
    color: #59645f;
    font-size: 0.86rem;
    font-weight: 800;
}

.note-compose {
    display: grid;
    gap: 0.65rem;
}

.note-list {
    display: grid;
    gap: 0.65rem;
}

.note-card {
    background: #f6f1e8;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    display: grid;
    gap: 0.45rem;
    padding: 0.8rem;
}

.note-card div {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.note-card strong {
    color: #1f2a26;
}

.note-card span {
    color: #59645f;
    font-size: 0.78rem;
    font-weight: 800;
}

.note-card p {
    margin: 0;
    white-space: pre-wrap;
}

.note-card .btn {
    justify-self: end;
}

@media (max-width: 760px) {
    .media-modal-body {
        grid-template-columns: 1fr;
    }

    .media-category-sidebar {
        border-right: 0;
        border-bottom: 1px solid #e6dac9;
        max-height: 12rem;
        padding: 0 0 1rem;
    }
}

.category-picker.compact {
    max-height: 12rem;
    overflow: auto;
    padding: 0.75rem;
}

.category-root-target {
    background: #f6f1e8;
    border: 1px dashed #b9ad9b;
    border-radius: 8px;
    color: #59645f;
    font-size: 0.85rem;
    padding: 0.65rem 0.75rem;
}

.category-node {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    cursor: grab;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.7rem 0.75rem;
}

.category-node.dragging {
    opacity: 0.55;
}

.category-node span {
    color: #6c756f;
    display: block;
    font-size: 0.8rem;
}

.mini-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-end;
}

.media-filter {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.tag-row {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0 !important;
}

.media-tag {
    background: #dceee7;
    border-radius: 999px;
    color: #176b5d !important;
    display: inline-flex;
    font-size: 0.75rem !important;
    font-weight: 800;
    padding: 0.25rem 0.55rem;
}

.permission-matrix {
    display: grid;
    gap: 0.85rem;
}

.product-editor form {
    display: grid;
    gap: 1rem;
}

.product-editor {
    min-width: 0;
}

.product-tab-bar {
    align-items: center;
    background: #f6f1e8;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    padding: 0.35rem;
}

.product-tab-button {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #42504a;
    flex: 0 0 auto;
    font-weight: 800;
    min-height: 2.25rem;
    padding: 0.45rem 0.8rem;
}

.product-tab-button.active,
.product-tab-button:hover {
    background: #173b36;
    border-color: #173b36;
    color: #fff;
}

.product-info-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-info-grid .span-2 {
    grid-column: 1 / -1;
}

.product-subpanel {
    background: #ffffff;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

.product-subpanel-heading {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
}

.product-subpanel-heading h2 {
    color: #1f2a26;
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
}

.product-row-grid {
    align-items: start;
    border-top: 1px solid #ece3d6;
    display: grid;
    gap: 0.6rem;
    grid-template-columns: minmax(11rem, 1.2fr) repeat(5, minmax(6.5rem, 1fr)) auto;
    padding-top: 0.75rem;
}

.product-row-grid.variant-grid {
    grid-template-columns: repeat(6, minmax(6.5rem, 1fr)) auto;
}

.product-row-grid .form-label {
    color: #59645f;
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.product-row-grid .row-action {
    align-self: end;
    padding-bottom: 0.05rem;
}

.appointment-panel {
    background: #fffaf2;
}

.appointment-product-grid {
    align-items: start;
    border-top: 1px solid #ece3d6;
    display: grid;
    gap: 0.6rem;
    grid-template-columns: minmax(14rem, 1.4fr) minmax(5rem, 0.5fr) minmax(8rem, 0.7fr) minmax(8rem, 0.7fr) auto;
    padding-top: 0.75rem;
}

.appointment-product-grid .form-label {
    color: #59645f;
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.appointment-product-grid .row-action {
    align-self: end;
}

.appointment-total {
    align-items: center;
    background: #f6f1e8;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 0.75rem;
}

.appointment-total span {
    color: #59645f;
    font-size: 0.86rem;
    font-weight: 800;
}

.appointment-total strong {
    color: #176b5d;
    font-size: 1.15rem;
}

.contact-list {
    display: grid;
    gap: 1rem;
}

.contact-card {
    background: #fffaf2;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    padding: 1rem;
}

.contact-card h2 {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 0.35rem;
}

.contact-card p {
    color: #59645f;
    margin-bottom: 0.25rem;
}

.tab-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tab-button {
    background: #fffaf2;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    color: #42504a;
    font-weight: 700;
    padding: 0.7rem 1rem;
}

.tab-button.active,
.tab-button:hover {
    background: #173b36;
    border-color: #173b36;
    color: #fff;
}

.rich-editor-shell {
    display: grid;
    gap: 0.5rem;
}

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

.rich-source-toggle {
    border: 1px solid #173b36;
    border-radius: 6px;
    padding: 0.4rem 0.65rem;
    color: #173b36;
    background: #f7f1e8;
    font-weight: 700;
}

.rich-source-toggle:hover {
    color: #fff;
    background: #173b36;
}

.rich-editor {
    background: #fff;
    border: 1px solid #d9d1c3;
    border-radius: 8px;
    overflow: hidden;
}

.rich-editor.source-hidden {
    display: none;
}

.rich-source-area {
    width: 100%;
    min-height: 17rem;
    border: 1px solid #d9d1c3;
    border-radius: 8px;
    padding: 1rem;
    color: #17231f;
    background: #fff;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.92rem;
    line-height: 1.5;
    resize: vertical;
}

.rich-source-area:focus {
    border-color: #2bb9a7;
    box-shadow: 0 0 0 0.2rem rgba(43, 185, 167, .14);
    outline: 0;
}

.ckeditor-wrapper .ck.ck-toolbar {
    background: #f7f1e8;
    border: 0;
    border-bottom: 1px solid #d9d1c3;
}

.ckeditor-wrapper .ck.ck-editor__main > .ck-editor__editable {
    border: 0;
    box-shadow: none;
    min-height: 13rem;
    padding: 1rem;
}

.ckeditor-wrapper .ck.ck-editor__editable.ck-focused {
    border: 0;
    box-shadow: inset 0 0 0 1px #2bb9a7;
}

.ckeditor-wrapper .ck-content h2,
.ckeditor-wrapper .ck-content h3 {
    margin-top: 1rem;
}

.ckeditor-wrapper .ck-content p:last-child {
    margin-bottom: 0;
}

.rich-preview {
    color: #59645f;
    margin-top: 0.5rem;
}

.auto-reply-channel-state {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px solid #d9d1c3;
    border-radius: 8px;
    padding: 0.75rem;
    margin-top: 1rem;
    background: #fff;
}

.auto-reply-channel-state div {
    display: grid;
    gap: 0.1rem;
}

.auto-reply-channel-state span,
.auto-reply-preview span {
    color: #69766f;
    font-size: 0.82rem;
}

.auto-reply-channel-state strong {
    color: #173b36;
}

.auto-reply-preview {
    display: grid;
    gap: 0.25rem;
    border: 1px solid #d9d1c3;
    border-radius: 8px;
    padding: 0.85rem;
    margin-top: 1rem;
    background: #f9f5ee;
}

.auto-reply-preview strong {
    color: #173b36;
}

.auto-reply-preview p {
    margin: 0;
    color: #34423d;
    white-space: pre-wrap;
}

.whatsapp-format-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.keyword-editor {
    min-height: 7rem;
}

.auto-reply-media-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.auto-reply-media-preview img {
    width: 120px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 1px solid #d9d1c3;
    border-radius: 8px;
    background: #fff;
}

.auto-reply-media-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.7rem;
}

.auto-reply-media-heading > div {
    display: grid;
    gap: 0.1rem;
}

.auto-reply-empty-media {
    display: grid;
    gap: 0.25rem;
    padding: 0.95rem 1rem;
    border: 1px dashed #b9c4bc;
    border-radius: 8px;
    background: #f8fbf8;
    color: #315045;
}

.auto-reply-empty-media span,
.auto-reply-media-preview span {
    color: #607268;
    font-size: 0.9rem;
}

.auto-reply-selected-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.auto-reply-selected-image {
    border: 1px solid #d9d1c3;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.auto-reply-selected-image.primary {
    border-color: #2bb9a7;
    box-shadow: 0 0 0 2px rgba(43, 185, 167, .18);
}

.auto-reply-selected-image img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.auto-reply-selected-image span {
    display: block;
    padding: 0.5rem 0.6rem;
    color: #34423d;
    font-size: 0.86rem;
    font-weight: 700;
}

.rich-preview p:last-child {
    margin-bottom: 0;
}

.editor-label-row {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.45rem;
}

.editor-label-row .form-label {
    margin-bottom: 0;
}

.ai-assist-panel {
    background: #f7f1e8;
    border: 1px solid #e6dac9;
    border-radius: 8px;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(150px, 0.28fr) minmax(240px, 1fr);
    margin-bottom: 0.75rem;
    padding: 0.75rem;
}

.taxonomy-group-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-top: 1rem;
}

.taxonomy-group-card {
    border: 1px solid #e6dac9;
    border-radius: 8px;
    display: grid;
    gap: 0.65rem;
    padding: 0.85rem;
}

.taxonomy-group-card strong {
    display: block;
}

.taxonomy-group-card span {
    color: #66736d;
    font-size: 0.88rem;
}

.category-tree-panel.compact {
    max-height: 260px;
}

.empty-state.compact {
    min-height: auto;
    padding: 0.75rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

@media (max-width: 760px) {
    .hero-panel,
    .metric-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        flex-direction: column;
    }

    .data-grid-toolbar,
    .product-toolbar-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .product-toolbar-actions .btn,
    .grid-search {
        width: 100%;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .customer-actions {
        justify-content: flex-start;
    }

    .media-layout {
        grid-template-columns: 1fr;
    }

    .product-row-grid,
    .product-row-grid.variant-grid,
    .appointment-product-grid,
    .product-info-grid {
        grid-template-columns: 1fr;
    }

    .product-info-grid .span-2 {
        grid-column: auto;
    }

    .toast-stack {
        left: 1rem;
        right: 1rem;
        top: 0.75rem;
        max-width: none;
    }
}

.form-field-v {
    /*display: flex;*/
    gap: 10px;
    margin-top: 8px;
    align-items: center;
}

.form-field{
    display:flex;
    gap:10px;
    margin-top:8px;
    align-items:center;
}

.form-field .form-label {
    min-width:100px;
}

.domain-create-steps {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.step-pill {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid #d6dde8;
    border-radius: 999px;
    color: #475569;
    background: #f8fafc;
    font-size: 0.85rem;
    font-weight: 600;
}

.step-pill.active {
    color: #0f172a;
    border-color: #7aa2ff;
    background: #eef4ff;
}

.shipping-zone-editor {
    display: grid;
    grid-template-columns: minmax(280px, 0.36fr) minmax(360px, 1fr);
    gap: 1rem;
    align-items: start;
}

.shipping-tree-panel {
    border: 1px solid #d6dde8;
    border-radius: 8px;
    background: #ffffff;
    max-height: 620px;
    overflow: auto;
    padding: 0.5rem;
}

.tree-view {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tree-view-branch {
    margin-left: 1.05rem;
    padding-left: 0.8rem;
    border-left: 1px solid #e2e8f0;
}

.tree-view-item {
    margin: 0.1rem 0;
}

.tree-view-row {
    display: grid;
    grid-template-columns: 1.85rem minmax(0, 1fr);
    align-items: center;
    min-height: 2.35rem;
    border: 1px solid transparent;
    border-radius: 7px;
    color: #334155;
}

.tree-view-row.multi {
    grid-template-columns: 1.85rem 1.35rem minmax(0, 1fr);
}

.tree-view-row:hover {
    border-color: #d6e2ff;
    background: #f8fbff;
}

.tree-view-row.active {
    border-color: #7aa2ff;
    background: #eef4ff;
    color: #0f172a;
}

.tree-view-row.group-node {
    font-weight: 700;
}

.tree-view-toggle,
.tree-view-label {
    border: 0;
    background: transparent;
    color: inherit;
}

.tree-view-toggle {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 2.15rem;
}

.tree-view-toggle-placeholder {
    width: 1.85rem;
    height: 1px;
}

.tree-view-check {
    justify-self: center;
    align-self: center;
}

.tree-view-chevron {
    display: inline-block;
    font-size: 1.35rem;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform 0.16s ease;
}

.tree-view-chevron.expanded {
    transform: rotate(90deg);
}

.tree-view-label {
    display: flex;
    min-width: 0;
    min-height: 2.15rem;
    flex-direction: column;
    justify-content: center;
    gap: 0.05rem;
    text-align: left;
    padding: 0.25rem 0.5rem 0.25rem 0;
}

.tree-view-label span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tree-view-label small {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
}

.shipping-district-panel {
    min-width: 0;
}

.shipping-district-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.shipping-district-header h3 {
    margin: 0;
    font-size: 1.15rem;
}

.shipping-district-table th:first-child,
.shipping-district-table td:first-child {
    width: 5.5rem;
    text-align: center;
}

.shipping-price-input {
    max-width: 12rem;
}

.product-category-layout {
    display: grid;
    grid-template-columns: minmax(220px, 0.35fr) minmax(320px, 1fr);
    gap: 1rem;
    align-items: start;
}

.category-tree-panel {
    max-height: 360px;
    overflow: auto;
    border: 1px solid #d6dde8;
    border-radius: 8px;
    background: #ffffff;
    padding: 0.5rem;
}

.related-product-picker {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
    border: 1px solid #d6dde8;
    border-radius: 8px;
    background: #f8fafc;
    padding: 0.85rem;
}

.related-product-picker strong,
.related-product-picker span {
    display: block;
}

.related-product-table th:first-child,
.related-product-table td:first-child {
    width: 5rem;
    text-align: center;
}

.selection-list {
    display: grid;
    gap: 0.5rem;
    max-height: 360px;
    overflow: auto;
    border: 1px solid #d6dde8;
    border-radius: 8px;
    background: #ffffff;
    padding: 0.65rem;
}

.selection-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: center;
    padding: 0.6rem 0.7rem;
    border: 1px solid #e6ebf2;
    border-radius: 8px;
    background: #f8fafc;
}

.selection-row span,
.selection-row small {
    overflow-wrap: anywhere;
}

.faq-question-row {
    align-items: start;
}

.faq-question-row .drag-order {
    font-weight: 700;
    padding-top: 2.35rem;
}

.faq-question-fields {
    min-width: 0;
}

.faq-question-row .rich-editor {
    background: #fff;
}

.muted-text {
    color: #64748b;
}

@media (max-width: 900px) {
    .shipping-zone-editor {
        grid-template-columns: 1fr;
    }

    .product-category-layout {
        grid-template-columns: 1fr;
    }

      .related-product-picker {
          grid-template-columns: 1fr;
      }

      .ai-assist-panel {
          grid-template-columns: 1fr;
      }
  }

.wa-settings-layout,
.wa-inbox-layout,
.wa-report-layout {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

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

.wa-card {
    padding: 1rem;
    border: 1px solid #dfe5ee;
    border-radius: 8px;
    background: #fff;
}

.wa-card h2 {
    margin: 0 0 .75rem;
    font-size: 1.1rem;
    color: #142033;
}

.wa-list {
    display: grid;
    gap: .55rem;
}

.wa-list-row,
.conversation-card {
    display: grid;
    gap: .25rem;
    width: 100%;
    padding: .75rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #f7f9fc;
    color: #263247;
    text-align: left;
    text-decoration: none;
}

.wa-list-row.active,
.wa-list-row:hover,
.conversation-card.active,
.conversation-card:hover {
    border-color: #b7dfca;
    background: #e9f7ef;
    color: #136b3b;
}

.wa-list-row span,
.wa-list-row small,
.conversation-card span,
.conversation-card small,
.empty-mini {
    color: #748296;
    font-size: .88rem;
}

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

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

.toggle-row,
.button-row,
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
}

.token-input {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: .9rem;
}

.endpoint-box {
    display: grid;
    gap: .35rem;
    margin-top: 1rem;
    padding: .8rem;
    border: 1px solid #dfe8f3;
    border-radius: 8px;
    background: #f8fafc;
}

.endpoint-box code {
    white-space: normal;
    word-break: break-all;
}

.status-pill {
    align-self: start;
    padding: .25rem .55rem;
    border-radius: 999px;
    background: #e7f7ed;
    color: #166534;
    font-size: .8rem;
    font-weight: 700;
}

.conversation-column {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow: auto;
}

.conversation-top {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
}

.conversation-top em {
    min-width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background: #0f7a43;
    color: #fff;
    font-style: normal;
    font-size: .78rem;
    display: inline-grid;
    place-items: center;
}

.chat-workspace {
    min-height: 72vh;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5ebf2;
}

.chat-header h2 {
    margin-bottom: .15rem;
}

.message-thread {
    display: grid;
    gap: .75rem;
    padding: 1rem 0;
}

.message-bubble {
    max-width: min(760px, 86%);
    padding: .85rem;
    border: 1px solid #e1e7ef;
    border-radius: 8px;
    background: #f8fafc;
}

.message-bubble.outbound {
    justify-self: end;
    background: #e9f7ef;
    border-color: #c3e5d2;
}

.message-bubble.failed {
    background: #fff6f6;
    border-color: #f3b2b2;
}

.message-bubble p {
    margin: .45rem 0;
    white-space: pre-wrap;
}

.message-meta,
.message-audit {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .8rem;
    color: #66768a;
    font-size: .8rem;
}

.error-line {
    color: #a11d1d;
    font-weight: 700;
}

.reply-box {
    padding-top: 1rem;
    border-top: 1px solid #e5ebf2;
}

.empty-state {
    display: grid;
    place-content: center;
    min-height: 52vh;
    color: #64748b;
    text-align: center;
}

.report-grid,
.wa-home-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.metric-card,
.wa-home-card {
    display: grid;
    gap: .35rem;
    padding: 1rem;
    border: 1px solid #dfe5ee;
    border-radius: 8px;
    background: #fff;
    color: #203047;
    text-decoration: none;
}

.metric-card strong {
    font-size: 2rem;
    color: #12352f;
}

.metric-card.danger strong {
    color: #a11d1d;
}

.wa-home-card span {
    font-size: 1.45rem;
    color: #136b3b;
}

.message-log {
    display: grid;
    gap: .65rem;
}

.message-log-row {
    display: grid;
    gap: .3rem;
    padding: .75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fbfcfe;
}

.message-log-row.failed {
    border-color: #f5b5b5;
    background: #fff6f6;
}

.message-log-row pre {
    max-height: 180px;
    overflow: auto;
    margin: .35rem 0 0;
    padding: .55rem;
    border-radius: 6px;
    background: #101828;
    color: #d7e3f8;
    font-size: .78rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.question-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin: .65rem 0 .4rem;
}

.question-meta span {
    padding: .2rem .45rem;
    border: 1px solid #dfe8f3;
    border-radius: 999px;
    background: #f8fafc;
    color: #42526a;
    font-size: .78rem;
    font-weight: 700;
}

.bot-designer-shell {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1.35fr) minmax(320px, .9fr);
    gap: 1rem;
    align-items: start;
}

.bot-flow-list,
.bot-canvas,
.bot-inspector {
    min-width: 0;
}

.bot-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.bot-panel-heading h2 {
    margin: 0;
    color: #142033;
    font-size: 1.12rem;
    font-weight: 800;
}

.bot-start-card,
.bot-node {
    width: 100%;
    display: grid;
    gap: .25rem;
    padding: .8rem;
    border: 1px solid #dfe5ee;
    border-radius: 8px;
    background: #fff;
    color: #142033;
    text-align: left;
}

.bot-start-card {
    margin-bottom: .75rem;
    cursor: pointer;
    background: #f8fafc;
}

.bot-start-card.selected,
.bot-node.selected {
    border-color: #2f7d57;
    box-shadow: 0 0 0 3px rgba(47, 125, 87, .12);
}

.bot-tree {
    display: grid;
    gap: .55rem;
}

.bot-node-wrap {
    display: grid;
    gap: .45rem;
    margin-left: calc(var(--depth) * 1.25rem);
}

.bot-node {
    cursor: pointer;
    background: #fbfcfe;
}

.bot-node:hover {
    background: #f3f8f6;
}

.bot-node.inactive {
    opacity: .58;
}

.bot-node span {
    color: #64748b;
    font-size: .78rem;
    font-weight: 700;
}

.bot-node strong {
    font-size: .96rem;
    overflow-wrap: anywhere;
}

.bot-node small,
.bot-start-card small {
    color: #64748b;
    overflow-wrap: anywhere;
}

.bot-node-children {
    display: grid;
    gap: .45rem;
    margin-left: .8rem;
    padding-left: .7rem;
    border-left: 1px solid #d6dde8;
}

.message-format-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .45rem;
}

.message-editor {
    min-height: 8rem;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.message-preview {
    margin-top: .55rem;
    padding: .65rem .75rem;
    border: 1px solid #dfe8f3;
    border-radius: 8px;
    background: #f8fafc;
}

.message-preview span {
    display: block;
    margin-bottom: .3rem;
    color: #64748b;
    font-size: .78rem;
    font-weight: 800;
}

.message-preview p {
    margin: 0;
    color: #1d2a3d;
    overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
    .wa-settings-layout,
    .wa-inbox-layout,
    .wa-report-layout,
    .report-grid,
    .wa-home-grid,
    .bot-designer-shell {
        grid-template-columns: 1fr;
    }

    .conversation-column {
        position: static;
        max-height: none;
    }

    .bot-node-wrap {
        margin-left: 0;
    }
}

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

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

    .message-bubble {
        max-width: 100%;
    }
}
