:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --text: #172033;
    --muted: #64708a;
    --line: #dfe5ef;
    --primary: #1967d2;
    --primary-dark: #114aa0;
    --accent: #00a78e;
    --danger: #bd2b2b;
    --shadow: 0 18px 50px rgba(31, 45, 70, 0.12);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(25, 103, 210, 0.12), transparent 34rem),
        linear-gradient(135deg, #f8fbff 0%, var(--bg) 52%, #eef8f5 100%);
}

a {
    color: inherit;
}

.app-shell {
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid rgba(223, 229, 239, 0.9);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 76px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto minmax(240px, 1fr) auto;
    align-items: center;
    gap: 18px;
}

.site-logo {
    display: inline-grid;
    place-items: center;
    color: var(--text);
    text-decoration: none;
}

.site-logo-mark {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    box-shadow: 0 10px 24px rgba(31, 45, 70, 0.12);
}

.site-logo-mark svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-logo-mark.has-image {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.site-logo-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mode-actions {
    width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-self: start;
    scrollbar-width: none;
}

.mode-actions::-webkit-scrollbar {
    display: none;
}

.mode-button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.mode-button.active {
    position: relative;
    color: var(--primary);
}

.mode-button.active::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--primary);
    content: "";
}

.mode-button:not(.active):not(.disabled):hover {
    background: #f0f6ff;
    color: var(--primary-dark);
}

.mode-button.disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

.mode-select,
.field input {
    width: 100%;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

.mode-select {
    padding: 0 44px 0 14px;
    font-weight: 600;
}

.choices {
    margin-bottom: 0;
    font-size: 15px;
}

.choices[data-type*=select-one]::after {
    right: 16px;
    border-color: var(--muted) transparent transparent;
}

.choices[data-type*=select-one].is-open::after {
    border-color: transparent transparent var(--muted);
}

.choices.is-disabled .choices__inner {
    opacity: 0.72;
    cursor: not-allowed;
}

.choices__inner {
    min-height: 44px;
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 4px 44px 4px 14px;
    color: var(--text);
    font-weight: 600;
}

.choices.is-focused .choices__inner,
.choices.is-open .choices__inner {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(25, 103, 210, 0.16);
}

.choices__list--single {
    padding: 0;
}

.choices__list--dropdown,
.choices__list[aria-expanded] {
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 36px rgba(31, 45, 70, 0.14);
}

.choices__list--dropdown .choices__item,
.choices__list[aria-expanded] .choices__item {
    padding: 12px 14px;
    font-weight: 600;
}

.choices__list--dropdown .choices__item--selectable.is-highlighted,
.choices__list[aria-expanded] .choices__item--selectable.is-highlighted {
    background: #f0f6ff;
    color: var(--primary-dark);
}

.user-area {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-card {
    min-width: 180px;
    text-align: right;
}

.user-card strong {
    display: block;
    font-size: 14px;
}

.user-card span {
    color: var(--muted);
    font-size: 12px;
}

.login-icon-button {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--primary);
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(31, 45, 70, 0.08);
}

.login-icon-button svg {
    width: 19px;
    height: 19px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-icon-button:hover {
    border-color: rgba(25, 103, 210, 0.32);
    background: #f0f6ff;
    color: var(--primary-dark);
}

.avatar-menu {
    position: relative;
}

.avatar-menu summary {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 8px 5px 5px;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    list-style: none;
}

.avatar-menu summary::-webkit-details-marker {
    display: none;
}

.avatar-menu summary:hover,
.avatar-menu[open] summary {
    border-color: var(--line);
    background: #fff;
}

.avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-weight: 600;
}

.user-meta {
    display: block;
    min-width: 120px;
}

.user-meta strong {
    display: block;
    max-width: 160px;
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-meta span {
    display: block;
    max-width: 160px;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 210px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(31, 45, 70, 0.16);
}

.user-dropdown a {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 8px;
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
}

.user-dropdown a:hover {
    background: #f0f6ff;
    color: var(--primary-dark);
}

.main {
    width: min(1280px, calc(100% - 32px));
    margin: 32px auto;
    display: flex;
    flex-direction: column;
}

.project-main {
    margin-top: 16px;
    margin-bottom: 16px;
}

.auth-page {
    min-height: calc(100vh - 140px);
    display: grid;
    place-items: center;
    padding: 24px 0;
}

.landing-page {
    display: grid;
    gap: 56px;
}

.landing-hero {
    min-height: calc(100vh - 156px);
    position: relative;
    display: grid;
    align-items: end;
    overflow: hidden;
    padding: 56px;
    border-radius: 8px;
    background: #17212f;
    color: #fff;
    box-shadow: 0 24px 60px rgba(31, 45, 70, 0.18);
}

.landing-hero-media {
    position: absolute;
    inset: 0;
}

.landing-hero-media::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(12, 18, 28, 0.9), rgba(12, 18, 28, 0.5) 48%, rgba(12, 18, 28, 0.18));
    content: "";
}

.landing-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.82;
}

.landing-hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.landing-hero-content .eyebrow {
    color: #64d8c6;
}

.landing-hero-content h1 {
    margin-bottom: 16px;
    font-size: 52px;
    line-height: 1.05;
}

.landing-hero-content p:not(.eyebrow) {
    max-width: 620px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 17px;
    line-height: 1.65;
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.landing-actions .btn-ghost,
.landing-cta .btn-ghost {
    background: rgba(255, 255, 255, 0.92);
}

.landing-section {
    display: grid;
    gap: 18px;
}

.landing-section-heading {
    max-width: 620px;
}

.landing-section-heading h2,
.landing-cta h2 {
    margin-bottom: 0;
    font-size: 32px;
    line-height: 1.16;
}

.landing-sample-grid {
    display: grid;
    grid-template-columns: 0.86fr 1fr;
    grid-template-rows: repeat(3, 220px);
    gap: 16px;
}

.landing-sample-card {
    min-height: 220px;
    height: 220px;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: stretch;
    overflow: hidden;
    border: 1px solid rgba(223, 229, 239, 0.9);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 38px rgba(31, 45, 70, 0.1);
    cursor: pointer;
}

.landing-sample-card:focus-visible {
    outline: 3px solid rgba(25, 103, 210, 0.18);
    outline-offset: 3px;
}

.landing-sample-card.large {
    min-height: 0;
    height: 100%;
    grid-row: span 3;
    grid-template-columns: 1fr;
}

.landing-sample-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: 220px;
    object-fit: cover;
    background: #eef3f8;
    transition: opacity 0.18s ease;
}

.landing-sample-image-placeholder {
    width: 100%;
    height: 220px;
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 1;
    background: #eef3f8;
    color: var(--muted);
    font-size: 13px;
}

.landing-sample-card.large {
    height: 100%;
}

.landing-sample-card.large img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
}

.landing-sample-card.large .landing-sample-image-placeholder {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
}

.landing-sample-card .landing-sample-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 22px;
}

.landing-sample-card span,
.landing-benefits span,
.landing-process-list span {
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.landing-sample-card h3 {
    margin: 8px 0;
    font-size: 19px;
    line-height: 1.26;
}

.landing-sample-card p,
.landing-benefits p,
.landing-process-list p,
.landing-cta p {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.58;
}

.landing-benefits {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-benefits .landing-section-heading {
    grid-column: 1 / -1;
}

.landing-benefits article,
.landing-process-list article {
    padding: 22px;
    border: 1px solid rgba(223, 229, 239, 0.9);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
}

.landing-benefits h3,
.landing-process-list h3 {
    margin: 12px 0 8px;
}

.landing-process-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.landing-cta {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1fr);
    align-items: center;
    gap: 24px;
    padding: 34px;
    border: 1px solid rgba(0, 167, 142, 0.2);
    border-radius: 8px;
    background: linear-gradient(135deg, #f7fbff 0%, #edf9f6 100%);
    color: var(--text);
    box-shadow: 0 18px 42px rgba(31, 45, 70, 0.1);
}

.landing-cta-copy {
    min-width: 0;
}

.landing-cta .eyebrow {
    color: #007767;
}

.landing-cta p {
    color: #4a5b72;
}

.landing-contact-form {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(223, 229, 239, 0.92);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 28px rgba(31, 45, 70, 0.08);
}

.landing-contact-field {
    display: grid;
    gap: 7px;
    color: #303b52;
    font-size: 13px;
    font-weight: 600;
}

.landing-contact-field input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

.landing-contact-field input:focus {
    outline: 3px solid rgba(25, 103, 210, 0.16);
    border-color: var(--primary);
}

.landing-floating-cta[hidden] {
    display: none !important;
}

.landing-floating-cta {
    position: fixed;
    left: 50%;
    bottom: 22px;
    bottom: max(22px, calc(env(safe-area-inset-bottom) + 14px));
    z-index: 45;
    min-height: 56px;
    max-width: calc(100vw - 32px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 24px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    background: linear-gradient(135deg, #ff315f 0%, #ff6a2a 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 18px 38px rgba(255, 49, 95, 0.36), 0 0 0 8px rgba(255, 106, 42, 0.12);
    transform: translateX(-50%);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.landing-floating-cta:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 22px 44px rgba(255, 49, 95, 0.42), 0 0 0 10px rgba(255, 106, 42, 0.14);
}

.landing-floating-cta svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.landing-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 24px;
    padding: 28px 0 8px;
    border-top: 1px solid var(--line);
}

.landing-footer h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
}

.landing-footer-contact {
    display: grid;
    grid-template-columns: repeat(3, auto);
    align-items: stretch;
    justify-content: end;
    gap: 12px;
}

.landing-footer-contact a {
    min-width: 0;
    min-height: 74px;
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid rgba(223, 229, 239, 0.9);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
}

.landing-footer-contact a:hover {
    border-color: rgba(25, 103, 210, 0.3);
    background: #f8fbff;
}

.landing-footer-contact-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
}

.landing-footer-contact-label svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    fill: none;
    stroke: var(--primary);
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.landing-footer-contact strong {
    overflow: hidden;
    font-size: 15px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.landing-footer-social {
    width: 74px;
    height: 74px;
    min-height: 74px;
    display: grid;
    place-items: center;
    gap: 0;
    padding: 0;
    overflow: hidden;
    line-height: 0;
}

.landing-footer-social svg {
    width: 42px;
    height: 42px;
    display: block;
    fill: none;
    stroke: var(--primary);
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.landing-footer-social .facebook-icon {
    fill: #1877f2;
    stroke: none;
}

.landing-footer-social .facebook-icon .xe3v8dz {
    fill: #fff;
}

.landing-footer-social .zalo-icon {
    width: 42px;
    height: 42px;
    display: block;
    border-radius: 50%;
    object-fit: contain;
    object-position: center;
}

.landing-thank-modal {
    background: rgba(8, 13, 22, 0.58);
}

.modal.landing-thank-dialog {
    position: relative;
    width: min(460px, calc(100vw - 32px));
    display: grid;
    justify-items: center;
    gap: 14px;
    padding: 34px 28px 28px;
    text-align: center;
}

.landing-thank-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(226, 232, 240, 0.8);
    color: var(--text);
    cursor: pointer;
}

.landing-thank-close svg,
.landing-thank-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.landing-thank-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #16a34a);
    color: #fff;
    box-shadow: 0 16px 34px rgba(14, 165, 233, 0.28);
}

.landing-thank-icon svg {
    width: 28px;
    height: 28px;
}

.landing-thank-dialog h2 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--text);
}

.landing-thank-dialog p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.modal-backdrop.landing-gallery-modal {
    padding: 0;
    background: rgba(8, 13, 22, 0.92);
    backdrop-filter: none;
}

.modal.landing-gallery-dialog {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.landing-gallery-view {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 0;
    background: transparent;
}

.landing-gallery-view img {
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    object-fit: contain;
    background: transparent;
}

#gallery-viewer-modal .landing-gallery-view img {
    max-height: calc(90vh - 74px);
}

.gallery-viewer-caption {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 3;
    width: min(720px, calc(100vw - 32px));
    transform: translateX(-50%);
}

.gallery-viewer-name,
.gallery-viewer-rename-form {
    min-height: 46px;
    display: grid;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 6px 16px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 32px rgba(8, 13, 22, 0.28);
}

.gallery-viewer-name {
    grid-template-columns: minmax(0, 1fr) auto;
}

.gallery-viewer-name span {
    overflow: hidden;
    color: var(--text);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-viewer-rename-form {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.gallery-viewer-rename-form input {
    width: 100%;
    height: 34px;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
}

.gallery-viewer-rename-form input:focus {
    outline: none;
}

.gallery-viewer-caption .project-action-icon {
    width: 34px;
    height: 34px;
    min-height: 34px;
}

.landing-gallery-close {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 3;
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #172033;
    cursor: pointer;
}

.landing-gallery-close svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.landing-gallery-nav {
    position: fixed;
    top: 50%;
    z-index: 2;
    width: 46px;
    height: 46px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #172033;
    cursor: pointer;
    transform: translateY(-50%);
}

.landing-gallery-nav.prev {
    left: 22px;
}

.landing-gallery-nav.next {
    right: 22px;
}

.landing-gallery-nav svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gallery-workspace {
    min-height: calc(100vh - 112px);
}

.gallery-header {
    align-items: flex-start;
}

.gallery-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.gallery-breadcrumbs a {
    color: var(--primary-dark);
    text-decoration: none;
}

.gallery-breadcrumbs a:hover {
    text-decoration: underline;
}

.gallery-toolbar,
.gallery-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gallery-body {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.gallery-up-link {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 14px;
    text-decoration: none;
}

.gallery-up-link svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gallery-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gallery-section-title {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
}

.gallery-folder-grid,
.gallery-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
}

.gallery-folder-card,
.gallery-image-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(31, 45, 70, 0.06);
}

.gallery-folder-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
}

.gallery-folder-link {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
}

.gallery-folder-link svg {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    fill: none;
    stroke: #d8922d;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gallery-folder-link span,
.gallery-image-meta span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-image-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.gallery-image-card.is-selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(25, 103, 210, 0.16), 0 12px 30px rgba(31, 45, 70, 0.1);
}

.gallery-image-card.is-selected::after {
    content: "";
    position: absolute;
    top: 8px;
    left: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 6px 14px rgba(25, 103, 210, 0.28);
}

.gallery-image-card.is-selected::before {
    content: "";
    position: absolute;
    top: 13px;
    left: 13px;
    z-index: 1;
    width: 10px;
    height: 6px;
    border-bottom: 2px solid #fff;
    border-left: 2px solid #fff;
    transform: rotate(-45deg);
}

.gallery-image-link {
    display: block;
    aspect-ratio: 1 / 1;
    background: #f4f7fb;
}

.gallery-image-link img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.gallery-image-meta {
    display: grid;
    gap: 3px;
    padding: 10px 12px 12px;
}

.gallery-image-meta small {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-image-card .gallery-item-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
}

.gallery-item-actions form {
    margin: 0;
}

.gallery-item-actions .project-action-icon {
    width: 34px;
    height: 34px;
    min-height: 34px;
}

.gallery-item-actions .danger-action {
    border: 0;
    background: rgba(208, 54, 54, 0.1);
    color: #c73030;
}

.gallery-image-card .gallery-item-actions .danger-action {
    width: 28px;
    height: 28px;
    min-height: 28px;
    background: rgba(255, 238, 238, 0.94);
    box-shadow: 0 8px 18px rgba(31, 45, 70, 0.16);
}

.gallery-image-card .gallery-item-actions .danger-action svg {
    width: 14px;
    height: 14px;
}

.gallery-upload-preview {
    min-height: 280px;
    max-height: min(54vh, 520px);
    overflow: auto;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafd;
}

.gallery-upload-empty {
    min-height: 278px;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.gallery-upload-list {
    display: grid;
    gap: 0;
}

.gallery-upload-item {
    min-width: 0;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(31, 45, 70, 0.08);
}

.gallery-upload-item:last-child {
    border-bottom: 0;
}

.gallery-upload-item img {
    width: 58px;
    height: 58px;
    border-radius: 8px;
    object-fit: cover;
    background: #edf2f8;
}

.gallery-upload-item-meta {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.gallery-upload-item-meta span,
.gallery-upload-item-meta small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-upload-item-meta span {
    color: var(--text);
    font-size: 14px;
}

.gallery-upload-item-meta small {
    color: var(--muted);
    font-size: 12px;
}

#gallery_images {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.modal-actions.gallery-upload-actions {
    justify-content: space-between;
}

.gallery-file-button {
    margin-right: auto;
    cursor: pointer;
}

.gallery-file-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gallery-upload-submit-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gallery-empty {
    min-height: 260px;
}

.site-settings-workspace {
    padding: 22px;
    background: transparent;
    box-shadow: none;
}

.users-workspace {
    min-height: calc(100vh - 112px);
}

.users-header {
    align-items: flex-start;
}

.users-body {
    display: grid;
    gap: 18px;
}

.users-table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(31, 45, 70, 0.08);
}

.users-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.users-table th,
.users-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(31, 45, 70, 0.08);
    text-align: left;
    vertical-align: middle;
}

.users-table th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
}

.users-table tbody tr:last-child td {
    border-bottom: 0;
}

.users-table tbody tr:hover {
    background: #f8fbff;
}

.account-card-list {
    display: grid;
    gap: 12px;
}

.account-card {
    display: grid;
    grid-template-columns: minmax(220px, 1.1fr) 120px minmax(260px, 1.3fr) 180px auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(31, 45, 70, 0.06);
}

.account-card:hover {
    border-color: rgba(25, 103, 210, 0.2);
    box-shadow: 0 16px 38px rgba(31, 45, 70, 0.09);
}

.account-card-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-card-avatar {
    width: 42px;
    height: 42px;
}

.account-card-identity {
    min-width: 0;
    max-width: 100%;
    display: grid;
    gap: 4px;
}

.account-card-identity strong,
.account-card-identity small {
    min-width: 0;
    max-width: 100%;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-card-identity strong {
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
}

.account-card-identity small {
    color: var(--muted);
    font-size: 12px;
}

.account-card-permissions {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.account-card-label {
    color: #718096;
    font-size: 11px;
    line-height: 1.2;
    text-transform: uppercase;
}

.account-card-meta {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
}

.account-card-meta > div {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.account-card-meta strong {
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-cell {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, #1967d2, #00a78e);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.user-cell strong,
.user-cell small {
    display: block;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-cell strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.user-cell small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.user-role-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef3f8;
    color: #41506a;
    font-size: 12px;
    font-weight: 600;
}

.user-role-badge.is-admin {
    background: rgba(25, 103, 210, 0.12);
    color: var(--primary-dark);
}

.user-permission-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.user-permission-badges span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(0, 167, 142, 0.1);
    color: #087565;
    font-size: 12px;
    font-weight: 500;
}

.user-permission-badges .is-muted {
    background: #eef3f8;
    color: var(--muted);
}

.user-permission-field {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 16px;
}

.user-permission-field > span {
    grid-column: 1 / -1;
    color: #303b52;
    font-size: 14px;
    font-weight: 600;
}

.user-permission-field label {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
}

.user-permission-field input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.users-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.users-actions form {
    margin: 0;
}

.users-actions .project-action-icon {
    width: 34px;
    height: 34px;
    min-height: 34px;
}

.users-actions .danger-action {
    border: 0;
    background: rgba(208, 54, 54, 0.1);
    color: #c73030;
}

.customers-workspace,
.customers-body {
    overflow: visible;
}

.customer-card-list {
    display: grid;
    gap: 12px;
}

.customer-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) 112px minmax(240px, 1fr) minmax(280px, 1.4fr);
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(31, 45, 70, 0.06);
}

.customer-card:hover {
    border-color: rgba(25, 103, 210, 0.2);
    box-shadow: 0 16px 38px rgba(31, 45, 70, 0.09);
}

.customer-card-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.customer-card-avatar {
    width: 42px;
    height: 42px;
}

.customer-card-identity {
    min-width: 0;
    max-width: 100%;
    display: grid;
    gap: 4px;
}

.customer-card-identity strong {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-phone-link {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.customer-phone-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.customer-phone-link.has-previous-status.is-new {
    color: var(--primary-dark);
}

.customer-phone-link.has-previous-status.is-contacted {
    color: #087565;
}

.customer-phone-link.has-previous-status.is-missed {
    color: #c73030;
}

.customer-phone-link.has-previous-status.is-invalid-phone {
    color: #7c3aed;
}

.customer-status-menu {
    position: relative;
    width: 112px;
}

.customer-status-menu[open] {
    z-index: 35;
}

.customer-status-menu summary {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
    list-style: none;
}

.customer-status-menu summary span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-status-menu.is-new summary {
    border-color: rgba(25, 103, 210, 0.24);
    background: #eef5ff;
    color: var(--primary-dark);
}

.customer-status-menu.is-contacted summary {
    border-color: rgba(0, 167, 142, 0.26);
    background: #ebfaf6;
    color: #087565;
}

.customer-status-menu.is-missed summary {
    border-color: rgba(208, 54, 54, 0.22);
    background: #fff1f1;
    color: #c73030;
}

.customer-status-menu.is-invalid-phone summary {
    border-color: rgba(124, 58, 237, 0.24);
    background: #f5f0ff;
    color: #7c3aed;
}

.customer-status-menu summary::-webkit-details-marker {
    display: none;
}

.customer-status-menu summary svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    fill: none;
    stroke: var(--muted);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    transition: transform 0.16s ease;
}

.customer-status-menu[open] summary {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(25, 103, 210, 0.14);
}

.customer-status-menu[open] summary svg {
    transform: rotate(180deg);
}

.customer-status-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 30;
    width: 190px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(31, 45, 70, 0.16);
}

.customer-status-dropdown button {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.customer-status-dropdown button:hover,
.customer-status-dropdown button[aria-current="true"] {
    background: #f0f6ff;
    color: var(--primary-dark);
}

.customer-card-note {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.customer-note-cell {
    max-width: none;
    color: #4a5b72;
}

.customer-note-view,
.customer-note-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.customer-note-view span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-note-form {
    display: block;
}

.customer-note-form[hidden] {
    display: none;
}

.customer-note-input-shell {
    width: 100%;
    height: 38px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 4px;
    padding: 2px 3px 2px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.customer-note-input-shell:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(25, 103, 210, 0.16);
}

.customer-note-form input {
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
}

.customer-note-form input:focus {
    outline: 0;
}

.customer-note-edit,
.customer-note-form .project-action-icon {
    width: 30px;
    height: 30px;
    min-height: 30px;
}

.customer-note-edit {
    opacity: 0;
    pointer-events: none;
    transform: translateX(4px);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.customer-note-view.is-action-visible .customer-note-edit,
.customer-note-view:hover .customer-note-edit {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.customer-note-form .danger-action {
    border: 0;
    background: rgba(208, 54, 54, 0.1);
    color: #c73030;
}

.customer-card-meta {
    min-width: 0;
    display: grid;
    grid-template-columns: 112px 120px 92px;
    gap: 12px;
    align-items: center;
}

.customer-card-meta > div {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.customer-card-label {
    color: #718096;
    font-size: 11px;
    line-height: 1.2;
    text-transform: uppercase;
}

.customer-card-meta strong,
.customer-card-meta span:not(.customer-card-label) {
    min-width: 0;
    color: var(--muted);
    font-size: 13px;
}

.customer-card-meta strong {
    color: var(--text);
    font-weight: 600;
    white-space: nowrap;
}

.customer-card-truncate {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-settings-form {
    display: grid;
    gap: 18px;
}

.site-settings-accordion {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(31, 45, 70, 0.05);
}

.site-settings-accordion[open] {
    z-index: 5;
}

.site-settings-accordion summary {
    list-style: none;
}

.site-settings-accordion summary::-webkit-details-marker {
    display: none;
}

.site-settings-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    margin: 0;
    padding: 0 16px;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.site-settings-section-title > span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.site-settings-section-title svg:not(.accordion-chevron) {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--primary);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-settings-section-title .accordion-chevron {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--muted);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.16s ease;
}

.site-settings-accordion[open] .accordion-chevron {
    transform: rotate(180deg);
}

.site-settings-accordion-body {
    display: grid;
    gap: 18px;
    padding: 0 16px 16px;
}

.site-settings-grid {
    display: grid;
    gap: 18px;
}

.site-settings-grid.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.site-settings-grid.align-start {
    align-items: start;
}

.site-seo-meta-grid {
    display: grid;
    grid-template-columns: max-content minmax(220px, 1fr) minmax(220px, 1fr);
    align-items: start;
    gap: 18px;
}

.site-smtp-primary-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    align-items: start;
    gap: 18px;
}

.site-intro-primary-grid {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 18px;
}

.site-display-card {
    width: 100%;
    min-height: 56px;
    display: grid;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #dbe5f2;
    border-radius: 8px;
    background: #f8fbff;
    color: var(--text);
}

.site-display-card-title {
    font-size: 15px;
    font-weight: 600;
}

.site-display-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.site-display-add-button {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(25, 103, 210, 0.18);
    border-radius: 8px;
    background: #eef4ff;
    color: var(--primary);
    cursor: pointer;
}

.site-display-add-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
}

.site-display-add-button:hover {
    background: #e0ecff;
}

.site-sample-list {
    display: grid;
    gap: 12px;
}

.site-sample-item-card {
    width: 100%;
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid #dbe5f2;
    border-radius: 8px;
    background: #fff;
}

.site-sample-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.site-sample-remove-button,
.site-sample-image-remove {
    width: 26px;
    height: 26px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(208, 54, 54, 0.16);
    border-radius: 999px;
    background: rgba(208, 54, 54, 0.08);
    color: #c73535;
    cursor: pointer;
}

.site-sample-remove-button svg,
.site-sample-image-remove svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-sample-remove-button:hover,
.site-sample-image-remove:hover {
    background: rgba(208, 54, 54, 0.14);
}

.site-sample-text-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.site-sample-image-field {
    min-width: 0;
    display: grid;
    gap: 8px;
    color: #303b52;
    font-size: 13px;
    font-weight: 600;
}

.site-sample-image-picker {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px dashed var(--accent);
    border-radius: 8px;
    background: #f8fbff;
    color: var(--muted);
    cursor: pointer;
    text-align: left;
}

.site-sample-image-picker:has(.site-sample-image-grid.is-empty) {
    padding: 0;
}

.site-sample-image-grid {
    min-height: 42px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    gap: 8px;
}

.site-sample-image-grid.is-empty {
    min-height: 78px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    text-align: center;
}

.site-sample-image-grid.is-empty::before {
    content: "Chọn ảnh";
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.site-sample-image-thumb {
    position: relative;
    display: block;
}

.site-sample-image-thumb img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    background: #f2f5fa;
}

.site-sample-image-remove {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 20px;
    height: 20px;
    border-color: rgba(208, 54, 54, 0.26);
    background: #fdeaea;
    box-shadow: 0 4px 10px rgba(31, 45, 70, 0.12);
}

.site-sample-image-remove svg {
    width: 9px;
    height: 9px;
}

.site-display-card > .site-settings-field textarea {
    min-height: 72px;
}

.site-sample-item-card .site-settings-field textarea {
    min-height: 92px;
}

.site-settings-field,
.site-favicon-field {
    min-width: 0;
    display: grid;
    gap: 8px;
    color: #303b52;
    font-size: 13px;
    font-weight: 600;
}

.site-favicon-field {
    align-self: end;
}

.site-settings-field {
    position: relative;
    display: block;
}

.site-settings-field > span {
    position: absolute;
    top: 22px;
    left: 14px;
    z-index: 2;
    max-width: calc(100% - 28px);
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1;
    pointer-events: none;
    text-overflow: ellipsis;
    transform: translateY(-50%);
    transition: top 0.16s ease, color 0.16s ease, font-size 0.16s ease, transform 0.16s ease;
    white-space: nowrap;
}

.site-settings-field.half-width {
    width: calc(50% - 9px);
}

.site-settings-field input,
.site-settings-field textarea,
.site-settings-field select {
    width: 100%;
    min-height: 44px;
    padding: 15px 14px 4px;
    border: 1px solid #cdd8e8;
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-weight: 400;
}

.site-settings-field textarea {
    min-height: 112px;
    padding-top: 22px;
    resize: vertical;
}

.site-settings-field input::placeholder,
.site-settings-field textarea::placeholder {
    opacity: 0;
    transition: opacity 0.16s ease;
}

.site-settings-field:focus-within input::placeholder,
.site-settings-field:focus-within textarea::placeholder {
    opacity: 0.58;
}

.site-settings-field input:focus,
.site-settings-field textarea:focus {
    outline: 3px solid rgba(25, 103, 210, 0.14);
    border-color: var(--primary);
}

.site-settings-field:focus-within > span,
.site-settings-field:has(input:not(:placeholder-shown)) > span,
.site-settings-field:has(textarea:not(:placeholder-shown)) > span,
.site-settings-field:has(.choices) > span {
    top: 6px;
    color: var(--primary);
    font-size: 10px;
    transform: none;
}

.site-settings-field .choices__inner {
    border-color: #cdd8e8;
    font-weight: 400;
    padding: 15px 44px 4px 14px;
}

.site-settings-field .choices {
    position: relative;
    z-index: 3;
}

.site-settings-field .choices.is-open {
    z-index: 80;
}

.site-settings-field .choices__list--dropdown,
.site-settings-field .choices__list[aria-expanded] {
    z-index: 90;
}

.site-favicon-field input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.site-favicon-preview {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px dashed var(--accent);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    cursor: pointer;
    padding: 0;
}

.site-favicon-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.site-favicon-preview svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-image-picker-grid {
    max-height: min(66vh, 620px);
    overflow: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    padding-right: 4px;
}

.site-image-picker-item {
    min-width: 0;
    display: grid;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    text-align: left;
}

.site-image-picker-item:hover {
    border-color: rgba(25, 103, 210, 0.34);
    background: #f6f9ff;
}

.site-image-picker-item.is-selected {
    border-color: var(--primary);
    background: #eef4ff;
    box-shadow: 0 0 0 3px rgba(25, 103, 210, 0.12);
}

.site-image-picker-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    background: #f2f5fa;
}

.site-image-picker-item span {
    overflow: hidden;
    color: #4a556a;
    font-size: 12px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-image-picker-empty {
    min-height: 160px;
}

.site-image-picker-actions {
    padding-top: 18px;
}

.site-settings-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 4px;
}


.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

h1,
h2,
h3,
strong,
p {
    margin-top: 0;
}

h1,
h2,
h3,
strong {
    font-weight: 600;
}

h2 {
    margin-bottom: 10px;
    font-size: 26px;
}

h3 {
    margin-bottom: 10px;
    font-size: 17px;
}

.muted {
    color: var(--muted);
}

.panel,
.workspace {
    border: 1px solid rgba(223, 229, 239, 0.9);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.panel {
    padding: 28px;
}

.auth-panel {
    width: min(430px, 100%);
}

.auth-link-row {
    display: flex;
    justify-content: flex-end;
    margin: -6px 0 16px;
}

.auth-link-row a {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.auth-link-row a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    margin-bottom: 8px;
    color: #303b52;
    font-size: 14px;
    font-weight: 600;
}

.field input {
    padding: 0 14px;
}

.field input:focus,
.mode-select:focus {
    outline: 3px solid rgba(25, 103, 210, 0.16);
    border-color: var(--primary);
}

.ceiling-price-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.ceiling-price-field .ceiling-price-input {
    position: relative;
    display: block;
    min-width: 0;
    margin: 0;
    border-left: 1px solid rgba(31, 45, 70, 0.08);
    color: var(--text);
    font-size: 14px;
    font-weight: 400;
}

.ceiling-price-field .ceiling-price-input:first-child {
    border-left: 0;
}

.ceiling-price-input > span:first-child {
    position: absolute;
    top: 10px;
    left: 12px;
    z-index: 1;
    color: var(--muted);
    font-size: 11px;
    line-height: 1;
    pointer-events: none;
}

.ceiling-price-input input {
    height: 48px;
    border: 0;
    border-radius: 0;
    padding: 20px 58px 6px 12px;
    background: transparent;
}

.ceiling-price-input input:focus {
    outline: 3px solid rgba(25, 103, 210, 0.14);
    outline-offset: -3px;
    border-color: transparent;
}

.ceiling-price-input .unit-text {
    top: auto;
    bottom: 8px;
    transform: none;
    line-height: 1;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}

.btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 12px 26px rgba(25, 103, 210, 0.26);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-ghost {
    border-color: var(--line);
}

.btn-danger {
    border-color: rgba(189, 43, 43, 0.22);
    background: #fff5f5;
    color: var(--danger);
}

.btn-danger:hover {
    background: #ffe8e8;
}

.workspace {
    overflow: hidden;
}

.project-workspace {
    min-height: calc(100vh - 108px);
    display: flex;
    flex-direction: column;
}

.workspace-header {
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--line);
}

.compact-header .eyebrow {
    margin: 0;
}

.workspace-body {
    padding: 22px;
}

.material-settings-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.material-add-button {
    width: 44px;
    padding: 0;
}

.material-add-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2;
}

.material-search-form {
    margin: 0;
}

.material-search-input {
    width: min(280px, 28vw);
    height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.material-search-input:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(25, 103, 210, 0.16);
}

.material-search-input svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: var(--muted);
    stroke-linecap: round;
    stroke-width: 2;
}

.material-search-input input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
}

.material-settings-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.material-list-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.material-list-heading .eyebrow {
    margin: 0 0 4px;
}

.material-list-heading h2 {
    margin: 0;
    font-size: 22px;
}

.material-settings-list {
    min-height: 220px;
    display: grid;
    align-items: start;
    gap: 12px;
}

.material-library-card {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    height: 104px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.material-library-image {
    width: 78px;
    aspect-ratio: 1;
    border-radius: 8px;
    object-fit: cover;
    background: #f4f8fd;
}

.material-library-image-empty {
    display: grid;
    place-items: center;
    border: 1px dashed #c7d1e2;
    color: var(--muted);
    font-size: 24px;
}

.material-library-info {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    align-self: stretch;
}

.material-library-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.material-library-main {
    min-width: 0;
}

.material-library-main h3 {
    margin: 0;
    min-width: 0;
    font-size: 18px;
    line-height: 1.12;
    max-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

.material-library-main p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.15;
}

.material-library-side {
    flex: 0 0 auto;
    max-width: 280px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.18;
    text-align: right;
}

.material-library-side p {
    margin: 0;
}

.material-library-row-bottom {
    align-items: center;
}

.material-library-price {
    min-width: 0;
    color: var(--primary-dark);
    font-size: 15px;
    line-height: 1.15;
    text-align: left;
}

.material-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.material-card-actions form {
    margin: 0;
}

.material-card-actions .project-action-icon {
    width: 30px;
    height: 30px;
    min-height: 30px;
}

.material-card-actions .project-action-icon svg {
    width: 15px;
    height: 15px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-top: 4px;
}

.pagination-button {
    min-width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.pagination-button svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pagination-button.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.pagination-button:not(:disabled):not(.active):not([aria-disabled="true"]):hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-button:disabled,
.pagination-button[aria-disabled="true"],
.pagination-ellipsis {
    opacity: 0.45;
    pointer-events: none;
    cursor: not-allowed;
}

.pagination-ellipsis {
    cursor: default;
}

.project-workspace .workspace-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.tool-card {
    min-height: 168px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.tool-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    border-radius: 8px;
    background: rgba(0, 167, 142, 0.12);
    color: #007767;
    font-weight: 600;
}

.material-item-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.material-item-card {
    display: grid;
    gap: 5px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.material-item-card.is-collapsed > .material-service-grid,
.material-item-card.is-collapsed > .material-service-lines,
.material-item-card.is-collapsed > .material-item-total {
    display: none;
}

.material-extra-card {
    margin-top: 14px;
    border-color: #d9dde7;
    background: #f7f8fb;
}

.material-cost-card {
    margin-top: 14px;
    border-color: #ded6f5;
    background: #faf8ff;
}

.material-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.material-item-heading {
    display: flex;
    align-items: center;
    gap: 16px;
}

.material-item-heading h3 {
    margin-bottom: 0;
}

.material-item-heading strong {
    color: var(--primary);
    white-space: nowrap;
}

.material-item-details {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
}

.material-item-toggle {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
}

.material-item-toggle svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.18s ease;
}

.material-item-card:not(.is-collapsed) .material-item-toggle svg {
    transform: rotate(180deg);
}

.material-item-toggle:hover {
    border-color: rgba(0, 167, 142, 0.3);
    color: var(--primary);
}

.material-extra-actions {
    justify-content: flex-end;
}

.material-item-total {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}

.material-item-total strong {
    min-width: 140px;
    color: var(--primary-dark);
    text-align: right;
}

.material-project-total {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 10px;
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.material-project-total strong {
    min-width: 160px;
    color: var(--primary-dark);
    text-align: right;
}

.material-service-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 8px;
}

.material-service-grid:has(> :only-child) {
    grid-template-columns: 1fr;
}

.material-service-grid:empty {
    display: none;
}

.material-service-card {
    min-height: 82px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    padding: 7px 16px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    overflow: visible;
}

.material-service-card h4 {
    margin: 0;
    color: var(--text);
    font-size: 15px;
}

.material-service-heading {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.material-service-title {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wall-side-badges {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.wall-side-badges span {
    min-width: 24px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    padding: 0 7px;
    border: 1px solid rgba(25, 103, 210, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
    color: #195fba;
    font-size: 11px;
    line-height: 1;
}

.material-service-add {
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 24px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.72);
    color: currentColor;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(31, 45, 70, 0.08);
    transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.material-service-add svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.material-service-add:hover {
    background: #fff;
    box-shadow: 0 6px 14px rgba(31, 45, 70, 0.12);
    transform: translateY(-1px);
}

.material-service-lines {
    width: 100%;
    display: grid;
    gap: 6px;
}

.material-service-line-card {
    width: 100%;
    min-height: 42px;
    display: grid;
    grid-template-columns: minmax(110px, 1fr) minmax(150px, 1.1fr) minmax(104px, 0.7fr) minmax(118px, 0.8fr) minmax(82px, 0.5fr) minmax(122px, 0.78fr) 34px;
    align-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.68);
    color: var(--text);
    font-size: 13px;
    overflow: visible;
}

.material-line-suggest-menu {
    min-width: 190px;
}

.material-service-line-card.is-other-service-line {
    grid-template-columns: minmax(130px, 1fr) minmax(180px, 1.2fr) minmax(112px, 0.72fr) minmax(92px, 0.55fr) minmax(132px, 0.8fr) 34px;
}

.material-cost-line-card {
    grid-template-columns: minmax(160px, 1fr) minmax(130px, 0.42fr) minmax(130px, 0.42fr) 34px;
}

.material-service-cost-date-field {
    border-left: 1px solid rgba(31, 45, 70, 0.08);
}

.material-service-cost-date-field input {
    min-width: 0;
    padding-right: 38px;
    border-radius: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2300a78e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M16 2v4'/%3E%3Crect x='3' y='4' width='18' height='18' rx='3'/%3E%3Cpath d='M3 10h18'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    background-size: 18px 18px;
    color-scheme: light;
    cursor: pointer;
}

.material-service-cost-date-field input::-webkit-calendar-picker-indicator {
    width: 34px;
    height: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    opacity: 0;
}

.material-service-cost-date-field:focus-within input {
    background: rgba(25, 103, 210, 0.04);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%231967d2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M16 2v4'/%3E%3Crect x='3' y='4' width='18' height='18' rx='3'/%3E%3Cpath d='M3 10h18'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    background-size: 18px 18px;
}

.cost-date-picker {
    position: absolute;
    z-index: 120;
    width: 288px;
    padding: 12px;
    border: 1px solid rgba(31, 45, 70, 0.12);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(31, 45, 70, 0.18);
}

.cost-date-picker::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 24px;
    width: 10px;
    height: 10px;
    border-top: 1px solid rgba(31, 45, 70, 0.12);
    border-left: 1px solid rgba(31, 45, 70, 0.12);
    background: #fff;
    transform: rotate(45deg);
}

.cost-date-picker.is-above::before {
    top: auto;
    bottom: -6px;
    transform: rotate(225deg);
}

.cost-date-picker-header {
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.cost-date-picker-header strong {
    color: var(--text);
    font-size: 14px;
    text-align: center;
}

.cost-date-picker-header button {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(31, 45, 70, 0.1);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--text);
    cursor: pointer;
}

.cost-date-picker-header button:hover {
    border-color: rgba(0, 167, 142, 0.26);
    background: rgba(0, 167, 142, 0.08);
    color: var(--primary);
}

.cost-date-picker-header svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cost-date-picker-weekdays,
.cost-date-picker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.cost-date-picker-weekdays {
    margin-bottom: 6px;
}

.cost-date-picker-weekdays span {
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.cost-date-picker-day {
    height: 32px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.cost-date-picker-day:hover {
    background: rgba(0, 167, 142, 0.1);
    color: var(--primary);
}

.cost-date-picker-day.is-muted {
    color: #a8b0bd;
}

.cost-date-picker-day.is-today {
    box-shadow: inset 0 0 0 1px rgba(0, 167, 142, 0.38);
}

.cost-date-picker-day.is-selected {
    background: var(--primary);
    color: #fff;
    box-shadow: none;
}

.material-service-line-delete {
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 24px;
    justify-self: center;
    padding: 0;
    border: 1px solid rgba(208, 54, 54, 0.18);
    border-radius: 999px;
    background: rgba(208, 54, 54, 0.08);
    color: #c73535;
    cursor: pointer;
    line-height: 1;
}

.material-service-line-delete svg {
    width: 12px;
    height: 12px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.material-service-line-delete:hover {
    background: rgba(208, 54, 54, 0.14);
}

.material-service-line-field {
    position: relative;
    width: 100%;
    display: block;
}

.material-service-line-field > span,
.material-service-line-select label {
    position: absolute;
    top: 20px;
    left: 10px;
    z-index: 1;
    color: var(--muted);
    font-size: 13px;
    pointer-events: none;
    transform: translateY(-50%);
    transition: top 0.16s ease, font-size 0.16s ease, color 0.16s ease;
}

.material-service-line-field input {
    width: 100%;
    height: 42px;
    padding: 13px 10px 3px;
    border: 0;
    border-radius: 8px 0 0 8px;
    background: transparent;
    color: var(--text);
    font: inherit;
}

.material-service-line-field .input-unit {
    display: block;
}

.material-service-line-field .input-unit input {
    padding-right: 46px;
}

.material-service-line-field .unit-text {
    right: 10px;
    font-size: 10px;
}

.material-service-price-field,
.material-service-dimension-field,
.material-service-quantity-field,
.material-service-total-field {
    border-left: 1px solid rgba(31, 45, 70, 0.08);
}

.material-service-price-field input,
.material-service-dimension-field input,
.material-service-quantity-field input,
.material-service-total-field input {
    border-radius: 0;
}

.material-service-quantity-field input,
.material-service-total-field input {
    color: var(--primary-dark);
    text-align: right;
}

.material-service-price-field .input-unit input,
.material-service-total-field .input-unit input {
    padding-right: 38px;
}

.material-service-price-field .unit-text,
.material-service-total-field .unit-text {
    top: auto;
    bottom: 9px;
    transform: none;
    line-height: 1;
}

.material-service-total-field .unit-text {
    opacity: 0;
}

.material-service-total-field:has(input:not(:placeholder-shown)) .unit-text {
    opacity: 1;
}

.material-service-dimensions {
    height: 42px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
    align-items: end;
    gap: 4px;
    padding: 13px 8px 3px;
}

.material-service-dimensions input {
    height: 24px;
    min-width: 0;
    padding: 0 2px;
    text-align: center;
}

.material-service-dimensions > span {
    color: var(--muted);
    font-size: 11px;
    line-height: 24px;
    opacity: 0;
    transition: opacity 0.16s ease;
}

.material-service-dimensions:focus-within > span,
.material-service-dimensions:has(input:not(:placeholder-shown)) > span {
    opacity: 1;
}

.material-service-line-field input:focus {
    outline: 3px solid rgba(25, 103, 210, 0.14);
    outline-offset: -3px;
}

.material-service-quantity-field input:focus,
.material-service-total-field input:focus {
    outline: none;
    box-shadow: none;
}

.material-service-line-field:focus-within > span,
.material-service-line-field:has(input:not(:placeholder-shown)) > span {
    top: 4px;
    color: var(--primary);
    font-size: 10px;
    transform: none;
}

.material-service-line-select {
    position: relative;
    width: 100%;
    display: block;
    border-left: 1px solid rgba(31, 45, 70, 0.08);
    overflow: visible;
}

.material-service-line-select label {
    top: 20px;
    color: var(--muted);
    font-size: 13px;
    transform: translateY(-50%);
}

.material-service-line-select.is-choice-filled label,
.material-service-line-select:has(.choices.is-focused) label,
.material-service-line-select:has(.choices.is-open) label {
    top: 4px;
    color: var(--primary);
    font-size: 10px;
    transform: none;
}

.material-service-line-select .choices {
    width: 100%;
    z-index: 4;
}

.material-service-line-select .choices__inner {
    min-height: 42px;
    height: 42px;
    padding: 13px 30px 3px 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
}

.material-service-line-select.is-choice-filled .choices__inner,
.material-service-line-select:has(.choices.is-focused) .choices__inner,
.material-service-line-select:has(.choices.is-open) .choices__inner {
    padding-top: 14px;
    padding-bottom: 2px;
}

.material-service-line-select .choices.is-focused .choices__inner,
.material-service-line-select .choices.is-open .choices__inner {
    box-shadow: inset 0 0 0 3px rgba(25, 103, 210, 0.14);
}

.material-service-line-select .choices[data-type*=select-one]::after {
    right: 10px;
}

.material-service-line-select .choices__list--single {
    padding-top: 0;
    min-width: 0;
}

.material-service-line-select .choices__list--dropdown,
.material-service-line-select .choices__list[aria-expanded] {
    min-width: 220px;
    z-index: 20;
}

.material-service-line-select .choices__list--dropdown .choices__item[data-value=""],
.material-service-line-select .choices__list[aria-expanded] .choices__item[data-value=""] {
    display: none;
}

.material-service-line-select .choices__list--single .choices__item,
.material-service-line-select .choices__list--dropdown .choices__item,
.material-service-line-select .choices__list[aria-expanded] .choices__item {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wall-service-card {
    border-color: rgba(25, 103, 210, 0.2);
    background: #eef4ff;
    color: #195fba;
}

.wall-service-card h4 {
    color: #195fba;
}

.ceiling-service-card {
    border-color: rgba(0, 167, 142, 0.2);
    background: #edfbf8;
    color: #007767;
}

.ceiling-service-card h4 {
    color: #007767;
}

.floor-service-card {
    border-color: rgba(217, 137, 25, 0.22);
    background: #fff8e9;
    color: #a26100;
}

.floor-service-card h4 {
    color: #a26100;
}

.material-service-card.is-enabled {
    border-width: 2px;
}

.material-item-dimensions {
    white-space: nowrap;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.project-card {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.project-card h3 {
    margin-bottom: 8px;
    word-break: break-word;
}

.project-card .btn {
    align-self: flex-start;
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.project-card .project-actions {
    justify-content: space-between;
    flex-wrap: nowrap;
}

.project-navigation-actions,
.project-management-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-actions form {
    margin: 0;
}

.project-detail-actions {
    flex-direction: column;
    align-items: stretch;
}

.material-detail-actions {
    justify-content: flex-end;
}

.project-action-icon {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.project-action-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.project-action-icon:hover {
    transform: translateY(-1px);
}

.edit-action {
    border-color: rgba(25, 103, 210, 0.2);
    background: #eef4ff;
    color: #195fba;
}

.edit-action:hover {
    background: #e0ecff;
    box-shadow: 0 10px 20px rgba(25, 103, 210, 0.14);
}

.estimate-action {
    border-color: rgba(0, 167, 142, 0.2);
    background: #edfbf8;
    color: #007767;
}

.estimate-action:hover {
    background: #dff7f1;
    box-shadow: 0 10px 20px rgba(0, 167, 142, 0.14);
}

.material-action {
    border-color: rgba(217, 137, 25, 0.22);
    background: #fff8e9;
    color: #a26100;
}

.material-action:hover {
    background: #fff0cc;
    box-shadow: 0 10px 20px rgba(217, 137, 25, 0.14);
}

.save-action {
    border-color: rgba(43, 138, 82, 0.2);
    background: #eefaf3;
    color: #1f7a45;
}

.save-action:hover {
    background: #e1f5e9;
    box-shadow: 0 10px 20px rgba(43, 138, 82, 0.14);
}

.add-action {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 12px 26px rgba(25, 103, 210, 0.22);
}

.add-action:hover {
    background: var(--primary-dark);
}

.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    align-content: start;
}

.item-card {
    position: relative;
    min-height: 230px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(25, 103, 210, 0.04), transparent),
        #fff;
}

.item-remove {
    position: relative;
    width: 24px;
    height: 24px;
    display: grid;
    flex: 0 0 24px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(189, 43, 43, 0.12);
    border-radius: 50%;
    background: #fff1f1;
    color: var(--danger);
    cursor: pointer;
    line-height: 0;
}

.item-remove:hover {
    background: #ffe2e2;
    color: var(--danger);
}

.item-remove svg {
    width: 13px;
    height: 13px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.item-field {
    position: relative;
    display: grid;
    gap: 7px;
}

.item-name-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 75px;
    gap: 12px;
}

.item-field span {
    color: #303b52;
    font-size: 13px;
    font-weight: 600;
}

.item-field input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

.item-field > span:first-child {
    position: absolute;
    top: 20px;
    left: 12px;
    z-index: 1;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    pointer-events: none;
    transform: translateY(-50%);
    transition: top 0.16s ease, font-size 0.16s ease, color 0.16s ease;
}

.item-field input {
    padding-top: 14px;
}

.item-field:focus-within > span:first-child,
.item-field:has(input:not(:placeholder-shown)) > span:first-child {
    top: 4px;
    color: var(--primary);
    font-size: 11px;
    transform: none;
}

.item-name-field {
    position: relative;
}

.item-name-field > span {
    position: absolute;
    top: 20px;
    left: 12px;
    z-index: 1;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    pointer-events: none;
    transform: translateY(-50%);
    transition: top 0.16s ease, font-size 0.16s ease, color 0.16s ease;
}

.item-name-field input {
    padding-top: 14px;
}

.item-name-row .item-field:not(.item-name-field) input,
.item-dimensions input {
    text-align: right;
}

.item-name-row .item-field:not(.item-name-field) input {
    text-align: center;
}

.item-name-field:focus-within > span,
.item-name-field:has(input:not(:placeholder-shown)) > span {
    top: 4px;
    color: var(--primary);
    font-size: 11px;
    transform: none;
}

.item-field input:focus {
    outline: 3px solid rgba(25, 103, 210, 0.16);
    border-color: var(--primary);
}

.item-field input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.item-field input[type="number"]::-webkit-outer-spin-button,
.item-field input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
}

.input-unit {
    position: relative;
    display: block;
}

.input-unit input {
    padding-right: 32px;
}

.money-unit input {
    padding-right: 58px;
}

.item-field .unit-text,
.unit-text {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: #9aa4b2;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    pointer-events: none;
}

.item-field .unit-text {
    top: calc(50% + 7px);
    opacity: 0;
    transition: opacity 0.16s ease;
}

.item-field:focus-within .unit-text,
.item-field:has(input:not(:placeholder-shown)) .unit-text {
    opacity: 1;
}

.suggest-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 5;
    display: grid;
    gap: 4px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(31, 45, 70, 0.14);
}

.suggest-menu.is-above {
    top: auto;
    bottom: calc(100% + 6px);
}

.suggest-option {
    min-height: 34px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.suggest-option:hover,
.suggest-option:focus {
    outline: none;
    background: #f0f6ff;
    color: var(--primary-dark);
}

.item-dimensions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.item-options {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    padding-top: 2px;
}

.check-field {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.check-field input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--primary);
}

.wall-field {
    cursor: default;
}

.wall-check-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.wall-switches {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.mini-switch {
    position: relative;
    min-width: 34px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
}

.mini-switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.mini-switch span {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 0 8px;
    background: #f5f7fb;
    color: var(--muted);
}

.mini-switch input:checked + span {
    background: rgba(25, 103, 210, 0.14);
    color: var(--primary-dark);
}

.ceiling-field {
    padding-right: 6px;
    cursor: default;
}

.ceiling-check-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.ceiling-field .choices {
    width: 120px;
    min-width: 120px;
}

.ceiling-field .choices__inner {
    height: 32px;
    min-height: 32px;
    padding: 2px 28px 2px 10px;
    border-color: transparent;
    background: #f5f7fb;
    font-size: 13px;
}

.ceiling-field .choices[data-type*=select-one]::after {
    right: 10px;
}

.ceiling-field .choices__list--dropdown,
.ceiling-field .choices__list[aria-expanded] {
    min-width: 120px;
}

.ceiling-field .choices__list--single {
    padding-top: 3px;
}

.item-estimate {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.item-estimate span {
    color: var(--muted);
    font-size: 13px;
}

.item-estimate strong {
    color: var(--primary-dark);
    font-size: 18px;
    text-align: center;
}

.item-estimate .item-remove {
    justify-self: end;
}

.project-detail-header {
    align-items: flex-start;
    padding-top: 12px;
    padding-bottom: 12px;
}

.project-heading {
    min-width: 0;
}

.project-heading-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    min-width: 0;
}

.project-heading-top .eyebrow {
    margin: 0;
}

.project-name-eyebrow {
    max-width: min(620px, 58vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-total {
    margin: 6px 0 0;
    color: var(--text);
    font-size: 14px;
}

.project-total strong {
    margin-left: 8px;
    color: var(--primary-dark);
}

.icon-link {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    cursor: pointer;
    text-decoration: none;
}

.icon-link:hover {
    background: #f0f6ff;
    color: var(--primary-dark);
}

.icon-link svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.compact-empty {
    min-height: 220px;
}

.project-workspace .compact-empty {
    flex: 1;
    min-height: 0;
}

.empty-state {
    min-height: 320px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    padding: 32px;
    border: 1px dashed #c7d1e2;
    border-radius: 8px;
    background: rgba(248, 251, 255, 0.76);
    text-align: center;
}

.empty-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(25, 103, 210, 0.12);
    color: var(--primary);
    font-size: 28px;
    font-weight: 600;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    place-items: center;
    padding: 24px;
    background: rgba(23, 32, 51, 0.42);
    backdrop-filter: blur(8px);
}

.modal-backdrop[aria-hidden="true"] {
    display: none !important;
}

.modal-backdrop.open {
    display: grid;
}

.modal {
    width: min(460px, 100%);
    padding: 24px;
    border: 1px solid rgba(223, 229, 239, 0.92);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 26px 70px rgba(23, 32, 51, 0.24);
}

.modal.site-image-picker-modal {
    width: min(60vw, calc(100vw - 32px));
}

.material-modal {
    width: min(620px, 100%);
}

.material-form-intro {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    align-items: start;
    gap: 18px;
    margin-bottom: 16px;
}

.material-image-upload {
    position: relative;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px dashed #c7d1e2;
    border-radius: 8px;
    background: #f8fbff;
    color: var(--muted);
    cursor: pointer;
}

.material-image-upload:hover,
.material-image-upload:focus-within {
    border-color: var(--primary);
    background: #f0f6ff;
    color: var(--primary);
}

.material-image-upload input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    opacity: 0;
}

.material-image-placeholder {
    display: grid;
    place-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
}

.material-image-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.material-image-placeholder svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.material-name-field {
    margin-bottom: 0;
}

.material-manufacturer-field {
    margin-bottom: 0;
}

.material-meta-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(120px, 0.72fr);
    gap: 12px;
}

.material-code-field {
    margin-bottom: 0;
}

.material-type-price-fields {
    display: grid;
    grid-template-columns: minmax(120px, 0.72fr) minmax(0, 1fr);
    gap: 12px;
}

.material-dimensions-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.confirm-message {
    margin-bottom: 18px;
    line-height: 1.6;
}

.icon-button {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.icon-button:hover {
    background: #f0f6ff;
    color: var(--primary-dark);
}

.modal-actions {
    justify-content: flex-end;
}

.toast-stack {
    position: fixed;
    top: 92px;
    right: 24px;
    z-index: 50;
    width: min(380px, calc(100% - 32px));
}

.toast {
    min-height: 54px;
    display: grid;
    grid-template-columns: 10px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 12px 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 44px rgba(31, 45, 70, 0.18);
    color: #274060;
    font-weight: 600;
    transition: opacity 180ms ease, transform 180ms ease;
}

.toast-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
}

.toast.error {
    border-color: rgba(189, 43, 43, 0.24);
    color: var(--danger);
}

.toast.error .toast-dot {
    background: var(--danger);
}

.toast.success {
    border-color: rgba(0, 167, 142, 0.26);
    color: #006b5d;
}

.toast.success .toast-dot {
    background: var(--accent);
}

.toast-close {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: currentColor;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.toast-close:hover {
    background: rgba(31, 45, 70, 0.08);
}

.password-layout {
    max-width: 560px;
}

@media (max-width: 900px) {
    .header-inner {
        grid-template-columns: auto minmax(0, 1fr) auto;
        padding: 16px 0;
        gap: 12px;
    }

    .mode-actions {
        width: auto;
        max-width: 100%;
        overflow-x: auto;
    }

    .user-area {
        justify-self: end;
    }

    .user-meta {
        display: none;
    }

    .landing-hero {
        min-height: 620px;
        padding: 32px;
    }

    .landing-hero-content h1 {
        font-size: 36px;
    }

    .landing-sample-grid,
    .landing-benefits,
    .landing-process-list {
        grid-template-columns: 1fr;
    }

    .landing-sample-grid {
        grid-template-rows: auto;
    }

    .landing-sample-card,
    .landing-sample-card.large {
        height: auto;
        min-height: 0;
        grid-row: auto;
        grid-template-columns: 1fr;
    }

    .landing-sample-card img,
    .landing-sample-card.large img {
        height: auto;
    }

    .landing-page {
        gap: 36px;
    }

    .landing-cta {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .landing-contact-form {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .landing-footer {
        grid-template-columns: 1fr;
    }

    .landing-footer-contact {
        grid-template-columns: auto repeat(2, 74px);
        justify-content: start;
    }

    .tool-grid {
        grid-template-columns: 1fr;
    }

    .material-service-grid {
        grid-template-columns: 1fr;
    }

    .panel,
    .workspace-header,
    .workspace-body {
        padding: 18px;
    }

    .material-list-heading {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .material-settings-tools {
        width: 100%;
        align-items: center;
        flex-direction: row;
    }

    .material-search-form {
        flex: 1 1 auto;
        min-width: 0;
    }

    .material-search-input {
        width: 100%;
    }

    .material-add-button {
        flex: 0 0 44px;
    }

    .material-library-card {
        grid-template-columns: 68px minmax(0, 1fr);
        gap: 10px;
        height: 124px;
    }

    .material-library-image {
        width: 68px;
    }

    .material-library-row-top {
        flex-direction: column;
        gap: 4px;
    }

    .material-library-side,
    .material-library-price {
        max-width: 100%;
        text-align: left;
    }

    .material-dimensions-form {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .material-meta-fields {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .site-settings-grid.two-columns,
    .site-settings-field.half-width {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .site-seo-meta-grid {
        grid-template-columns: max-content minmax(0, 1fr);
    }

    .site-seo-meta-grid .site-settings-field:last-child {
        grid-column: 1 / -1;
    }

    .site-smtp-primary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-smtp-primary-grid .site-settings-field:first-child {
        grid-column: 1 / -1;
    }

    .site-intro-primary-grid {
        grid-template-columns: max-content minmax(0, 1fr);
    }

    .site-intro-primary-grid .site-settings-field:last-child {
        grid-column: 1 / -1;
    }

    .site-sample-text-grid {
        grid-template-columns: 1fr;
    }

    .material-type-price-fields {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .customer-card {
        grid-template-columns: minmax(0, 1fr) 112px;
        align-items: start;
    }

    .account-card {
        grid-template-columns: minmax(0, 1fr) 118px auto;
        align-items: start;
    }

    .account-card-permissions,
    .account-card-meta {
        grid-column: 1 / -1;
    }

    .account-card-actions {
        justify-content: flex-end;
    }

    .customer-card-note,
    .customer-card-meta {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .modal.site-image-picker-modal {
        width: min(90vh, calc(100vw - 24px));
    }

    .account-workspace .users-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .account-workspace .users-header > div {
        min-width: 0;
    }

    .account-workspace .users-header .project-action-icon {
        flex: 0 0 auto;
    }

    .account-card {
        grid-template-columns: minmax(0, 1fr) max-content;
        gap: 12px;
        padding: 12px;
    }

    .account-card-role {
        justify-self: end;
    }

    .account-card-permissions {
        grid-column: 1 / -1;
    }

    .account-card-meta {
        grid-column: 1 / 2;
        grid-template-columns: minmax(52px, auto) minmax(92px, 1fr);
        align-self: center;
    }

    .account-card-actions {
        grid-column: 2 / 3;
        align-self: center;
        justify-content: flex-end;
        flex-wrap: nowrap;
    }

    .customer-card {
        grid-template-columns: minmax(0, 1fr) 112px;
        gap: 12px;
        padding: 12px;
    }

    .customer-card-status {
        justify-self: end;
    }

    .customer-status-menu {
        width: 112px;
    }

    .customer-status-dropdown {
        right: 0;
        left: auto;
    }

    .customer-card-meta {
        grid-column: 1 / -1;
        grid-template-columns: 1fr;
        gap: 10px;
        padding-top: 2px;
    }

    .gallery-header {
        flex-direction: column;
    }

    .users-header {
        flex-direction: column;
    }

    .gallery-toolbar {
        width: 100%;
        justify-content: space-between;
    }

    .gallery-upload-actions,
    .gallery-upload-submit-actions {
        width: 100%;
    }

    .gallery-upload-actions {
        align-items: stretch;
    }

    .gallery-upload-submit-actions {
        justify-content: space-between;
    }

    .user-permission-field {
        grid-template-columns: 1fr;
    }

    .gallery-folder-grid,
    .gallery-image-grid {
        grid-template-columns: 1fr;
    }

    .ceiling-price-fields {
        grid-template-columns: 1fr;
    }

    .ceiling-price-field .ceiling-price-input {
        border-top: 1px solid rgba(31, 45, 70, 0.08);
        border-left: 0;
    }

    .ceiling-price-field .ceiling-price-input:first-child {
        border-top: 0;
    }

    .material-service-line-card {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .material-service-line-delete {
        grid-column: 2;
        justify-self: end;
    }

    .material-service-dimension-field {
        border-top: 1px solid rgba(31, 45, 70, 0.08);
    }
}
