/*
 * Zevo Masaj — yönetim paneli
 * Okaliptüs yeşili menü, kum rengi yüzey, terrakota vurgular.
 */

:root {
    --ink: #2b2522;
    --ink-soft: #6f6560;
    --ink-faint: #a0958f;
    --cream: #f8f4ef;
    --paper: #ffffff;
    --line: #ece4dd;
    --line-strong: #dccfc5;
    --rose: #b4593b;
    --rose-dark: #8c4128;
    --rose-soft: #f7e8de;
    --leaf: #1d3a30;
    --leaf-2: #24473b;
    --leaf-3: #2f5a4b;
    --sage: #6f8f72;
    --sage-soft: #e7efe7;
    --amber: #a26b00;
    --amber-soft: #fff3d6;
    --red: #b3263a;
    --red-soft: #fde7ea;
    --blue: #1f5fae;
    --blue-soft: #e3eefc;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(60, 35, 30, .04), 0 8px 24px rgba(60, 35, 30, .06);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
}

body.admin {
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    color: var(--rose-dark);
}

img {
    max-width: 100%;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    background: #f3ede7;
    padding: 2px 6px;
    border-radius: 6px;
}

.ic {
    flex-shrink: 0;
    vertical-align: -3px;
}

.muted {
    color: var(--ink-soft);
}

.small {
    font-size: 12px;
}

.nowrap {
    white-space: nowrap;
}

.t-right {
    text-align: right;
}

.t-center {
    text-align: center;
}

/* ------------------------------------------------------------------ iskelet */

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

.sidebar {
    width: 264px;
    flex-shrink: 0;
    background: var(--leaf);
    background-image:
        radial-gradient(circle at 110% -10%, rgba(180, 89, 59, .28), transparent 42%),
        radial-gradient(circle at -20% 110%, rgba(111, 143, 114, .35), transparent 45%);
    color: #d9e6df;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--leaf-3) transparent;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 20px 18px;
    color: #fff;
}

.brand:hover {
    color: #fff;
}

.brand-text strong {
    display: block;
    font-family: var(--serif);
    font-size: 17px;
    letter-spacing: .2px;
    line-height: 1.2;
}

.brand-text small {
    color: #98b5a8;
    font-size: 11.5px;
}

.menu {
    padding: 4px 12px 20px;
    flex: 1;
}

.menu-group {
    margin-top: 14px;
}

.menu-title {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #84a698;
    padding: 0 10px 6px;
    font-weight: 600;
}

.menu a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 10px;
    border-radius: 10px;
    color: #d3e2da;
    font-size: 13.5px;
    transition: background .15s, color .15s;
}

.menu a:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.menu a.active {
    background: linear-gradient(90deg, rgba(180, 89, 59, .95), rgba(180, 89, 59, .75));
    color: #fff;
    box-shadow: 0 6px 16px rgba(180, 89, 59, .35);
}

.menu a span {
    flex: 1;
}

.menu .count {
    background: #f1ddd0;
    color: var(--rose-dark);
    font-size: 11px;
    border-radius: 999px;
    padding: 1px 8px;
}

.menu a.active .count {
    background: #fff;
}

.sidebar-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: 12.5px;
}

.sidebar-foot a {
    color: #d3e2da;
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.sidebar-foot .version {
    color: #84a698;
}

.sidebar-backdrop {
    display: none;
}

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

.topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 28px;
    background: rgba(248, 244, 239, .9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar-title {
    font-weight: 600;
    flex: 1;
    color: var(--ink-soft);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--paper);
    display: inline-grid;
    place-items: center;
    color: var(--ink);
    cursor: pointer;
}

.icon-btn .dot {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--rose);
    color: #fff;
    font-size: 10.5px;
    border-radius: 999px;
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    padding: 0 4px;
}

.menu-toggle {
    display: none;
}

.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 4px;
    font: inherit;
    color: inherit;
    text-align: left;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--rose-soft);
    color: var(--rose-dark);
    display: grid;
    place-items: center;
    font-weight: 700;
}

.user-name {
    font-weight: 600;
    line-height: 1.2;
}

.user-name small {
    display: block;
    font-weight: 400;
    color: var(--ink-faint);
    font-size: 11.5px;
}

.dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 190px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 6px;
    display: none;
}

.dropdown.open {
    display: block;
}

.dropdown a {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--ink);
}

.dropdown a:hover {
    background: var(--cream);
}

.content {
    padding: 26px 28px 60px;
    max-width: 1440px;
    width: 100%;
}

.demo-strip {
    background: #2f5a4b;
    color: #fff;
    padding: 8px 28px;
    font-size: 13px;
}

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

.page-head h1 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 28px;
    margin: 0;
    letter-spacing: .2px;
}

.page-head p {
    margin: 4px 0 0;
    color: var(--ink-soft);
}

.page-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ------------------------------------------------------------------ kartlar */

.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card-body {
    padding: 20px 22px;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--line);
}

.card-head h2,
.card-head h3 {
    margin: 0;
    font-size: 15.5px;
    font-weight: 650;
    display: flex;
    gap: 8px;
    align-items: center;
}

.card-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

.card-toolbar .muted {
    margin-left: auto;
}

.card-toolbar .muted + .muted {
    margin-left: 0;
}

.grid {
    display: grid;
    gap: 20px;
}

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

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

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

.grid-main {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: start;
}

.stat {
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
}

.stat .label {
    color: var(--ink-soft);
    font-size: 12.5px;
    display: flex;
    gap: 6px;
    align-items: center;
}

.stat .value {
    font-family: var(--serif);
    font-size: 28px;
    font-weight: 600;
    margin-top: 6px;
}

.stat .sub {
    font-size: 12px;
    color: var(--ink-faint);
}

.stat::after {
    content: "";
    position: absolute;
    right: -18px;
    top: -18px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--rose-soft);
    opacity: .7;
}

.stat.green::after {
    background: var(--sage-soft);
}

.stat.amber::after {
    background: var(--amber-soft);
}

.stat.blue::after {
    background: var(--blue-soft);
}

.list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 22px;
    border-bottom: 1px solid var(--line);
}

.list li:last-child {
    border-bottom: 0;
}

.list .grow {
    flex: 1;
    min-width: 0;
}

.list .title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list .meta {
    color: var(--ink-faint);
    font-size: 12px;
}

/* ------------------------------------------------------------------ tablolar */

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

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

.table th {
    text-align: left;
    font-weight: 600;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--ink-faint);
    padding: 11px 14px;
    background: #fcfaf7;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: #fdfaf8;
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.table .thumb {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 10px;
    background: var(--cream);
    display: block;
}

.table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.table tr.sum td {
    font-weight: 700;
    background: #fcfaf7;
}

.w-drag {
    width: 34px;
    padding-right: 0 !important;
}

.drag-handle {
    cursor: grab;
    color: var(--ink-faint);
    display: inline-flex;
}

tr.dragging {
    opacity: .5;
    background: var(--rose-soft) !important;
}

.cell-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cell-main strong {
    display: block;
}

.cell-main small {
    color: var(--ink-faint);
}

/* ------------------------------------------------------------------ rozetler */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    background: #f1ebe5;
    color: var(--ink-soft);
}

.badge-green {
    background: var(--sage-soft);
    color: #2f6a3b;
}

.badge-gray {
    background: #f0ece8;
    color: #8b817b;
}

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

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

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

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

/* ------------------------------------------------------------------ butonlar */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 11px;
    border: 1px solid var(--line-strong);
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
    text-decoration: none;
}

.btn:hover {
    border-color: var(--ink-faint);
    color: var(--ink);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--rose);
    border-color: var(--rose);
    color: #fff;
    box-shadow: 0 6px 14px rgba(180, 89, 59, .25);
}

.btn-primary:hover {
    background: var(--rose-dark);
    border-color: var(--rose-dark);
    color: #fff;
}

.btn-leaf {
    background: var(--leaf-3);
    border-color: var(--leaf-3);
    color: #fff;
}

.btn-leaf:hover {
    background: var(--leaf);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
}

.btn-ghost:hover {
    background: #f3ede7;
    border-color: transparent;
}

.btn-danger,
.btn.danger:hover {
    color: var(--red);
}

.btn-danger {
    border-color: #f0c7cd;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 12.5px;
    border-radius: 9px;
}

.btn[disabled] {
    opacity: .5;
    pointer-events: none;
}

.link-btn {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

.inline-form {
    display: inline;
}

/* ------------------------------------------------------------------ formlar */

.form-card {
    padding: 22px;
}

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

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

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

.span-2,
.form-grid .field-image,
.form-grid .checklist-field {
    grid-column: span 2;
}

.cols-1 .span-2,
.cols-1 .field-image {
    grid-column: auto;
}

.field label,
.field > label {
    display: block;
    font-weight: 600;
    font-size: 12.5px;
    margin-bottom: 6px;
    color: #4a413c;
}

.req {
    color: var(--rose);
}

.field input[type=text],
.field input[type=email],
.field input[type=number],
.field input[type=password],
.field input[type=search],
.field input[type=date],
.field input[type=time],
.field input[type=datetime-local],
.field input[type=url],
.field input[type=tel],
.field select,
.field textarea,
.input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fffdfb;
    font: inherit;
    color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}

.field select[multiple] {
    padding: 6px;
}

.field textarea {
    resize: vertical;
    min-height: 80px;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.input:focus {
    outline: none;
    border-color: var(--rose);
    box-shadow: 0 0 0 3px rgba(180, 89, 59, .12);
}

.help {
    display: block;
    color: var(--ink-faint);
    font-size: 12px;
    margin-top: 5px;
}

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group span {
    display: grid;
    place-items: center;
    padding: 0 12px;
    background: #f3ede7;
    border: 1px solid var(--line-strong);
    color: var(--ink-soft);
    font-size: 13px;
}

.input-group span:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    border-right: 0;
}

.input-group span:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    border-left: 0;
}

.input-group input:not(:first-child):not(:last-child) {
    border-radius: 0;
}

.input-group input:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.input-group span:first-child + input {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

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

.form-section {
    grid-column: 1 / -1;
    margin: 10px 0 0;
    padding-top: 14px;
    border-top: 1px dashed var(--line-strong);
    font-family: var(--serif);
    font-size: 17px;
}

.form-section:first-child {
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
}

.checklist {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
    padding: 2px;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 11px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 500 !important;
    font-size: 13px !important;
    margin: 0 !important;
    background: #fffdfb;
}

.check:has(input:checked) {
    border-color: var(--rose);
    background: var(--rose-soft);
    color: var(--rose-dark);
}

.check input {
    accent-color: var(--rose);
}

.check.small {
    padding: 3px 9px;
    font-size: 12px !important;
}

.weekdays .checklist {
    flex-wrap: nowrap;
}

.field-toggle {
    align-self: end;
}

.toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 11px;
    cursor: pointer;
    margin: 0 !important;
}

.toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-track {
    width: 42px;
    height: 24px;
    background: #d8cfc8;
    border-radius: 999px;
    position: relative;
    transition: background .2s;
    flex-shrink: 0;
}

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
    transition: transform .2s;
}

.toggle input:checked + .toggle-track {
    background: var(--sage);
}

.toggle input:checked + .toggle-track .toggle-thumb {
    transform: translateX(18px);
}

.toggle input:focus-visible + .toggle-track {
    box-shadow: 0 0 0 3px rgba(111, 143, 114, .3);
}

.toggle-label {
    font-weight: 600;
    font-size: 13.5px;
}

.color-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-input input[type=color] {
    width: 46px;
    height: 38px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    padding: 3px;
    background: #fff;
    cursor: pointer;
}

.image-input {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fffdfb;
}

.image-preview {
    width: 92px;
    height: 92px;
    border-radius: 12px;
    background: var(--cream);
    overflow: hidden;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: var(--ink-faint);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.translations {
    margin-top: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    background: #fcfaf7;
}

.translations summary {
    cursor: pointer;
    font-weight: 600;
    display: flex;
    gap: 8px;
    align-items: center;
}

.translations fieldset {
    border: 0;
    padding: 12px 0 0;
    margin: 0;
}

.translations legend {
    font-weight: 700;
    color: var(--rose-dark);
}

.editor {
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fffdfb;
    overflow: hidden;
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 6px;
    background: #f7f2ed;
    border-bottom: 1px solid var(--line);
}

.editor-toolbar button {
    border: 0;
    background: none;
    padding: 5px 9px;
    border-radius: 7px;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    color: var(--ink);
    min-width: 30px;
}

.editor-toolbar button:hover,
.editor-toolbar button.on {
    background: #fff;
}

.editor-area {
    min-height: 200px;
    padding: 14px;
    outline: none;
    line-height: 1.65;
}

.editor-area h2 {
    font-size: 20px;
}

.editor-area h3 {
    font-size: 17px;
}

.editor-source {
    display: none;
    width: 100%;
    border: 0;
    padding: 12px;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 12.5px;
    min-height: 220px;
    background: #fbf8f5;
}

.editor.source-mode .editor-area {
    display: none;
}

.editor.source-mode .editor-source {
    display: block;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fcfaf7;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    padding: 0 10px;
    color: var(--ink-faint);
}

.search-form input {
    border: 0;
    background: none;
    padding: 8px 0;
    font: inherit;
    outline: none;
    min-width: 200px;
}

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

.filters select,
.filters input {
    padding: 8px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #fffdfb;
    font: inherit;
    font-size: 13px;
}

/* ------------------------------------------------------------------ uyarılar */

.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-weight: 500;
    border: 1px solid transparent;
}

.main > .alert {
    margin: 12px 28px 0;
}

.alert-success {
    background: var(--sage-soft);
    color: #2c5f35;
    border-color: #cfe0cf;
}

.alert-error {
    background: var(--red-soft);
    color: var(--red);
    border-color: #f5c9cf;
}

.alert-warning {
    background: var(--amber-soft);
    color: #7a5200;
    border-color: #f2dfac;
}

.alert-info {
    background: var(--blue-soft);
    color: var(--blue);
    border-color: #c9dbf4;
}

.note {
    background: #fcf6f0;
    border-left: 3px solid var(--sage);
    padding: 12px 14px;
    border-radius: 0 10px 10px 0;
    color: var(--ink-soft);
    margin-bottom: 18px;
    font-size: 13px;
}

.empty {
    text-align: center;
    padding: 50px 20px;
    color: var(--ink-faint);
}

.empty p {
    margin: 10px 0 16px;
    color: var(--ink-soft);
}

.empty .ic {
    color: #d8b7c3;
}

/* ------------------------------------------------------------------ sekmeler */

.tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    background: #efe7df;
    padding: 4px;
    border-radius: 13px;
    width: fit-content;
    max-width: 100%;
}

.tabs a {
    padding: 8px 14px;
    border-radius: 10px;
    color: var(--ink-soft);
    font-weight: 600;
    font-size: 13px;
}

.tabs a:hover {
    color: var(--ink);
}

.tabs a.active {
    background: var(--paper);
    color: var(--rose-dark);
    box-shadow: 0 1px 4px rgba(60, 35, 30, .08);
}

/* ------------------------------------------------------------------ sayfalama */

.pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    padding: 14px;
}

.pagination a,
.pagination span {
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 0 8px;
}

.pagination .current {
    background: var(--rose);
    border-color: var(--rose);
    color: #fff;
}

/* ------------------------------------------------------------------ sipariş ekranı */

.order-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 20px;
}

.order-meta dt {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--ink-faint);
    margin-bottom: 2px;
}

.order-meta dd {
    margin: 0;
    font-weight: 500;
}

.card-message {
    background: linear-gradient(135deg, #fff8f3, #fbeef2);
    border: 1px solid #f1d6df;
    border-radius: 14px;
    padding: 18px;
    font-family: var(--serif);
    font-size: 16px;
    font-style: italic;
    line-height: 1.6;
    position: relative;
}

.card-message .sign {
    display: block;
    text-align: right;
    margin-top: 10px;
    font-style: normal;
    font-size: 14px;
    color: var(--rose-dark);
}

.timeline {
    list-style: none;
    margin: 0;
    padding: 0 22px 16px;
}

.timeline li {
    position: relative;
    padding: 12px 0 12px 22px;
    border-left: 2px solid var(--line);
}

.timeline li::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 16px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--rose);
    box-shadow: 0 0 0 3px var(--rose-soft);
}

.timeline small {
    color: var(--ink-faint);
    display: block;
}

.status-steps {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.status-steps button {
    flex: 1;
    min-width: 110px;
}

.status-steps button.current {
    background: var(--leaf-3);
    border-color: var(--leaf-3);
    color: #fff;
}

.map-box {
    height: 260px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--cream);
}

.map-full {
    height: calc(100vh - 220px);
    min-height: 420px;
    border-radius: var(--radius);
    overflow: hidden;
}

.chart svg {
    width: 100%;
    height: auto;
    display: block;
}

.bar-row {
    display: grid;
    grid-template-columns: 160px 1fr 110px;
    gap: 12px;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
}

.bar-row .bar {
    height: 10px;
    background: #f1ebe5;
    border-radius: 99px;
    overflow: hidden;
}

.bar-row .bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--rose), #d99a7c);
    border-radius: 99px;
}

.bar-row .lbl {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ------------------------------------------------------------------ tasarım ekranı */

.layout-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.layout-card {
    border: 2px solid var(--line);
    border-radius: 16px;
    padding: 12px;
    cursor: pointer;
    background: #fffdfb;
    display: block;
    transition: border-color .15s, box-shadow .15s;
}

.layout-card:has(input:checked) {
    border-color: var(--rose);
    box-shadow: 0 0 0 4px rgba(180, 89, 59, .12);
}

.layout-card input {
    position: absolute;
    opacity: 0;
}

.layout-card strong {
    display: block;
    margin-top: 10px;
}

.layout-card small {
    color: var(--ink-faint);
    display: block;
    line-height: 1.4;
}

.mini {
    height: 130px;
    border-radius: 10px;
    background: #f6f0eb;
    padding: 8px;
    display: grid;
    gap: 5px;
}

.mini i {
    display: block;
    border-radius: 5px;
    background: #e7c5d1;
}

.mini i.g {
    background: #c9d8ca;
}

.mini i.l {
    background: #e9e1da;
}

.mini i.c {
    border-radius: 50%;
    aspect-ratio: 1;
    background: #ecc9d5;
}

.palette-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.palette-card {
    border: 2px solid var(--line);
    border-radius: 14px;
    padding: 10px;
    cursor: pointer;
    display: block;
    background: #fff;
}

.palette-card:has(input:checked) {
    border-color: var(--rose);
}

.palette-card input {
    position: absolute;
    opacity: 0;
}

.swatches {
    display: flex;
    height: 34px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.swatches span {
    flex: 1;
}

.section-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.section-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 8px;
    background: #fffdfb;
}

.section-list li .grow {
    flex: 1;
}

/* ------------------------------------------------------------------ sohbet */

.chat-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    /* Yedek değer; chat.php ekrandaki gerçek konuma göre yüksekliği ayarlar */
    height: calc(100vh - 280px);
    min-height: 480px;
    overflow: hidden;
}

.chat-list {
    border-right: 1px solid var(--line);
    overflow-y: auto;
}

.chat-list a {
    display: block;
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}

.chat-list a.active {
    background: var(--rose-soft);
}

.chat-list .meta {
    font-size: 12px;
    color: var(--ink-faint);
    display: flex;
    justify-content: space-between;
}

.chat-list .preview {
    font-size: 12.5px;
    color: var(--ink-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* min-height: 0 şart: yoksa esnek kutu içeriği kadar uzar, mesajlar kesilir ve kaydırılamaz */
.chat-window {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 20px;
    background: #fcf9f6;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bubble {
    max-width: 72%;
    padding: 10px 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--line);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.bubble small {
    display: block;
    font-size: 11px;
    color: var(--ink-faint);
    margin-top: 4px;
}

.bubble.admin {
    align-self: flex-end;
    background: var(--leaf-3);
    color: #fff;
    border-color: var(--leaf-3);
    border-bottom-right-radius: 4px;
}

.bubble.admin small {
    color: #bfd6cb;
}

.bubble.bot {
    background: var(--sage-soft);
    border-color: #d3e2d4;
}

.bubble.customer {
    border-bottom-left-radius: 4px;
}

.chat-form {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid var(--line);
}

.chat-form textarea {
    flex: 1;
    resize: none;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    padding: 10px;
    font: inherit;
    min-height: 46px;
}

/* ------------------------------------------------------------------ giriş */

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background: var(--cream);
}

.auth-art {
    background: var(--leaf);
    background-image:
        radial-gradient(circle at 20% 20%, rgba(180, 89, 59, .45), transparent 40%),
        radial-gradient(circle at 80% 85%, rgba(111, 143, 114, .55), transparent 45%);
    color: #fff;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-art h2 {
    font-family: var(--serif);
    font-size: 40px;
    line-height: 1.15;
    font-weight: 600;
    max-width: 440px;
    margin: 0;
}

.auth-art p {
    color: #c8dbd1;
    max-width: 380px;
}

.auth-art svg.bloom {
    position: absolute;
    right: -60px;
    bottom: -60px;
    width: 420px;
    opacity: .9;
}

.auth-form-wrap {
    display: grid;
    place-items: center;
    padding: 40px 24px;
}

.auth-form {
    width: 100%;
    max-width: 380px;
}

.auth-form h1 {
    font-family: var(--serif);
    font-size: 30px;
    margin: 0 0 6px;
}

.auth-form .field {
    margin-bottom: 14px;
}

.auth-form .btn {
    width: 100%;
    padding: 12px;
}

.demo-box {
    margin-top: 20px;
    padding: 14px;
    border-radius: 12px;
    background: var(--sage-soft);
    border: 1px solid #cfe0cf;
    font-size: 13px;
}

.demo-box button {
    margin-top: 8px;
}

/* ------------------------------------------------------------------ duyarlı */

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

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

@media (max-width: 860px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 60;
        transform: translateX(-100%);
        transition: transform .25s;
    }

    body.sidebar-open .sidebar {
        transform: none;
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(20, 30, 25, .45);
        z-index: 50;
    }

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

    .topbar,
    .content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .user-name {
        display: none;
    }

    .grid-2,
    .form-grid,
    .form-grid.cols-3,
    .order-meta {
        grid-template-columns: minmax(0, 1fr);
    }

    .span-2,
    .form-grid .field-image {
        grid-column: auto;
    }

    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-art {
        display: none;
    }

    .chat-layout {
        grid-template-columns: 1fr;
        /* Üstte sohbet listesi, altta kalan yüksekliği dolduran mesaj penceresi */
        grid-template-rows: auto minmax(0, 1fr);
    }

    .chat-list {
        max-height: 220px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .bar-row {
        grid-template-columns: 110px 1fr 90px;
    }

    .main > .alert {
        margin: 12px 16px 0;
    }
}

@media (max-width: 560px) {
    .grid-4 {
        grid-template-columns: minmax(0, 1fr);
    }

    .page-head h1 {
        font-size: 23px;
    }
}

@media print {
    .sidebar,
    .topbar,
    .page-actions,
    .form-actions {
        display: none !important;
    }
}

/* ==========================================================================
   Medya alanı (parçalı yükleme + kütüphane)
   ========================================================================== */

.form-grid .field-media {
    grid-column: span 2;
}

.cols-1 .field-media {
    grid-column: auto;
}

.media-input {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 12px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fffdfb;
}

.media-input.is-dragover {
    border-color: var(--rose);
    background: var(--rose-soft);
}

.media-preview {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 120px;
    height: 92px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--cream);
    color: var(--ink-faint);
}

.media-preview img,
.media-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-empty {
    display: grid;
    justify-items: center;
    gap: 4px;
    font-size: 11px;
}

.media-actions {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.media-actions input[type="text"] {
    width: 100%;
}

.media-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.upload-progress {
    display: grid;
    gap: 4px;
}

.upload-progress span {
    display: block;
    height: 6px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--rose) var(--p, 0%), var(--line) var(--p, 0%));
}

.upload-progress small {
    color: var(--ink-soft);
    font-size: 12px;
}

@media (max-width: 560px) {
    .media-input {
        flex-direction: column;
    }

    .media-preview {
        width: 100%;
        height: 160px;
    }
}

/* ==========================================================================
   Modal
   ========================================================================== */

.modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(30, 22, 18, .45);
}

.modal[hidden] {
    display: none;
}

.modal-box {
    display: flex;
    flex-direction: column;
    width: min(560px, 100%);
    max-height: calc(100vh - 32px);
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 24px 60px rgba(30, 22, 18, .25);
}

.modal-wide {
    width: min(980px, 100%);
}

.modal-head,
.modal-foot,
.modal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
}

.modal-head {
    border-bottom: 1px solid var(--line);
}

.modal-head h2 {
    margin: 0;
    font-size: 17px;
}

.modal-toolbar input[type="search"] {
    flex: 1;
    min-width: 0;
}

.modal-box > .upload-progress {
    padding: 0 18px 10px;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    padding: 0 18px 12px;
    overflow-y: auto;
}

.media-tile {
    position: relative;
    display: grid;
    grid-template-rows: 100px auto;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 12px;
    background: var(--cream);
    cursor: pointer;
    text-align: left;
}

.media-tile:hover,
.media-tile:focus-visible {
    border-color: var(--rose);
}

.media-tile img,
.media-tile video {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.media-tile small {
    padding: 6px 8px;
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-tile .kind {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 10px;
}

/* ==========================================================================
   Tekrarlayan alanlar (faydalar, seans akışı, SSS, fiyatlar…)
   ========================================================================== */

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

.repeater-rows {
    display: grid;
    gap: 8px;
}

.repeater-row {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fffdfb;
}

.repeater-row .drag-handle {
    padding-top: 8px;
    color: var(--ink-faint);
    cursor: grab;
}

.repeater-fields {
    display: grid;
    grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
    gap: 8px;
}

.repeater-fields .wide {
    grid-column: 1 / -1;
}

.repeater-fields input,
.repeater-fields textarea,
.repeater-fields select {
    width: 100%;
}

.repeater-fields small {
    display: block;
    margin-bottom: 2px;
    color: var(--ink-soft);
    font-size: 11px;
}

@media (max-width: 640px) {
    .repeater-fields {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Ön izleme kutusu (tasarım ekranı) */
.preview-frame {
    width: 100%;
    height: 560px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
}

.swatches {
    display: flex;
    gap: 4px;
}

.swatches span {
    width: 18px;
    height: 18px;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 50%;
}

.palette-option {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    cursor: pointer;
}

.palette-option:has(input:checked) {
    border-color: var(--rose);
    background: var(--rose-soft);
}

.palette-option input {
    position: absolute;
    opacity: 0;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
}

.section-list {
    display: grid;
    gap: 6px;
}

.section-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    list-style: none;
}

.section-list li .grow {
    flex: 1;
}

.qr-box {
    display: inline-block;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
}

.qr-box svg {
    display: block;
    width: 200px;
    height: 200px;
}

.recovery-codes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: var(--cream);
    font-family: ui-monospace, Consolas, monospace;
    font-size: 14px;
}

.login-captcha {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.login-captcha .captcha {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.login-captcha .captcha__img {
    border: 1px solid var(--line);
    border-radius: 8px;
}

.login-captcha .captcha__refresh {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
}

.login-captcha .captcha__input {
    flex: 1 1 140px;
    min-width: 0;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.form-section {
    margin: 0 0 18px;
    padding: 16px 18px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.form-section legend {
    padding: 0 6px;
    font-family: var(--serif);
    font-size: 16px;
    font-weight: 600;
}

.repeater-row {
    grid-template-columns: 22px minmax(0, 1fr) auto;
}

.row-order {
    display: grid;
    gap: 2px;
    padding-top: 14px;
}

.row-order .link-btn {
    padding: 0;
    color: var(--ink-faint);
    font-size: 10px;
    line-height: 1.2;
}

.row-order .link-btn:hover {
    color: var(--rose);
}

.auth-art {
    background-image:
        radial-gradient(circle at 20% 20%, rgba(180, 89, 59, .5), transparent 42%),
        radial-gradient(circle at 80% 85%, rgba(111, 143, 114, .55), transparent 45%);
}

.auth-brand {
    font-family: var(--serif);
    font-size: 20px;
}

.auth-page--single {
    grid-template-columns: minmax(0, 1fr);
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"],
.auth-form .code-input {
    width: 100%;
}

.code-input {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 22px !important;
    letter-spacing: .25em;
    text-align: center;
}

.auth-form .login-captcha .captcha__refresh,
.auth-form .login-captcha .captcha__input {
    width: auto;
    padding: 8px 10px;
}

/* ==========================================================================
   Özet ekranı listeleri
   ========================================================================== */

.mini-list {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mini-list a {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink);
}

.mini-list a:hover {
    background: var(--cream);
}

.mini-list span {
    color: var(--ink-soft);
}

.mini-list small {
    color: var(--ink-faint);
}

.checklist-links {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0 0 4px 18px;
}

.steps-list {
    display: grid;
    gap: 6px;
    margin: 0 0 16px;
    padding-left: 20px;
}

a.stat {
    color: inherit;
    transition: transform .15s, box-shadow .15s;
}

a.stat:hover {
    color: inherit;
    transform: translateY(-2px);
}

/* Takvim (randevular) */
.calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.calendar-head {
    padding: 4px 6px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.calendar-day {
    display: grid;
    align-content: start;
    gap: 4px;
    min-height: 110px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    font-size: 12px;
}

.calendar-day.is-other {
    background: transparent;
    opacity: .5;
}

.calendar-day.is-today {
    border-color: var(--rose);
    box-shadow: inset 0 0 0 1px var(--rose);
}

.calendar-day.is-closed {
    background: repeating-linear-gradient(45deg, #faf6f2, #faf6f2 6px, #f3ece5 6px, #f3ece5 12px);
}

.calendar-day .num {
    font-weight: 700;
}

.calendar-item {
    display: block;
    overflow: hidden;
    padding: 2px 6px;
    border-left: 3px solid var(--amber);
    border-radius: 4px;
    background: var(--amber-soft);
    color: var(--ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-item.st-confirmed {
    border-color: #3c8a5a;
    background: var(--sage-soft);
}

.calendar-item.st-completed {
    border-color: var(--blue);
    background: var(--blue-soft);
}

.calendar-item.st-cancelled,
.calendar-item.st-no_show {
    border-color: #aaa;
    background: #f1f1f1;
    text-decoration: line-through;
}

@media (max-width: 860px) {
    .calendar {
        grid-template-columns: minmax(0, 1fr);
    }

    .calendar-head,
    .calendar-day.is-other {
        display: none;
    }

    .calendar-day {
        min-height: 0;
    }
}

.timeline {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline li {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 10px;
    font-size: 13px;
}

.timeline time {
    color: var(--ink-faint);
}

.status-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.status-buttons .btn.current {
    border-color: var(--rose);
    background: var(--rose-soft);
    color: var(--rose-dark);
}

.kv {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 8px 14px;
    margin: 0;
}

.kv dt {
    color: var(--ink-soft);
}

.kv dd {
    margin: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 560px) {
    .kv {
        grid-template-columns: minmax(0, 1fr);
    }

    .kv dd {
        margin-bottom: 6px;
    }
}

.pill-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.pill-nav a {
    padding: 5px 12px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: #fff;
    color: var(--ink-soft);
    font-size: 13px;
}

.pill-nav a.active {
    border-color: var(--rose);
    background: var(--rose-soft);
    color: var(--rose-dark);
}

.pill-nav small {
    color: var(--ink-faint);
}

.w-check {
    width: 36px;
}

/* Medya kütüphanesi */
.dropzone {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 28px 16px;
    border: 2px dashed var(--line-strong);
    border-radius: var(--radius);
    color: var(--ink-soft);
    text-align: center;
}

.dropzone.is-dragover {
    border-color: var(--rose);
    background: var(--rose-soft);
}

.dropzone p {
    margin: 0;
    max-width: 620px;
}

.dropzone .upload-progress {
    width: min(420px, 100%);
}

.media-library {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.media-card {
    display: grid;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
}

.media-card img,
.media-card video {
    display: block;
    width: 100%;
    height: 130px;
    object-fit: cover;
    background: var(--cream);
}

.media-card figcaption {
    display: grid;
    gap: 4px;
    padding: 8px;
    min-width: 0;
}

.media-card strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-card input {
    width: 100%;
    padding: 5px 8px;
    font-size: 12px;
}

.media-card__actions {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
}

[hidden] {
    display: none !important;
}

.hours-grid {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.hours-row {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto auto auto;
    gap: 10px;
    align-items: center;
    max-width: 520px;
}

@media (max-width: 480px) {
    .hours-row {
        grid-template-columns: minmax(0, 1fr) auto auto auto;
    }
}

.code-block {
    max-width: 100%;
    margin: 0 0 12px;
    padding: 10px 12px;
    overflow-x: auto;
    border-radius: var(--radius-sm);
    background: #241d19;
    color: #f3eadf;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 12.5px;
    white-space: pre-wrap;
    word-break: break-all;
}

.log-view {
    max-height: 360px;
    overflow-y: auto;
}

/* Google sonuç önizlemesi */
.serp {
    display: grid;
    gap: 2px;
    max-width: 600px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    font-family: Arial, sans-serif;
}

.serp-url {
    color: #4d5156;
    font-size: 12px;
}

.serp-title {
    color: #1a0dab;
    font-size: 19px;
    line-height: 1.3;
}

.serp-desc {
    color: #4d5156;
    font-size: 13.5px;
    line-height: 1.5;
}

/* ==========================================================================
   Analitik
   ========================================================================== */

.range-bar {
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    padding: 0;
}

.range-form input[type="date"] {
    padding: 5px 8px;
}

.bars {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bars li {
    display: grid;
    grid-template-columns: minmax(90px, 34%) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    font-size: 13px;
}

.bars-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bars-track {
    display: block;
    height: 8px;
    overflow: hidden;
    border-radius: 99px;
    background: var(--cream);
}

.bars-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--rose);
}

.bars-track.inline {
    display: inline-block;
    width: 120px;
    vertical-align: middle;
}

.bars-value {
    color: var(--ink-soft);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

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

.chart {
    display: block;
    width: 100%;
    min-width: 520px;
    height: auto;
}

.chart .grid-line {
    stroke: var(--line);
    stroke-width: 1;
}

.chart .axis {
    fill: var(--ink-faint);
    font-size: 11px;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 6px;
    color: var(--ink-soft);
    font-size: 12px;
}

.chart-legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    border-radius: 3px;
}

.funnel {
    display: grid;
    gap: 12px;
}

.funnel-step {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr) 150px;
    gap: 12px;
    align-items: center;
}

.funnel-track {
    height: 26px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--cream);
}

.funnel-bar {
    height: 100%;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--rose), #d99a7c);
}

@media (max-width: 640px) {
    .funnel-step {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }
}

.heatmap {
    display: grid;
    grid-template-columns: 36px repeat(24, minmax(10px, 1fr));
    gap: 3px;
    overflow-x: auto;
    font-size: 10px;
}

.heat-hour,
.heat-day {
    color: var(--ink-faint);
}

.heat-cell {
    aspect-ratio: 1;
    border-radius: 3px;
    background: rgba(180, 89, 59, var(--a));
}

/* ==========================================================================
   Kart iç boşlukları (uyum katmanı)
   Kart içeriği doğrudan .card içine yazılabilir; başlık, araç çubuğu ve
   tablolar kenardan kenara uzanır, diğer her şey iç boşluk alır.
   ========================================================================== */

.card {
    padding: 18px 22px;
}

.card > .card-body {
    padding: 0;
}

.card.form-card {
    padding: 22px;
}

.card > .card-head,
.card > .card-toolbar,
.card > .table-wrap,
.card > form > .card-toolbar,
.card > form > .table-wrap {
    margin-right: -22px;
    margin-left: -22px;
}

.card > .card-head:first-child,
.card > .card-toolbar:first-child {
    margin-top: -18px;
}

.card > .card-head {
    margin-bottom: 16px;
}

.card > .card-head:not(:first-child) {
    margin-top: 18px;
    border-top: 1px solid var(--line);
}

.card > .card-head + .table-wrap,
.card > .card-head + .card-toolbar {
    margin-top: -16px;
}

.card > .card-toolbar + .card-toolbar {
    margin-top: 0;
}

.card > .card-toolbar:last-child,
.card > form:last-child > .card-toolbar:last-child {
    margin-bottom: -18px;
    border-top: 1px solid var(--line);
    border-bottom: 0;
}

.card > .table-wrap:last-child,
.card > form:last-child > .table-wrap:last-child {
    margin-bottom: -18px;
}

.card > :last-child {
    margin-bottom: 0;
}

.card > .empty {
    padding: 32px 10px;
}

.card > .pagination {
    margin-top: 16px;
}

.card > .mini-list {
    margin-right: -12px;
    margin-left: -12px;
}

.card > p:first-child {
    margin-top: 0;
}

/* Izgaralar ve içlerindeki kartlar */
.grid {
    margin-bottom: 20px;
}

.grid > .card,
.grid > form.card,
.grid > div > .card:last-child {
    margin-bottom: 0;
}

/* İstatistik kutuları kart görünümündedir; satırlar alt alta */
.stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow);
}

.stat .label,
.stat .value,
.stat .sub {
    position: relative;
    z-index: 1;
}

.stat .value {
    display: block;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.stat .sub {
    display: block;
}

.card > .stat {
    margin: -18px -22px 16px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: none;
}

.checklist-links {
    padding-left: 20px;
}

.checklist-links li {
    padding: 2px 0;
}

/* Gizli alanlarla başlayan kartlarda (form.card) başlık yine en üstte sayılır */
.card > input[type="hidden"] + .card-head,
.card > input[type="hidden"] + input[type="hidden"] + .card-head {
    margin-top: -18px;
    border-top: 0;
}

/* Araç çubuklarındaki ve satır içi formlardaki yerel alanlar */
.card-toolbar input[type="date"],
.card-toolbar input[type="text"],
.card-toolbar select,
.inline-form input[type="date"],
.inline-form input[type="text"],
.inline-form select,
.range-form input[type="date"] {
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fffdfb;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
}

.card-toolbar input:focus,
.card-toolbar select:focus,
.inline-form input:focus,
.inline-form select:focus {
    outline: none;
    border-color: var(--rose);
    box-shadow: 0 0 0 3px rgba(180, 89, 59, .12);
}

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

/* Takvim: gün adı sütun başlığında var; masaüstünde tekrar yazılmaz */
.calendar-day .num .muted {
    display: none;
}

@media (max-width: 860px) {
    .calendar-day .num .muted {
        display: inline;
    }
}

.hours-row input[type="time"],
.form-section .inline-form input,
.balance-row input {
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fffdfb;
    color: var(--ink);
    font: inherit;
    font-size: 13.5px;
}

.hours-row input[type="time"]:focus {
    outline: none;
    border-color: var(--rose);
    box-shadow: 0 0 0 3px rgba(180, 89, 59, .12);
}
