/* Ekip page — neutral dark UI (no lime/green accent); night-yard via dashboard-modern */
.team-page{
  --team-ink:#151718;
  --team-soft:rgba(255,255,255,.06);
  --team-line:rgba(255,255,255,.18);
  --team-avatar:64px;
  --team-nav-h:82px;
  min-height:100vh;
  background:transparent;
  color:#f3f3f1;
  overflow-x:hidden;
  max-width:100vw;
}
.team-page .site-header.nb-07__bar{
  max-width:100%;
  box-sizing:border-box;
}
.team-page .site-header .header-actions{
  min-width:0;
  max-width:100%;
  width:auto;
  flex-wrap:nowrap;
  gap:8px;
}
.team-page .site-header .account-wrap{min-width:0;max-width:100%}
.team-page .site-header .account-area{
  max-width:min(218px,42vw);
  width:auto;
  min-width:0;
}
.team-page #team-login-link[hidden],
.team-page #team-account[hidden],
.team-page #team-menu[hidden],
.team-page #team-add-btn[hidden]{display:none!important}

.team-stage{
  position:relative;
  isolation:isolate;
  box-sizing:border-box;
  min-height:100vh;
  min-height:100dvh;
  /* Center title+cards in space below fixed navbar; safe → top-align if overflow */
  padding-top:var(--team-nav-h);
  overflow-x:hidden;
  overflow-y:auto;
  max-width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  justify-content:safe center;
}
/* Viewport-locked overlays — fixed to viewport, NOT team-stage / content height */
.team-stage > .glow-radial-brand-top,
.team-stage > .hero-atmosphere,
.team-stage > .hero-fog{
  position:fixed;
  inset:0;
  width:auto;
  height:auto;
  min-width:100%;
  min-height:100%;
  z-index:0;
  pointer-events:none;
  max-width:none;
}
.team-stage > .hero-atmosphere{opacity:.28}
.team-stage > .hero-fog{opacity:.1}
.team-stage > .glow-radial-brand-top{opacity:.4}
.team-shell{
  position:relative;z-index:1;
  flex:0 0 auto;
  width:min(100% - 40px,1100px);
  max-width:100%;
  margin-left:auto;
  margin-right:auto;
  padding:28px 0 36px;
  box-sizing:border-box;
}
/* Staff toolbar — absolute under navbar; out of flow so cards stay centered */
.team-toolbar{
  position:absolute;
  top:calc(var(--team-nav-h) + 14px);
  right:max(20px, calc((100% - min(100% - 40px, 1100px)) / 2));
  z-index:2;
  display:flex;
  justify-content:flex-end;
  pointer-events:none;
}
.team-hero-actions{
  display:flex;
  align-items:center;
  gap:8px;
  pointer-events:auto;
}

.team-add-btn{
  position:static;
  transform:none;
  display:inline-flex;align-items:center;gap:8px;
  min-height:36px;padding:0 14px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.22);
  background:#f0f1ed;
  color:var(--team-ink);
  font-size:12px;font-weight:600;cursor:pointer;
  box-shadow:0 12px 30px rgba(255,255,255,.08);
  transition:background .2s,border-color .2s,transform .2s,box-shadow .2s;
  flex-shrink:0;
  white-space:nowrap;
}
.team-add-btn:hover{
  background:#fff;border-color:#fff;color:#111;
  transform:translateY(-1px);
  box-shadow:0 16px 38px rgba(255,255,255,.12);
}
.team-add-btn svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.team-refresh-btn{
  background:rgba(255,255,255,.08);
  color:#e8ebe7;
  border-color:rgba(255,255,255,.2);
  box-shadow:none;
}
.team-refresh-btn:hover{
  background:rgba(255,255,255,.14);
  color:#fff;
  border-color:rgba(255,255,255,.35);
  box-shadow:none;
}
.team-page #team-refresh-banners-btn[hidden]{display:none!important}

.team-grid{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-content:flex-start;
  align-items:stretch;
  gap:16px;
  width:100%;
  max-width:100%;
  min-width:0;
  margin-left:auto;
  margin-right:auto;
}
.team-empty{
  flex:1 1 100%;
  width:100%;
  margin:16px 0;
  color:#8f9591;
  font-size:14px;
  text-align:center;
}

.team-card{
  --team-card-w:240px;
  /* Fixed strip only — never % of viewport / flex-grow / 100vh */
  --team-banner-h:108px;
  --team-avatar:64px;
  position:relative;
  display:flex;flex-direction:column;align-items:center;
  text-align:center;
  flex:0 0 var(--team-card-w);
  width:var(--team-card-w);
  max-width:var(--team-card-w);
  min-width:0;
  /* ~108/280 ≈ 39% — banner must not dominate the card */
  min-height:280px;
  height:auto;
  max-height:none;
  padding:0 14px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.1);
  background:linear-gradient(165deg,rgba(255,255,255,.08),rgba(12,14,15,.78));
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  box-shadow:0 14px 32px rgba(0,0,0,.26);
  transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease;
  box-sizing:border-box;
  overflow:hidden;
}
.team-card:hover{
  transform:translateY(-2px);
  border-color:rgba(255,255,255,.22);
  box-shadow:0 18px 36px rgba(0,0,0,.32);
}
/* Fixed banner spacer (not flex % — that was crushing the avatar) */
.team-card::before{
  content:"";
  display:block;
  width:100%;
  height:var(--team-banner-h);
  max-height:120px;
  flex:0 0 var(--team-banner-h);
  flex-grow:0;
  flex-shrink:0;
  pointer-events:none;
}
.team-card-banner{
  /* Top strip of the card ONLY — never fixed / 100vw / 100vh */
  position:absolute;
  top:0;left:0;right:0;
  bottom:auto;
  width:100%;
  height:var(--team-banner-h);
  max-height:120px;
  min-height:0;
  flex:none;
  background:
    linear-gradient(180deg,rgba(8,10,11,.12) 0%,rgba(8,10,11,.55) 100%),
    #1a1d1f;
  background-size:cover;
  background-position:center top;
  background-repeat:no-repeat;
  border-radius:14px 14px 0 0;
  pointer-events:none;
  z-index:0;
  overflow:hidden;
}
.team-card-banner-img{
  position:absolute;
  top:0;left:0;
  right:0;bottom:0;
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  object-fit:cover;
  object-position:center top;
  display:block;
  border:0;
  /* Prevent intrinsic image size from blowing out the strip */
  min-width:0;
  min-height:0;
}
.team-card.has-banner .team-card-banner{
  background:#121416;
}
.team-card.has-banner .team-card-banner::after{
  content:"";
  position:absolute;
  top:0;left:0;right:0;bottom:0;
  width:100%;
  height:100%;
  background:linear-gradient(180deg,rgba(8,10,11,.08) 0%,rgba(8,10,11,.55) 100%);
  pointer-events:none;
  z-index:1;
}
.team-card-avatar{
  /* Absolute circle — never ellipse from flex column stretch */
  position:absolute;
  left:50%;
  top:var(--team-banner-h);
  transform:translate(-50%,-50%);
  z-index:2;
  box-sizing:border-box;
  width:64px;
  height:64px;
  min-width:64px;
  min-height:64px;
  max-width:64px;
  max-height:64px;
  flex:none;
  aspect-ratio:1 / 1;
  border-radius:50%;
  overflow:hidden;
  border:2px solid rgba(255,255,255,.18);
  background:#1a1d1f;
  box-shadow:0 6px 18px rgba(0,0,0,.35);
  pointer-events:none;
}
.team-card-avatar img{
  display:block;
  width:64px;
  height:64px;
  max-width:64px;
  max-height:64px;
  min-width:64px;
  min-height:64px;
  aspect-ratio:1 / 1;
  object-fit:cover;
  object-position:center;
  border-radius:50%;
}
.team-card-name{
  margin:42px 0 0;
  font-family:"Poppins",sans-serif;
  font-size:14px;font-weight:600;
  letter-spacing:-.02em;
  color:#f3f3f1;
  max-width:100%;
  overflow-wrap:anywhere;
}
.team-card-role{
  margin:4px 0 0;
  color:#d7dad6;
  font-size:12px;font-weight:600;
  max-width:100%;
  overflow-wrap:anywhere;
}
.team-card-category{
  margin:5px 0 0;
  color:#7e8480;
  font-size:9px;font-weight:600;
  letter-spacing:.14em;text-transform:uppercase;
}
.team-card-links{
  display:flex;gap:8px;justify-content:center;
  margin-top:10px;
}
.team-card-link{
  width:30px;height:30px;border-radius:9px;
  display:inline-flex;align-items:center;justify-content:center;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.28);
  color:#c8ccc8;text-decoration:none;
  transition:border-color .2s,color .2s,background .2s;
}
.team-card-link:hover{border-color:rgba(255,255,255,.35);color:#f0f1ed;background:rgba(255,255,255,.1)}
.team-card-link svg{width:14px;height:14px;fill:currentColor}
.team-card-admin{
  position:absolute;top:8px;right:8px;z-index:2;
  display:flex;gap:5px;
}
.team-card-admin button{
  width:26px;height:26px;border-radius:7px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.35);color:#c9cecb;
  cursor:pointer;display:inline-flex;align-items:center;justify-content:center;
  transition:background .2s,border-color .2s,color .2s;
}
.team-card-admin button:hover{border-color:rgba(255,255,255,.28);color:#fff;background:rgba(255,255,255,.1)}
.team-card-admin button.danger:hover{border-color:rgba(239,139,139,.45);color:#ef9b9b;background:rgba(239,139,139,.1)}
.team-card-admin svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

.team-modal[hidden]{display:none!important}
.team-modal{
  position:fixed;inset:0;z-index:80;
  display:flex;align-items:center;justify-content:center;
  padding:20px;
}
.team-modal-backdrop{position:absolute;inset:0;background:rgba(4,5,6,.72);backdrop-filter:blur(6px)}
.team-modal-panel{
  position:relative;z-index:1;
  width:min(100%,440px);
  max-width:100%;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.14);
  background:linear-gradient(160deg,rgba(28,31,33,.96),rgba(10,12,13,.98));
  box-shadow:0 30px 80px rgba(0,0,0,.55);
  padding:22px 22px 20px;
  box-sizing:border-box;
}
.team-modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:16px}
.team-modal-head h2{margin:0;font-size:20px;letter-spacing:-.03em}
.team-modal-close{
  width:34px;height:34px;border-radius:10px;border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);color:#d1d5d1;font-size:20px;line-height:1;cursor:pointer;
}
.team-form{display:grid;gap:12px}
.team-form label{display:grid;gap:6px;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#9aa19d}
.team-form input,.team-form select{
  width:100%;min-height:44px;padding:0 12px;
  border-radius:12px;border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.05);color:#f3f3f1;
  font:inherit;font-size:14px;text-transform:none;letter-spacing:0;
  box-sizing:border-box;
}
.team-form input:focus,.team-form select:focus{
  outline:none;border-color:rgba(255,255,255,.4);
  box-shadow:0 0 0 3px rgba(255,255,255,.08);
}
.team-form-hint{margin:0;min-height:1.2em;font-size:12px;color:#8f9591}
.team-form-hint.is-error{color:#ef9b9b}
.team-form-hint.is-ok{color:#c9cecb}
.team-form .form-message{margin:0;font-size:12px;color:#ef9b9b}
.team-form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:4px;flex-wrap:wrap}
.team-discord-preview{
  display:flex;align-items:center;gap:12px;
  padding:10px 12px;border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.05);
  min-width:0;
}
.team-discord-preview[hidden]{display:none!important}
.team-discord-preview-avatar{
  width:42px;height:42px;border-radius:50%;overflow:hidden;
  background:#1a1d1f;border:1px solid rgba(255,255,255,.12);flex-shrink:0;
}
.team-discord-preview-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.team-discord-preview strong{display:block;font-size:14px;color:#f3f3f1}
.team-discord-preview small{color:#9aa19d;font-size:12px}

@media(max-width:850px){
  .team-page{--team-nav-h:72px}
}
@media(max-width:640px){
  .team-shell{width:min(100% - 28px,1100px);padding:24px 0 32px}
  .team-toolbar{
    top:calc(var(--team-nav-h) + 10px);
    left:14px;
    right:14px;
    justify-content:stretch;
  }
  .team-hero-actions{
    width:100%;
    flex-direction:column;
  }
  .team-add-btn{
    width:100%;
    justify-content:center;
  }
  .team-grid{gap:12px;justify-content:center}
  .team-card{--team-card-w:min(240px,calc(50% - 6px));max-width:var(--team-card-w)}
  .team-page .site-header .account-area{max-width:52px}
}
@media(max-width:420px){
  .team-card{--team-card-w:100%;flex-basis:100%;width:100%;max-width:100%}
}

.team-page .dashboard-toast{z-index:90}

/* =============================================================================
   FORCE CENTER LOCK — team-vcenter-1
   Horizontal card center + vertical stage center below fixed navbar.
   ============================================================================= */
body.dashboard-page.team-page .team-stage{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  justify-content:safe center!important;
  box-sizing:border-box!important;
  min-height:100vh!important;
  min-height:100dvh!important;
  padding-top:var(--team-nav-h)!important;
}
body.dashboard-page.team-page .team-shell{
  flex:0 0 auto!important;
  width:min(100% - 40px,1100px)!important;
  max-width:100%!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding-top:28px!important;
  padding-bottom:36px!important;
  box-sizing:border-box!important;
}
body.dashboard-page.team-page .team-toolbar{
  position:absolute!important;
  top:calc(var(--team-nav-h) + 14px)!important;
  right:max(20px, calc((100% - min(100% - 40px, 1100px)) / 2))!important;
  left:auto!important;
  z-index:2!important;
  display:flex!important;
  justify-content:flex-end!important;
  width:auto!important;
  margin:0!important;
  pointer-events:none!important;
}
body.dashboard-page.team-page .team-hero-actions{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  position:static!important;
  transform:none!important;
  pointer-events:auto!important;
}
body.dashboard-page.team-page .team-grid,
body.dashboard-page.team-page section.team-grid,
body.dashboard-page.team-page #team-grid{
  display:flex!important;
  flex-wrap:wrap!important;
  justify-content:center!important;
  align-content:flex-start!important;
  align-items:stretch!important;
  gap:16px!important;
  width:100%!important;
  max-width:100%!important;
  margin-left:auto!important;
  margin-right:auto!important;
  float:none!important;
}
body.dashboard-page.team-page .team-card{
  --team-banner-h:108px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  flex:0 0 240px!important;
  flex-grow:0!important;
  flex-shrink:0!important;
  flex-basis:240px!important;
  width:240px!important;
  max-width:240px!important;
  min-width:0!important;
  min-height:280px!important;
  height:auto!important;
  float:none!important;
  margin-left:0!important;
  margin-right:0!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
  position:relative!important;
}
/* Banner strip lock — never fullscreen / vh / vw / flex-grow */
body.dashboard-page.team-page .team-card::before{
  height:108px!important;
  max-height:120px!important;
  flex:0 0 108px!important;
  flex-grow:0!important;
}
body.dashboard-page.team-page .team-card-banner{
  position:absolute!important;
  top:0!important;
  left:0!important;
  right:0!important;
  bottom:auto!important;
  width:100%!important;
  max-width:100%!important;
  height:108px!important;
  max-height:120px!important;
  min-height:0!important;
  flex:none!important;
  flex-grow:0!important;
  overflow:hidden!important;
  border-radius:14px 14px 0 0!important;
  background-size:cover!important;
  background-position:center top!important;
  background-repeat:no-repeat!important;
}
body.dashboard-page.team-page .team-card-banner-img{
  position:absolute!important;
  top:0!important;
  left:0!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:cover!important;
  object-position:center top!important;
  display:block!important;
}
body.dashboard-page.team-page .team-card-avatar{
  position:absolute!important;
  left:50%!important;
  top:108px!important;
  transform:translate(-50%,-50%)!important;
  width:64px!important;
  height:64px!important;
  min-width:64px!important;
  min-height:64px!important;
  max-width:64px!important;
  max-height:64px!important;
  flex:none!important;
  aspect-ratio:1 / 1!important;
  border-radius:50%!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
body.dashboard-page.team-page .team-card-avatar img{
  display:block!important;
  width:64px!important;
  height:64px!important;
  min-width:64px!important;
  min-height:64px!important;
  max-width:64px!important;
  max-height:64px!important;
  aspect-ratio:1 / 1!important;
  object-fit:cover!important;
  object-position:center!important;
  border-radius:50%!important;
}
@media(max-width:640px){
  body.dashboard-page.team-page .team-shell{
    width:min(100% - 28px,1100px)!important;
    padding-top:24px!important;
    padding-bottom:32px!important;
  }
  body.dashboard-page.team-page .team-toolbar{
    top:calc(var(--team-nav-h) + 10px)!important;
    left:14px!important;
    right:14px!important;
    width:auto!important;
    justify-content:stretch!important;
  }
  body.dashboard-page.team-page .team-hero-actions{
    width:100%!important;
    flex-direction:column!important;
  }
  body.dashboard-page.team-page .team-grid,
  body.dashboard-page.team-page section.team-grid,
  body.dashboard-page.team-page #team-grid{gap:12px!important;justify-content:center!important}
  body.dashboard-page.team-page .team-card{
    flex:0 0 min(240px,calc(50% - 6px))!important;
    flex-basis:min(240px,calc(50% - 6px))!important;
    width:min(240px,calc(50% - 6px))!important;
    max-width:min(240px,calc(50% - 6px))!important;
  }
}
@media(max-width:420px){
  body.dashboard-page.team-page .team-card{
    flex:0 0 100%!important;
    flex-basis:100%!important;
    width:100%!important;
    max-width:100%!important;
  }
}
