/* =========================================================
   DATAWEB UNIFIED UI v1.0.0
   Portal + MyBB ortak header/footer/container standardı
   ========================================================= */

:root{
  --dw-u-bg:#f5f7fb;
  --dw-u-surface:#fff;
  --dw-u-line:#e5e9f0;
  --dw-u-text:#172033;
  --dw-u-muted:#6b7280;
  --dw-u-primary:#155eef;
  --dw-u-navy:#0f1b33;
  --dw-u-danger:#991b1b;
}

/* Ortak 1200px eksen */
.dw-wrap,
.wrapper{
  width:min(1200px,calc(100% - 32px)) !important;
  max-width:1200px !important;
  min-width:0 !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

/* ---------- Ortak ana header ---------- */
.dw-header,
.dw-site-header{
  position:sticky;
  top:0;
  z-index:60;
  background:rgba(255,255,255,.97) !important;
  border-bottom:1px solid var(--dw-u-line) !important;
  backdrop-filter:blur(12px);
}

.dw-head,
.dw-header-inner{
  min-height:72px !important;
  display:flex !important;
  align-items:center !important;
  gap:26px !important;
  padding:0 !important;
}

.dw-brand{
  display:inline-flex !important;
  align-items:center !important;
  flex:0 0 auto !important;
  color:var(--dw-u-navy) !important;
  text-decoration:none !important;
  font-size:24px !important;
  font-weight:900 !important;
  letter-spacing:-1.2px !important;
  white-space:nowrap;
}

.dw-brand .dw-brand-symbol{
  width:35px !important;
  height:35px !important;
  min-width:35px !important;
  margin-right:9px !important;
  border-radius:10px !important;
  background:#2263eb !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  box-shadow:0 8px 20px rgba(21,94,239,.24) !important;
  overflow:hidden;
  line-height:0;
}

.dw-brand .dw-brand-symbol svg{
  width:23px !important;
  height:23px !important;
  display:block !important;
}

.dw-nav,
.dw-main-nav{
  display:flex !important;
  align-items:center !important;
  gap:5px !important;
  flex:1 1 auto !important;
  min-width:0;
  margin:0 !important;
  padding:0 !important;
}

.dw-nav a,
.dw-main-nav a{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:38px !important;
  padding:0 12px !important;
  border-radius:10px !important;
  color:#3d485d !important;
  font-size:13px !important;
  font-weight:700 !important;
  text-decoration:none !important;
  white-space:nowrap;
  background:transparent !important;
}

.dw-nav a:hover,
.dw-nav a.active,
.dw-main-nav a:hover,
.dw-main-nav a.is-active{
  color:var(--dw-u-primary) !important;
  background:#edf3ff !important;
}

.dw-account,
.dw-userbar{
  margin-left:auto !important;
  display:flex !important;
  align-items:center !important;
  gap:7px !important;
  flex:0 0 auto;
}

.dw-account > a,
.dw-userbar > a,
.dw-member-actions > a,
.dw-auth-actions > a{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:36px !important;
  padding:0 10px !important;
  border-radius:9px !important;
  font-size:12px !important;
  font-weight:700 !important;
  text-decoration:none !important;
}

.dw-user,
.dw-member-user{
  color:var(--dw-u-navy) !important;
  background:transparent !important;
}

.dw-soft,
.dw-member-message{
  color:#4c596e !important;
  background:#f5f7fa !important;
}

.dw-danger,
.dw-logout{
  color:var(--dw-u-danger) !important;
  background:#fff3f3 !important;
}

.dw-primary-small,
.dw-register{
  color:#fff !important;
  background:var(--dw-u-primary) !important;
}

/* Board Closed / geliştirme çubuğu iki tarafta aynı */
.dw-devbar,
.dw-boardclosed-unified{
  width:100%;
  border:0 !important;
  border-bottom:1px solid #fecaca !important;
  background:#fff5f5 !important;
  color:#991b1b !important;
  margin:0 !important;
  padding:0 !important;
  font-size:12px !important;
  font-weight:750 !important;
  text-align:left !important;
}

.dw-devbar > .dw-wrap,
.dw-boardclosed-unified > .wrapper{
  padding-top:8px !important;
  padding-bottom:8px !important;
}

/* ---------- Forum'a özgü ikincil toolbar ---------- */
.dw-forum-tools{
  background:#fff;
  border-bottom:1px solid var(--dw-u-line);
}

.dw-forum-tools-inner{
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.dw-forum-subnav{
  display:flex;
  align-items:center;
  gap:18px;
  min-width:0;
}

.dw-forum-subnav a{
  color:#475569 !important;
  font-size:12px !important;
  font-weight:700 !important;
  text-decoration:none !important;
  white-space:nowrap;
}

.dw-forum-subnav a:hover{
  color:var(--dw-u-primary) !important;
}

.dw-forum-role-links{
  list-style:none;
  display:flex;
  align-items:center;
  gap:6px;
  margin:0 0 0 auto !important;
  padding:0 !important;
}

.dw-forum-role-links:empty{display:none}

.dw-forum-role-links li{margin:0 !important}

.dw-forum-role-links a{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:0 8px !important;
  border-radius:8px;
  background:#f5f7fa !important;
  color:#526074 !important;
  font-size:11px !important;
  font-weight:700;
  background-image:none !important;
}

.dw-forum-tools #search{
  float:none !important;
  display:flex !important;
  align-items:center;
  gap:6px;
  margin:0 !important;
}

.dw-forum-tools #search input.textbox{
  width:220px !important;
  min-width:0 !important;
}

.dw-utility{
  background:#fff !important;
  border-bottom:1px solid var(--dw-u-line) !important;
}

.dw-utility-inner{
  min-height:38px !important;
  display:flex !important;
  align-items:center !important;
}

/* ---------- Ortak footer ---------- */
.dw-footer,
#footer.dw-unified-footer{
  background:var(--dw-u-navy) !important;
  color:#9babbd !important;
  margin-top:40px !important;
  padding:30px 0 0 !important;
  border:0 !important;
}

.dw-foot-grid{
  display:grid !important;
  grid-template-columns:minmax(240px,1fr) minmax(0,2.4fr) !important;
  gap:28px !important;
  align-items:start !important;
}

.dw-foot-brand{
  color:#fff !important;
  font-size:18px !important;
  font-weight:900 !important;
  letter-spacing:.1px !important;
}

.dw-foot-about p,
.dw-footer p{
  margin:5px 0 0 !important;
  color:#9babbd !important;
  font-size:11px !important;
}

.dw-foot-links{
  display:flex !important;
  flex-wrap:wrap !important;
  justify-content:flex-end !important;
  align-items:center !important;
  gap:10px 16px !important;
  min-width:0;
}

.dw-foot-links a,
.dw-foot-links .dw-cookie-link{
  flex:0 0 auto;
  color:#d6deeb !important;
  background:transparent !important;
  border:0 !important;
  padding:0 !important;
  font:inherit !important;
  font-size:12px !important;
  line-height:1.4 !important;
  white-space:nowrap;
  text-decoration:none !important;
  cursor:pointer;
}

.dw-foot-links a:hover,
.dw-foot-links .dw-cookie-link:hover{
  color:#fff !important;
  text-decoration:underline !important;
}

.dw-copy{
  margin-top:22px !important;
  padding:14px 0 18px !important;
  border-top:1px solid rgba(255,255,255,.08) !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:16px !important;
  color:#8fa0bb !important;
  font-size:10px !important;
}

.dw-copy a,
.dw-credit-links a{
  color:#b9c6d8 !important;
  text-decoration:none !important;
}

.dw-copy a:hover,
.dw-credit-links a:hover{
  color:#fff !important;
}

/* Eski MyBB footer bloklarını etkisizleştir */
#footer.dw-unified-footer .upper,
#footer.dw-unified-footer .lower{
  display:none !important;
}

/* ---------- Responsive ---------- */
@media(max-width:1100px){
  .dw-foot-grid{
    grid-template-columns:1fr !important;
    gap:18px !important;
  }
  .dw-foot-links{justify-content:flex-start !important}
}

@media(max-width:900px){
  .dw-wrap,
  .wrapper{
    width:calc(100% - 24px) !important;
    max-width:none !important;
    margin-left:12px !important;
    margin-right:12px !important;
  }

  .dw-head,
  .dw-header-inner{
    display:flex !important;
    flex-wrap:wrap !important;
    gap:9px 12px !important;
    padding:10px 0 !important;
    min-height:auto !important;
  }

  .dw-brand{order:1}
  .dw-account,
  .dw-userbar{order:2;margin-left:auto !important}

  .dw-nav,
  .dw-main-nav{
    order:3 !important;
    flex:0 0 100% !important;
    width:100% !important;
    max-width:100% !important;
    border-top:1px solid #eef1f5;
    padding-top:7px !important;
    justify-content:space-between !important;
    overflow:visible !important;
  }

  .dw-nav a,
  .dw-main-nav a{
    flex:1 1 0 !important;
    min-width:0 !important;
    padding-left:5px !important;
    padding-right:5px !important;
    text-align:center !important;
  }

  .dw-forum-tools-inner{
    flex-wrap:wrap;
    padding:8px 0;
    min-height:0;
  }

  .dw-forum-subnav{
    flex:1 1 auto;
    flex-wrap:wrap;
  }

  .dw-forum-role-links{
    order:3;
    flex:0 0 100%;
    margin-left:0 !important;
  }

  .dw-forum-tools #search{
    flex:1 1 220px;
    justify-content:flex-end;
  }

  .dw-forum-tools #search input.textbox{
    flex:1 1 auto;
    width:auto !important;
  }
}

@media(max-width:700px){
  .dw-foot-links{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    width:100%;
  }

  .dw-foot-links a,
  .dw-foot-links .dw-cookie-link{
    white-space:normal !important;
    text-align:left !important;
  }

  .dw-copy{
    flex-direction:column !important;
    align-items:flex-start !important;
  }
}

@media(max-width:600px){
  .dw-wrap,
  .wrapper{
    width:calc(100% - 20px) !important;
    margin-left:10px !important;
    margin-right:10px !important;
  }

  .dw-brand{
    font-size:20px !important;
    letter-spacing:-.8px !important;
  }

  /* Mobilde yalnız üye mesaj bağlantısını gizle.
     Misafir Giriş bağlantısı (.dw-soft) görünür kalmalıdır. */
  .dw-account .dw-member-message,
  .dw-userbar .dw-member-message,
  .dw-account a[href*="/private.php"],
  .dw-userbar a[href*="/private.php"]{
    display:none !important;
  }

  .dw-account a[href*="member.php?action=login"],
  .dw-userbar a[href*="member.php?action=login"]{
    display:inline-flex !important;
  }

  .dw-account > a,
  .dw-member-actions > a,
  .dw-auth-actions > a{
    min-height:34px !important;
    padding:0 7px !important;
    font-size:11px !important;
  }

  .dw-nav,
  .dw-main-nav{gap:2px !important}

  .dw-nav a,
  .dw-main-nav a{
    min-height:34px !important;
    padding-left:2px !important;
    padding-right:2px !important;
    font-size:10.5px !important;
  }

  .dw-forum-subnav{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    width:100%;
    gap:4px;
  }

  .dw-forum-subnav a{
    white-space:normal;
    text-align:center;
    font-size:10px !important;
  }

  .dw-forum-tools #search{
    flex:0 0 100%;
    width:100%;
  }
}

@media(max-width:420px){
  .dw-foot-links{grid-template-columns:1fr !important}
}
