/* EMG Studio masaüstü ışık efektleri */
:root {
  --studio-glow: #77f5c9;
  --studio-glow-soft: rgb(119 245 201 / 18%);
}

nav { position: relative; }

nav a {
  position: relative;
  color: #e4e9e9;
  font-size: 15px;
  padding-inline: 18px;
}

nav a:is(:hover, :focus-visible):not([aria-current]) {
  border-bottom-color: transparent;
  background: #172322;
}

nav a[aria-current] {
  border-bottom-color: transparent;
  background: linear-gradient(to top, #54e5b540, #54e5b500 84%);
  color: var(--studio-glow);
}

nav::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: var(--indicator-width, 0px);
  transform: translate(var(--indicator-x, 0px), var(--indicator-y, 0px));
  height: 2px;
  background: var(--studio-glow);
  box-shadow: 0 0 14px rgb(119 245 201 / 65%);
  pointer-events: none;
}

nav[data-indicator-ready]::after {
  transition: transform 240ms cubic-bezier(.215,.61,.355,1), width 240ms cubic-bezier(.215,.61,.355,1);
}

.panel {
  background: linear-gradient(141deg, #272c2f, #141719 24%, #0f1214 84%, #1d2224);
  border-color: #687174;
  box-shadow: 0 4px 24px rgb(24 50 74 / 8%);
}

.summary {
  background:
    linear-gradient(115deg, rgb(255 255 255 / 5%), transparent 30%),
    linear-gradient(110deg, #24292a, #131617 50%, #212627);
}

.primary, .recent > a {
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.recent > a {
  align-self: center;
  padding: 12px 17px;
  border: 1px solid #438d79;
  border-radius: 10px;
  background: #112a24;
  text-decoration: none;
  font-weight: 600;
}

.primary:hover:not(:disabled), .recent > a:hover {
  border-color: var(--studio-glow);
  background-color: #17372e;
  box-shadow: 0 0 12px var(--studio-glow-soft), inset 0 0 7px var(--studio-glow-soft);
}

:where(nav a, button, input, select, textarea, .recent > a):focus-visible {
  outline: 2px solid var(--studio-glow);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  nav[data-indicator-ready]::after, .primary, .recent > a { transition: none; }
}
.overview .table-wrap{display:flex;flex-direction:column}
.overview .table-wrap .empty{flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:10px;font-size:18px;font-weight:600}
.overview .empty svg{width:34px;height:40px;fill:none;stroke:#a4bec3;stroke-width:2}
.overview .table-panel{gap:0;padding:12px}
.overview .table-panel h2{margin:0 0 12px}
.overview-tabs{display:flex;margin-bottom:9px}
.overview-tabs button{border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;padding:8px 15px}
.overview-tabs button[aria-pressed=true]{color:var(--studio-glow);border-bottom-color:var(--studio-glow)}
.recent{justify-content:flex-start;gap:8px}
.recent h2{margin-bottom:0}
.recent > a{margin-top:auto}
.recent-posters{display:grid;gap:8px;margin-bottom:10px}
.recent-posters .recent-poster{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);align-items:center;gap:10px;padding:12px 15px;border:1px solid #bce7eb;border-radius:15px;background:linear-gradient(110deg,#b2e6ef,#95c0dc);color:#081820;text-decoration:none;overflow-wrap:anywhere}
.recent-poster img{width:100%;height:95px;object-fit:contain;background:white}
.recent-poster time{display:block;margin-top:4px;font-size:12px}
.recent-empty{color:#c5d2cd;text-align:center}

/* GlassSelect in WhatsAppWorkspace.xaml */
.filters select, .studio select {
  appearance: none;
  min-height: 40px;
  border: 1px solid #596366;
  border-radius: 9px;
  padding: 7px 31px 7px 12px;
  color: #f1f5f5;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23DFE9E9' stroke-width='1.5'/%3E%3C/svg%3E") right 12px center / 12px 8px no-repeat,
    linear-gradient(143deg, #2b3032, #16191a 24%, #101213 74%, #202527);
}

:is(.filters,.studio) select:is(:hover,:focus) {
  border-color: #77f5c9;
}

@supports (appearance: base-select) {
  :is(.filters,.studio) select, :is(.filters,.studio) select::picker(select) {
    appearance: base-select;
  }

  :is(.filters,.studio) select::picker-icon { display: none; }
  :is(.filters,.studio) select::picker(select) {
    max-height: min(300px, 50dvh);
    border: 1px solid #596366;
    border-radius: 8px;
    background: #1c2224;
    color: #f1f5f5;
  }
  :is(.filters,.studio) option { padding: 8px 12px; }
  :is(.filters,.studio) option:is(:hover,:focus-visible,:checked) { background: #285045; }
}
body[data-page=studio] main{padding:24px 23px 22px}
body[data-page=studio] h1{font-size:30px;margin:0 0 8px}
.studio-subtitle{margin:0 0 10px;color:#c9d5d7}
.studio .panel{border-radius:20px;padding:24px}
.studio aside{overflow:auto;scrollbar-color:#526166 #15191b}
.studio aside h2,.studio .preview h2{font-size:22px;margin:8px 0 5px}
.studio aside label{font-size:12px;color:#e4e9e9}
.studio aside small{font-size:12px;color:#acb9bd;line-height:1.4}
.studio aside textarea{min-height:200px;border-radius:0;background:#1c2224}
.studio aside summary{cursor:pointer;font-size:12px;padding:6px 0}
.studio aside details details{margin:4px 0 6px 8px}
.studio aside details label{margin:6px 0}
.studio aside summary{display:flex;align-items:center;gap:6px;list-style:none}
.studio aside summary::-webkit-details-marker{display:none}
.studio aside summary::before{
  content:"";display:inline-block;width:18px;height:18px;flex:0 0 18px;border-radius:6px;
  border:1px solid #365d53;
  background:#162723 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%2377F5C9' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition:transform 160ms ease,border-color 160ms ease,background-color 160ms ease;
}
.studio aside summary:is(:hover,:focus-visible)::before{border-color:#77f5c9;background-color:#204037}
.studio aside details[open] > summary::before{transform:rotate(180deg)}
@media (prefers-reduced-motion:reduce){.studio aside summary::before{transition:none}}
.studio aside select:not([multiple]){
  padding-inline:12px 31px;
  text-align:left;
  text-align-last:left;
}
@supports (appearance: base-select){
  .studio aside select:not([multiple]){align-items:center}
  .studio aside select:not([multiple]) > selectedcontent{width:100%;text-align:left}
  .studio aside select:not([multiple]) option{justify-content:flex-start}
}
.studio aside textarea,.studio .page-name-list option{text-align:center}
.studio aside details details{margin-left:0}
.studio .type-label{font-size:12px;margin:12px 0 4px;color:#e4e9e9}
.studio .type-button-row{display:flex;gap:6px}
.studio .type-button-row button{flex:1;min-width:0;min-height:34px;padding:5px;background:#22292b;font-size:12px}
.studio aside .type-ratio{display:flex;align-items:center;gap:5px;margin-top:11px}
.studio .type-ratio input{margin:0;accent-color:#f1f5f5}
.studio .type-scale{margin-top:10px}
.studio .type-scale output{text-align:right}
.studio .type-scale input{appearance:none;background:transparent;border:0;padding:0 5px;height:18px}
.studio .type-scale input::-webkit-slider-runnable-track{
  height:7px;border:1px solid #747779;border-radius:999px;
  background:linear-gradient(to right,#9bc8fc 0 var(--scale-progress,33.33%),#393b3d var(--scale-progress,33.33%) 100%);
}
.studio .type-scale input::-webkit-slider-thumb{
  appearance:none;width:15px;height:15px;margin-top:-5px;border:0;border-radius:50%;background:#9bc8fc;
}
.studio .type-scale input::-moz-range-track{height:5px;border:1px solid #747779;border-radius:999px;background:#393b3d}
.studio .type-scale input::-moz-range-progress{height:5px;border-radius:999px;background:#9bc8fc}
.studio .type-scale input::-moz-range-thumb{width:15px;height:15px;border:0;border-radius:50%;background:#9bc8fc}
.studio .last-poster-layout{display:grid;gap:6px;margin:5px 0 20px}
.studio .last-poster-layout label{margin:0;font-weight:700}
.studio .last-poster-layout p,.studio .name-layout-status,.studio details p{font-size:12px;line-height:1.35;color:#c5d2d3;margin:0}
.studio .last-poster-layout :is(input,button),.studio .page-name-list{
  width:100%;color:#f1f5f5;background:#1a2022;border-color:#3f4b4e;
}
.studio .last-poster-layout :is(input,button){min-height:34px;font-size:12px}
.studio .page-name-list[multiple]{
  min-height:170px;margin:8px 0;appearance:auto;padding:4px;background:#111719;
}
.studio .page-name-list option{padding:4px 6px}
.studio .page-name-list option:checked{background:#285045;color:#f1f5f5}
.studio .name-layout-status:empty{display:none}
.studio aside .page-names-editor{margin-top:12px}
.studio .preview{gap:16px;min-height:0}
.studio .preview .stage{padding:12px;overflow:hidden;border-radius:17px;border-color:#424c4e;background:linear-gradient(140deg,#101416,#14191b)}
.studio .preview .actions{gap:10px;align-items:center}
.studio .actions button{min-height:34px;font-size:12px;padding:7px 12px}
.studio .actions span{font-size:12px;min-width:32px;text-align:center}
@media(min-width:801px){
  body[data-page=studio]{height:100dvh}
  body[data-page=studio] main,body[data-page=studio] #screen{min-height:0}
  body[data-page=studio] #screen{gap:16px}
  .studio{grid-template-columns:clamp(250px,23.1vw,320px) minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
  .studio .preview .stage{min-height:0;grid-template-rows:minmax(0,1fr)}
  .studio .stage canvas{max-height:100%;width:auto;height:auto}
}
body[data-page=pending] main{padding:24px 34px 26px}
.pending-panel{padding:20px;gap:12px;border-radius:17px}
.pending-panel>.filters{display:grid;grid-template-columns:1.1fr 1fr 1fr 1.42fr;gap:15px}
.pending-panel>.filters>label{min-width:0;font-weight:600}
.pending-search{position:relative}
.pending-search input{min-height:48px;padding-left:38px}
.pending-search::before,.pending-search::after{content:"";position:absolute;pointer-events:none}
.pending-search::before{width:9px;height:9px;border:1px solid #99abb1;border-radius:50%;left:15px;top:17px}
.pending-search::after{width:6px;height:1px;background:#99abb1;left:11px;top:29px;transform:rotate(-45deg)}
.pending-add{padding:14px 0;border-block:1px solid #414b4d;align-items:center}
.pending-add>label{display:flex;align-items:center;gap:18px;flex:0 1 497px;font-weight:600}
.pending-add>label input{flex:1;min-width:0}
.pending-add>label input,.pending-add>button{min-height:48px}
.pending-tools{display:flex;gap:8px;margin-left:auto}
.pending-tools button{min-height:48px;white-space:nowrap}
.fetch-names{display:inline-flex;align-items:center;justify-content:center;gap:8px}
:is(button,nav a,.recent > a,.pending-types span).is-pulsing{
  position:relative;isolation:isolate;overflow:hidden;animation:button-color-glow 850ms ease-out;
}
:is(button,nav a,.recent > a,.pending-types span).is-pulsing::before{
  content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:linear-gradient(110deg,transparent 10%,#38bdf8 34%,#a78bfa 52%,#f472b6 67%,#77f5c9 82%,transparent);
  opacity:0;transform:translateX(-105%);animation:button-color-sweep 850ms ease-out;
}
.fetch-names-icon{display:inline-block;line-height:1;font-size:17px}
.fetch-names.is-pulsing .fetch-names-icon{animation:fetch-names-arrow 850ms ease-out}
@keyframes button-color-glow{
  28%{border-color:#38bdf8;box-shadow:0 0 14px rgb(56 189 248 / 42%)}
  52%{border-color:#a78bfa;box-shadow:0 0 14px rgb(167 139 250 / 44%)}
  72%{border-color:#77f5c9;box-shadow:0 0 12px rgb(119 245 201 / 35%)}
}
@keyframes button-color-sweep{
  0%{opacity:0;transform:translateX(-105%)}
  25%,65%{opacity:.42}
  100%{opacity:0;transform:translateX(105%)}
}
@keyframes fetch-names-arrow{
  0%,100%{transform:translateY(0)}
  40%{transform:translateY(4px)}
}
@media(prefers-reduced-motion:reduce){
  .is-pulsing,.is-pulsing::before,.fetch-names.is-pulsing .fetch-names-icon{animation:none!important}
}
.pending-types{display:flex;padding:2px;border:1px solid #414b4d;border-radius:10px;background:#171c1e}
.pending-types label{position:relative;display:block}
.pending-types input{position:absolute;opacity:0;width:1px;height:1px}
.pending-types span{display:block;cursor:pointer;padding:12px 13px;border:1px solid transparent;border-radius:8px}
.pending-types input:checked+span{background:#142d27;color:#77f5c9;border-color:#438d79}
.pending-types input:focus-visible+span{outline:2px solid #77f5c9;outline-offset:2px}
.pending-panel .table-wrap{display:flex;flex-direction:column}
.pending-panel table{min-width:680px;table-layout:fixed}
.pending-panel th:first-child{width:29%}
.pending-panel th:nth-child(2){width:19%}
.pending-panel th:nth-child(3){width:11%}
.pending-panel th:nth-child(4){width:12%}
.pending-panel th:nth-child(5){width:10%}
.pending-panel td{overflow-wrap:anywhere}
.pending-panel .empty{flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px;font-size:18px;font-weight:600}
.pending-panel .empty svg{width:34px;height:40px;fill:none;stroke:#a4bec3;stroke-width:2}
.pending-row-name{display:flex;align-items:center;gap:8px;cursor:pointer}
.pending-row-name input{accent-color:#77f5c9}
.pending-panel tr.selected{background:#243b35}
.pending-panel>.actions:last-child{padding-top:13px;border-top:1px solid #414b4d;align-items:center}
.pending-selection{margin-right:8px}
@media(max-width:800px){
  body[data-page=pending] main{padding:20px 15px}
  .pending-panel>.filters{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pending-add>label{flex-basis:100%}
}
body[data-page=drafts] main{padding:24px 34px 40px}
body[data-page=drafts] h1{margin-bottom:42px}
body[data-page=drafts] #screen{margin-inline:21px;min-height:0}
body[data-page=drafts] #screen>.filters{display:grid;grid-template-columns:1.1fr 1fr 1fr 1.42fr;gap:15px}
body[data-page=drafts] #screen>.filters>label{min-width:0;font-weight:600}
.drafts-panel{padding:12px;border-radius:16px;min-height:0}
.drafts-panel .table-wrap{display:flex;flex-direction:column;min-height:220px}
.drafts-panel table{table-layout:fixed;min-width:650px}
.drafts-panel th:nth-child(1){width:8%}
.drafts-panel th:nth-child(2){width:28%}
.drafts-panel th:nth-child(3){width:18.5%}
.drafts-panel th:nth-child(4){width:11%}
.drafts-panel th:nth-child(5){width:12.5%}
.drafts-panel td{overflow-wrap:anywhere}
.drafts-panel tr.selected{background:#243b35}
.drafts-panel .empty{flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px;font-size:18px;font-weight:600;text-align:center;padding:10px}
.drafts-panel .empty svg{width:34px;height:40px;fill:none;stroke:#a4bec3;stroke-width:2;flex:none}
.draft-actions{flex:none;border-top:1px solid #414b4d;padding-top:13px;align-items:center}
@media(max-width:800px){
  body[data-page=drafts] main{padding:20px 15px}
  body[data-page=drafts] #screen{margin-inline:0}
  body[data-page=drafts] h1{margin-bottom:24px}
  body[data-page=drafts] #screen>.filters{grid-template-columns:repeat(2,minmax(0,1fr))}
}
