/* Zevo Korku Evi — yönetim paneli */
:root {
    --bg: #0a0a0a;
    --panel: #141414;
    --panel-2: #1a1a1a;
    --line: #262626;
    --line-2: #333;
    --text: #e2e2e2;
    --title: #f5f5f5;
    --muted: #9a9a9a;
    --red: #d71920;
    --red-dark: #8b0000;
    --green: #2fbf62;
    --amber: #e0a526;
    --blue: #4f8cff;
    --radius: 14px;
    --side: 250px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a {
    color: #ff6a62;
}

h1,
h2,
h3 {
    color: var(--title);
    margin: 0 0 .5em;
    line-height: 1.25;
}

h1 {
    font-size: 24px;
}

h2 {
    font-size: 17px;
}

h3 {
    font-size: 15px;
}

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

.small {
    font-size: 12.5px;
}

.icon {
    display: inline-block;
    vertical-align: -3px;
    flex-shrink: 0;
}

[hidden] {
    display: none !important;
}

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

.admin-shell {
    display: grid;
    grid-template-columns: var(--side) 1fr;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: #0d0d0d;
    border-right: 1px solid var(--line);
    padding: 16px 12px 30px;
}

.sidebar-brand {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 6px 8px 18px;
    color: var(--title);
    text-decoration: none;
    font-weight: 700;
}

.sidebar-brand small {
    display: block;
    font-weight: 400;
    color: var(--muted);
    font-size: 12px;
}

.side-nav {
    display: grid;
    gap: 2px;
}

.side-group {
    margin: 14px 10px 4px;
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #666;
}

.side-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
}

.side-nav a:hover {
    background: var(--panel);
}

.side-nav a[aria-current="page"] {
    background: rgba(215, 25, 32, .14);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--red);
}

.side-nav a .icon {
    color: var(--muted);
}

.side-nav a[aria-current="page"] .icon {
    color: var(--red);
}

.side-nav .count {
    margin-left: auto;
    background: var(--red);
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    padding: 1px 8px;
}

.sidebar-backdrop {
    display: none;
}

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

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

.topbar-site {
    color: var(--muted);
    text-decoration: none;
}

.topbar-user {
    margin-left: auto;
    display: flex;
    gap: 12px;
    align-items: center;
}

.topbar-user a {
    color: var(--text);
    text-decoration: none;
}

.topbar .menu-btn {
    display: none;
}

.content {
    padding: 24px;
    flex: 1;
    max-width: 1400px;
    width: 100%;
}

.admin-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--line);
}

/* @lisans:basla */
.license-alert {
    margin: 16px 24px 0;
}
/* @lisans:bitir */

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

.page-head p {
    margin: 0;
}

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

/* ------------------------------------------------------------ bileşenler */

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 18px;
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

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

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

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

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

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

.grid > .card {
    margin-bottom: 0;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
}

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

.stat strong {
    display: block;
    font-size: 26px;
    color: var(--title);
    margin-top: 4px;
}

.stat small {
    color: var(--muted);
}

.stat.is-accent {
    border-color: rgba(215, 25, 32, .5);
    background: linear-gradient(160deg, rgba(215, 25, 32, .16), transparent 70%), var(--panel);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid var(--line-2);
    background: var(--panel-2);
    color: var(--title);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn:hover {
    border-color: #555;
    color: #fff;
}

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

.btn-primary:hover {
    background: #b5141a;
    border-color: #b5141a;
}

.btn-ghost {
    background: transparent;
}

.btn-danger {
    color: #ff8f88;
    border-color: rgba(215, 25, 32, .45);
    background: transparent;
}

.btn-danger:hover {
    background: rgba(215, 25, 32, .15);
}

.btn-sm {
    min-height: 32px;
    padding: 5px 11px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

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

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--line-2);
    background: var(--panel-2);
    color: var(--title);
    display: inline-grid;
    place-items: center;
    cursor: pointer;
}

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid;
    white-space: nowrap;
}

.badge-green {
    color: #8fe5ae;
    border-color: rgba(47, 191, 98, .45);
    background: rgba(47, 191, 98, .1);
}

.badge-amber {
    color: #f3cd7a;
    border-color: rgba(224, 165, 38, .45);
    background: rgba(224, 165, 38, .1);
}

.badge-red {
    color: #ffa29c;
    border-color: rgba(215, 25, 32, .5);
    background: rgba(215, 25, 32, .12);
}

.badge-blue {
    color: #9ec7ff;
    border-color: rgba(79, 140, 255, .45);
    background: rgba(79, 140, 255, .1);
}

.badge-gray {
    color: #bbb;
    border-color: #444;
    background: #1a1a1a;
}

.alert {
    padding: 11px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    border: 1px solid;
}

.alert-success {
    background: rgba(47, 191, 98, .1);
    border-color: rgba(47, 191, 98, .4);
    color: #9be8b6;
}

.alert-error {
    background: rgba(215, 25, 32, .12);
    border-color: rgba(215, 25, 32, .5);
    color: #ffb3ae;
}

.alert-warning {
    background: rgba(224, 165, 38, .1);
    border-color: rgba(224, 165, 38, .4);
    color: #f5d48c;
}

.alert-info {
    background: rgba(79, 140, 255, .08);
    border-color: rgba(79, 140, 255, .35);
    color: #b9d1ff;
}

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

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    font-weight: 600;
    background: #111;
    white-space: nowrap;
}

tbody tr:hover {
    background: rgba(255, 255, 255, .02);
}

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

td.actions {
    white-space: nowrap;
    text-align: right;
}

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

.row-link {
    color: var(--title);
    font-weight: 600;
    text-decoration: none;
}

.row-link:hover {
    color: #ff6a62;
}

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

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

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

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

dl.meta {
    margin: 0;
    display: grid;
    gap: 2px;
}

dl.meta div {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid var(--line);
}

dl.meta dt {
    color: var(--muted);
}

dl.meta dd {
    margin: 0;
    color: var(--title);
    word-break: break-word;
}

.pagination {
    display: flex;
    gap: 4px;
    margin-top: 14px;
}

.pagination a,
.pagination span {
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    border: 1px solid var(--line-2);
    color: var(--text);
    text-decoration: none;
}

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

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

.field {
    display: block;
    margin-bottom: 14px;
}

.field > span {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--title);
    font-size: 13px;
}

.field small {
    display: block;
    color: var(--muted);
    margin-top: 4px;
    font-size: 12px;
}

input,
select,
textarea {
    width: 100%;
    background: #0d0d0d;
    border: 1px solid var(--line-2);
    color: var(--title);
    border-radius: 9px;
    padding: 9px 12px;
    font: inherit;
    min-height: 40px;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(215, 25, 32, .18);
}

input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    min-height: 0;
    padding: 0;
    accent-color: var(--red);
    flex-shrink: 0;
}

input[type="file"] {
    padding: 7px;
}

input[type="color"] {
    padding: 2px;
    width: 60px;
}

.check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 12px;
    cursor: pointer;
}

.check small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.check.small {
    margin: 0;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0 14px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 6px;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 16px;
}

.filters .field {
    margin: 0;
    min-width: 150px;
}

.filters .field.grow {
    flex: 1;
    min-width: 200px;
}

.file-current {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
}

.file-current img {
    max-height: 70px;
    max-width: 140px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #000;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.tabs a {
    padding: 10px 14px;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-weight: 600;
}

.tabs a[aria-current="page"] {
    color: #fff;
    border-color: var(--red);
}

.repeater-row {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    background: #101010;
}

.hours-table td {
    padding: 6px 10px;
}

.hours-table input[type="time"] {
    width: 130px;
}

/* ------------------------------------------------------------ grafik */

.chart {
    height: 200px;
    padding-top: 18px;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    height: 100%;
    gap: 0;
}

.chart-col {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 0 2px;
    position: relative;
}

.chart-bar {
    width: 100%;
    max-width: 34px;
    background: linear-gradient(180deg, var(--red), var(--red-dark));
    border-radius: 5px 5px 0 0;
    min-height: 0;
}

.chart-col:hover .chart-bar {
    background: #ff3b33;
}

.chart-val {
    font-size: 10.5px;
    color: var(--muted);
    margin-bottom: 3px;
}

.chart-label {
    font-size: 10.5px;
    color: var(--muted);
    margin-top: 5px;
    white-space: nowrap;
}

.heat {
    border-collapse: separate;
    border-spacing: 3px;
}

.heat td,
.heat th {
    border: 0;
    padding: 0;
    text-align: center;
    font-size: 11px;
}

.heat td {
    width: 34px;
    height: 26px;
    border-radius: 5px;
    color: #fff;
}

.heat th {
    background: none;
    padding: 0 6px;
}

/* ------------------------------------------------------------ takvim */

.cal {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.cal-h {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.cal-cell {
    min-height: 104px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 7px;
    background: var(--panel);
    color: var(--text);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 12px;
}

.cal-cell:hover {
    border-color: #555;
}

.cal-cell.is-today {
    border-color: var(--red);
}

.cal-cell.is-off {
    opacity: .45;
}

.cal-cell.is-closed {
    background: repeating-linear-gradient(135deg, #121212 0 6px, #161616 6px 12px);
}

.cal-cell.is-selected {
    box-shadow: 0 0 0 2px var(--red);
}

.cal-num {
    font-weight: 700;
    color: var(--title);
    display: flex;
    justify-content: space-between;
}

.cal-pill {
    display: block;
    padding: 1px 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .05);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-pill.s-pending {
    background: rgba(224, 165, 38, .15);
    color: #f3cd7a;
}

.cal-pill.s-confirmed {
    background: rgba(47, 191, 98, .15);
    color: #9be8b6;
}

.cal-pill.s-completed {
    background: rgba(79, 140, 255, .14);
    color: #b9d1ff;
}

.cal-pill.s-no_show {
    background: #222;
    color: #aaa;
}

.slot-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}

.slot-box {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px;
    background: #101010;
}

.slot-box strong {
    color: var(--title);
    display: block;
    font-size: 16px;
}

.slot-box.is-booked {
    border-color: rgba(215, 25, 32, .5);
}

.slot-box.is-available {
    border-color: rgba(47, 191, 98, .45);
}

.slot-box.is-blocked {
    background: repeating-linear-gradient(135deg, #121212 0 6px, #171717 6px 12px);
}

/* ------------------------------------------------------------ galeri */

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

.media-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: var(--panel);
    display: flex;
    flex-direction: column;
}

.media-card.is-dragging {
    opacity: .4;
}

.media-thumb {
    aspect-ratio: 4 / 3;
    background: #000;
    position: relative;
}

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

.media-thumb .badge {
    position: absolute;
    top: 8px;
    left: 8px;
}

.media-body {
    padding: 10px;
    display: grid;
    gap: 6px;
}

.media-body .field {
    margin: 0;
}

.drag-handle {
    cursor: grab;
    color: var(--muted);
}

/* ------------------------------------------------------------ giriş ekranı */

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background: radial-gradient(circle at 50% 20%, #2a0405, #0a0a0a 60%);
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 30px;
    display: grid;
    gap: 6px;
    text-align: center;
}

.login-card img {
    margin: 0 auto 6px;
}

.login-card .field {
    text-align: left;
}

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

.empty-state .icon {
    color: var(--red);
    margin: 0 auto 10px;
    display: block;
}

pre.code {
    background: #0b0b0b;
    border: 1px solid var(--line);
    padding: 10px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 12px;
    max-height: 260px;
}

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

@media (max-width: 1100px) {
    .grid-main,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        z-index: 60;
        left: 0;
        top: 0;
        width: 270px;
        transform: translateX(-100%);
        transition: transform .3s;
    }

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

    .sidebar-backdrop {
        display: none;
    }

    .sidebar-open .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 55;
        background: rgba(0, 0, 0, .6);
    }

    .topbar .menu-btn {
        display: inline-grid;
    }

    .topbar {
        padding: 10px 14px;
    }

    .topbar-site,
    .topbar-user .muted {
        display: none;
    }

    .content {
        padding: 16px 14px;
    }

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

    dl.meta div {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .cal {
        gap: 3px;
    }

    .cal-cell {
        min-height: 64px;
        padding: 4px;
    }

    .cal-pill {
        font-size: 0;
        height: 5px;
        padding: 0;
    }

    .hide-sm {
        display: none;
    }
}
