/* Portal shell — düz, nötr yüzey + mavi vurgu */
:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #111827;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #3b82f6;
  --accent-soft: #eff6ff;
  --shell: #1f2937;
  --utility-bg: #111827;
  --shell-muted: rgba(209, 213, 219, 0.95);
  --radius: 0;
  --radius-sm: 0;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  --content-max: 100%;
  --portal-nav-tab-w: 10rem;
  --font-ui: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.portal-app {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 2.25rem 1rem 3rem;
  box-sizing: border-box;
}

.page-title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.28rem, 3.8vw, 1.52rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  text-align: center;
  line-height: 1.25;
}

.page-intro {
  margin: 0 0 1.65rem;
  font-size: 0.90625rem;
  color: var(--muted);
  line-height: 1.62;
  text-align: center;
  max-width: 100%;
}

.panel {
  padding: 1.25rem 1.35rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: visible;
}

.panel--toolbar {
  margin-bottom: 1.75rem;
}

.panel--toolbar .btn-group {
  justify-content: center;
}

/* Üst şerit: koyu arka plana uyumlu kompakt işlem düğmeleri */
.portal-header__toolbar-actions {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 0.65rem;
  min-width: 0;
}

.portal-header__toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
}

.portal-header__toolbar-divider {
  flex-shrink: 0;
  width: 1px;
  height: 1.35rem;
  background: rgba(255, 255, 255, 0.14);
  align-self: center;
}

.portal-header__action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-height: 2.125rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.45rem 0.85rem;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  line-height: 1.25;
  white-space: nowrap;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.portal-header__action-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.42);
  color: #fff;
}

.portal-header__action-btn:focus-visible {
  outline: 2px solid rgba(125, 211, 252, 0.9);
  outline-offset: 2px;
}

.portal-header__action-btn--link {
  text-decoration: none;
  box-sizing: border-box;
}

.portal-header__action-btn-ico {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  opacity: 0.92;
}

.portal-header__action-btn--danger {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(185, 28, 28, 0.22);
  color: #fecaca;
}

.portal-header__action-btn--danger:hover {
  background: rgba(220, 38, 38, 0.38);
  border-color: rgba(252, 165, 165, 0.55);
  color: #fff;
}

.portal-header__action-btn--logout {
  color: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.16);
  background: transparent;
}

.portal-header__action-btn--logout:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
}

@media (max-width: 900px) {
  .portal-header__utility-top {
    flex-direction: column;
    align-items: stretch;
  }

  .portal-header__utility-top-actions {
    margin-left: 0;
    justify-content: flex-start;
  }

  .portal-header__utility-bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .portal-header__toolbar-actions {
    justify-content: flex-start;
  }

  .portal-header__toolbar-divider {
    display: none;
  }

  .portal-header__action-btn--danger {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .portal-header__action-btn {
    font-size: 0.75rem;
    padding: 0.45rem 0.7rem;
  }
}

.portal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--shell);
  color: #f9fafb;
  font-family: inherit;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.portal-header__tier--utility {
  border-bottom: 1px solid rgba(90, 126, 184, 0.22);
  background: linear-gradient(180deg, #131c2e 0%, var(--utility-bg) 100%);
}

.portal-header__utility-inner {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0.7rem 1.25rem 0.8rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.8125rem;
}

.portal-header__utility-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  flex-wrap: wrap;
  min-height: 2.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-header__utility-top-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  margin-left: auto;
  padding: 0.2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.portal-header__utility-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  flex-wrap: wrap;
  min-width: 0;
  min-height: 2.375rem;
}

.portal-header__utility-userrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  min-width: 0;
}

.portal-header__utility-brandrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  min-width: 0;
}

.portal-header__utility-dot {
  display: inline-block;
  width: 1px;
  height: 0.875rem;
  margin: 0 0.15rem;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0;
  line-height: 0;
  user-select: none;
  vertical-align: middle;
}

.portal-header__sitename {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(209, 213, 219, 0.82);
  letter-spacing: 0.015em;
  line-height: 1.25;
}

.portal-header__brandmark {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #f3f6fc;
  letter-spacing: 0.02em;
  line-height: 1.25;
  white-space: nowrap;
}

.portal-header__brand-ico {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  color: var(--accent-light);
  opacity: 1;
}

.portal-header__sitename-ico {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  opacity: 0.72;
}

.portal-header__user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 2.125rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  border-radius: 0;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.portal-header__user-trigger--profile {
  gap: 0.5rem;
  padding: 0.4rem 0.7rem 0.4rem 0.55rem;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.portal-header__user-trigger--profile:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
}

.portal-header__user-name {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.94);
}

.portal-header__role-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.28);
  line-height: 1.2;
}

.portal-header__user-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.26);
  color: #fff;
}

.portal-header__utility-top-actions .portal-header__user-trigger {
  min-height: 2rem;
  padding: 0.4rem 0.7rem;
  border-color: transparent;
  background: transparent;
}

.portal-header__utility-top-actions .portal-header__user-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.portal-header__utility-top-actions .portal-header__action-btn {
  min-height: 2rem;
  padding: 0.4rem 0.75rem;
}

.portal-header__user-trigger:focus-visible {
  outline: 2px solid rgba(125, 211, 252, 0.9);
  outline-offset: 2px;
}

.portal-header__user-trigger-ico {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  opacity: 0.9;
}

.portal-header__tier--main {
  background: var(--shell);
  border-top: none;
}

.portal-header__main-inner {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0.35rem 1rem 0;
  display: grid;
  justify-items: center;
  align-items: center;
}

.portal-header__nav {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  justify-content: center;
  flex-wrap: wrap;
  justify-self: center;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 0;
}

.portal-nav-item {
  flex: 0 0 var(--portal-nav-tab-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.35rem 0.5rem 0.45rem;
  width: var(--portal-nav-tab-w);
  min-width: var(--portal-nav-tab-w);
  max-width: var(--portal-nav-tab-w);
  border-radius: 0;
  text-decoration: none;
  color: rgba(228, 234, 245, 0.62);
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.portal-nav-item:hover:not(.is-active):not(.portal-nav-item--static) {
  color: rgba(240, 244, 252, 0.95);
  background: rgba(90, 126, 184, 0.12);
}

.portal-nav-item.is-active {
  background: transparent;
  color: #f0f4fc;
  border-bottom-color: var(--accent-light);
  box-shadow: none;
}

.portal-nav-item.is-active .portal-nav-item__ico {
  color: var(--accent-light);
}

.portal-nav-item--static {
  cursor: default;
}

.portal-nav-item__ico {
  display: flex;
  color: inherit;
}

.portal-nav-item__ico svg {
  width: 22px;
  height: 22px;
}

.portal-nav-item__lbl {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.25;
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  hyphens: none;
  overflow-wrap: break-word;
  word-break: break-word;
}

@media (max-width: 768px) {
  .portal-header__nav {
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 380px) {
  :root {
    --portal-nav-tab-w: 8.75rem;
  }

  .portal-nav-item__lbl {
    font-size: 0.625rem;
    letter-spacing: 0.06em;
  }
}

@media (max-width: 768px) {
  .wrap {
    padding: 1.5rem 0.75rem 2.5rem;
  }

  .portal-header__utility-inner,
  .portal-header__actions-inner {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Köşe yuvarlaklığı yok — shell + sayfa içeriği */
*,
*::before,
*::after {
  border-radius: 0 !important;
}
