/* ==========================================================
   Dijiben — Panel iskeleti
   (Form bileşenleri card.dijiben.com/asset/css/setup.css'ten gelir)
   ========================================================== */

:root {
    --p-side: 248px;
}

.p-body {
    min-height: 100vh;
}

/* Sol menü */
.p-side {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--p-side);
    background: var(--s-surface);
    border-right: 1px solid var(--s-line);
    display: flex;
    flex-direction: column;
    padding: 20px 14px 14px;
    z-index: 40;
    transition: transform .2s ease;
}

.p-brand {
    display: block;
    padding: 2px 10px 22px;
}

.p-brand img {
    height: 26px;
}

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

.p-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 9px;
    color: var(--s-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 14.5px;
    transition: background .12s ease, color .12s ease;
}

.p-nav a i {
    font-size: 17px;
}

.p-nav a:hover {
    background: #f4f4f2;
    color: var(--s-ink);
}

.p-nav a.is-on {
    background: #f0f0ed;
    color: var(--s-ink);
}

.p-accounts {
    margin-top: 24px;
    border-top: 1px solid var(--s-line);
    padding-top: 14px;
    overflow-y: auto;
    min-height: 0;
}

.p-accounts p {
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #a1a1aa;
    margin: 0 10px 8px;
}

.p-accounts button {
    all: unset;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 7px 10px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 500;
}

.p-accounts button small {
    display: block;
    color: var(--s-muted);
    font-weight: 400;
    font-size: 12px;
}

.p-accounts button:hover,
.p-accounts button.is-on {
    background: #f4f4f2;
}

.p-me {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 6px 2px 10px;
    border-top: 1px solid var(--s-line);
}

.p-me-t {
    min-width: 0;
    flex: 1;
    line-height: 1.25;
}

.p-me-t b,
.p-me-t small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.p-me-t b {
    font-size: 13.5px;
    font-weight: 600;
}

.p-me-t small {
    font-size: 12px;
    color: var(--s-muted);
}

.p-me form {
    margin: 0;
}

.p-out {
    border: 0;
    background: transparent;
    color: var(--s-muted);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 17px;
}

.p-out:hover {
    background: #f4f4f2;
    color: var(--s-danger);
}

.p-av {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: #ebebe8;
    color: var(--s-ink);
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 13px;
    overflow: hidden;
}

.p-av img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobil üst bar */
.p-top {
    display: none;
}

.p-scrim {
    display: none;
}

@media (max-width: 991.98px) {
    .p-side {
        transform: translateX(-100%);
        box-shadow: none;
    }

    .p-side.is-open {
        transform: none;
        box-shadow: 0 20px 60px -20px rgba(24, 24, 27, .4);
    }

    .p-scrim {
        position: fixed;
        inset: 0;
        background: rgba(9, 9, 11, .35);
        z-index: 35;
    }

    .p-scrim.is-on {
        display: block;
    }

    .p-top {
        display: flex;
        align-items: center;
        gap: 10px;
        height: 60px;
        padding: 0 12px;
        background: var(--s-surface);
        border-bottom: 1px solid var(--s-line);
        position: sticky;
        top: 0;
        z-index: 30;
    }

    .p-top img {
        height: 24px;
    }

    .p-burger {
        border: 0;
        background: transparent;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        font-size: 22px;
        color: var(--s-ink);
    }
}

/* İçerik */
.p-main {
    margin-left: var(--p-side);
    padding: 36px 40px 80px;
    max-width: calc(1180px + var(--p-side));
}

@media (max-width: 991.98px) {
    .p-main {
        margin-left: 0;
        padding: 22px 16px 120px;
    }
}

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

.p-head h1 {
    font-size: 26px;
    font-weight: 650;
    letter-spacing: -.025em;
    margin: 0 0 6px;
}

.p-sub {
    color: var(--s-muted);
    margin: 0;
}

.p-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--s-muted);
    text-decoration: none;
    font-size: 13.5px;
    margin-bottom: 10px;
}

.p-back:hover {
    color: var(--s-ink);
}

.p-addr {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13.5px;
    color: var(--s-muted);
}

.p-addr a {
    color: var(--s-ink);
    text-decoration: none;
}

.p-addr a:hover {
    text-decoration: underline;
}

.p-sep {
    width: 1px;
    height: 14px;
    background: var(--s-line-strong);
}

.p-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #a1a1aa;
}

.p-dot--on {
    background: var(--s-ok);
}

.p-dot--wait {
    background: #d97706;
}

.p-dot--off {
    background: var(--s-danger);
}

.p-copy {
    border: 0;
    background: transparent;
    color: var(--s-muted);
    padding: 2px 4px;
    border-radius: 6px;
}

.p-copy:hover {
    color: var(--s-ink);
    background: #ebebe8;
}

/* İstatistikler */
.p-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 26px;
}

.p-stat {
    background: var(--s-surface);
    border: 1px solid var(--s-line);
    border-radius: 14px;
    padding: 14px 16px;
}

.p-stat span {
    display: block;
    font-size: 12.5px;
    color: var(--s-muted);
    margin-bottom: 4px;
}

.p-stat b {
    font-size: 24px;
    font-weight: 650;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}

/* Düzenleyici */
.p-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

@media (min-width: 992px) {
    .p-editor {
        grid-template-columns: minmax(0, 1fr) 320px;
    }
}

.p-preview {
    top: 32px;
}

.p-tabs {
    gap: 4px;
    border-bottom: 1px solid var(--s-line);
    margin-bottom: 18px;
    overflow-x: auto;
    scrollbar-width: none;
}

.p-tabs::-webkit-scrollbar {
    display: none;
}

.p-tabs li {
    flex: 0 0 auto;
}

.p-tabs button {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    width: auto !important;
    padding: 10px 12px 12px !important;
    font-size: 14px;
    font-weight: 500;
    color: var(--s-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    transition: color .12s ease, border-color .12s ease;
}

.p-tabs button:hover {
    color: var(--s-ink);
}

.p-tabs li.is-active button {
    color: var(--s-ink);
    border-bottom-color: var(--s-ink);
}

.p-savebar {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 28px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--s-line);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 0 0 18px 18px;
    margin-top: 24px;
    z-index: 5;
}

@media (max-width: 575.98px) {
    .p-savebar {
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    }
}

.p-dirty {
    margin-right: auto;
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: #b45309;
}

.p-dirty i {
    font-size: 7px;
}

.is-dirty .p-dirty {
    display: inline-flex;
}

.p-narrow {
    max-width: 640px;
}

.p-mono {
    font-size: 13px;
    word-break: break-all;
}

.p-mono a {
    color: var(--s-muted);
}

/* Bildirim */
.p-flash {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 20px;
    transition: opacity .3s ease, transform .3s ease;
}

.p-flash--ok {
    background: #ecfdf3;
    border: 1px solid #b7ebcb;
    color: #14532d;
}

.p-flash--err {
    background: #fef3f2;
    border: 1px solid #f3c7c3;
    color: #7a271a;
}

.p-flash.is-gone {
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
}

/* Ekip listesi */
.p-team {
    overflow: hidden;
}

.p-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--s-line);
}

.p-search {
    max-width: 360px;
    flex: 1 1 240px;
}

.p-filters {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--s-line-strong);
    border-radius: 10px;
    background: #fafaf9;
}

.p-filters a {
    padding: 6px 12px;
    border-radius: 7px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--s-muted);
    text-decoration: none;
    white-space: nowrap;
}

.p-filters a.is-on {
    background: var(--s-surface);
    color: var(--s-ink);
    box-shadow: 0 1px 2px rgba(24, 24, 27, .12);
}

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

.p-list li + li {
    border-top: 1px solid var(--s-line);
}

.p-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: var(--s-ink);
    text-decoration: none;
    transition: background .12s ease;
}

.p-row:hover {
    background: #fafaf9;
}

.p-row .p-av {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    font-size: 15px;
}

.p-row-main {
    flex: 1;
    min-width: 0;
}

.p-row-main b,
.p-row-main small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.p-row-main b {
    font-weight: 600;
    font-size: 15px;
}

.p-row-main small {
    color: var(--s-muted);
    font-size: 13px;
}

.p-note i {
    margin-right: 5px;
}

.p-tag {
    font-style: normal;
    font-size: 11px;
    font-weight: 600;
    background: #f0f0ed;
    color: var(--s-muted);
    padding: 2px 7px;
    border-radius: 99px;
    margin-left: 8px;
    vertical-align: 2px;
}

.p-row-num {
    flex-direction: column;
    align-items: flex-end;
    min-width: 84px;
    line-height: 1.2;
}

.p-row-num b {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.p-row-num small {
    font-size: 11.5px;
    color: var(--s-muted);
}

.p-badge {
    font-size: 12px;
    font-weight: 550;
    padding: 4px 10px;
    border-radius: 99px;
    white-space: nowrap;
}

.p-badge--on {
    background: #ecfdf3;
    color: #166534;
}

.p-badge--wait {
    background: #fffbeb;
    color: #92400e;
}

.p-badge--off {
    background: #fef3f2;
    color: #991b1b;
}

.p-go {
    color: #a1a1aa;
}

@media (max-width: 575.98px) {
    .p-badge {
        display: none;
    }
}

.p-empty {
    text-align: center;
    padding: 56px 16px;
    color: var(--s-muted);
}

.p-empty i {
    font-size: 30px;
    display: block;
    margin-bottom: 8px;
}

.p-pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-top: 1px solid var(--s-line);
    font-size: 13.5px;
    color: var(--s-muted);
}

.p-pager > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.p-pager .btn {
    width: 34px;
    padding: 0;
}

.p-pager-n {
    font-variant-numeric: tabular-nums;
    color: var(--s-ink);
    min-width: 54px;
    text-align: center;
}

/* Giriş */
.l-body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.l-wrap {
    width: 100%;
    max-width: 420px;
    padding: 40px 16px;
    display: flex;
    flex-direction: column;
}

.l-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
}

.l-logo {
    height: 28px;
}

.l-langs {
    display: flex;
    gap: 6px;
    margin: 0;
}

.l-langs .form-select {
    height: 36px;
    width: auto;
    padding: 0 32px 0 12px;
    font-size: 14px;
    background-position: right 10px center;
}

.l-card {
    background: var(--s-surface);
    border: 1px solid var(--s-line);
    border-radius: 18px;
    padding: 30px 28px;
    box-shadow: 0 1px 2px rgba(24, 24, 27, .04);
}

@media (max-width: 575.98px) {
    .l-card {
        padding: 24px 20px;
    }
}

.l-card h1 {
    font-size: 21px;
    font-weight: 650;
    letter-spacing: -.02em;
    margin: 0 0 6px;
}

.l-sub {
    color: var(--s-muted);
    font-size: 14.5px;
    margin: 0 0 22px;
}

.l-sub b {
    color: var(--s-ink);
    font-weight: 550;
}

.l-code {
    font-size: 24px !important;
    letter-spacing: .5em;
    text-align: center;
    font-variant-numeric: tabular-nums;
    height: 56px !important;
    padding-left: .5em;
}

.l-links {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
}

.l-links form {
    margin: 0;
}

.l-links .btn {
    padding: 0 4px;
}

.l-info {
    margin-bottom: 16px;
}

.l-picks {
    display: grid;
    gap: 8px;
}

.l-picks form {
    margin: 0;
}

.l-pick {
    all: unset;
    box-sizing: border-box;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--s-line);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .12s ease, background .12s ease;
}

.l-pick:hover,
.l-pick:focus-visible {
    border-color: #a1a1aa;
    background: #fafaf9;
}

.l-pick .p-av {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
}

.l-pick-t {
    flex: 1;
    min-width: 0;
}

.l-pick-t b,
.l-pick-t small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.l-pick-t b {
    font-weight: 600;
}

.l-pick-t small {
    color: var(--s-muted);
    font-size: 13px;
}

.l-foot {
    margin-top: auto;
    padding-top: 40px;
    text-align: center;
    font-size: 13px;
    color: #a1a1aa;
}

.l-foot a {
    color: var(--s-muted);
}

@media (max-width: 575.98px) {
    .p-stats {
        grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
        gap: 8px;
    }

    .p-stat {
        padding: 12px;
    }

    .p-stat span {
        font-size: 11.5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .p-stat b {
        font-size: 20px;
    }

    .p-head-act {
        width: 100%;
    }
}
