/* ================================================================
   MARİNA YÖNETİMİ — ÜYE PORTALİ tema katmanı
   admin-theme-{tema}.css ile aynı --t-* token'larını kullanır,
   üye portali sınıflarını kaplar. body[data-admin-theme] altında.
   ================================================================ */
body[data-admin-theme]{font-family:var(--t-font);color:var(--t-ink);}
body[data-admin-theme] .member-shell{background:var(--t-bg) !important;}
body[data-admin-theme] .member-shell::before{display:none !important;}
body[data-admin-theme] *{scrollbar-width:thin;scrollbar-color:var(--t-scroll) transparent;}

/* ---- kenar menü ---- */
body[data-admin-theme] .member-sidebar{background:var(--t-sidebar-bg) !important;border-right:1px solid var(--t-sidebar-border);box-shadow:var(--t-sidebar-shadow);}
body[data-admin-theme] .member-sidebar::after{display:none !important;}
body[data-admin-theme] .member-nav-scroll{scrollbar-width:none !important;-ms-overflow-style:none !important;}
body[data-admin-theme] .member-nav-scroll::-webkit-scrollbar{width:0 !important;height:0 !important;display:none !important;}
body[data-admin-theme] .member-brand{border-bottom:1px solid var(--t-sidebar-border);}
body[data-admin-theme] .member-brand .sidebar-logo{background:var(--t-logo-bg) !important;border-radius:12px;}
body[data-admin-theme] .member-brand-meta strong{color:var(--t-sidebar-text-strong);}
body[data-admin-theme] .member-brand-meta{color:var(--t-sidebar-dim);}
body[data-admin-theme] .member-nav-title{color:var(--t-sidebar-dim) !important;letter-spacing:.14em;}
body[data-admin-theme] .member-nav-item{color:var(--t-sidebar-text);border-radius:0;}
body[data-admin-theme] .member-nav-item:hover{background:var(--t-sidebar-hover);color:var(--t-sidebar-text-strong);}
body[data-admin-theme] .member-nav-item.active{background:var(--t-sidebar-active-bg) !important;color:var(--t-sidebar-text-strong);border-left-color:var(--t-accent-bar) !important;}
body[data-admin-theme] .member-nav-item .nav-icon{opacity:1;}
body[data-admin-theme] .member-nav-sub-item{color:var(--t-sidebar-text);}
body[data-admin-theme] .member-nav-sub-item.active{color:var(--t-sidebar-text-strong);}

/* ---- üst çubuk + içerik ---- */
body[data-admin-theme] .member-main{background:transparent;}
body[data-admin-theme] .member-topbar{background:var(--t-topbar-bg) !important;border-bottom:1px solid var(--t-line);backdrop-filter:blur(12px);box-shadow:var(--t-topbar-shadow);}
body[data-admin-theme] .member-topbar strong{color:var(--t-ink) !important;}
body[data-admin-theme] .member-topbar-user,body[data-admin-theme] .member-topbar > span{color:var(--t-ink-soft) !important;background:var(--t-chip-bg) !important;border:1px solid var(--t-line);}
body[data-admin-theme] .member-menu-toggle{border:1px solid var(--t-line);background:var(--t-card);color:var(--t-ink);}
body[data-admin-theme] .member-content{color:var(--t-ink);}
body[data-admin-theme] .page-toolbar h2,body[data-admin-theme] .member-content h1,body[data-admin-theme] .member-content h2,body[data-admin-theme] .member-content h3{color:var(--t-ink);}
body[data-admin-theme] .form-hint,body[data-admin-theme] .muted,body[data-admin-theme] .empty-state,body[data-admin-theme] .panel-desc{color:var(--t-ink-soft) !important;}

/* ---- kartlar / paneller ---- */
body[data-admin-theme] .panel,body[data-admin-theme] .member-card,body[data-admin-theme] .stat-tile,body[data-admin-theme] .info-card{background:var(--t-card) !important;border:1px solid var(--t-card-line) !important;box-shadow:var(--t-shadow);color:var(--t-ink);border-radius:var(--t-radius);}
body[data-admin-theme] .panel h2,body[data-admin-theme] .panel h3{color:var(--t-ink);}

/* ---- tablolar ---- */
body[data-admin-theme] table{background:var(--t-card);color:var(--t-ink);}
body[data-admin-theme] table th,body[data-admin-theme] thead th{background:var(--t-th-bg) !important;color:var(--t-th-text) !important;}
body[data-admin-theme] table td{border-color:var(--t-card-line) !important;color:var(--t-ink);}
body[data-admin-theme] table tbody tr:hover{background:var(--t-row-hover);}

/* ---- düğmeler ---- */
body[data-admin-theme] .btn-primary,body[data-admin-theme] .btn-gold{border:none;}
body[data-admin-theme] .btn-primary{background:var(--t-accent-grad) !important;color:#fff !important;}
body[data-admin-theme] .btn-gold{background:linear-gradient(135deg,var(--t-gold),var(--t-gold-d)) !important;color:var(--t-gold-ink) !important;}
body[data-admin-theme] .btn-outline{background:var(--t-card) !important;border:1px solid var(--t-line) !important;color:var(--t-ink) !important;}

/* ---- formlar ---- */
body[data-admin-theme] .member-content input:not([type=checkbox]):not([type=radio]),
body[data-admin-theme] .member-content select,
body[data-admin-theme] .member-content textarea{background:var(--t-input-bg) !important;border:1px solid var(--t-input-line) !important;color:var(--t-ink) !important;border-radius:10px;}
body[data-admin-theme] .member-content input:focus,body[data-admin-theme] .member-content select:focus,body[data-admin-theme] .member-content textarea:focus{border-color:var(--t-accent) !important;box-shadow:0 0 0 3px var(--t-focus-ring) !important;outline:none;}
body[data-admin-theme] .member-content label{color:var(--t-ink);}

/* ---- rozet / uyarı ---- */
body[data-admin-theme] .badge{background:var(--t-chip-bg);color:var(--t-ink-soft);}
body[data-admin-theme] .alert-success{background:var(--t-ok-bg) !important;color:var(--t-ok-ink) !important;border:1px solid var(--t-ok-line) !important;}
body[data-admin-theme] .alert-error,body[data-admin-theme] .alert-danger{background:var(--t-err-bg) !important;color:var(--t-err-ink) !important;border:1px solid var(--t-err-line) !important;}
body[data-admin-theme] a{color:var(--t-accent-d);}
body[data-admin-theme] code{background:var(--t-chip-bg);color:var(--t-ink);}

/* ---- mobil alt sekme çubuğu (üye) ---- */
@media(max-width:820px){
  body[data-admin-theme] .member-tabbar{background:var(--t-tabbar-bg) !important;border-top:1px solid var(--t-line) !important;}
  body[data-admin-theme] .member-tab{color:var(--t-ink-soft) !important;}
  body[data-admin-theme] .member-tab.active{color:var(--t-tabbar-active) !important;}
}
body[data-admin-theme] .member-sidebar-overlay{background:rgba(5,15,28,.6) !important;}

/* ================================================================
   MENÜ YERLEŞİM MODLARI (üye portali) — admin ile aynı mantık,
   .member-* sınıflarına. accordion/glass (sol katlanır) ·
   rail (ikon ray) · topbar/mega (üstten açılan). Kaydırma yok.
   ================================================================ */
body[data-admin-theme] .nav-caret{margin-left:auto;display:inline-block;transition:transform .22s ease;opacity:.55;font-weight:800;font-size:15px;line-height:1;color:var(--t-sidebar-text);}

/* ACCORDION + GLASS: katlanır gruplar (tüm genişlikler) */
body[data-nav-mode="accordion"] .member-nav-group,
body[data-nav-mode="glass"] .member-nav-group{margin-bottom:3px;padding:0 10px;}
body[data-nav-mode="accordion"] .member-nav-title,
body[data-nav-mode="glass"] .member-nav-title{
    cursor:pointer;user-select:none;margin:2px 0;padding:10px 12px;border-radius:11px;display:flex;align-items:center;
    text-transform:none;font-size:13px;font-weight:700;letter-spacing:.01em;color:var(--t-sidebar-text) !important;
    background:transparent;transition:background .15s,color .15s;
}
body[data-nav-mode="accordion"] .member-nav-title:hover,
body[data-nav-mode="glass"] .member-nav-title:hover,
body[data-nav-mode="accordion"] .member-nav-group.is-open > .member-nav-title,
body[data-nav-mode="glass"] .member-nav-group.is-open > .member-nav-title{background:var(--t-sidebar-hover);color:var(--t-sidebar-text-strong) !important;}
body[data-nav-mode="accordion"] .member-nav-group.is-open .nav-caret,
body[data-nav-mode="glass"] .member-nav-group.is-open .nav-caret{transform:rotate(90deg);}
body[data-nav-mode="accordion"] .member-nav-group:not(.is-open) .member-nav-item,
body[data-nav-mode="accordion"] .member-nav-group:not(.is-open) form,
body[data-nav-mode="glass"] .member-nav-group:not(.is-open) .member-nav-item,
body[data-nav-mode="glass"] .member-nav-group:not(.is-open) form{display:none !important;}

@media(min-width:1025px){
  /* GLASS yüzen panel */
  body[data-nav-mode="glass"] .member-sidebar{
      margin:16px 0 16px 16px;height:calc(100vh - 32px);border-radius:24px;overflow:hidden;
      box-shadow:0 34px 80px -34px rgba(8,16,44,.55);backdrop-filter:blur(20px) saturate(1.25);
  }

  /* RAIL: ikon ray + uçan menü */
  body[data-nav-mode="rail"] .member-shell{grid-template-columns:86px 1fr;}
  body[data-nav-mode="rail"] .member-sidebar{overflow:visible;position:relative;z-index:1000;}
  body[data-nav-mode="rail"] .member-brand{justify-content:center;padding:14px 0 10px;flex-direction:column;min-height:62px;background:url(../assets/uploads/marina-mark.png) center 12px/46px no-repeat;}
  body[data-nav-mode="rail"] .member-brand img{display:none !important;}
  body[data-nav-mode="rail"] .member-brand .sidebar-wordmark,
  body[data-nav-mode="rail"] .member-brand-meta{display:none !important;}
  body[data-nav-mode="rail"] .member-nav-scroll{overflow:visible;padding:8px 0;display:flex;flex-direction:column;align-items:center;gap:6px;}
  body[data-nav-mode="rail"] .member-nav-group{margin:0;width:100%;display:flex;justify-content:center;position:relative;padding:0;}
  body[data-nav-mode="rail"] .rail-btn{
      width:52px;height:52px;border-radius:16px;border:1px solid transparent;cursor:pointer;
      background:var(--t-icon-bg);color:var(--t-sidebar-text);font-size:22px;
      display:flex;align-items:center;justify-content:center;transition:all .16s;box-shadow:inset 0 0 0 1px var(--t-icon-ring);
  }
  body[data-nav-mode="rail"] .member-nav-group:hover .rail-btn,
  body[data-nav-mode="rail"] .member-nav-group.is-open .rail-btn{color:var(--t-sidebar-text-strong);background:var(--t-sidebar-active-bg);box-shadow:0 0 0 1px var(--t-accent),0 10px 22px -10px var(--t-accent-shadow);}
  body[data-nav-mode="rail"] .member-nav-group.has-active .rail-btn{background:var(--t-icon-active-bg);color:var(--t-sidebar-text-strong);box-shadow:inset 0 0 0 1px var(--t-icon-active-ring),0 0 16px -2px var(--t-accent-bar);}
  body[data-nav-mode="rail"] .nav-pop{
      position:absolute;left:calc(100% + 12px);top:-4px;min-width:230px;z-index:130;text-align:left;
      background:var(--t-sidebar-bg);border:1px solid var(--t-sidebar-border);border-radius:16px;padding:10px;
      box-shadow:0 34px 80px -28px rgba(0,0,0,.6);opacity:0;visibility:hidden;transform:translateX(-8px);
      transition:opacity .16s,transform .16s,visibility .16s;pointer-events:none;
  }
  body[data-nav-mode="rail"] .nav-pop::before{content:"";position:absolute;left:-14px;top:0;width:16px;height:100%;}
  body[data-nav-mode="rail"] .member-nav-group:hover .nav-pop,
  body[data-nav-mode="rail"] .member-nav-group.is-open .nav-pop{opacity:1;visibility:visible;transform:none;pointer-events:auto;}
  body[data-nav-mode="rail"] .nav-pop .member-nav-title{display:block;margin:2px 10px 8px;padding:0;font-size:11px;background:none !important;cursor:default;color:var(--t-sidebar-dim) !important;}
  body[data-nav-mode="rail"] .nav-pop .member-nav-item{margin:1px 0;}

  /* TOPBAR + MEGA: üstten açılan */
  body[data-nav-mode="topbar"] .member-shell,
  body[data-nav-mode="mega"] .member-shell{grid-template-columns:1fr;}
  body[data-nav-mode="topbar"] .member-sidebar,
  body[data-nav-mode="mega"] .member-sidebar{
      height:auto;position:sticky;top:0;flex-direction:row;align-items:stretch;overflow:visible;z-index:1000;
      box-shadow:0 2px 16px -6px rgba(0,0,0,.3);
  }
  body[data-nav-mode="topbar"] .member-brand,
  body[data-nav-mode="mega"] .member-brand{border-bottom:none;border-right:1px solid var(--t-sidebar-border);padding:0 20px;align-items:center;flex-shrink:0;}
  body[data-nav-mode="topbar"] .member-brand img,
  body[data-nav-mode="mega"] .member-brand img{height:32px !important;width:auto;}
  body[data-nav-mode="topbar"] .member-brand-meta,
  body[data-nav-mode="mega"] .member-brand-meta{display:none !important;}
  body[data-nav-mode="topbar"] .member-nav-scroll,
  body[data-nav-mode="mega"] .member-nav-scroll{flex:1;flex-direction:row;overflow:visible;padding:0;display:flex;align-items:stretch;}
  body[data-nav-mode="topbar"] .member-nav-group,
  body[data-nav-mode="mega"] .member-nav-group{margin:0;position:relative;display:flex;align-items:center;padding:0;}
  body[data-nav-mode="topbar"] .member-nav-title,
  body[data-nav-mode="mega"] .member-nav-title{
      margin:0;height:100%;min-height:56px;padding:0 15px;display:flex;align-items:center;gap:6px;cursor:pointer;
      text-transform:none;font-size:13px;font-weight:700;color:var(--t-sidebar-text) !important;
      border-bottom:3px solid transparent;white-space:nowrap;transition:all .15s;
  }
  body[data-nav-mode="topbar"] .nav-caret,
  body[data-nav-mode="mega"] .nav-caret{margin-left:2px;transform:rotate(90deg);opacity:.5;font-size:13px;}
  body[data-nav-mode="topbar"] .member-nav-group.is-open .nav-caret,
  body[data-nav-mode="mega"] .member-nav-group.is-open .nav-caret{transform:rotate(-90deg);}
  body[data-nav-mode="topbar"] .member-nav-group:hover .member-nav-title,
  body[data-nav-mode="topbar"] .member-nav-group.is-open .member-nav-title,
  body[data-nav-mode="mega"] .member-nav-group:hover .member-nav-title,
  body[data-nav-mode="mega"] .member-nav-group.is-open .member-nav-title{background:var(--t-sidebar-hover);color:var(--t-sidebar-text-strong) !important;border-bottom-color:var(--t-accent);}
  body[data-nav-mode="topbar"] .member-nav-group.has-active .member-nav-title,
  body[data-nav-mode="mega"] .member-nav-group.has-active .member-nav-title{color:var(--t-sidebar-text-strong) !important;border-bottom-color:var(--t-accent-bar);}
  body[data-nav-mode="topbar"] .nav-pop,
  body[data-nav-mode="mega"] .nav-pop{
      position:absolute;top:100%;left:0;min-width:240px;z-index:130;
      background:var(--t-sidebar-bg);border:1px solid var(--t-sidebar-border);border-top:none;border-radius:0 0 16px 16px;
      padding:10px;box-shadow:0 30px 64px -26px rgba(0,0,0,.55);
      opacity:0;visibility:hidden;transform:translateY(-8px);transition:opacity .16s,transform .16s,visibility .16s;pointer-events:none;
  }
  body[data-nav-mode="topbar"] .member-nav-group:hover .nav-pop,
  body[data-nav-mode="topbar"] .member-nav-group.is-open .nav-pop,
  body[data-nav-mode="mega"] .member-nav-group:hover .nav-pop,
  body[data-nav-mode="mega"] .member-nav-group.is-open .nav-pop{opacity:1;visibility:visible;transform:none;pointer-events:auto;}
  body[data-nav-mode="mega"] .nav-pop{min-width:440px;display:grid;grid-template-columns:1fr 1fr;gap:3px 8px;padding:14px;border-radius:0 0 20px 20px;}
  body[data-nav-mode="topbar"] .nav-pop .member-nav-item,
  body[data-nav-mode="mega"] .nav-pop .member-nav-item{margin:1px 0;}
  body[data-nav-mode="topbar"] .member-nav-group:last-child,
  body[data-nav-mode="mega"] .member-nav-group:last-child{margin-left:auto;}
  body[data-nav-mode="topbar"] .member-nav-group:last-child .nav-pop,
  body[data-nav-mode="mega"] .member-nav-group:last-child .nav-pop{left:auto;right:0;}
}

@media(max-width:1024px){
  body[data-nav-mode="glass"] .member-sidebar{margin:0;height:100vh;border-radius:0;backdrop-filter:none;}
  body[data-nav-mode="rail"] .rail-btn{display:none;}
  body[data-nav-mode="rail"] .member-brand-meta,
  body[data-nav-mode="rail"] .member-brand .sidebar-wordmark{display:block !important;}
  body[data-nav-mode="topbar"] .member-sidebar,
  body[data-nav-mode="mega"] .member-sidebar{flex-direction:column;overflow:hidden;}
  body[data-nav-mode="topbar"] .member-nav-scroll,
  body[data-nav-mode="mega"] .member-nav-scroll{flex-direction:column;}
  body[data-nav-mode="topbar"] .member-nav-group,
  body[data-nav-mode="mega"] .member-nav-group{display:block;}
  body[data-nav-mode="topbar"] .member-nav-title,
  body[data-nav-mode="mega"] .member-nav-title{min-height:0;height:auto;border-bottom:none;padding:5px 12px;}
  body[data-nav-mode="topbar"] .member-nav-group:last-child,
  body[data-nav-mode="mega"] .member-nav-group:last-child{margin-left:0;}
  body[data-nav-mode="rail"] .nav-pop,
  body[data-nav-mode="topbar"] .nav-pop,
  body[data-nav-mode="mega"] .nav-pop{position:static !important;opacity:1 !important;visibility:visible !important;transform:none !important;pointer-events:auto !important;min-width:0 !important;display:block !important;background:none !important;border:none !important;box-shadow:none !important;padding:0 !important;}
  body[data-nav-mode="rail"] .nav-caret,
  body[data-nav-mode="topbar"] .nav-caret,
  body[data-nav-mode="mega"] .nav-caret{display:none;}
}

/* ================================================================
   İÇ SAYFA PALETİ (üye) — member.css kök değişkenlerini AKTİF TEMAYA bağla.
   ================================================================ */
body[data-admin-theme]{
  --navy:var(--t-ink); --navy-mid:var(--t-ink); --navy-light:var(--t-ink);
  --text:var(--t-ink); --muted:var(--t-ink-soft);
  --foam:var(--t-chip-bg); --foam-dark:var(--t-card-line);
  --sea:var(--t-accent); --sea-light:var(--t-accent-d);
  --gold:var(--t-gold); --gold-light:var(--t-gold);
  --shadow:var(--t-shadow); --shadow-lg:var(--t-shadow);
}
body[data-admin-theme] .announcement-page.is-active{background:var(--t-accent) !important;border-color:var(--t-accent) !important;color:#fff !important;}
body[data-admin-theme] .member-content th,
body[data-admin-theme] .member-content table th{background:var(--t-th-bg) !important;color:var(--t-th-text) !important;}

/* ================================================================
   ÜYE HERO + MOBİL CİLASI (3 Kas)
   "Hoş geldiniz" başlığı koyu-zemin-koyu-yazı hatası düzeltildi:
   hero banner temaya uygun, karşılama metni beyaz; hero içi kartlar
   her temada okunur (buzlu açık); mobil düzen profesyonelleştirildi.
   ================================================================ */
body[data-admin-theme] .member-hero-bg{background:var(--t-hero-bg) !important;}
body[data-admin-theme] .member-hero-content,
body[data-admin-theme] .member-hero-content h1,
body[data-admin-theme] .member-hero-content p{color:#fff !important;}
body[data-admin-theme] .member-hero-content p{opacity:.92 !important;}
body[data-admin-theme] .member-hero-badge{background:linear-gradient(135deg,var(--t-gold),var(--t-gold-d)) !important;color:var(--t-gold-ink,#2a1e05) !important;}
/* hero içi kartlar: buzlu açık zemin + koyu metin (her temada okunur) */
body[data-admin-theme] .member-hero-pier-card,
body[data-admin-theme] .member-hero-finance-card{background:rgba(255,255,255,.97) !important;border:1px solid rgba(255,255,255,.55) !important;box-shadow:0 12px 30px -16px rgba(0,0,0,.55) !important;color:#0c2340 !important;}
body[data-admin-theme] .member-hero-pier-card .member-hero-pier-no,
body[data-admin-theme] .member-hero-finance .member-hero-finance-val{color:#0c2340 !important;}
body[data-admin-theme] .member-hero-pier-meta{color:#5b6b7c !important;}
body[data-admin-theme] .member-hero-pier-zone{background:rgba(14,143,153,.14) !important;color:#0e8f99 !important;}
body[data-admin-theme] .member-hero-finance-card .qc-label{color:var(--t-accent-d) !important;}
body[data-admin-theme] .member-hero-finance-card.is-debt .member-hero-finance-val,
body[data-admin-theme] .member-hero-finance-card.is-negative .member-hero-finance-val{color:#dc2626 !important;}
body[data-admin-theme] .member-hero-finance-card.is-positive .member-hero-finance-val,
body[data-admin-theme] .member-hero-finance-card.is-clear .member-hero-finance-val{color:#16a34a !important;}

@media(max-width:820px){
  body[data-admin-theme] .member-content{padding:0.9rem 0.8rem calc(92px + env(safe-area-inset-bottom)) !important;}
  body[data-admin-theme] .member-hero{border-radius:18px !important;margin-bottom:1.05rem !important;}
  body[data-admin-theme] .member-hero-inner{padding:1.15rem 1.1rem !important;}
  body[data-admin-theme] .member-hero-content h1{font-size:1.35rem !important;line-height:1.2 !important;}
  body[data-admin-theme] .member-hero-content p{font-size:0.86rem !important;}
  body[data-admin-theme] .panel,body[data-admin-theme] .member-card,body[data-admin-theme] .info-card,body[data-admin-theme] .stat-tile{border-radius:16px !important;}
  body[data-admin-theme] .member-tabbar{padding-top:8px !important;box-shadow:0 -12px 32px -18px rgba(0,0,0,.55) !important;}
  body[data-admin-theme] .member-tab{gap:3px !important;font-weight:600 !important;}
  body[data-admin-theme] .member-tab.active{color:var(--t-tabbar-active) !important;}
}
