/* Verinomi kurumsal renkleri (verinomi.com) */
:root {
  --navy: #0B2A4A;
  --navy-2: #0E3A66;
  --blue: #1877B9;
  --blue-hover: #136399;
  --blue-wash: #E8F2FA;
  --teal: #17A28A;
  --green: #2F9E6E;
  --green-wash: #E6F4EE;
  --lime: #8EC449;
  --amber: #B7791F;
  --amber-wash: #FBF2E0;
  --red: #C2412D;
  --red-wash: #FBE9E5;

  --bg: #F6F8FB;
  --surface: #FFFFFF;
  --surface-2: #F1F4F8;
  --text: #0B2A4A;
  --text-2: #4A5B70;
  --text-3: #647189;
  --line: #DCE3EC;
  --line-strong: #C0C7D2;
  --shadow: 0 1px 2px rgba(11, 42, 74, .06), 0 4px 16px rgba(11, 42, 74, .05);
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A1626; --surface: #0F1F33; --surface-2: #142840; --text: #E6EDF5; --text-2: #A9B8CA; --text-3: #8496AB;
    --line: #1E3450; --line-strong: #2B4566; --blue-wash: #12324F; --green-wash: #10332A; --amber-wash: #3A2C12; --red-wash: #3A1C17;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h2 { font-size: 15px; font-weight: 600; }
a { color: var(--blue); text-decoration: none; }
code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 13px; }
.muted { color: var(--text-3); }
.error { color: var(--red); margin: 0; min-height: 1.2em; font-size: 13px; }
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i.big { width: 32px; height: 32px; }

/* --- Rol bazlı görünürlük --- */
body:not(.role-admin) .need-admin { display: none !important; }
body.role-viewer .need-editor, body.role-advertiser .need-editor { display: none !important; }
body.role-advertiser .need-staff, body.role-advertiser .staff-label { display: none !important; }
body:not(.role-advertiser) .only-advertiser, body:not(.role-advertiser) .adv-label { display: none !important; }
body.role-viewer .need-uploader { display: none !important; }

/* --- Butonlar ve formlar --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { border-color: var(--line-strong); background: var(--surface-2); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-hover); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-wash); border-color: var(--red-wash); }
.btn.block { width: 100%; height: 42px; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.danger:hover { background: var(--red-wash); color: var(--red); }
.icon-btn.on-dark { color: #9FB3C8; }
.icon-btn.on-dark:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.icon-btn:disabled { opacity: .35; cursor: default; background: transparent; }
.icon-btn .i { width: 16px; height: 16px; }

input, select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; height: 38px; padding: 0 12px; width: 100%; transition: border-color .15s, box-shadow .15s; }
select { padding-right: 28px; }
input:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(24, 119, 185, .18); }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.field small { font-weight: 400; color: var(--text-3); }
.form { display: grid; gap: 14px; max-width: 380px; margin-top: 14px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.code-input { text-transform: uppercase; letter-spacing: .4em; font-family: ui-monospace, Menlo, monospace; font-size: 20px; height: 48px; text-align: center; }

/* --- Giriş --- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-brand { position: relative; overflow: hidden; background: radial-gradient(ellipse at 20% 20%, rgba(24, 119, 185, .45), transparent 55%), radial-gradient(ellipse at 80% 85%, rgba(23, 162, 138, .35), transparent 50%), radial-gradient(ellipse at 70% 30%, rgba(142, 196, 73, .18), transparent 45%), linear-gradient(135deg, #071C33, var(--navy) 45%, var(--navy-2)); color: #CFDBE8; display: flex; flex-direction: column; justify-content: center; padding: 64px; gap: 28px; }
.login-brand p { max-width: 420px; font-size: 16px; line-height: 1.6; margin: 0; }
.login-logo { width: 340px; max-width: 100%; height: auto; }
.login-form-wrap { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 24px; background: var(--surface); }
.login-form { width: 100%; max-width: 360px; display: grid; gap: 16px; }
.login-form h1 { font-size: 24px; }
.login-form .muted { margin: -10px 0 8px; }
.login-logo-mobile { display: none; width: 170px; }
.login-foot { color: var(--text-3); font-size: 12px; margin-top: 48px; }

/* --- Kabuk --- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: linear-gradient(180deg, var(--navy), #08223D); color: #CFDBE8; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 20px 14px; z-index: 20; }
.sidebar-logo { padding: 4px 10px 22px; border-bottom: 1px solid rgba(255, 255, 255, .08); margin-bottom: 14px; }
.sidebar-logo img { width: 150px; display: block; }
.sidebar-logo span { display: block; margin-top: 8px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #7F98B3; }
.sidebar nav { display: grid; gap: 2px; flex: 1; align-content: start; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; color: #B5C6D8; font-weight: 500; transition: background .15s, color .15s; position: relative; }
.sidebar nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar nav a.active { background: rgba(24, 119, 185, .28); color: #fff; }
.sidebar nav a.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--lime); }
.nav-sep { margin: 18px 12px 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #6F8AA6; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--teal)); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: none; }
.who { flex: 1; min-width: 0; display: grid; }
.who strong { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who span { font-size: 12px; color: var(--text-3); }

.user-menu { position: relative; flex: none; }
.user-btn { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; text-align: left; max-width: 240px; transition: border-color .15s, background .15s; }
.user-btn:hover, .user-btn[aria-expanded="true"] { border-color: var(--line-strong); background: var(--surface-2); }
.user-btn .chev { width: 14px; height: 14px; color: var(--text-3); }
.user-dropdown { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(11, 42, 74, .16); padding: 6px; z-index: 30; display: grid; }
.user-dropdown a, .user-dropdown button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 7px; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--surface-2); }
.user-dropdown button { color: var(--red); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 22px 32px 18px; position: sticky; top: 0; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); z-index: 10; }
.topbar .titles { flex: 1; min-width: 0; }
.topbar h1 { font-size: 22px; font-weight: 650; }
.topbar p { margin: 2px 0 0; font-size: 13px; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.menu-btn { display: none; }
.content { padding: 4px 32px 48px; }
.page { display: grid; gap: 18px; }
.scrim { display: none; }

/* --- Kartlar --- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card.flush { padding: 0; overflow-x: auto; }
.card > h2 { margin-bottom: 6px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2 { flex: 1; }
.link { font-size: 13px; font-weight: 500; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; align-items: start; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: center; }
.stat .ic { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--blue-wash); color: var(--blue); flex: none; }
.stat .ic.green { background: var(--green-wash); color: var(--green); }
.stat .ic.amber { background: var(--amber-wash); color: var(--amber); }
.stat .ic .i { width: 20px; height: 20px; }
.stat b { display: block; font-size: 24px; font-weight: 650; line-height: 1.15; }
.stat span { color: var(--text-3); font-size: 13px; }

.list { display: grid; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow > * { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item small { color: var(--text-3); font-size: 12px; }
.list-item > .pill, .list-item > .btn, .list-item > .avatar { flex: none; }
.empty { padding: 28px 12px; text-align: center; color: var(--text-3); }
.empty strong { display: block; color: var(--text-2); margin-bottom: 4px; }

/* --- Tablo --- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.table .actions { text-align: right; white-space: nowrap; }
.table .nowrap { white-space: nowrap; }
.table select { height: 32px; min-width: 150px; }
.cell-main strong { display: block; font-weight: 600; }
.cell-main small { display: block; margin-top: 2px; color: var(--text-3); font-size: 12px; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.green { background: var(--green-wash); color: var(--green); }
.pill.blue { background: var(--blue-wash); color: var(--blue); }
.pill.amber { background: var(--amber-wash); color: var(--amber); }
.pill.red { background: var(--red-wash); color: var(--red); }
.pill.gray { background: var(--surface-2); color: var(--text-3); }

/* --- Playlistler --- */
.playlists { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 18px; align-items: start; }
.pl-items { list-style: none; margin: 0 0 14px; padding: 0; counter-reset: pl; }
.pl-items li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; background: var(--surface); }
.pl-items li[draggable="true"] { cursor: grab; }
.pl-items li.dragging { opacity: .4; }
.pl-items li.drop-target { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(24, 119, 185, .15); }
.pl-items li::before { counter-increment: pl; content: counter(pl); width: 22px; height: 22px; border-radius: 6px; background: var(--surface-2); color: var(--text-3); font-size: 12px; font-weight: 600; display: grid; place-items: center; flex: none; }
.pl-items li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.pl-add { display: flex; gap: 8px; }
.pl-add select { flex: 1; min-width: 0; }

/* --- Videolar --- */
.dropzone { display: grid; place-items: center; gap: 6px; text-align: center; padding: 34px 20px; border: 2px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--text-2); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--blue); background: var(--blue-wash); }
.dropzone .i { color: var(--blue); }
.uploads { display: grid; gap: 8px; }
.upload { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: grid; gap: 6px; }
.upload-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.bar div { height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--teal), var(--lime)); transition: width .2s; }
.vid-icon { width: 40px; height: 40px; border-radius: 8px; background: var(--blue-wash); color: var(--blue); display: grid; place-items: center; flex: none; }
.vid-cell { display: flex; align-items: center; gap: 12px; }

/* --- Ayarlar --- */
.logo-preview { background: linear-gradient(135deg, #071C33, var(--navy) 50%, var(--navy-2)); border-radius: 10px; padding: 28px; margin: 14px 0; display: flex; justify-content: center; align-items: center; min-height: 120px; }
.logo-preview img { max-height: 90px; max-width: 100%; }
.info-line { font-size: 13px; color: var(--text-2); margin: 12px 0; }
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 10px; }
.roles p { margin: 8px 0 0; color: var(--text-2); font-size: 13px; }

/* --- Pencereler --- */
.modal { border: 0; border-radius: 14px; padding: 0; width: min(460px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(11, 42, 74, .28); }
.modal.wide { width: min(900px, calc(100vw - 32px)); }
.modal::backdrop { background: rgba(7, 28, 51, .55); backdrop-filter: blur(2px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; }
.modal-head h2 { font-size: 17px; }
.modal-body { padding: 10px 20px 6px; display: grid; gap: 14px; }
.modal-body p { margin: 0; color: var(--text-2); }
.modal .error { padding: 0 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; }
.modal video { display: block; width: 100%; max-height: 70vh; background: #000; border-radius: 0 0 14px 14px; margin-top: 10px; }

#toast { position: fixed; bottom: 24px; left: 50%; translate: -50% 16px; background: var(--navy); color: #fff; padding: 11px 18px; border-radius: 10px; box-shadow: 0 8px 24px rgba(11, 42, 74, .3); opacity: 0; transition: opacity .2s, translate .2s; pointer-events: none; z-index: 100; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; translate: -50% 0; }
#toast.err { background: var(--red); }

/* --- Mobil --- */
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-logo-mobile { display: block; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; transform: translateX(-100%); transition: transform .2s; }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(7, 28, 51, .5); z-index: 15; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 14px 16px; }
  .content { padding: 4px 16px 40px; }
  .topbar { flex-wrap: wrap; }
  .user-btn .who, .user-btn .chev { display: none; }
  .user-btn { padding: 3px; }
  .top-actions { order: 3; width: 100%; justify-content: flex-start; }
  .playlists { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* --- Yeni bileşenler --- */
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--amber); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { border-color: var(--line-strong); }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip .n { font-size: 11px; opacity: .7; }
.chip.add { border-style: dashed; color: var(--blue); }
.info-card { background: var(--blue-wash); border-color: transparent; box-shadow: none; }
.info-card p { margin: 0; color: var(--text-2); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { padding: 10px 14px; border: 0; background: none; color: var(--text-3); font: inherit; font-weight: 500; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--blue); border-bottom-color: var(--blue); }
.form.wide { max-width: 640px; }
.row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
.check input, .days input { width: 18px; height: 18px; accent-color: var(--blue); }
input[type="color"] { padding: 3px; height: 38px; cursor: pointer; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days label { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-weight: 500; color: var(--text); }
.days label:has(input:checked) { border-color: var(--blue); background: var(--blue-wash); }
.days input { margin: 0; }
.steps { margin: 12px 0 4px; padding-left: 20px; color: var(--text-2); display: grid; gap: 6px; }
.report-filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.report-filters .field { min-width: 160px; }
.quick-ranges { margin-left: auto; }
.bars { display: grid; gap: 4px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 200px) 1fr 50px; gap: 10px; align-items: center; font-size: 13px; }
.bar-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.bar-row .track { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.bar-row .track div { height: 100%; background: linear-gradient(90deg, var(--blue), var(--teal)); border-radius: 4px; }
.bar-row b { text-align: right; font-weight: 600; }
.thumb { width: 64px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--surface-2); flex: none; }
.screenshot { display: block; width: 100%; background: #000; aspect-ratio: 16 / 9; object-fit: contain; }
.screenshot-foot { padding: 10px 20px 18px; display: flex; align-items: center; gap: 10px; justify-content: space-between; }

.design-grid { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(320px, 1.2fr); gap: 18px; align-items: start; }
.tv-preview { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4%; border: 6px solid #111; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.tv-bg { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0; }
.tv-preview > *:not(.tv-bg) { position: relative; z-index: 1; }
.tv-logo { width: 42%; max-height: 22%; object-fit: contain; }
.tv-message { font-size: clamp(14px, 2.4vw, 26px); font-weight: 600; text-align: center; padding: 0 8%; }
.tv-status { font-size: clamp(10px, 1.2vw, 13px); color: rgba(255,255,255,.75); }
.tv-clock { position: absolute !important; left: 4%; bottom: 6%; display: grid; line-height: 1.1; }
.tv-clock b { font-size: clamp(16px, 2.6vw, 30px); font-weight: 300; }
.tv-clock span { font-size: clamp(8px, .9vw, 11px); color: rgba(255,255,255,.7); }
.ticker-preview { overflow: hidden; border-radius: 8px; height: 42px; display: flex; align-items: center; white-space: nowrap; }
.ticker-preview span { display: inline-block; padding-left: 100%; font-size: 16px; font-weight: 600; animation: ticker 14s linear infinite; }
@keyframes ticker { to { transform: translateX(-100%); } }
@media (max-width: 900px) { .design-grid { grid-template-columns: 1fr; } .quick-ranges { margin-left: 0; } }
