/* Reklam Rehberim — panel arayüzü (Linear / Vercel / Stripe hissi) */

:root {
    --bg: #F6F7F9;
    --surface: #FFFFFF;
    --sunken: #F1F3F5;
    --border: #E4E7EB;
    --border-strong: #CDD2D9;
    --text: #0E1116;
    --text-2: #545C68;
    --text-3: #8A929E;
    --ink: #14171C;
    --ink-text: #FFFFFF;
    --accent: #2F5BEA;
    --accent-soft: #EDF1FE;
    --pos: #0F7B4F;
    --neg: #C2312B;
    --warn: #A9741B;

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    --radius: 8px;
    --radius-sm: 6px;
    --sidebar-w: 232px;
    --sidebar-collapsed: 56px;
    --content-max: 1440px;
    --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}

[data-theme="dark"] {
    --bg: #0B0D10;
    --surface: #14171C;
    --sunken: #0F1216;
    --border: #232830;
    --border-strong: #333B45;
    --text: #E9ECF1;
    --text-2: #99A2AE;
    --text-3: #6B7482;
    --ink: #E9ECF1;
    --ink-text: #14171C;
    --accent: #6E8BFF;
    --accent-soft: #182238;
    --pos: #3FB27F;
    --neg: #E56B63;
    --warn: #D2A24C;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    font-family: var(--font-sans);
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.45;
    color: var(--text);
    background: var(--bg);
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

.tabular,
.num,
.mono,
td.num,
th.num,
.kpi-value,
.creative-metrics,
.account-id,
.report-range,
.share-url-input {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

/* ——— Focus ——— */
:focus {
    outline: none;
}

:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}

/* ——— Shell ——— */
.app-body {
    min-height: 100vh;
}

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

.sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    width: var(--sidebar-w);
    height: 100vh;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-right: 1px solid var(--border);
    z-index: 40;
}

.sidebar-brand {
    height: 56px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.sidebar-logo {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    flex-shrink: 0;
}

.sidebar-brand-text {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 8px 8px 12px;
    flex: 1;
    overflow-y: auto;
}

.nav-group + .nav-group {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.nav-group-label {
    padding: 6px 10px 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
    user-select: none;
    pointer-events: none;
}

.nav-group-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-link .nav-label {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
}

.nav-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--neg) 16%, transparent);
    color: var(--neg);
    font-size: 10px;
    font-weight: 600;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 34px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    text-decoration: none;
}

.nav-link:hover {
    background: var(--sunken);
    color: var(--text);
    text-decoration: none;
}

.nav-link.is-active {
    background: var(--sunken);
    color: var(--text);
}

.nav-link.is-active .nav-icon {
    color: var(--accent);
}

.nav-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-3);
}

.nav-link:hover .nav-icon {
    color: var(--text-2);
}

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.sidebar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--sunken);
    color: var(--text-2);
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-mono);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-user-text {
    min-width: 0;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 1px;
}

.sidebar-logout {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-3);
    flex-shrink: 0;
    text-decoration: none;
}

.sidebar-logout:hover {
    background: var(--sunken);
    color: var(--text);
    text-decoration: none;
}

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    padding: 0 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 30;
}

.sidebar-toggle {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.app-top {
    display: none;
}

.app-content {
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 24px 32px 48px;
    flex: 1;
}

.sidebar-backdrop {
    display: none;
}

body.sidebar-open .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(14, 17, 22, 0.4);
    z-index: 45;
}

/* ——— Page header ——— */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.page-header-text {
    min-width: 0;
}

.page-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.25;
    color: var(--text);
}

.page-desc {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--text-2);
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.section-title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-3);
}

.card-title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-3);
}

/* ——— Theme toggle ——— */
.theme-toggle {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.theme-toggle:hover {
    background: var(--sunken);
    color: var(--text);
}

[data-theme="light"] .theme-toggle .icon-moon,
[data-theme="dark"] .theme-toggle .icon-sun {
    display: none;
}

/* ——— Buttons ——— */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--ink);
    color: var(--ink-text);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    filter: brightness(1.08);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: none;
}

.btn-ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}

.btn-ghost:hover {
    background: var(--sunken);
    filter: none;
}

.btn-quiet {
    background: transparent;
    border-color: transparent;
    color: var(--text-2);
}

.btn-quiet:hover {
    background: var(--sunken);
    color: var(--text);
    filter: none;
}

.btn-danger {
    background: transparent;
    border-color: var(--border);
    color: var(--neg);
}

.btn-danger:hover {
    background: color-mix(in srgb, var(--neg) 10%, transparent);
    filter: none;
}

.btn-sm {
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

.link-btn {
    appearance: none;
    border: 0;
    background: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-size: 12px;
    color: var(--accent);
    cursor: pointer;
}

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

.link-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ——— Badges ——— */
.badge {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.badge-muted {
    background: color-mix(in srgb, var(--text-3) 12%, transparent);
    color: var(--text-3);
}

.badge-pos,
.badge-ok {
    background: color-mix(in srgb, var(--pos) 12%, transparent);
    color: var(--pos);
}

.badge-neg {
    background: color-mix(in srgb, var(--neg) 12%, transparent);
    color: var(--neg);
}

.badge-warn {
    background: color-mix(in srgb, var(--warn) 14%, transparent);
    color: var(--warn);
}

.badge-accent {
    background: var(--accent-soft);
    color: var(--accent);
}

/* ——— Flash / empty ——— */
.flash {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    margin-bottom: 16px;
    font-size: 13px;
}

.flash-ok {
    border-color: color-mix(in srgb, var(--pos) 35%, var(--border));
    background: color-mix(in srgb, var(--pos) 8%, var(--surface));
}

.flash-error {
    border-color: color-mix(in srgb, var(--neg) 35%, var(--border));
    background: color-mix(in srgb, var(--neg) 8%, var(--surface));
}

.flash-warn {
    border-color: color-mix(in srgb, var(--warn) 35%, var(--border));
    background: color-mix(in srgb, var(--warn) 8%, var(--surface));
}

.report-admin-mismatch {
    font-size: 13px;
    margin: 8px 0 0;
}

.flash-password {
    margin-top: 8px;
}

.flash-password code,
.flash-password input {
    font-family: var(--font-mono);
    font-size: 12px;
}

.empty-state {
    padding: 40px 16px;
    text-align: center;
}

.empty-state-title {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-2);
}

.empty-state-desc {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--text-3);
}

.empty-state-action {
    margin-top: 12px;
}

/* ——— Cards (sparse) ——— */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.card-flush {
    padding: 0;
    overflow: hidden;
}

.card-flush .toolbar {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.panel {
    margin-bottom: 32px;
}

.panel + .panel {
    padding-top: 0;
}

.divider {
    height: 1px;
    background: var(--border);
    border: 0;
    margin: 16px 0;
}

/* ——— Toolbar ——— */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.toolbar-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-2);
}

/* ——— Forms ——— */
.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.field-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-2);
}

.field-hint {
    margin: 0;
    font-size: 12px;
    color: var(--text-3);
}

.field-inline {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.field-align-end {
    justify-content: flex-end;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
select,
textarea {
    width: 100%;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
}

textarea {
    height: auto;
    min-height: 80px;
    padding: 8px 10px;
    resize: vertical;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    border-color: var(--accent);
    box-shadow: var(--focus);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' fill='none' stroke='%238A929E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

[data-theme="dark"] select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' fill='none' stroke='%236B7482' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0.55;
    cursor: pointer;
    filter: invert(0.4);
}

[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.75);
}

.input-compact {
    height: 28px;
    padding: 0 8px;
    font-size: 12px;
    font-family: var(--font-mono);
    width: 88px;
    text-align: right;
}

.switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-2);
    cursor: pointer;
}

.switch input {
    width: auto;
    height: auto;
}

/* Segmented control (rapor tipi) */
.segmented,
.radio-row {
    display: inline-flex;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--sunken);
    gap: 0;
    width: fit-content;
    max-width: 100%;
}

.segmented label,
.radio-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    padding: 0 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    cursor: pointer;
    margin: 0;
}

.segmented label span,
.radio-chip span {
    position: relative;
    z-index: 1;
}

.segmented input,
.radio-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.segmented label:has(input:checked),
.radio-chip:has(input:checked) {
    background: var(--surface);
    color: var(--text);
}

fieldset.field {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}

fieldset.field > legend.field-label {
    padding: 0;
    margin-bottom: 6px;
}

/* Preset chips */

.segmented-wrap {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    gap: 2px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--sunken);
}
.segment-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--text-2);
    height: 28px;
    padding: 0 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    flex: 1 1 auto;
    white-space: nowrap;
}
.segment-btn:hover {
    color: var(--text);
}
.segment-btn.is-selected {
    background: var(--surface);
    color: var(--text);
}
a.segment-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-sizing: border-box;
}
@media (max-width: 720px) {
    .segment-btn {
        flex: 1 1 calc(50% - 2px);
    }
}

.preset-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.preset-row .btn,
.preset-row .btn-ghost,
.preset-row .btn-quiet {
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
}

.preset-row .btn-quiet.is-selected,
.preset-row .btn.is-selected {
    background: var(--accent-soft);
    color: var(--accent);
}

/* ——— Tables ——— */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table th,
.table td {
    height: 40px;
    padding: 0 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}

.table th {
    position: sticky;
    top: 0;
    z-index: 2;
    height: 36px;
    background: var(--sunken);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-3);
}

.table tbody tr:hover td {
    background: var(--sunken);
}

.table .num,
.table td.num,
.table th.num {
    text-align: right;
}

.table .cell-muted,
.cell-muted {
    color: var(--text-3);
    font-size: 12px;
    font-family: var(--font-mono);
}

.table .cell-ellipsis,
.cell-ellipsis {
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cell-actions,
.row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    white-space: nowrap;
}

.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    flex-wrap: wrap;
}

.inline-form select,
.table select {
    height: 28px;
    font-size: 12px;
    width: auto;
    min-width: 110px;
}

.table-total td {
    background: var(--sunken);
    font-weight: 500;
}

.row-save-btn {
    visibility: hidden;
    opacity: 0;
}

.row-dirty .row-save-btn,
.inline-form.is-dirty .row-save-btn {
    visibility: visible;
    opacity: 1;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ——— Admin tabs ——— */
.admin-tabs {
    display: flex;
    gap: 0;
    margin: -8px 0 24px;
    border-bottom: 1px solid var(--border);
}

.admin-tab {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 12px;
    margin-bottom: -1px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.admin-tab:hover {
    color: var(--text);
    text-decoration: none;
}

.admin-tab.is-active {
    color: var(--text);
    border-bottom-color: var(--text);
}

/* Sync bar */
.sync-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 0 0 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
    background: transparent;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
}

.sync-bar.card {
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    padding: 0 0 16px;
    margin-bottom: 16px;
}

.sync-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.sync-bar-status {
    font-size: 12px;
    color: var(--text-3);
}

.sync-bar-status.is-stale {
    color: var(--warn);
}

.sync-bar-sep {
    color: var(--text-3);
}

.sync-bar-form {
    margin: 0;
}

/* ——— Assignments ——— */
.assign-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    min-height: 0;
}

.assign-users {
    padding: 12px;
    max-height: calc(100vh - 160px);
    overflow: auto;
}

.assign-user-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.assign-user-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
}

.assign-user-link:hover {
    background: var(--sunken);
    text-decoration: none;
}

.assign-user-link.is-active {
    background: var(--sunken);
}

.assign-user-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.assign-user-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.assign-user-count {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-3);
}

.assign-main {
    min-width: 0;
}

.assign-search-bar {
    margin-bottom: 12px;
}

.assign-search-bar input {
    width: 100%;
}

.assign-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    min-height: 0;
}

.assign-cols .card,
.assign-cols section {
    max-height: calc(100vh - 220px);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.assign-cols .table-wrap {
    flex: 1;
    overflow: auto;
}

.assign-empty {
    margin: 0;
    padding: 24px 12px;
    text-align: center;
    color: var(--text-3);
    font-size: 13px;
}

.assign-row-action {
    opacity: 0.35;
}

.assign-cols tr:hover .assign-row-action {
    opacity: 1;
}

/* ——— Reports form ——— */
.report-form {
    max-width: 720px;
}

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

.report-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--border);
}

/* ——— Report view ——— */
.report-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.report-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.report-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 0 0 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
    background: transparent;
}

.report-hero.card {
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    padding: 0 0 16px;
    margin-bottom: 16px;
}

.report-agency {
    margin: 0 0 4px;
    font-size: 12px;
    color: var(--text-3);
}

.report-hero-brand {
    justify-content: center;
    text-align: center;
}

.report-brand-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.report-brand-logo {
    height: 56px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
}

.report-brand-name {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.report-range {
    margin: 6px 0 0;
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-3);
}

.report-hero-brand .report-range {
    margin: 0;
}

.kpi-strip,
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
    margin-bottom: 24px;
}

.kpi-cell,
.kpi-card {
    min-height: 72px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: transparent;
    position: relative;
}

.kpi-strip > :last-child,
.kpi-grid > :last-child {
    border-right: 0;
}

.kpi-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-3);
    margin: 0;
}

.kpi-value {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--text);
}

.kpi-note {
    margin: 0;
    font-size: 11px;
    color: var(--text-3);
}

.kpi-edit {
    display: none;
}

.report-section {
    margin-top: 32px;
}

.report-section .card-flush,
.report-section.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

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

.creative-card {
    display: flex;
    gap: 12px;
    align-items: stretch;
    padding: 12px;
    min-height: 120px;
    height: 100%;
}

.creative-thumb {
    width: 96px;
    height: 96px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--sunken);
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.creative-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.creative-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-3);
}

.creative-body {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.creative-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.creative-camp {
    font-size: 12px;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.creative-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-2);
}

.report-sync-meta {
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.inline-refresh {
    display: inline;
    margin: 0;
}

.share-url-input {
    width: 100%;
    height: 32px;
}

/* Users reveal form */
.user-add-wrap[hidden],
.user-add-wrap[hidden] * {
    display: none !important;
}

.user-add-panel {
    padding: 12px 0 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

/* ——— Login ——— */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg);
}

.login-main {
    width: 100%;
    max-width: 380px;
}

.login-theme-wrap {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.login-wrap {
    width: 100%;
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.login-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.login-sub {
    margin: 6px 0 20px;
    font-size: 13px;
    color: var(--text-2);
}

.alert {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-bottom: 16px;
    font-size: 13px;
}

.alert-error {
    border-color: color-mix(in srgb, var(--neg) 35%, var(--border));
    background: color-mix(in srgb, var(--neg) 8%, var(--surface));
    color: var(--text);
}

/* Public report */
.report-public-body {
    background: var(--bg);
    min-height: 100vh;
}

.report-public-wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 24px 32px 48px;
}

.report-public-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.report-public-brand {
    font-size: 13px;
    font-weight: 600;
}

.report-public-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.print-only {
    display: none;
}

/* ——— Responsive ——— */
@media (max-width: 1100px) {
    .sidebar {
        width: var(--sidebar-collapsed);
    }

    .nav-group-label {
        display: none;
    }

    .nav-badge {
        display: none;
    }

    .nav-link .nav-label {
        display: none;
    }

    .sidebar-brand-text,
    .sidebar-user-text {
        font-size: 0;
    }

    .nav-link {
        font-size: 0;
        gap: 0;
        justify-content: center;
        padding: 0;
        width: 40px;
        margin: 0 auto;
    }

    .sidebar-brand {
        justify-content: center;
        padding: 0;
    }

    .sidebar-footer {
        justify-content: center;
        padding: 12px 8px;
    }

    .sidebar-user {
        justify-content: center;
    }

    .sidebar-logout {
        display: none;
    }

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

    .assign-layout {
        grid-template-columns: 200px minmax(0, 1fr);
    }
}

@media (max-width: 1024px) {
    .report-form-grid,
    .assign-cols,
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .app-topbar {
        display: flex;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: var(--sidebar-w);
        transform: translateX(-100%);
        z-index: 50;
    }

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

    .sidebar-brand-text,
    .sidebar-user-text {
        font-size: 13px;
    }

    .nav-group-label {
        display: block;
    }

    .nav-badge {
        display: inline-flex;
    }

    .nav-link .nav-label {
        display: inline;
        font-size: 13px;
    }

    .nav-link {
        width: auto;
        margin: 0;
        font-size: 13px;
        justify-content: flex-start;
        gap: 10px;
        padding: 0 10px;
    }

    .sidebar-brand {
        justify-content: flex-start;
        padding: 0 16px;
    }

    .sidebar-footer {
        justify-content: flex-start;
        padding: 12px;
    }

    .sidebar-logout {
        display: inline-flex;
    }

    .app-content,
    .report-public-wrap {
        padding: 16px 16px 40px;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

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

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

    .assign-layout {
        grid-template-columns: 1fr;
    }

    .assign-users,
    .assign-cols .card,
    .assign-cols section {
        max-height: none;
    }
}

@media (max-width: 390px) {
    .kpi-strip,
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .kpi-cell,
    .kpi-card {
        border-right: 0;
    }
}

/* ——— Print ——— */
.report-ig-section {
    margin-top: 32px;
    page-break-inside: avoid;
}

.report-ig-value {
    font-size: 24px;
    font-family: var(--font-mono);
    line-height: 1.2;
}

.report-ig-note {
    margin: 8px 0 0;
    font-size: 11px;
    color: var(--text-3);
}

.report-result-type {
    font-size: 12px;
    color: var(--text-3);
}

.report-campaigns-section {
    page-break-inside: avoid;
}

.spd-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.spd-head .section-title {
    margin: 0;
}

.spd-layout {
    display: grid;
    grid-template-columns: minmax(240px, 280px) 1fr;
    gap: 20px;
    align-items: start;
}

.spd-chart-wrap {
    position: relative;
    width: 100%;
    max-width: 280px;
}

.spd-chart-wrap canvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
}

.spd-tip {
    position: absolute;
    z-index: 5;
    max-width: 280px;
    min-width: 200px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--ink);
    color: var(--ink-text);
    font-size: 12px;
    line-height: 1.4;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.day-tip-title {
    font-weight: 600;
    margin-bottom: 6px;
}

.day-tip-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.day-tip-row span:last-child {
    font-variant-numeric: tabular-nums;
    font-family: var(--font-mono);
}

.day-tip-sep {
    height: 1px;
    margin: 6px 0;
    background: color-mix(in srgb, var(--ink-text) 22%, transparent);
}

.day-tip-note {
    margin-top: 4px;
    font-size: 11px;
    opacity: 0.7;
}

.spd-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    vertical-align: middle;
}

.spd-all-link {
    margin: 8px 0 0;
    font-size: 13px;
}

.kpi-note {
    font-weight: 400;
    font-size: 11px;
    color: var(--text-3);
}

span.is-disabled {
    color: var(--text-3);
    cursor: not-allowed;
    text-decoration: none;
    margin-left: 6px;
}

.store-products-section,
.store-web-section,
.store-sales-section {
    page-break-inside: avoid;
    break-inside: avoid;
}

/* ——— Rapor hiyerarşisi ——— */
.report-h1 {
    margin: 0 0 16px;
    padding-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0;
    text-transform: none;
    border-bottom: 1px solid var(--border);
}

.report-band-desc {
    margin: -10px 0 14px;
    font-size: 11px;
    line-height: 1.35;
    color: var(--text-3);
}

.report-summary-note {
    margin: 2px 0 0;
    font-size: 11px;
    color: var(--text-3);
}

.report-day-note {
    margin: 10px 12px 12px;
}

.report-band {
    padding: 20px 20px 8px;
    margin: 40px 0 0;
    border-radius: var(--radius);
    page-break-inside: avoid;
    break-inside: avoid;
}

.report-band-ads {
    background: var(--surface);
    border: 1px solid var(--border);
}

.report-band-store {
    background: var(--sunken);
}

.report-band-creative,
.report-band-ig {
    background: var(--surface);
}

.report-band .report-section {
    margin-top: 20px;
}

.report-band .report-section:first-of-type {
    margin-top: 0;
}

.report-band .kpi-strip {
    margin-bottom: 16px;
}

.report-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    background: var(--sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 16px 0 8px;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
}

.report-summary-cell {
    padding: 20px 24px;
    border-right: 1px solid var(--border);
}

.report-summary-cell:last-child {
    border-right: 0;
}

.report-summary-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-3);
    margin: 0 0 8px;
}

.report-summary-value {
    font-size: 42px;
    font-family: var(--font-mono);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text);
}

.report-delta {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-2);
}

.report-delta.is-pos {
    color: var(--pos);
}

.report-delta.is-neg {
    color: var(--neg);
}

.day-strip {
    display: flex;
    align-items: flex-start;
    margin: 8px 0 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    overflow: visible;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
}

.day-strip-y {
    flex: 0 0 44px;
    width: 44px;
    padding: 18px 0 0;
    position: relative;
    z-index: 1;
    background: var(--surface);
}

.day-strip-y-plot {
    position: relative;
    height: 200px;
}

.day-strip-tick {
    position: absolute;
    right: 6px;
    font-size: 9px;
    line-height: 1;
    color: var(--text-3);
    transform: translateY(50%);
    pointer-events: none;
}

.day-strip-scroll {
    flex: 1;
    min-width: 0;
    position: relative;
    padding-top: 18px;
}

.day-strip-grid-wrap {
    position: absolute;
    left: 0;
    right: 0;
    top: 18px;
    height: 200px;
    pointer-events: none;
    z-index: 0;
}

.day-strip-grid {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px solid color-mix(in srgb, var(--border) 30%, transparent);
}

.day-cols {
    display: flex;
    align-items: stretch;
    position: relative;
    z-index: 1;
}

.day-col {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    text-align: center;
    border-right: 1px solid var(--border);
}

.day-col:last-child {
    border-right: none;
}

.day-col.is-today {
    background: var(--accent-soft);
}

.day-col:hover {
    background: var(--sunken);
    z-index: 3;
}

.day-col-plot {
    position: relative;
    height: 200px;
    border-bottom: 1px solid var(--border);
}

.day-bar {
    position: absolute;
    bottom: 0;
    width: 28%;
    border-radius: 2px 2px 0 0;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
}

.day-bar.is-spend {
    left: calc(50% - 28% - 1.5px);
    background: #B8C2D4;
}

.day-bar.is-rev {
    left: calc(50% + 1.5px);
    background: var(--accent);
}

.day-strip.is-hizmet .day-bar.is-spend {
    left: 36%;
}

.day-bar-val {
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%);
    margin-bottom: 3px;
    font-size: 11px;
    line-height: 1;
    color: var(--text);
    white-space: nowrap;
    pointer-events: none;
}

.day-strip.is-compact .day-bar-val {
    display: none;
}

.day-col-foot {
    padding: 8px 4px 10px;
}

.day-col-date,
.day-col-dow {
    font-size: 11px;
    line-height: 1.25;
    color: var(--text-3);
}

.day-col-roas {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.2;
    color: var(--text-2);
}

.day-col-roas.is-pos,
.day-col-total-roas.is-pos {
    color: var(--pos);
}

.day-col-roas.is-neg,
.day-col-total-roas.is-neg {
    color: var(--neg);
}

.day-col-tip {
    display: none;
    position: absolute;
    z-index: 6;
    left: 50%;
    top: 12px;
    transform: translateX(-50%);
    min-width: 188px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--ink);
    color: var(--ink-text);
    font-size: 12px;
    line-height: 1.4;
    text-align: left;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.day-col:hover .day-col-tip {
    display: block;
}

.day-col:nth-child(-n+2) .day-col-tip {
    left: 6px;
    transform: none;
}

.day-col:nth-last-child(-n+2) .day-col-tip {
    left: auto;
    right: 6px;
    transform: none;
}

.day-strip.is-compact .day-col {
    padding: 0;
}

.day-col-total {
    flex: 0 0 118px;
    width: 118px;
    align-self: stretch;
    padding: 12px 12px 14px;
    background: var(--sunken);
    border-left: 2px solid var(--text);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.day-col-total-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
}

.day-col-total-spend {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-2);
}

.day-col-total-rev {
    margin-top: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.day-col-total-hint {
    font-size: 10px;
    color: var(--text-3);
}

.day-col-total-roas {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-2);
}

@media (max-width: 900px) {
    .day-strip {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .day-strip-y {
        display: none;
    }

    .day-strip-scroll {
        flex: 1 0 auto;
    }

    .day-cols {
        min-width: max-content;
    }

    .day-col {
        flex: 0 0 88px;
        min-width: 88px;
    }

    .day-strip.is-compact .day-col {
        flex: 0 0 56px;
        min-width: 56px;
    }

    .day-col-total {
        order: -1;
        position: sticky;
        left: 0;
        z-index: 4;
        box-shadow: 4px 0 10px color-mix(in srgb, var(--text) 8%, transparent);
    }
}

@media print {
    .day-strip {
        overflow: visible;
        break-inside: avoid;
    }

    .day-strip-scroll,
    .day-cols {
        overflow: visible;
        min-width: 0;
    }

    .day-col {
        flex: 1 1 0;
        min-width: 0;
    }

    .day-col-tip {
        display: none !important;
    }

    .day-col-total {
        position: static;
        order: 0;
        box-shadow: none;
    }
}

.report-day-details {
    margin: 8px 0 12px;
}

.report-day-details > summary {
    cursor: pointer;
    list-style: none;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-3);
    padding: 8px 0;
}

.report-day-details > summary::-webkit-details-marker {
    display: none;
}

.report-day-details > summary::after {
    content: " ▾";
}

.report-day-details[open] > summary::after {
    content: " ▴";
}

.report-day-table-wrap {
    max-height: 420px;
    overflow: auto;
}

.report-day-table-wrap .table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
}

.report-day-table-wrap .table tfoot td {
    position: sticky;
    bottom: 0;
    z-index: 3;
    background: var(--sunken);
}

.cell-bar {
    position: relative;
}

.cell-bar-fill {
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    pointer-events: none;
}

.cell-bar-fill.is-pie {
    top: 10px;
    bottom: 10px;
    opacity: 0.55;
}

.cell-bar-val {
    position: relative;
    z-index: 1;
}

.is-roas-high {
    color: var(--pos);
}

.is-roas-low {
    color: var(--neg);
}

.report-result-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
    background: var(--sunken);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 2px 8px;
}

.creative-fallback-icon {
    color: var(--text-3);
}

@media (max-width: 800px) {
    .report-summary {
        grid-template-columns: 1fr;
    }
    .report-summary-cell {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
    .report-summary-cell:last-child {
        border-bottom: 0;
    }
    .report-summary-value {
        font-size: 32px;
    }
    .report-band {
        padding: 16px 12px 4px;
    }
}

@media (max-width: 800px) {
    .spd-layout {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    .spd-table-wrap {
        width: 100%;
    }
}

@media print {
    .report-ig-section {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    .report-ig-value {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    body {
        background: #fff !important;
        color: #000 !important;
    }

    .sidebar,
    .app-topbar,
    .theme-toggle,
    .no-print,
    .report-toolbar,
    .report-public-top,
    .sidebar-backdrop {
        display: none !important;
    }

    .print-only {
        display: block !important;
    }

    .app-shell,
    .app-main,
    .app-content,
    .report-public-wrap {
        display: block;
        max-width: none;
        padding: 0;
        margin: 0;
    }

    .kpi-strip,
    .kpi-grid,
    .kpi-cell,
    .kpi-card,
    .creative-card,
    .card,
    .table {
        background: #fff !important;
        color: #000 !important;
        border-color: #ccc !important;
        box-shadow: none !important;
        break-inside: avoid;
    }

    .report-summary,
    .report-summary-cell,
    .report-band-store,
    .report-band-ads,
    .cell-bar-fill,
    .day-strip,
    .day-col-bar,
    .store-products-section canvas {
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }

    .report-summary,
    .report-summary-cell {
        background: #F1F3F5 !important;
        color: #000 !important;
    }

    .report-band,
    .report-summary,
    .creative-card,
    .store-products-section,
    .store-web-section,
    .store-sales-section,
    .report-campaigns-section,
    .day-strip {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .report-day-details {
        display: block !important;
    }

    .report-day-details > summary {
        display: none !important;
    }

    .report-day-details > *:not(summary) {
        display: block !important;
    }

    .report-day-table-wrap {
        max-height: none !important;
        overflow: visible !important;
    }

    .store-products-section,
    .store-web-section,
    .store-sales-section {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .store-products-section canvas {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .kpi-value,
    .tabular,
    .num {
        color: #000 !important;
    }

    .is-roas-high {
        color: #0F7B4F !important;
    }

    .is-roas-low {
        color: #C2312B !important;
    }

    .report-delta.is-pos {
        color: #0F7B4F !important;
    }

    .report-delta.is-neg {
        color: #C2312B !important;
    }

    @page {
        margin: 14mm;
    }
}

/* ——— Kontrol paneli ——— */
.dash-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.dash-toolbar .segmented-wrap {
    width: auto;
    max-width: 100%;
    flex: 1 1 auto;
}

.dash-toolbar-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.dash-refresh-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.dash-refresh-meta {
    font-size: 11px;
    color: var(--text-3);
}

.dash-section {
    margin-top: 8px;
}

.dash-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dash-table .tabular {
    font-variant-numeric: tabular-nums;
    font-family: var(--font-mono);
}

.dash-metric-sub {
    margin-top: 2px;
    font-size: 11px;
    font-weight: 400;
    color: var(--text-3);
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}

.dash-th-sort {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-align: inherit;
}

.dash-th-sort:hover {
    color: var(--text);
}

.dash-sort-ind {
    font-size: 11px;
    color: var(--text-3);
    font-weight: 500;
}

.dash-acc-cell {
    white-space: nowrap;
}

.dash-acc-cell .dash-acc-link {
    vertical-align: middle;
}

.dash-acc-link {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}

.dash-acc-link:hover {
    text-decoration: underline;
}

.dash-brand-link {
    margin-left: 8px;
    font-size: 11px;
    color: var(--text-3);
    text-decoration: none;
    font-weight: 400;
    vertical-align: middle;
}

.dash-brand-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.brand-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 880px;
}

.brand-section {
    padding: 16px 18px;
}

.brand-logo-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo-preview {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--sunken);
}

.brand-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
    font-size: 18px;
}

.cred-pass-mask {
    font-family: var(--font-mono);
    letter-spacing: 0.08em;
    margin-right: 4px;
}

.brand-view-log {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 12px;
    color: var(--text-3);
}

.brand-view-log li {
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
}

.brand-view-log li:last-child {
    border-bottom: 0;
}

.dash-alert-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: 0 0 auto;
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
    text-decoration: none;
}

.dash-alert-dot.is-neg {
    background: var(--neg);
}

.dash-alert-dot.is-warn {
    background: var(--warn);
}

.dash-table .is-pos {
    color: var(--pos);
}

.dash-table .is-warn {
    color: var(--warn);
}

.dash-table .is-neg {
    color: var(--neg);
}

.dash-today-note {
    margin: 16px 0 0;
    font-size: 12px;
    color: var(--text-3);
}

.dash-tables {
    position: relative;
}

.dash-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--bg) 55%, transparent);
}

.dash-loading-overlay[hidden] {
    display: none;
}

.dash-loading-text {
    margin: 0;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-2);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.dash-fetch-fail {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-left: 6px;
    border-radius: 50%;
    background: var(--text-3);
    vertical-align: middle;
    cursor: help;
}

.dash-admin-limit-note {
    margin: 0 0 12px;
    font-size: 11px;
    color: var(--text-3);
}

.dash-admin-footer {
    margin-top: 28px;
    font-size: 11px;
    color: var(--text-3);
    line-height: 1.4;
}

.dash-admin-footer a {
    color: var(--text-3);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.dash-admin-linkbtn {
    appearance: none;
    border: 0;
    background: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-size: 11px;
    color: var(--text-3);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.dash-admin-linkbtn:disabled {
    opacity: 0.5;
    cursor: default;
    text-decoration: none;
}

.dash-validate-fail td {
    color: var(--neg);
}

.dash-debug-pre {
    margin: 0;
    padding: 12px;
    background: var(--sunken);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    font-family: var(--font-mono);
    overflow: auto;
    max-height: 480px;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 900px) {
    .dash-table-wrap {
        overflow-x: auto;
    }

    .dash-table .dash-sticky {
        position: sticky;
        left: 0;
        z-index: 2;
        background: var(--surface);
        box-shadow: 1px 0 0 var(--border);
    }

    .dash-table thead .dash-sticky {
        z-index: 3;
    }

    .dash-table .dash-total .dash-sticky {
        background: var(--sunken);
    }

    .dash-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .dash-toolbar-right {
        justify-content: space-between;
    }

    .dash-refresh-wrap {
        align-items: flex-start;
    }
}

/* —— Haftalık plan —— */
.plan-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.plan-toolbar-left,
.plan-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.plan-week-label {
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    min-width: 10rem;
    text-align: center;
}
.plan-week-label:hover {
    color: var(--accent);
}
.plan-view-switch {
    display: flex;
    gap: 4px;
}
.plan-board {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 14px;
    align-items: start;
    min-height: 420px;
}
.plan-days {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
}
.plan-day {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-height: 360px;
    display: flex;
    flex-direction: column;
}
.plan-day.is-today .plan-day-head {
    background: var(--accent-soft);
}
.plan-day-head {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 6px;
}
.plan-day-head strong {
    font-size: 13px;
}
.plan-day-date {
    font-size: 12px;
    color: var(--text-3);
}
.plan-day-cards {
    flex: 1;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 80px;
}
.plan-day-drop {
    margin: 0 8px 8px;
    padding: 6px;
    font-size: 11px;
    color: var(--text-3);
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: 6px;
}
.plan-day-drop.is-dragover,
.plan-day-cards.is-dragover,
.plan-pool-cards.is-dragover {
    background: var(--accent-soft);
    border-color: var(--accent);
}
.plan-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 52px;
    padding: 6px 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: grab;
    user-select: none;
}
.plan-card.is-dragging {
    opacity: 0.45;
}
.plan-card.is-skipped .plan-card-name {
    text-decoration: line-through;
    color: var(--text-3);
}
.plan-card-logo,
.plan-card-initials {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    flex: 0 0 auto;
    object-fit: contain;
}
.plan-card-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 10px;
    font-weight: 600;
}
.plan-card-body {
    min-width: 0;
    flex: 1;
}
.plan-card-name {
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.plan-card-note {
    font-size: 12px;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.plan-card-status {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-3);
}
.plan-card-status.status-yapiliyor { background: var(--warn); }
.plan-card-status.status-bitti { background: var(--pos); }
.plan-card-status.status-atlandi { background: var(--text-3); }
.plan-card-files {
    font-size: 10px;
    color: var(--text-3);
    margin-right: 10px;
}
.plan-card-menu {
    display: none;
    border: 0;
    background: transparent;
    color: var(--text-3);
    cursor: pointer;
    padding: 2px 4px;
}
.plan-pool {
    width: 240px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    position: sticky;
    top: 12px;
    max-height: calc(100vh - 120px);
    overflow: auto;
}
.plan-pool-head {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 8px;
}
.plan-pool-search {
    width: 100%;
    margin-bottom: 8px;
    font-size: 13px;
}
.plan-pool-cards {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 40px;
}
.plan-pool-empty,
.plan-pool-hint {
    font-size: 12px;
    color: var(--text-3);
    margin: 8px 0 0;
}
.plan-apply-hint {
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-2);
}
.plan-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: var(--bg);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    z-index: 50;
}
.plan-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.25);
    z-index: 40;
}
.plan-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(380px, 100%);
    height: 100%;
    background: var(--surface);
    border-left: 1px solid var(--border);
    z-index: 41;
    box-shadow: -8px 0 24px rgba(0,0,0,.08);
    overflow: auto;
}
.plan-drawer-inner {
    padding: 18px 16px 32px;
}
.plan-drawer-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    font-size: 22px;
    color: var(--text-3);
    cursor: pointer;
}
.plan-drawer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-right: 28px;
}
.plan-drawer-brand h2 {
    margin: 0;
    font-size: 16px;
}
.plan-drawer-logo {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: var(--accent-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    overflow: hidden;
}
.plan-drawer-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.plan-seg {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}
.plan-seg button {
    border: 1px solid var(--border);
    background: var(--bg);
    font-size: 11px;
    padding: 7px 4px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-2);
}
.plan-seg button.is-active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}
.plan-file-list {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    font-size: 13px;
}
.plan-file-list li {
    padding: 3px 0;
}
.plan-drawer-links {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
}
.plan-month-head,
.plan-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.plan-month-head {
    margin-bottom: 6px;
    font-size: 11px;
    color: var(--text-3);
    text-align: center;
}
.plan-month-cell {
    min-height: 72px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px;
    text-decoration: none;
    color: inherit;
    background: var(--surface);
}
.plan-month-cell.is-empty {
    background: transparent;
    border-color: transparent;
}
.plan-month-cell.is-today {
    border-color: var(--accent);
}
.plan-month-day {
    font-size: 12px;
    color: var(--text-3);
}
.plan-month-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 4px;
}
.plan-month-chip {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 10px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.dash-planned-today {
    margin-left: 6px;
    font-size: 10px;
    color: var(--accent);
    font-weight: 500;
    vertical-align: middle;
}
@media (max-width: 1100px) {
    .plan-board {
        grid-template-columns: 1fr;
    }
    .plan-pool {
        width: auto;
        position: static;
        max-height: none;
    }
    .plan-days {
        grid-template-columns: 1fr;
    }
}
@media (hover: none) and (pointer: coarse) {
    .plan-card-menu {
        display: inline-block;
    }
}

/* —— Kreatif üretici —— */
.creative-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 16px;
}
.creative-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 20px;
    align-items: start;
}
.creative-side {
    position: sticky;
    top: 72px;
    align-self: start;
}
.creative-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 0;
}
.creative-search {
    flex: 1 1 180px;
    min-width: 140px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    font-size: 13px;
}
.creative-filter-select {
    height: 36px;
    max-width: 180px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    font-size: 13px;
    padding: 0 8px;
}
.creative-filter-chk {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-2);
    white-space: nowrap;
    cursor: pointer;
}
.creative-sel-count {
    font-size: 12px;
    color: var(--text-2);
    white-space: nowrap;
}
.creative-sel-count .btn-link {
    border: 0;
    background: none;
    color: var(--accent);
    cursor: pointer;
    font: inherit;
    padding: 0;
    text-decoration: underline;
}
.creative-list {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    overflow: hidden;
}
.creative-row {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 200px 120px 40px;
    gap: 12px;
    align-items: center;
    height: 68px;
    padding: 0 10px 0 6px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    box-sizing: border-box;
    border-left: 2px solid transparent;
}
.creative-row:last-child {
    border-bottom: 0;
}
.creative-row:hover {
    background: var(--sunken);
}
.creative-row.is-selected {
    background: var(--accent-soft);
    border-left-color: var(--accent);
}
.creative-row-thumb {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--sunken);
    flex-shrink: 0;
}
.creative-row-thumb img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    display: block;
}
.creative-row-title {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.creative-row-name {
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.creative-row-variant {
    font-size: 11px;
    color: var(--text-3);
}
.creative-row-cat {
    font-size: 12px;
    color: var(--text-3);
    width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.creative-row-price {
    width: 120px;
    text-align: right;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    line-height: 1.25;
}
.creative-row-price-old {
    font-size: 12px;
    color: var(--text-3);
    text-decoration: line-through;
}
.creative-row-price-new {
    font-size: 13px;
    color: var(--text);
}
.creative-row-check {
    width: 40px;
    display: flex;
    justify-content: center;
    pointer-events: none;
}
.creative-list-more {
    margin: 12px 0 8px;
    text-align: center;
}
.creative-tpl-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.creative-tpl {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 8px;
    padding: 12px;
    text-align: left;
    cursor: pointer;
}
.creative-tpl strong {
    display: block;
    font-size: 13px;
}
.creative-tpl span {
    font-size: 11px;
    color: var(--text-3);
}
.creative-tpl.is-active {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.creative-tpl.is-disabled,
.creative-tpl:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.creative-editor {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 320px);
    gap: 16px;
    margin-top: 24px;
    align-items: start;
}
.creative-canvas-wrap {
    background: var(--sunken);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.creative-canvas-stage {
    position: relative;
    width: 100%;
}
#creative-canvas {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    background: #fff;
}
.creative-cell-overlays {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.creative-cell-hit {
    position: absolute;
    pointer-events: auto;
    box-sizing: border-box;
    cursor: grab;
}
.creative-cell-hit:active {
    cursor: grabbing;
}
.creative-cell-hit:hover {
    outline: 1px solid rgba(0, 0, 0, 0.2);
    outline-offset: -1px;
}
.creative-cell-swap {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.15s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.creative-cell-hit:hover .creative-cell-swap {
    opacity: 1;
}
.creative-cell-crop-hint {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s;
}
.creative-cell-hit:hover .creative-cell-crop-hint {
    opacity: 1;
}
.creative-cell-crop-hint button {
    border: 0;
    background: rgba(255, 255, 255, 0.92);
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.creative-badge-layer {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}
.badge-selection {
    position: absolute;
    box-sizing: border-box;
    border: 1.5px dashed rgba(47, 91, 234, 0.9);
    pointer-events: none;
}
.badge-selection i {
    position: absolute;
    width: 7px;
    height: 7px;
    background: #fff;
    border: 1.5px solid rgba(47, 91, 234, 0.95);
    box-sizing: border-box;
}
.badge-selection i:nth-child(1) { left: -4px; top: -4px; }
.badge-selection i:nth-child(2) { right: -4px; top: -4px; }
.badge-selection i:nth-child(3) { left: -4px; bottom: -4px; }
.badge-selection i:nth-child(4) { right: -4px; bottom: -4px; }
.creative-guides {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
}
.creative-guide {
    position: absolute;
}
.creative-guide-v {
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 1px dashed var(--accent);
}
.creative-guide-h {
    left: 0;
    right: 0;
    height: 0;
    border-top: 1px dashed var(--accent);
}
.creative-text-layer {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}
.text-frame {
    position: absolute;
    box-sizing: border-box;
    margin: -4px 0 0 -4px;
    padding: 4px;
    border: 1px dashed rgba(47, 91, 234, 0.45);
    border-radius: 3px;
}
.text-frame.is-selected {
    border-color: var(--accent);
    background: rgba(47, 91, 234, 0.06);
}
.pos-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.pos-row-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-3);
}
.pos-seg {
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.pos-seg-btn {
    border: 0;
    background: var(--surface);
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    color: var(--text-2);
}
.pos-seg-btn + .pos-seg-btn {
    border-left: 1px solid var(--border);
}
.pos-seg-btn.is-active {
    background: var(--ink);
    color: var(--ink-text);
}
.pos-free {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    margin-bottom: 8px;
    background: var(--sunken);
    border-radius: var(--radius-sm);
}
.pos-free[hidden] {
    display: none !important;
}
.ct-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}
.ct-form[hidden] {
    display: none !important;
}
.ct-form-actions {
    display: flex;
    gap: 8px;
}
.ct-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ct-card {
    position: relative;
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}
.ct-card.is-disabled {
    opacity: 0.45;
}
.ct-card-main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    background: transparent;
    padding: 8px;
    text-align: left;
    cursor: pointer;
}
.ct-card-main:disabled {
    cursor: default;
}
.ct-card-thumb {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--sunken);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ct-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ct-card-noimg {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-3);
}
.ct-card-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ct-card-info strong {
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ct-card-meta {
    font-size: 11px;
    color: var(--text-3);
}
.ct-card-tools {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
}
.ct-menu-btn {
    width: 28px;
    height: 28px;
    margin: 6px 6px 0 0;
    border: 0;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-2);
    line-height: 1;
}
.ct-menu-btn:hover {
    background: var(--sunken);
}
.ct-menu {
    position: absolute;
    top: 32px;
    right: 4px;
    z-index: 5;
    min-width: 210px;
    display: flex;
    flex-direction: column;
    padding: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
.ct-menu[hidden] {
    display: none !important;
}
.ct-menu button {
    border: 0;
    background: transparent;
    text-align: left;
    padding: 7px 9px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    color: var(--text);
}
.ct-menu button:hover {
    background: var(--sunken);
}
.ct-menu button.is-danger {
    color: var(--neg);
}
.badge-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    position: relative;
}
.badge-preset-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0 0 10px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    max-height: 260px;
    overflow: auto;
}
.badge-preset-menu[hidden] {
    display: none !important;
}
.badge-preset-item {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
}
.badge-preset-item:hover {
    background: var(--sunken);
}
.badge-step-title {
    margin: 4px 6px 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-3);
}
.badge-style-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 4px;
}
.badge-style-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border);
    background: var(--sunken);
    border-radius: var(--radius-sm);
    padding: 8px 6px 6px;
    cursor: pointer;
    min-height: 72px;
}
.badge-style-item:hover {
    border-color: var(--border-strong);
    background: var(--surface);
}
.badge-style-item.is-warn {
    opacity: 0.55;
}
.badge-style-item canvas {
    display: block;
    max-width: 100%;
    height: auto;
}
.badge-style-name {
    font-size: 11px;
    color: var(--text-2);
    text-align: center;
}
.badge-item-bd .badge-warn,
.creative-badge-warn {
    margin: 0;
    font-size: 12px;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--warn) 14%, transparent);
    color: var(--warn);
}
.badge-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.badge-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}
.badge-item.is-selected {
    border-color: var(--border-strong);
}
.badge-item-bar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px 4px 4px 8px;
}
.badge-item-toggle {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    padding: 6px 4px;
    font-size: 13px;
    color: var(--text);
}
.badge-item-preview {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.badge-icon-btn {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-2);
    font-size: 13px;
    line-height: 1;
}
.badge-icon-btn:hover:not(:disabled) {
    background: var(--sunken);
    color: var(--text);
}
.badge-icon-btn:disabled {
    opacity: 0.35;
    cursor: default;
}
.badge-item-bd {
    padding: 8px 10px 12px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.badge-item-bd[hidden] {
    display: none !important;
}
.badge-colors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.creative-img-strips {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.creative-img-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.creative-img-strip-label {
    font-size: 11px;
    color: var(--text-3);
    min-width: 48px;
}
.creative-img-strip-thumbs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.creative-img-thumb {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    background: var(--surface);
}
.creative-img-thumb.is-active {
    border-color: var(--accent);
}
.creative-img-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.creative-crops-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 8px 0;
}
.creative-crop-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
    align-items: center;
}
.creative-flip-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface, #fff);
    color: var(--text);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}
.creative-flip-btn:hover {
    border-color: var(--accent);
}
.creative-flip-btn.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.creative-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    max-height: 80vh;
    overflow: auto;
}
.creative-accordion {
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}
.creative-accordion:last-of-type {
    border-bottom: 0;
}
.creative-accordion-hd {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 0;
    background: transparent;
    padding: 10px 2px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-2);
    cursor: pointer;
    text-align: left;
}
.creative-accordion-hd::after {
    content: '+';
    font-weight: 400;
    color: var(--text-3);
}
.creative-accordion-hd[aria-expanded="true"]::after {
    content: '−';
}
.creative-accordion-bd {
    padding: 0 2px 12px;
}
.typo-presets {
    margin-bottom: 12px;
}
.typo-presets-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.typo-preset-btn {
    border: 1px solid var(--border);
    background: var(--surface, #fff);
    color: var(--text);
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1.2;
}
.typo-preset-btn:hover {
    border-color: var(--accent);
}
.typo-preset-btn.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.typo-preset-custom {
    font-size: 11px;
    color: var(--text-3);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-left: 2px;
}
.typo-bulk-font {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.typo-group {
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 8px;
    overflow: hidden;
}
.typo-group-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px 0 0;
    background: var(--sunken);
}
.typo-group-hd {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    color: var(--text);
}
.typo-group-hd::after {
    content: ' +';
    float: right;
    color: var(--text-3);
    font-weight: 400;
}
.typo-group-hd[aria-expanded="true"]::after {
    content: ' −';
}
.typo-reset {
    border: 0;
    background: none;
    color: var(--accent);
    font-size: 11px;
    cursor: pointer;
    text-decoration: underline;
    padding: 4px;
    white-space: nowrap;
}
.typo-group-bd {
    padding: 10px 12px 12px;
}
.typo-shrink-warn {
    display: block;
    font-size: 11px;
    color: var(--warn, #b45309);
    margin-top: 4px;
}
.creative-actions {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.creative-lib-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.creative-lib-card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface);
}
.creative-lib-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    background: var(--sunken);
}
.creative-lib-check {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
    background: rgba(255,255,255,.85);
    border-radius: 4px;
    padding: 2px 4px;
}
.creative-lib-meta {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
}
.creative-lib-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}
@media (max-width: 1100px) {
    .creative-row {
        grid-template-columns: 56px minmax(0, 1fr) 100px 40px;
    }
    .creative-row-cat {
        display: none;
    }
}
@media (max-width: 900px) {
    .creative-workspace {
        grid-template-columns: 1fr;
    }
    .creative-side {
        position: static;
        order: -1;
    }
    .creative-tpl-grid {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .creative-lib-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .creative-editor {
        grid-template-columns: 1fr;
    }
    .creative-row {
        grid-template-columns: 56px minmax(0, 1fr) 40px;
    }
    .creative-row-price {
        display: none;
    }
}
