/*
 * Zevo Tamir — yönetim paneli (Bootstrap 5 üzerine).
 * Koyu lacivert yan menü, ikaz sarısı vurgu; açık ve koyu görünüm.
 */

:root {
    --zt-admin-primary: #1d5bd8;
    --zt-admin-accent: #f5b400;
    --zt-sidebar-bg: #0f1b2d;
    --zt-sidebar-text: #b9c4d4;
    --zt-sidebar-muted: #6c7a90;
    --zt-sidebar-active: #1b2d47;
    --zt-sidebar-width: 262px;
    --bs-primary: #1d5bd8;
    --bs-primary-rgb: 29, 91, 216;
    --bs-body-font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
    --bs-body-font-size: .925rem;
    --bs-border-radius: .55rem;
    --bs-link-color: #1d5bd8;
    --bs-link-color-rgb: 29, 91, 216;
}

[data-bs-theme="light"] body.zt-admin {
    background: #eef1f6;
}

[data-bs-theme="dark"] {
    --zt-sidebar-bg: #0a1220;
    --zt-sidebar-active: #15243a;
}

[data-bs-theme="dark"] body.zt-admin {
    background: #0e1522;
}

.btn-primary {
    --bs-btn-bg: #1d5bd8;
    --bs-btn-border-color: #1d5bd8;
    --bs-btn-hover-bg: #174bb4;
    --bs-btn-hover-border-color: #174bb4;
    --bs-btn-active-bg: #133f97;
    --bs-btn-active-border-color: #133f97;
}

.btn-warning {
    --bs-btn-bg: #f5b400;
    --bs-btn-border-color: #f5b400;
    --bs-btn-hover-bg: #ffc61f;
    --bs-btn-hover-border-color: #ffc61f;
    --bs-btn-color: #111;
    --bs-btn-hover-color: #111;
}

.ic {
    flex-shrink: 0;
    vertical-align: -.2em;
}

h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
    font-weight: 800;
    letter-spacing: -.01em;
}

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

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

.zt-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    width: var(--zt-sidebar-width);
    display: flex;
    flex-direction: column;
    background: var(--zt-sidebar-bg);
    color: var(--zt-sidebar-text);
    transition: transform .25s ease;
}

.zt-sidebar::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: repeating-linear-gradient(-45deg, var(--zt-admin-accent) 0 10px, #111 10px 20px);
}

.zt-brand {
    display: flex;
    gap: .75rem;
    align-items: center;
    padding: 1.35rem 1.1rem 1rem;
    color: #fff;
    text-decoration: none;
}

.zt-brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--zt-admin-accent);
    color: #111;
}

.zt-brand-text strong {
    display: block;
    line-height: 1.15;
    font-weight: 800;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zt-brand-text small {
    color: var(--zt-sidebar-muted);
    font-size: .75rem;
}

.zt-menu {
    flex: 1;
    overflow-y: auto;
    padding: .25rem .6rem 1rem;
    scrollbar-width: thin;
    scrollbar-color: #2a3a52 transparent;
}

.zt-menu-title {
    margin: 1rem .6rem .35rem;
    color: var(--zt-sidebar-muted);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.zt-menu a {
    display: flex;
    gap: .65rem;
    align-items: center;
    padding: .48rem .65rem;
    border-radius: .5rem;
    color: var(--zt-sidebar-text);
    text-decoration: none;
    font-size: .88rem;
}

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

.zt-menu a.active {
    background: var(--zt-sidebar-active);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--zt-admin-accent);
}

.zt-menu a.active .ic {
    color: var(--zt-admin-accent);
}

.zt-count {
    margin-left: auto;
    min-width: 22px;
    padding: 1px 7px;
    border-radius: 99px;
    background: var(--zt-admin-accent);
    color: #111;
    font-size: .72rem;
    text-align: center;
}

.zt-sidebar-foot {
    display: flex;
    justify-content: space-between;
    padding: .85rem 1.1rem;
    border-top: 1px solid rgba(255, 255, 255, .07);
    font-size: .8rem;
}

.zt-sidebar-foot a {
    color: var(--zt-sidebar-text);
    text-decoration: none;
}

.zt-main {
    flex: 1;
    min-width: 0;
    margin-left: var(--zt-sidebar-width);
}

.zt-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    gap: .75rem;
    align-items: center;
    padding: .55rem 1.5rem;
    background: var(--bs-body-bg);
    border-bottom: 1px solid var(--bs-border-color);
}

.zt-global-search {
    width: min(460px, 45vw);
}

.zt-menu-toggle {
    display: none;
    color: inherit;
}

.zt-icon-btn,
.zt-user {
    color: var(--bs-body-color);
    text-decoration: none;
}

.zt-user {
    display: flex;
    gap: .6rem;
    align-items: center;
    font-weight: 600;
    line-height: 1.2;
}

.zt-user small {
    color: var(--bs-secondary-color);
    font-weight: 500;
    font-size: .75rem;
}

.zt-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--zt-sidebar-bg);
    color: var(--zt-admin-accent);
    font-weight: 800;
}

.zt-content {
    padding: 1.75rem 1.5rem 3rem;
    max-width: 1500px;
}

.zt-backdrop {
    display: none;
}

@media (max-width: 991.98px) {
    .zt-sidebar {
        transform: translateX(-100%);
    }

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

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

    .zt-main {
        margin-left: 0;
    }

    .zt-menu-toggle {
        display: inline-flex;
    }

    .zt-content {
        padding: 1.1rem 1rem 3rem;
    }

    .zt-topbar {
        padding: .5rem 1rem;
    }
}

/* ------------------------------------------------------------------ kartlar, tablolar */

.zt-card,
.card {
    border-color: var(--bs-border-color-translucent);
    box-shadow: 0 1px 2px rgba(15, 27, 45, .04);
}

.card-header {
    background: transparent;
}

.zt-table thead th {
    color: var(--bs-secondary-color);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.zt-table td {
    vertical-align: middle;
}

.zt-thumb {
    width: 54px;
    height: 40px;
    object-fit: cover;
    border-radius: .35rem;
    background: var(--bs-secondary-bg);
}

.zt-w-drag {
    width: 34px;
}

.zt-drag {
    cursor: grab;
    color: var(--bs-secondary-color);
}

tr.dragging {
    opacity: .5;
    background: var(--bs-secondary-bg);
}

.zt-search {
    min-width: 220px;
}

.zt-page-head h1 {
    font-size: 1.55rem;
}

.zt-stat .card-body {
    padding: 1rem 1.1rem;
}

.zt-stat-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    flex-shrink: 0;
}

.zt-stat-label {
    color: var(--bs-secondary-color);
    font-size: .78rem;
    font-weight: 600;
}

.zt-stat-value {
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.2;
}

.min-w-0 {
    min-width: 0;
}

.zt-chart {
    width: 100%;
    height: 210px;
}

.zt-chart-label {
    fill: var(--bs-secondary-color);
    font-size: 11px;
}

.zt-bars-row + .zt-bars-row {
    margin-top: .65rem;
}

.zt-empty .ic {
    opacity: .4;
}

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

.form-label {
    font-weight: 600;
    font-size: .86rem;
}

.zt-switch .form-check-input {
    width: 2.6em;
    height: 1.35em;
    margin-top: .1em;
}

.zt-switch .form-check-label {
    padding-left: .35rem;
    font-weight: 600;
}

.zt-image-preview {
    display: grid;
    place-items: center;
    width: 110px;
    height: 80px;
    border-radius: .5rem;
    background: var(--bs-secondary-bg);
    overflow: hidden;
    flex-shrink: 0;
}

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

.zt-color .form-control-color {
    max-width: 56px;
}

.zt-editor-area {
    min-height: 220px;
    max-height: 600px;
    overflow-y: auto;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.zt-editor-toolbar {
    padding: .35rem;
    border: 1px solid var(--bs-border-color);
    border-bottom: 0;
    border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0;
    background: var(--bs-tertiary-bg);
}

.zt-editor-source {
    display: none;
}

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

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

.zt-translations summary {
    cursor: pointer;
}

.zt-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.zt-tabs .nav-link {
    white-space: nowrap;
    font-weight: 600;
}

/* ------------------------------------------------------------------ iş emri, takvim */

.zt-status-steps {
    display: flex;
    gap: 4px;
}

.zt-status-steps span {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--bs-secondary-bg);
}

.zt-status-steps span.on {
    background: var(--zt-admin-accent);
}

.zt-timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1.1rem;
    border-left: 2px solid var(--bs-border-color);
}

.zt-timeline li {
    position: relative;
    padding: 0 0 1rem .6rem;
}

.zt-timeline li::before {
    content: "";
    position: absolute;
    left: -1.52rem;
    top: .3rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bs-body-bg);
    border: 3px solid var(--zt-admin-primary);
}

.zt-calendar {
    display: grid;
    grid-template-columns: 60px repeat(7, minmax(120px, 1fr));
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    overflow-x: auto;
}

.zt-calendar > div {
    min-height: 44px;
    padding: 4px;
    border-right: 1px solid var(--bs-border-color-translucent);
    border-bottom: 1px solid var(--bs-border-color-translucent);
    font-size: .8rem;
}

.zt-cal-head {
    position: sticky;
    top: 0;
    background: var(--bs-tertiary-bg);
    font-weight: 700;
    text-align: center;
}

.zt-cal-time {
    color: var(--bs-secondary-color);
    text-align: right;
}

.zt-cal-event {
    display: block;
    margin-bottom: 3px;
    padding: 3px 6px;
    border-radius: 5px;
    border-left: 3px solid currentColor;
    background: var(--bs-secondary-bg);
    color: var(--bs-body-color);
    text-decoration: none;
    line-height: 1.25;
}

.zt-cal-today {
    background: rgba(245, 180, 0, .08);
}

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

.zt-login {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background: #fff;
}

.zt-login-art {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 3rem;
    background:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px) 0 0 / 28px 28px,
        #0f1b2d;
    color: #fff;
    overflow: hidden;
}

.zt-login-art::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 10px;
    background: repeating-linear-gradient(-45deg, #f5b400 0 14px, #111 14px 28px);
}

.zt-login-art h2 {
    font-size: 2.4rem;
    max-width: 420px;
}

.zt-login-form {
    display: grid;
    place-items: center;
    padding: 2rem;
}

.zt-login-form .card {
    width: min(420px, 100%);
    border: 0;
    box-shadow: none;
}

[data-bs-theme="dark"] .zt-login {
    background: #0e1522;
}

@media (max-width: 767.98px) {
    .zt-login {
        grid-template-columns: 1fr;
    }

    .zt-login-art {
        display: none;
    }
}

/* ------------------------------------------------------------------ yazdırma */

@media print {
    .zt-sidebar,
    .zt-topbar,
    .zt-no-print,
    .alert {
        display: none !important;
    }

    .zt-main {
        margin: 0;
    }

    .zt-content {
        padding: 0;
    }

    body.zt-admin {
        background: #fff;
    }
}
