/* =====================================================================
   MetropolAds - Panel temasi
   Bootstrap 5.3 uzerine kurulu: koyu yan menu + acik icerik alani
   ===================================================================== */

:root {
    --mp-primary: #1d4ed8;
    --mp-sidebar-hover: #1e293b;
    --mp-surface: #ffffff;
    --mp-bg: #f4f6fb;
    --mp-border: #e5e7eb;
    --mp-text: #111827;
    --mp-muted: #6b7280;
    --mp-radius: 14px;
    --mp-sidebar-width: 262px;
}

body {
    background: var(--mp-bg);
    color: var(--mp-text);
    font-family: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
    font-size: .925rem;
}

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

.main-area {
    flex: 1;
    min-width: 0;
    margin-left: var(--mp-sidebar-width);
    display: flex;
    flex-direction: column;
}

.content-area { padding: 1.4rem 1.6rem 3rem; flex: 1; }

/* --- Yan menu ------------------------------------------------------ */
.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--mp-sidebar-width);
    background: linear-gradient(180deg, #0f172a 0%, #131f38 100%);
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: transform .25s ease;
}

.sidebar-brand {
    display: flex; align-items: center; gap: .7rem;
    padding: 1.1rem 1.15rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-mark {
    width: 40px; height: 40px; border-radius: 11px;
    background: linear-gradient(135deg, var(--mp-primary), #6d28d9);
    display: grid; place-items: center;
    color: #fff; font-size: 1.15rem; flex-shrink: 0;
}

.brand-text strong { display: block; color: #fff; font-size: .95rem; line-height: 1.2; }
.brand-text small { color: #94a3b8; font-size: .72rem; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: .75rem .7rem 1rem; }
.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 4px; }

.nav-group { margin-bottom: .85rem; }

.nav-label {
    display: block; font-size: .66rem; text-transform: uppercase;
    letter-spacing: .09em; color: #64748b;
    padding: .35rem .6rem .3rem; font-weight: 600;
}

.nav-item {
    display: flex; align-items: center; gap: .65rem;
    padding: .52rem .65rem; border-radius: 9px;
    color: #cbd5e1; text-decoration: none; font-size: .875rem;
    transition: background .15s ease, color .15s ease;
}

.nav-item i { font-size: 1rem; width: 18px; text-align: center; opacity: .85; }
.nav-item:hover { background: var(--mp-sidebar-hover); color: #fff; }

.nav-item.active {
    background: linear-gradient(90deg, rgba(29,78,216,.95), rgba(109,40,217,.75));
    color: #fff; font-weight: 600;
    box-shadow: 0 4px 14px rgba(29,78,216,.35);
}

.sidebar-foot { padding: .9rem 1rem 1.1rem; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-user { display: flex; align-items: center; gap: .6rem; margin-bottom: .7rem; }

.sidebar-user .avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,.12); color: #fff;
    display: grid; place-items: center; font-weight: 700; flex-shrink: 0;
}

.user-meta { min-width: 0; }
.user-meta strong { display: block; color: #fff; font-size: .84rem; }
.user-meta small { display: block; color: #94a3b8; font-size: .72rem; }
.user-meta strong, .user-meta small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-backdrop {
    display: none; position: fixed; inset: 0;
    background: rgba(15,23,42,.55); z-index: 1035;
}
.sidebar-backdrop.show { display: block; }

/* --- Ust cubuk ----------------------------------------------------- */
.topbar {
    background: var(--mp-surface);
    border-bottom: 1px solid var(--mp-border);
    padding: .9rem 1.6rem;
    display: flex; align-items: center; gap: 1rem;
    position: sticky; top: 0; z-index: 1020;
}

.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 1.32rem; font-weight: 700; margin: 0; line-height: 1.25; }
.topbar-title p { margin: .12rem 0 0; color: var(--mp-muted); font-size: .83rem; }

.crumbs {
    display: flex; align-items: center; gap: .35rem;
    font-size: .74rem; color: var(--mp-muted); margin-bottom: .15rem;
}
.crumbs a { color: var(--mp-primary); text-decoration: none; }
.crumbs i { font-size: .6rem; }
.crumbs i:last-child { display: none; }

.topbar-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.notif-badge { position: absolute; top: -5px; right: -5px; font-size: .62rem; }

.notif-menu {
    width: 350px; max-height: 430px; overflow-y: auto; padding: 0;
    border-radius: 12px; border: 1px solid var(--mp-border);
    box-shadow: 0 12px 34px rgba(15,23,42,.14);
}

.notif-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: .7rem .9rem; border-bottom: 1px solid var(--mp-border);
}

.notif-empty { padding: 1.4rem; text-align: center; color: var(--mp-muted); font-size: .84rem; }

.notif-item {
    display: flex; gap: .6rem; padding: .65rem .9rem;
    border-bottom: 1px solid #f1f5f9; text-decoration: none; color: var(--mp-text);
}
.notif-item:hover { background: #f8fafc; }
.notif-item.unread { background: #eff6ff; }
.notif-item .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: .35rem; flex-shrink: 0; }
.notif-body { min-width: 0; }
.notif-body strong { display: block; font-size: .84rem; font-weight: 600; }
.notif-body small { display: block; color: var(--mp-muted); font-size: .76rem; }
.notif-body time { font-size: .7rem; color: #9ca3af; }

/* --- Kartlar ------------------------------------------------------- */
.card {
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius);
    box-shadow: 0 1px 3px rgba(15,23,42,.04);
}

.card-header {
    background: var(--mp-surface);
    border-bottom: 1px solid var(--mp-border);
    font-weight: 600; padding: .85rem 1.1rem;
    border-radius: var(--mp-radius) var(--mp-radius) 0 0 !important;
}

.stat-card {
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius);
    padding: 1rem 1.1rem;
    display: flex; align-items: center; gap: .9rem; height: 100%;
}

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

.stat-body { min-width: 0; }

.stat-label {
    display: block; font-size: .74rem; text-transform: uppercase;
    letter-spacing: .04em; color: var(--mp-muted); font-weight: 600;
}

.stat-value { display: block; font-size: 1.5rem; font-weight: 700; line-height: 1.15; }
.stat-note { display: block; font-size: .74rem; color: var(--mp-muted); }

.tone-primary .stat-icon { background: #dbeafe; color: #1d4ed8; }
.tone-success .stat-icon { background: #dcfce7; color: #15803d; }
.tone-warning .stat-icon { background: #fef3c7; color: #b45309; }
.tone-danger  .stat-icon { background: #fee2e2; color: #b91c1c; }
.tone-info    .stat-icon { background: #cffafe; color: #0e7490; }
.tone-purple  .stat-icon { background: #ede9fe; color: #6d28d9; }

.empty-state { text-align: center; padding: 2.8rem 1.5rem; color: var(--mp-muted); }
.empty-state i { font-size: 2.6rem; color: #cbd5e1; display: block; margin-bottom: .6rem; }
.empty-state h3 { font-size: 1.05rem; color: var(--mp-text); font-weight: 600; }
.empty-state p { font-size: .87rem; max-width: 460px; margin: .3rem auto 0; }

/* --- Tablolar ------------------------------------------------------ */
.table { margin-bottom: 0; }

.table > thead th {
    background: #f8fafc; font-size: .74rem; text-transform: uppercase;
    letter-spacing: .04em; color: var(--mp-muted); font-weight: 600;
    border-bottom: 1px solid var(--mp-border); white-space: nowrap;
}

.table > tbody td { vertical-align: middle; font-size: .875rem; }
.table-hover > tbody > tr:hover > * { background: #f8fafc; }

/* --- Icerik kartlari ----------------------------------------------- */
.content-card {
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius);
    overflow: hidden; height: 100%;
    display: flex; flex-direction: column;
    transition: box-shadow .18s ease, transform .18s ease;
}

.content-card:hover { box-shadow: 0 10px 26px rgba(15,23,42,.1); transform: translateY(-2px); }

.content-thumb { position: relative; aspect-ratio: 1 / 1; background: #f1f5f9; overflow: hidden; }
.content-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.content-thumb .no-img { width: 100%; height: 100%; display: grid; place-items: center; color: #94a3b8; font-size: 1.8rem; }
.content-thumb .status-pill { position: absolute; top: .6rem; left: .6rem; }

/* Onay merkezinde kart uzerindeki secim kutusu ve durum etiketi */
.content-check {
    position: absolute; top: .5rem; left: .5rem;
    background: rgba(255,255,255,.94);
    border-radius: .4rem; padding: .2rem .35rem;
    box-shadow: 0 2px 6px rgba(15,23,42,.16);
}
.content-check .form-check-input { margin: 0; cursor: pointer; }

.content-status {
    position: absolute; bottom: .5rem; left: .5rem;
    max-width: calc(100% - 1rem);
    font-size: .7rem; font-weight: 600;
}

.content-card .card-body { padding: .85rem .95rem; flex: 1; display: flex; flex-direction: column; }
.content-card .topic { font-weight: 600; font-size: .9rem; line-height: 1.3; margin-bottom: .35rem; }
.content-card .snippet { font-size: .8rem; color: var(--mp-muted); line-height: 1.42; flex: 1; }

.content-card .meta-row {
    display: flex; justify-content: space-between; align-items: center;
    font-size: .74rem; color: var(--mp-muted);
    margin-top: .6rem; padding-top: .55rem; border-top: 1px solid #f1f5f9;
}

/* --- Yayin takvimi ------------------------------------------------- */
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.cal-head {
    text-align: center; font-size: .74rem; font-weight: 700;
    color: var(--mp-muted); text-transform: uppercase; letter-spacing: .04em;
    padding: .35rem 0;
}

.cal-cell {
    position: relative;
    min-height: 116px;
    background: #fff;
    border: 1px solid var(--mp-border);
    border-radius: .5rem;
    padding: .3rem;
}

.cal-cell.is-empty { background: #f8fafc; border-style: dashed; }
.cal-cell.is-past  { background: #fcfdff; }
.cal-cell.is-today { border-color: var(--mp-primary); box-shadow: 0 0 0 2px rgba(29,78,216,.12); }

.cal-day {
    display: flex; justify-content: space-between; align-items: center;
    font-size: .78rem; font-weight: 700; color: #334155;
    padding: 0 .15rem .25rem;
}

.cal-item {
    background: #f8fafc;
    border-left: 3px solid var(--mp-primary);
    border-radius: .35rem;
    padding: .25rem .35rem;
    margin-bottom: .25rem;
}

.cal-item a { display: block; text-decoration: none; color: inherit; }
.cal-item a:hover .cal-topic { text-decoration: underline; }

.cal-time     { font-size: .68rem; font-weight: 700; color: var(--mp-primary); }
.cal-customer { font-size: .68rem; color: var(--mp-muted); margin-left: .25rem; }
.cal-topic    { display: block; font-size: .74rem; line-height: 1.3; color: #1e293b; margin-top: .1rem; }

.cal-item-foot { display: flex; align-items: center; gap: .25rem; margin-top: .2rem; }
.cal-move input[type="date"] {
    border: none; background: transparent; font-size: .62rem;
    color: var(--mp-muted); width: 84px; padding: 0; cursor: pointer;
}

.cal-add {
    position: absolute; right: .3rem; bottom: .3rem;
    width: 22px; height: 22px; border-radius: 50%;
    display: grid; place-items: center;
    color: var(--mp-muted); background: #f1f5f9;
    opacity: 0; transition: opacity .15s ease;
    text-decoration: none;
}
.cal-cell:hover .cal-add { opacity: 1; }
.cal-add:hover { background: var(--mp-primary); color: #fff; }

@media (max-width: 767.98px) {
    .cal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cal-head { display: none; }
    .cal-cell.is-empty { display: none; }
    .cal-cell { min-height: 90px; }
}

/* --- Medya indirici karolari --------------------------------------- */
.dl-tile {
    position: relative; display: block; cursor: pointer;
    aspect-ratio: 1 / 1; border-radius: .5rem; overflow: hidden;
    background: #f1f5f9; border: 2px solid transparent;
    transition: border-color .15s ease;
}

.dl-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dl-tile .dl-noimg { width: 100%; height: 100%; display: grid; place-items: center; color: #94a3b8; font-size: 1.4rem; }

.dl-tile .form-check-input {
    position: absolute; top: .35rem; left: .35rem; z-index: 2; margin: 0;
    box-shadow: 0 1px 4px rgba(15,23,42,.3);
}

.dl-tile .dl-badges {
    position: absolute; top: .35rem; right: .35rem; z-index: 2;
    display: flex; flex-direction: column; gap: .2rem; align-items: flex-end;
    font-size: .62rem;
}

.dl-tile .dl-meta {
    position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
    padding: .5rem .4rem .25rem;
    font-size: .66rem; color: #fff; text-align: right;
    background: linear-gradient(to top, rgba(15,23,42,.72), transparent);
}

.dl-tile:has(.form-check-input:checked) { border-color: var(--mp-primary); }
.dl-tile.is-highlight { border-color: #f59e0b; }

/* --- Zaman cizelgesi (notlar / onay gecmisi) ----------------------- */
.timeline { position: relative; padding-left: 1.1rem; }
.timeline::before {
    content: ''; position: absolute; left: .28rem; top: .35rem; bottom: .35rem;
    width: 2px; background: var(--mp-border);
}

.timeline-item { position: relative; padding: 0 0 .85rem 0; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
    content: ''; position: absolute; left: -1.1rem; top: .4rem;
    width: .55rem; height: .55rem; border-radius: 50%;
    background: #fff; border: 2px solid var(--mp-primary);
}

/* --- Sohbet -------------------------------------------------------- */
.chat-wrap { display: flex; gap: 1rem; height: calc(100vh - 190px); min-height: 460px; }

.chat-sidebar {
    width: 260px; flex-shrink: 0;
    background: var(--mp-surface); border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius);
    display: flex; flex-direction: column; overflow: hidden;
}

.chat-list { overflow-y: auto; flex: 1; }

.chat-list a {
    display: block; padding: .65rem .85rem;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none; color: var(--mp-text); font-size: .84rem;
}
.chat-list a:hover { background: #f8fafc; }
.chat-list a.active { background: #eff6ff; border-left: 3px solid var(--mp-primary); font-weight: 600; }

.chat-main {
    flex: 1; min-width: 0;
    background: var(--mp-surface); border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius);
    display: flex; flex-direction: column; overflow: hidden;
}

.chat-messages { flex: 1; overflow-y: auto; padding: 1.1rem; background: #f9fafb; }

.chat-bubble {
    max-width: 78%; margin-bottom: .9rem; padding: .7rem .95rem;
    border-radius: 14px; font-size: .875rem; line-height: 1.5;
    word-wrap: break-word;
}

.chat-bubble.user {
    margin-left: auto; background: var(--mp-primary); color: #fff;
    border-bottom-right-radius: 4px; white-space: pre-wrap;
}

.chat-bubble.assistant {
    background: var(--mp-surface); border: 1px solid var(--mp-border);
    border-bottom-left-radius: 4px;
}

.chat-bubble.assistant p:last-child,
.chat-bubble.assistant ul:last-child,
.chat-bubble.assistant ol:last-child { margin-bottom: 0; }

.chat-bubble .bubble-time { display: block; font-size: .68rem; opacity: .65; margin-top: .35rem; }
.chat-form { border-top: 1px solid var(--mp-border); padding: .8rem; background: var(--mp-surface); }

.typing-dots span {
    display: inline-block; width: 6px; height: 6px; border-radius: 50%;
    background: var(--mp-primary); margin-right: 3px; animation: mp-bounce 1.2s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: .18s; }
.typing-dots span:nth-child(3) { animation-delay: .36s; }

@keyframes mp-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: .45; }
    30% { transform: translateY(-5px); opacity: 1; }
}

/* --- AI raporlari -------------------------------------------------- */
.ai-body { font-size: .9rem; line-height: 1.62; }
.ai-body h3, .ai-body h4, .ai-body h5 { font-size: 1rem; font-weight: 700; margin-top: 1.1rem; }
.ai-body code { background: #f1f5f9; padding: .1rem .3rem; border-radius: 4px; font-size: .84em; color: #b91c1c; }

.action-item {
    display: flex; gap: .75rem; padding: .8rem .9rem;
    border: 1px solid var(--mp-border); border-radius: 11px;
    margin-bottom: .6rem; background: var(--mp-surface);
}

.action-item .num {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--mp-primary); color: #fff;
    display: grid; place-items: center;
    font-size: .78rem; font-weight: 700; flex-shrink: 0;
}

/* --- Yardim sayfasi ------------------------------------------------ */
.help-toc { position: sticky; top: 90px; }

.help-toc a {
    display: block; padding: .35rem .6rem; border-radius: 7px;
    color: var(--mp-muted); text-decoration: none; font-size: .84rem;
}
.help-toc a:hover { background: #f1f5f9; color: var(--mp-primary); }

.help-step {
    display: flex; gap: .9rem; padding-bottom: 1.1rem;
    margin-bottom: 1.1rem; border-bottom: 1px dashed var(--mp-border);
}
.help-step:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

.help-step .step-no {
    width: 30px; height: 30px; border-radius: 9px;
    background: linear-gradient(135deg, var(--mp-primary), #6d28d9);
    color: #fff; display: grid; place-items: center;
    font-weight: 700; font-size: .84rem; flex-shrink: 0;
}

.help-step h4 { font-size: .98rem; font-weight: 600; margin-bottom: .3rem; }
.help-step p, .help-step li { font-size: .875rem; color: #374151; line-height: 1.6; }

/* Yardim sayfasi: numarali adim basligi */
.help-h {
    display: flex; align-items: center; gap: .65rem;
    margin: 1.6rem 0 .7rem;
    padding-top: 1.1rem;
    border-top: 1px dashed var(--mp-border);
}
.help-h:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.help-h-no {
    width: 28px; height: 28px; border-radius: 8px;
    background: linear-gradient(135deg, var(--mp-primary), #6d28d9);
    color: #fff; display: grid; place-items: center;
    font-weight: 700; font-size: .8rem; flex-shrink: 0;
}
.help-h h5 { font-size: .96rem; font-weight: 600; margin: 0; }

/* Yardim sayfasi: kopyalanabilir deger satiri */
.help-copy {
    display: flex; align-items: stretch; gap: .4rem;
    margin-bottom: .25rem;
}
.help-copy code {
    flex: 1 1 auto; min-width: 0;
    display: block; padding: .45rem .6rem;
    background: #f8fafc; border: 1px solid var(--mp-border);
    border-radius: 7px; color: #0f172a;
    font-size: .8rem; word-break: break-all;
}
.help-copy .btn { flex-shrink: 0; }

/* Yardim sayfasi: harici baglanti */
.help-ext {
    color: var(--mp-primary); text-decoration: none;
    font-weight: 500; word-break: break-word;
}
.help-ext:hover { text-decoration: underline; }
.help-ext .bi { font-size: .72em; opacity: .7; }

.link-btn {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .3rem .65rem; background: #eff6ff;
    border: 1px solid #bfdbfe; border-radius: 7px;
    color: var(--mp-primary); text-decoration: none;
    font-size: .82rem; font-weight: 500; margin: .2rem .3rem .2rem 0;
}
.link-btn:hover { background: var(--mp-primary); color: #fff; border-color: var(--mp-primary); }

.copy-box {
    display: flex; align-items: center; gap: .5rem;
    background: #0f172a; color: #e2e8f0;
    border-radius: 9px; padding: .5rem .7rem;
    font-family: Consolas, 'Courier New', monospace; font-size: .8rem;
    word-break: break-all; margin: .4rem 0;
}
.copy-box button { margin-left: auto; flex-shrink: 0; }

/* --- Giris ekrani -------------------------------------------------- */
.login-page {
    min-height: 100vh; display: grid; place-items: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #4c1d95 100%);
    padding: 1.5rem;
}

.login-card {
    width: 100%; max-width: 420px;
    background: #fff; border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15,23,42,.35);
    padding: 2.1rem 2rem;
}

.login-logo {
    width: 56px; height: 56px; border-radius: 15px;
    background: linear-gradient(135deg, var(--mp-primary), #6d28d9);
    color: #fff; display: grid; place-items: center;
    font-size: 1.6rem; margin: 0 auto 1rem;
}

/* --- Yardimci siniflar --------------------------------------------- */
.text-tiny { font-size: .74rem; }
.cursor-pointer { cursor: pointer; }
.min-w-0 { min-width: 0; }

/* Claude'un performans puani icin halka gosterge (--score: 0-100) */
.score-ring {
    --score: 0;
    width: 108px; height: 108px; margin: 0 auto;
    border-radius: 50%;
    display: grid; place-items: center;
    background:
        conic-gradient(var(--mp-primary) calc(var(--score) * 1%), #e2e8f0 0)
        border-box;
    position: relative;
}
.score-ring::after {
    content: ''; position: absolute; inset: 9px;
    background: var(--mp-surface); border-radius: 50%;
}
.score-ring strong {
    position: relative; z-index: 1;
    font-size: 1.75rem; line-height: 1; color: var(--mp-text);
}
.score-ring small { position: relative; z-index: 1; font-size: .7rem; color: var(--mp-muted); }
.color-swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--mp-border); display: inline-block; }
.sticky-actions { position: sticky; bottom: 0; background: var(--mp-surface); border-top: 1px solid var(--mp-border); padding: .8rem 1.1rem; }
.badge-soft { background: #eff6ff; color: var(--mp-primary); font-weight: 600; }
.table-responsive { border-radius: var(--mp-radius); }

.progress-thin { height: 6px; border-radius: 3px; }

.metric-pill {
    display: inline-flex; align-items: center; gap: .3rem;
    background: #f1f5f9; border-radius: 20px;
    padding: .15rem .6rem; font-size: .76rem; color: #334155;
}

/* --- Sablon yazi alani onizlemesi ---------------------------------- */
/* Yuklenen bos tasarimin uzerinde, yazinin ve fotografin gelecegi
   bolgeleri cerceve olarak gosterir. Yuzdeler JS ile inset olarak yazilir. */
.tpl-stage {
    position: relative;
    display: inline-block;
    max-width: 100%;
    border: 1px solid var(--mp-border);
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    line-height: 0;
}
.tpl-stage img { display: block; max-width: 100%; height: auto; }

.tpl-zone {
    position: absolute;
    pointer-events: none;
    line-height: 1;
}
.tpl-zone span {
    position: absolute; top: 2px; left: 4px;
    font-size: .6rem; font-weight: 600;
    letter-spacing: .02em; text-transform: uppercase;
    padding: 1px 4px; border-radius: 3px;
}

.tpl-zone-safe {
    border: 2px dashed var(--mp-primary);
    background: rgba(37, 99, 235, .08);
}
.tpl-zone-safe span { background: var(--mp-primary); color: #fff; }

.tpl-zone-photo {
    border: 2px dashed #16a34a;
    background: rgba(22, 163, 74, .08);
}
.tpl-zone-photo span { background: #16a34a; color: #fff; }

/* --- Mobil --------------------------------------------------------- */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-area { margin-left: 0; }
    .topbar { padding: .75rem 1rem; }
    .content-area { padding: 1rem 1rem 2.5rem; }
    .chat-wrap { flex-direction: column; height: auto; }
    .chat-sidebar { width: 100%; max-height: 220px; }
    .chat-main { min-height: 420px; }
    .notif-menu { width: 300px; }
}

@media print {
    .sidebar, .topbar-actions, .sidebar-backdrop { display: none !important; }
    .main-area { margin-left: 0; }
    body { background: #fff; }
}
