/*
 * GB Butik Yönetim Paneli Güvenli Görünüm Katmanı — v1.19.11
 * Yalnızca organizasyon sahibi giriş/yönetim ekranlarını etkiler.
 * Davetiye/public sayfalara stil sızdırmaz.
 */

.auth-shell,
.dashboard-shell{
  --admin-text-primary:#3f3027;
  --admin-text-secondary:#655247;
  --admin-text-muted:#766356;
  --admin-surface:rgba(255,250,244,.94);
  --admin-surface-strong:#fffdfa;
  --admin-surface-soft:#f1e4d4;
  --admin-border:rgba(103,76,54,.20);
  --admin-accent:#855d2b;
  --admin-focus:rgba(133,93,43,.18);
  --admin-shadow:0 24px 70px rgba(34,24,18,.22);
  color:var(--admin-text-primary);
}

/* Temanın karakterini yalnız güvenli vurgu tonlarıyla koru. */
.auth-shell.theme-glass-garden,.dashboard-shell.theme-glass-garden{--admin-accent:#526746}
.auth-shell.theme-blue-infinity,.dashboard-shell.theme-blue-infinity{--admin-accent:#315b82}
.auth-shell.theme-thousand-candles,.dashboard-shell.theme-thousand-candles{--admin-accent:#865a28}
.auth-shell.theme-blush-garden,.dashboard-shell.theme-blush-garden{--admin-accent:#875f68}
.auth-shell.theme-prince-palace,.dashboard-shell.theme-prince-palace{--admin-accent:#506b7e}
.auth-shell.theme-cloud-baby,.dashboard-shell.theme-cloud-baby{--admin-accent:#567789}
.auth-shell.theme-ivory-palace,.dashboard-shell.theme-ivory-palace{--admin-accent:#685d4e}
.auth-shell.theme-amalfi-light,.dashboard-shell.theme-amalfi-light{--admin-accent:#5f7768}
.auth-shell.theme-elegant-gold,.dashboard-shell.theme-elegant-gold{--admin-accent:#855d2b}

/* === GİRİŞ / İLK KAYIT === */
.auth-shell.themed-auth{
  position:relative;
  isolation:isolate;
  overflow-x:hidden;
}
.auth-shell.themed-auth .auth-card{
  position:relative;
  z-index:2;
  color:var(--admin-text-primary)!important;
  background:var(--admin-surface)!important;
  border:1px solid rgba(255,255,255,.82)!important;
  box-shadow:var(--admin-shadow)!important;
}
.auth-shell.themed-auth .auth-card h1,
.auth-shell.themed-auth .auth-card h2,
.auth-shell.themed-auth .auth-card h3{
  color:var(--admin-text-primary)!important;
  text-shadow:none!important;
}
.auth-shell.themed-auth .auth-card p,
.auth-shell.themed-auth .auth-card .field label,
.auth-shell.themed-auth .auth-card .checkbox{
  color:var(--admin-text-secondary)!important;
}
.auth-shell.themed-auth .auth-card .eyebrow,
.auth-shell.themed-auth .auth-card a{
  color:var(--admin-accent)!important;
}
.auth-shell.themed-auth .tabs{
  background:var(--admin-surface-soft)!important;
  border:1px solid var(--admin-border);
}
.auth-shell.themed-auth .tabs button{
  color:var(--admin-text-secondary)!important;
  background:transparent!important;
}
.auth-shell.themed-auth .tabs button.active{
  color:var(--admin-accent)!important;
  background:var(--admin-surface-strong)!important;
  box-shadow:0 5px 16px rgba(59,42,30,.12)!important;
}
.auth-shell.themed-auth .field input,
.auth-shell.themed-auth .field textarea,
.auth-shell.themed-auth .field select{
  color:var(--admin-text-primary)!important;
  background:var(--admin-surface-strong)!important;
  border-color:var(--admin-border)!important;
  caret-color:var(--admin-accent)!important;
  -webkit-text-fill-color:var(--admin-text-primary)!important;
}
.auth-shell.themed-auth .field input::placeholder,
.auth-shell.themed-auth .field textarea::placeholder{
  color:var(--admin-text-muted)!important;
  opacity:.72!important;
}
.auth-shell.themed-auth .field input:focus,
.auth-shell.themed-auth .field textarea:focus,
.auth-shell.themed-auth .field select:focus{
  border-color:var(--admin-accent)!important;
  box-shadow:0 0 0 3px var(--admin-focus)!important;
}
.auth-shell.themed-auth .secondary{
  color:var(--admin-text-primary)!important;
  background:rgba(255,253,250,.82)!important;
  border-color:var(--admin-border)!important;
}

/* === YÖNETİM PANELİ === */
.dashboard-shell{
  position:relative;
  isolation:isolate;
  overflow-x:hidden;
}
.dashboard-shell .dash-top{
  position:relative;
  z-index:5;
  min-width:0;
}
.dashboard-shell .dash-top h1,
.dashboard-shell .dash-top .eyebrow{
  color:#fff!important;
  text-shadow:0 2px 14px rgba(0,0,0,.72)!important;
}
.dashboard-shell .dash-top h1{margin:.18em 0}
.dashboard-shell .dash-top>.actions{position:relative;z-index:6;min-width:0}
.dashboard-shell .dash-top .secondary,
.dashboard-shell .event-select{
  color:#fff!important;
  background:rgba(28,21,17,.62)!important;
  border-color:rgba(255,255,255,.38)!important;
  box-shadow:0 8px 22px rgba(0,0,0,.16)!important;
  backdrop-filter:blur(12px);
}
.dashboard-shell .event-select option{color:#30251f;background:#fffaf4}

.dashboard-shell .dashboard{
  position:relative;
  z-index:2;
  grid-template-columns:minmax(210px,250px) minmax(0,1fr);
  align-items:start;
  min-width:0;
}
.dashboard-shell .side,
.dashboard-shell .workspace{
  color:var(--admin-text-primary)!important;
  background:var(--admin-surface)!important;
  border-color:rgba(255,255,255,.78)!important;
  box-shadow:var(--admin-shadow)!important;
}
.dashboard-shell .side{z-index:3;max-width:100%}
.dashboard-shell .workspace{position:relative;z-index:2;min-width:0;overflow:hidden}
.dashboard-shell .workspace h1,
.dashboard-shell .workspace h2,
.dashboard-shell .workspace h3,
.dashboard-shell .workspace strong,
.dashboard-shell .workspace th,
.dashboard-shell .workspace td,
.dashboard-shell #accountEmail{
  color:var(--admin-text-primary)!important;
}
.dashboard-shell .workspace p,
.dashboard-shell .workspace small,
.dashboard-shell .panel-help,
.dashboard-shell .photo-review-note,
.dashboard-shell .field label,
.dashboard-shell .checkbox{
  color:var(--admin-text-secondary)!important;
}
.dashboard-shell .side button{
  color:var(--admin-text-secondary)!important;
  background:transparent!important;
  overflow-wrap:anywhere;
}
.dashboard-shell .side button:hover{
  color:var(--admin-text-primary)!important;
  background:rgba(126,93,55,.08)!important;
}
.dashboard-shell .side button.active{
  color:var(--admin-accent)!important;
  background:var(--admin-surface-soft)!important;
  box-shadow:inset 3px 0 0 var(--admin-accent)!important;
  font-weight:800!important;
}
.dashboard-shell .stat,
.dashboard-shell .photo-review-card,
.dashboard-shell .photo-review-empty{
  color:var(--admin-text-primary)!important;
  background:var(--admin-surface-strong)!important;
  border-color:var(--admin-border)!important;
}
.dashboard-shell .stat strong{color:var(--admin-accent)!important}
.dashboard-shell .field input,
.dashboard-shell .field textarea,
.dashboard-shell .field select,
.dashboard-shell #addEventForm input{
  color:var(--admin-text-primary)!important;
  background:var(--admin-surface-strong)!important;
  border-color:var(--admin-border)!important;
  caret-color:var(--admin-accent)!important;
  -webkit-text-fill-color:var(--admin-text-primary)!important;
}
.dashboard-shell .field input::placeholder,
.dashboard-shell .field textarea::placeholder{
  color:var(--admin-text-muted)!important;
  opacity:.72!important;
}
.dashboard-shell .field input:focus,
.dashboard-shell .field textarea:focus,
.dashboard-shell .field select:focus{
  border-color:var(--admin-accent)!important;
  box-shadow:0 0 0 3px var(--admin-focus)!important;
}
.dashboard-shell .photo-filter{
  color:var(--admin-text-primary)!important;
  background:rgba(255,255,255,.82)!important;
  border-color:var(--admin-border)!important;
}
.dashboard-shell .photo-filter.active{
  color:#fff!important;
  background:var(--admin-accent)!important;
  border-color:var(--admin-accent)!important;
}
.dashboard-shell .table-wrap{
  max-width:100%;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}
.dashboard-shell table{min-width:680px}
.dashboard-shell th,
.dashboard-shell td{
  background:transparent!important;
  border-bottom-color:var(--admin-border)!important;
  overflow-wrap:anywhere;
}
.dashboard-shell .secondary:not(.dash-top .secondary){
  color:var(--admin-text-primary)!important;
  background:rgba(255,253,250,.86)!important;
  border-color:var(--admin-border)!important;
}
.dashboard-shell hr{border-top-color:var(--admin-border)!important}

/* Katman güvenliği: yönetim modalları temanın diğer katmanlarının altında kalmaz. */
.dashboard-shell .side{position:sticky;top:20px}
.photo-lightbox{z-index:10050!important}
.toast{z-index:10100!important}

/* Taşma / üst üste binme koruması */
.auth-shell .auth-card,
.dashboard-shell .dash-top,
.dashboard-shell .dashboard,
.dashboard-shell .side,
.dashboard-shell .workspace,
.dashboard-shell .panel-view,
.dashboard-shell .stats,
.dashboard-shell .stat,
.dashboard-shell .form,
.dashboard-shell .field,
.dashboard-shell .photo-review-grid,
.dashboard-shell .photo-review-card{
  min-width:0;
  max-width:100%;
}
.dashboard-shell h1,.dashboard-shell h2,.dashboard-shell h3,
.dashboard-shell p,.dashboard-shell label,.dashboard-shell td,.dashboard-shell th,
.auth-shell h1,.auth-shell p,.auth-shell label,.auth-shell a{
  overflow-wrap:anywhere;
  word-break:normal;
}
.dashboard-shell button,.dashboard-shell a,.auth-shell button,.auth-shell a{max-width:100%}

@media(max-width:760px){
  .dashboard-shell .dashboard{grid-template-columns:minmax(0,1fr)!important}
  .dashboard-shell .side{
    position:static!important;
    z-index:2;
    display:flex;
    gap:4px;
    overflow-x:auto;
    overflow-y:hidden;
    overscroll-behavior-inline:contain;
    scrollbar-width:thin;
  }
  .dashboard-shell .side button{flex:0 0 auto;white-space:nowrap}
  .dashboard-shell .dash-top>.actions{width:100%;justify-content:flex-start}
  .dashboard-shell .event-select{max-width:100%;min-width:0}
  .dashboard-shell .workspace{overflow:visible}
}
@media(max-width:520px){
  .dashboard-shell .stats{grid-template-columns:minmax(0,1fr)!important}
  .dashboard-shell .dash-top .secondary,
  .dashboard-shell .event-select{max-width:100%}
  .auth-shell.themed-auth .auth-card{margin:2vh auto!important}
}

/* Erişilebilir odak görünümü; klavye kullanımında öğeler kaybolmaz. */
.auth-shell :focus-visible,
.dashboard-shell :focus-visible{
  outline:3px solid color-mix(in srgb,var(--admin-accent) 55%,white)!important;
  outline-offset:2px!important;
}
