@font-face {
    font-family: Vazirmatn;
    src: url("fonts/Vazirmatn-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: Vazirmatn;
    src: url("fonts/Vazirmatn-Bold.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}

:root {
    --bg: #0b0f18;
    --surface: #121925;
    --surface-raised: #192231;
    --text: #edf2fb;
    --muted: #9aa8bd;
    --border: #b3c8f212;
    --accent: #5b8cff;
    --radius: 18px;
    --sidebar-width: 260px;
}

body {
    font-family: Vazirmatn, Tahoma, sans-serif;
    background-image: radial-gradient(ellipse at 12% 0, #28456a12, transparent 45%);
}

body.light {
    --bg: #f3f6fb;
    --surface: #ffffff;
    --surface-raised: #edf2f9;
    --text: #1c2940;
    --muted: #61718a;
    --border: #1e3a5c16;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

button,
.button,
a,
input,
select,
textarea {
    transition: background-color 160ms, border-color 160ms, box-shadow 160ms;
}

button,
.button {
    font-size: 13px;
    min-height: 42px;
}

button:hover,
.button:hover {
    box-shadow: 0 4px 18px color-mix(in srgb, var(--accent) 14%, transparent);
}

.sidebar {
    width: var(--sidebar-width);
    padding: 28px 18px 18px;
    z-index: 60;
    background: var(--surface);
}

.brand {
    color: var(--text);
    margin-bottom: 27px;
    padding-inline: 8px;
}

.brand b {
    position: relative;
    background: linear-gradient(140deg, var(--accent), #584aca);
    box-shadow: 0 8px 20px #334e8b30;
    border-radius: 15px;
}

.brand-dot {
    position: absolute;
    bottom: -3px;
    left: -3px;
    width: 12px;
    height: 12px;
    background: #47d9a5;
    border: 3px solid var(--surface);
    border-radius: 50%;
}

.brand em {
    color: var(--accent);
    font: 9px Arial, sans-serif;
    letter-spacing: 1.5px;
    display: inline-block;
    margin-right: 5px;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 3px;
    vertical-align: middle;
}

.workspace-chip {
    border: 1px solid var(--border);
    padding: 9px 11px;
    border-radius: 10px;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.workspace-chip>span:last-child {
    margin-right: auto;
    font: 9px Arial, sans-serif;
    color: var(--accent);
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    scrollbar-width: thin;
    flex: 1;
    margin: 0;
    padding-left: 5px;
}

.nav-heading {
    font-size: 10px;
    color: var(--muted);
    padding: 17px 14px 7px;
    opacity: 0.8;
}

.sidebar nav a {
    padding: 10px 13px;
    font-size: 12px;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
}

.sidebar nav .selected {
    border-color: color-mix(in srgb, var(--accent) 18%, transparent);
}

.sidebar nav .nav-icon {
    font-size: 18px;
    width: 22px;
    text-align: center;
}

.sidebar nav a small {
    margin-right: auto;
    background: var(--bg);
    border-radius: 4px;
    font-size: 9px;
    padding: 0 5px;
}

.sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    margin-top: 20px;
    padding-top: 18px;
    font-size: 11px;
}

.sidebar-footer .avatar {
    min-width: 34px;
    width: 34px;
    height: 34px;
}

.sidebar-footer .person small {
    font-size: 9px;
}

.logout-button {
    color: var(--muted);
    background: transparent;
    font-size: 22px;
    padding: 5px 8px;
}

main {
    margin-right: var(--sidebar-width);
    padding: 0 36px 24px;
}

.topbar {
    min-height: 73px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    margin-bottom: 29px;
}

.breadcrumb,
.top-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 11px;
    color: var(--muted);
}

.breadcrumb strong {
    font-weight: 400;
    color: var(--text);
}

.icon-button {
    display: inline-grid;
    place-content: center;
    padding: 3px;
    width: 35px;
    height: 35px;
    min-height: 35px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 20px;
}

#menu-toggle,
.mobile-shade {
    display: none;
}

.version-chip {
    font: 9px Arial, sans-serif;
    letter-spacing: 1.5px;
    color: var(--muted);
}

header {
    margin-bottom: 25px;
}

header h1 {
    font-size: 25px;
    font-weight: 700;
    margin-top: 7px;
}

.eyebrow {
    color: var(--accent);
    font-size: 9px;
    letter-spacing: 2px;
}

.header-actions {
    display: flex;
    gap: 9px;
}

.small-button {
    padding: 7px 13px;
    min-height: 35px;
    font-size: 11px;
}

.card {
    box-shadow: 0 2px 12px #00000005;
    padding: 24px;
}

.hero {
    position: relative;
    padding: 35px 38px;
    border-color: color-mix(in srgb, var(--accent) 19%, var(--border));
    background: radial-gradient(ellipse at 8% 90%, #5854e523, transparent 55%), linear-gradient(110deg, color-mix(in srgb, var(--accent) 9%, var(--surface)), var(--surface));
}

.hero h2 {
    margin: 14px 0 7px;
    font-size: 30px;
}

.hero p {
    font-size: 12px;
    margin-bottom: 24px;
}

.hero-links {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 12px;
}

.orb {
    border-radius: 28px;
    background: linear-gradient(135deg, #ffffff08, #00000008);
    font-size: 65px;
    width: 135px;
    height: 135px;
    transform: rotate(-12deg);
    box-shadow: 0 0 65px color-mix(in srgb, var(--accent) 13%, transparent), inset 0 0 40px color-mix(in srgb, var(--accent) 10%, transparent);
}

.orb span {
    font-size: 8px;
    letter-spacing: 3px;
}

.stat-card {
    padding: 20px;
}

.stat-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label>span {
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    height: 29px;
    width: 29px;
    display: grid;
    place-content: center;
    border-radius: 8px;
    font-size: 18px;
}

.stat-card h2 {
    font-size: 26px;
    margin: 14px 0;
    letter-spacing: -0.5px;
}

.stat-card h2 small {
    font-size: 10px;
    margin-right: 6px;
    font-weight: 400;
}

.stat-bottom {
    color: var(--muted);
    font-size: 9px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.stat-bottom .dot {
    margin-left: 5px;
}

.analytics-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
}

.chart-card h3,
.action-center h3 {
    font-size: 15px;
}

.sales-chart {
    height: 200px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    direction: ltr;
    gap: 14px;
    padding: 15px 10px 0;
    background: repeating-linear-gradient(to top, transparent 0 45px, var(--border) 45px 46px);
}

.chart-column {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    align-items: center;
    justify-content: flex-end;
    font: 9px Vazirmatn, sans-serif;
    color: var(--muted);
}

.chart-bar {
    width: 62%;
    max-width: 45px;
    min-height: 2px;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(to top, color-mix(in srgb, var(--accent) 30%, var(--surface)), var(--accent));
    margin-bottom: 10px;
    opacity: 0.85;
}

.chart-column:hover .chart-bar {
    opacity: 1;
    box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 20%, transparent);
}

.action-center>h3 {
    margin: 12px 0 10px;
}

.queue-row {
    padding: 17px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text);
}

.queue-row:last-child {
    border-bottom: 0;
}

.queue-row b {
    font-size: 20px;
    color: var(--accent);
    margin-left: 11px;
}

.queue-row strong {
    font-size: 18px;
}

.queue-row strong small {
    font-size: 14px;
    margin-right: 14px;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.quick-grid>a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
}

.quick-grid>a>span {
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border-radius: 12px;
    padding: 5px 14px;
    font-size: 23px;
}

.quick-grid strong {
    font-size: 12px;
}

.quick-grid small {
    display: block;
    font-size: 9px;
    margin-top: 5px;
}

.quick-grid b {
    margin-right: auto;
    color: var(--muted);
}

.studio-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 32px;
    margin-bottom: 24px;
    border-radius: var(--radius);
    border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border));
    background: radial-gradient(ellipse at 0% 100%, #6653e21f, transparent 50%), var(--surface);
}

.studio-banner h2 {
    font-size: 24px;
    margin: 10px 0 5px;
}

.studio-banner p {
    color: var(--muted);
    font-size: 12px;
    margin: 5px 0;
}

.banner-metric {
    min-width: 100px;
    text-align: center;
    border-right: 1px solid var(--border);
    padding-right: 30px;
}

.banner-metric strong {
    display: block;
    font-size: 38px;
    color: var(--accent);
    line-height: 1.4;
}

.banner-metric span {
    font-size: 10px;
    color: var(--muted);
}

.editor-toolbar {
    padding: 18px 22px;
}

.editor-toolbar .filters {
    margin: 0;
}

.global-color {
    display: flex;
    align-items: center;
    gap: 20px;
    border-top: 1px solid var(--border);
    padding-top: 15px;
    margin-top: 16px;
    font-size: 11px;
}

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

.editor-card {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow: hidden;
}

.editor-card:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.editor-card-head,
.editor-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.editor-card-head .badge {
    font-size: 9px;
}

.editor-card-head small {
    font-size: 9px;
    white-space: nowrap;
}

.modified-dot {
    color: #34d399;
}

.editor-card h3 {
    font-size: 13px;
    margin: 18px 0 7px;
}

.text-excerpt {
    font-size: 11px;
    color: var(--muted);
    white-space: pre-wrap;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    min-height: 85px;
    margin: 0 0 18px;
    line-height: 1.9;
}

.editor-card-footer {
    border-top: 1px solid var(--border);
    margin-top: auto;
    padding-top: 14px;
    font-size: 11px;
}

.code-label {
    font: 10px/1.7 Consolas, monospace;
    direction: ltr;
    overflow-wrap: anywhere;
    color: var(--muted);
}

.editor-card-footer .code-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 65%;
}

.editor-grid+.pagination {
    margin-top: 24px;
    padding: 16px 22px;
}

.mini-telegram {
    background: #0c131d;
    border: 1px solid #ffffff08;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 18px 0;
}

.mini-chat-bubble {
    background: #1c2d3f;
    border-radius: 9px 9px 2px 9px;
    align-self: flex-start;
    font-size: 11px;
    padding: 5px 17px;
    color: #d8e2f2;
}

.telegram-button {
    background: #284158;
    border: 1px solid #ffffff12;
    padding: 10px 12px;
    border-radius: 8px;
    text-align: center;
    color: #fff;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.telegram-button.primary {
    background: #3066a6;
}

.telegram-button.success {
    background: #247d52;
}

.telegram-button.danger {
    background: #a44348;
}

.telegram-button.none {
    background: #284158;
}

.backlink {
    display: inline-block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 22px;
}

.studio-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    align-items: start;
    gap: 28px;
}

.edit-surface input:not([type=hidden]):not([type=radio]),
.edit-surface select,
textarea {
    display: block;
    width: 100%;
    margin: 8px 0 20px;
}

textarea {
    resize: vertical;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    color: var(--text);
    background: var(--bg);
    font-size: 13px;
    line-height: 2;
    outline: none;
    min-height: 120px;
}

textarea:focus {
    border-color: var(--accent);
}

.field-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: -8px;
    font-size: 10px;
    color: var(--muted);
}

.variable-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 20px 0;
}

.variable-chip {
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--accent);
    border-radius: 7px;
    padding: 5px 10px;
    min-height: 30px;
    font: 11px Consolas, monospace;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 22px;
    margin-top: 20px;
    border-top: 1px solid var(--border);
}

.default-details {
    margin-top: 24px;
    font-size: 12px;
    max-width: none;
}

pre {
    font: 12px/2 Vazirmatn, sans-serif;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--muted);
    background: var(--bg);
    padding: 16px;
    border-radius: 8px;
    max-height: 320px;
    overflow: auto;
}

.preview-heading {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 10px;
    margin: 5px 0 18px;
}

.telegram-phone {
    border: 5px solid #273246;
    border-radius: 29px;
    background: #101e2d;
    overflow: hidden;
    color: #e1e9f4;
    box-shadow: 0 20px 60px #00000020;
}

.phone-status {
    background: #17283b;
    font-size: 9px;
    padding: 8px 20px 0;
    direction: ltr;
    display: flex;
    justify-content: space-between;
}

.phone-chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #17283b;
    padding: 14px;
    font-size: 12px;
}

.phone-chat-header .avatar {
    background: #3563a8;
    color: #fff;
}

.phone-chat-header small {
    display: block;
    font-size: 9px;
    color: #a5b6ce;
}

.phone-chat-header>span:last-child {
    margin-right: auto;
}

.phone-conversation {
    min-height: 300px;
    padding: 15px 13px 30px;
    background: radial-gradient(ellipse at bottom left, #27436650, transparent 80%), #101e2d;
}

.phone-date {
    background: #00000030;
    padding: 2px 12px;
    color: #9eb1c9;
    width: max-content;
    margin: 0 auto 20px;
    border-radius: 20px;
    font-size: 9px;
}

.phone-message {
    background: #1e344b;
    border: 1px solid #ffffff06;
    color: #e0eafa;
    padding: 13px 15px;
    border-radius: 12px 12px 3px 12px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 12px;
    line-height: 2;
    max-height: 480px;
    overflow: auto;
    margin-bottom: 6px;
}

.preview-caption {
    font-size: 9px;
    line-height: 1.8;
    color: #a5b6ce;
    display: block;
    margin: 12px 5px 0;
}

.phone-input {
    display: flex;
    justify-content: space-between;
    padding: 12px 18px;
    background: #17283b;
    font-size: 12px;
    color: #90a2bb;
}

.hint-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-top: 24px;
    color: var(--muted);
    font-size: 11px;
    line-height: 2;
    background: color-mix(in srgb, var(--accent) 4%, var(--surface));
}

.hint-card h4 {
    color: var(--text);
    font-size: 12px;
    margin: 0 0 8px;
}

.hint-card p {
    margin: 6px 0;
}

.style-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 10px 0 25px;
}

.style-option {
    position: relative;
}

.style-option input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.style-option span {
    display: block;
    padding: 10px;
    border: 2px solid transparent;
    outline: 1px solid var(--border);
    background: var(--bg);
    border-radius: 9px;
    font-size: 11px;
    text-align: center;
    color: var(--muted);
    cursor: pointer;
}

.style-option.primary span {
    background: #3066a626;
    color: #83b7ff;
}

.style-option.success span {
    background: #247d5226;
    color: #60d89a;
}

.style-option.danger span {
    background: #a4434826;
    color: #ff9da1;
}

.style-option input:checked+span {
    border-color: currentColor;
}

.style-option input:focus-visible+span {
    outline: 2px solid var(--accent);
}

.emoji-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 15px;
}

.emoji-preset {
    padding: 4px;
    background: var(--bg);
    border: 1px solid var(--border);
    min-height: 34px;
    width: 36px;
    font-size: 19px;
}

.settings-tabs {
    overflow: auto;
    white-space: nowrap;
    padding-bottom: 4px;
}

.settings-tabs a {
    font-size: 12px;
    padding: 10px 24px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 28px;
    margin-top: 28px;
}

.settings-grid label {
    font-size: 12px;
}

.settings-grid select,
.settings-grid textarea {
    width: 100%;
    display: block;
    margin-top: 8px;
}

.settings-grid input {
    margin-bottom: 0;
}

.product-card h3 {
    margin: 22px 0;
    font-size: 17px;
}

.product-card label {
    font-size: 11px;
}

.product-card select {
    display: block;
    width: 100%;
    margin: 8px 0 20px;
}

.product-card button {
    width: 100%;
    margin-top: 10px;
}

.status-light {
    font-size: 10px;
    color: #f87171;
}

.status-light.on {
    color: #34d399;
}

.notice {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text);
}

.notice.error {
    border-color: #f8717140;
    background: #f8717112;
    color: #fa9393;
}

.mobile-shade {
    padding: 0;
}

body.light .style-option.primary span {
    color: #245bae;
}

body.light .style-option.success span {
    color: #167449;
}

body.light .style-option.danger span {
    color: #ad2632;
}

body.light .notice.error {
    color: #b02937;
}

body.light .badge.done,
body.light .badge.confirmed,
body.light .badge.approved {
    color: #14744a;
}

body.light .badge.rejected {
    color: #b72b3c;
}

body.light .badge.pending,
body.light .badge.processing {
    color: #946300;
}

footer {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    padding-top: 20px;
    margin-top: 35px;
    font: 9px Vazirmatn, sans-serif;
    letter-spacing: 0;
}

footer span:first-child {
    font-family: Arial, sans-serif;
    letter-spacing: 2px;
}

.loginmain {
    margin: 0;
    padding: 25px;
}

[hidden] {
    display: none !important;
}

@media (min-width: 1700px) {
    main {
        padding-right: 55px;
        padding-left: 55px;
    }

    .studio-workspace {
        grid-template-columns: minmax(0, 1fr) 350px;
    }
}

@media (max-width: 1200px) {
    :root {
        --sidebar-width: 225px;
    }

    main {
        padding: 0 24px 24px;
    }

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

    .studio-workspace {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 20px;
    }

    .quick-grid {
        gap: 12px;
    }

    .quick-grid>a {
        padding: 15px;
        gap: 8px;
    }

    .quick-grid>a>span {
        padding: 4px 10px;
    }
}

@media (max-width: 960px) {
    .studio-workspace {
        grid-template-columns: 1fr;
    }

    .preview-column {
        width: min(340px, 100%);
        margin: 0 auto 24px;
    }

    .analytics-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

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

    .hero h2 {
        font-size: 26px;
    }

    .header-actions .ghost {
        display: none;
    }

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

@media (max-width: 760px) {
    :root {
        --sidebar-width: 260px;
    }

    .sidebar {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        transform: translateX(101%);
        transition: transform 180ms;
        padding: 25px 18px;
        border-left: 1px solid var(--border);
    }

    body.nav-open .sidebar {
        transform: translateX(0);
    }

    body.nav-open .mobile-shade {
        display: block;
        position: fixed;
        inset: 0;
        background: #030810a6;
        z-index: 50;
        border: 0;
        border-radius: 0;
    }

    body.nav-open {
        overflow: hidden;
    }

    .sidebar nav {
        display: flex;
        flex-direction: column;
        overflow: auto;
    }

    .sidebar nav a {
        white-space: normal;
    }

    .sidebar nav .nav-icon {
        display: inline-block;
    }

    .sidebar .brand {
        margin-bottom: 25px;
        font-size: 23px;
    }

    .sidebar .brand b {
        width: 48px;
        height: 48px;
    }

    main {
        margin: 0;
        padding: 0 18px 22px;
    }

    .topbar {
        min-height: 65px;
        margin-bottom: 22px;
    }

    #menu-toggle {
        display: inline-grid;
    }

    .version-chip {
        display: none;
    }

    header h1 {
        font-size: 23px;
    }

    .header-actions>.button {
        font-size: 10px;
        padding: 7px 10px;
    }

    .hero {
        padding: 25px;
    }

    .hero h2 {
        font-size: 26px;
    }

    .hero-links {
        flex-wrap: wrap;
        gap: 14px;
    }

    .orb {
        display: none;
    }

    .studio-banner {
        padding: 22px;
    }

    .studio-banner h2 {
        font-size: 21px;
    }

    .banner-metric {
        padding-right: 15px;
        min-width: 80px;
    }

    .banner-metric strong {
        font-size: 30px;
    }

    .card {
        padding: 18px;
    }

    .stat-card h2 {
        font-size: 23px;
    }

    .stat-label small {
        font-size: 10px;
    }

    .global-color {
        flex-wrap: wrap;
        gap: 10px;
    }

    .editor-grid {
        gap: 14px;
    }

    .breadcrumb {
        font-size: 10px;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    main {
        padding-inline: 13px;
    }

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

    .banner-metric {
        display: none;
    }

    .studio-banner h2 {
        font-size: 22px;
    }

    .studio-banner p {
        font-size: 11px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card h2 {
        font-size: 20px;
    }

    .stat-label>span {
        height: 25px;
        width: 25px;
        font-size: 16px;
    }

    .stat-bottom {
        font-size: 8px;
    }

    .stat-card h2 small {
        font-size: 9px;
    }

    .header-actions {
        display: none;
    }

    .style-options {
        gap: 7px;
    }

    .style-option span {
        padding: 10px 5px;
        font-size: 10px;
    }

    .field-meta {
        flex-direction: column;
        gap: 5px;
    }

    .form-actions>button {
        flex: 1;
        font-size: 11px;
    }

    footer span:last-child {
        font-size: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

.ticket-thread {
    display: grid;
    gap: 14px;
    padding-block: 20px;
    margin-bottom: 20px;
    max-height: 550px;
    overflow: auto;
}

.thread-message {
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: 12px;
    padding: 16px;
    margin-left: 30px;
}

.thread-message.staff {
    background: color-mix(in srgb, var(--accent) 8%, var(--surface));
    margin-left: 0;
    margin-right: 30px;
}

.thread-message>div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 11px;
}

.thread-message small {
    font-size: 9px;
}

.thread-message p {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 12px;
}

.coupon-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1.5fr auto;
    gap: 15px;
    align-items: end;
}

.coupon-form label {
    font-size: 11px;
}

.coupon-form input {
    width: 100%;
    margin-bottom: 0;
}

.coupon-card label {
    font-size: 11px;
}

.coupon-code {
    color: var(--accent);
    font: 20px Consolas, monospace;
}

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

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