:root {
  --bg: #070809;
  --bg-soft: #0d1014;
  --bg-deep: #050607;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-strong: rgba(255, 255, 255, 0.08);
  --panel-hover: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  --text: #f5f7fb;
  --text-soft: rgba(245, 247, 251, 0.8);
  --text-muted: rgba(245, 247, 251, 0.58);

  --accent: #ff7a00;
  --accent-soft: rgba(255, 122, 0, 0.16);
  --accent-strong: rgba(255, 122, 0, 0.28);

  --blue: #5fb6ff;
  --blue-soft: rgba(95, 182, 255, 0.16);
  --green: #55d695;
  --green-soft: rgba(85, 214, 149, 0.15);
  --red: #ff7373;
  --red-soft: rgba(255, 115, 115, 0.15);
  --yellow: #ffcf62;
  --yellow-soft: rgba(255, 207, 98, 0.14);

  --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.32);
  --shadow-strong: 0 18px 60px rgba(0, 0, 0, 0.42);
  --shadow-accent: 0 18px 40px rgba(255, 122, 0, 0.22);

  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 30px;

  --sidebar-width: 310px;
  --topbar-height: auto;

  --font-main: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(255, 122, 0, 0.1), transparent 28%),
    radial-gradient(circle at top right, rgba(95, 182, 255, 0.08), transparent 24%),
    linear-gradient(180deg, #090b0f 0%, #060708 100%);
  color: var(--text);
  font-family: var(--font-main);
}

body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  appearance: none;
  -webkit-appearance: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.no-scroll {
  overflow-y: auto
}

::selection {
  background: rgba(255, 122, 0, 0.22);
  color: #fff;
}

::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.035);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 122, 0, 0.34);
  background-clip: padding-box;
}

/* ---------- GENERIC ---------- */

.eyebrow,
.page-kicker,
.login-kicker,
.auth-kicker,
.sidebar-branding-kicker,
.section-kicker {
  color: #ffbe88;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.glass-card,
.glass-subcard,
.card,
.panel-card,
.surface-card {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: var(--shadow-soft);
}

.glass-card,
.card,
.panel-card,
.surface-card {
  border-radius: 26px;
}

.glass-subcard {
  border-radius: 18px;
}

.status-bar,
.notice,
.status-message {
  border-radius: 14px;
  padding: 13px 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--text-soft);
  line-height: 1.55;
}

.status-bar.hidden {
  display: none;
}

.status-bar.info,
.notice-info {
  background: rgba(95, 182, 255, 0.08);
  border-color: rgba(95, 182, 255, 0.18);
  color: #b9deff;
}

.status-bar.success,
.notice-success {
  background: rgba(85, 214, 149, 0.08);
  border-color: rgba(85, 214, 149, 0.18);
  color: #baf1d5;
}

.status-bar.warning,
.notice-warning {
  background: rgba(255, 207, 98, 0.09);
  border-color: rgba(255, 207, 98, 0.18);
  color: #ffe1a1;
}

.status-bar.error,
.notice-error {
  background: rgba(255, 115, 115, 0.09);
  border-color: rgba(255, 115, 115, 0.18);
  color: #ffc0c0;
}

.btn,
.primary-btn,
.secondary-btn,
.ghost-btn,
.mini-btn,
.accent-btn {
  min-height: 46px;
  border-radius: 14px;
  padding: 0 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  outline: none;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease,
    opacity 0.22s ease,
    color 0.22s ease;
}

.primary-btn,
.btn-primary,
.accent-btn {
  background: linear-gradient(180deg, #ff8d1d 0%, #ff7a00 100%);
  color: #fff;
  box-shadow: 0 14px 28px rgba(255,122,0,0.22);
}

.primary-btn:hover,
.btn-primary:hover,
.accent-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(255,122,0,0.28);
}

.secondary-btn,
.btn-secondary,
.ghost-btn,
.mini-btn {
  background: rgba(255,255,255,0.055);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.08);
}

.secondary-btn:hover,
.btn-secondary:hover,
.ghost-btn:hover,
.mini-btn:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.085);
}

.mini-btn {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}

.mini-btn.red {
  background: rgba(255, 115, 115, 0.1);
  border-color: rgba(255, 115, 115, 0.18);
  color: #ffc0c0;
}

.primary-btn:disabled,
.btn:disabled,
.secondary-btn:disabled,
.ghost-btn:disabled,
.mini-btn:disabled,
.accent-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-full {
  width: 100%;
}

.btn-loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.28);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.text-link,
.ghost-link {
  color: #ffb77d;
  font-weight: 600;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.text-link:hover,
.ghost-link:hover {
  opacity: 0.86;
  color: #ffd1ac;
}

.badge,
.status-badge,
.meta-pill,
.info-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: var(--text-soft);
}

.badge-green,
.status-green {
  background: var(--green-soft);
  border-color: rgba(85,214,149,0.2);
  color: #baf1d5;
}

.badge-red,
.status-red {
  background: var(--red-soft);
  border-color: rgba(255,115,115,0.2);
  color: #ffc0c0;
}

.badge-accent,
.status-accent,
.badge-yellow,
.status-yellow {
  background: var(--yellow-soft);
  border-color: rgba(255,207,98,0.2);
  color: #ffe1a1;
}

.badge-blue,
.status-blue {
  background: var(--blue-soft);
  border-color: rgba(95,182,255,0.2);
  color: #b9deff;
}

.empty-state {
  padding: 12px 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.empty-state-title {
  color: var(--text-soft);
  font-weight: 700;
  margin-bottom: 4px;
}

.stack-list {
  display: flex;
  flex-direction: column;
}

.stack-item,
.list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.stack-item:last-child,
.list-item:last-child {
  border-bottom: none;
}

.stack-main {
  min-width: 0;
  flex: 1;
}

.stack-title {
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
}

.stack-subtitle {
  margin-top: 4px;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 14px;
}

.stack-meta {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.subtle-meta {
  color: var(--text-muted);
  margin-top: 12px;
}

.section-card {
  padding: 22px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.inline-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.inline-tools input,
.inline-tools select {
  min-width: 170px;
}

.portal-form,
.auth-form,
.dashboard-form {
  display: grid;
  gap: 16px;
}

.portal-form-grid,
.dashboard-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-group,
.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label,
.form-field label {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
}

.form-group-full {
  grid-column: 1 / -1;
}

.auth-form input,
.auth-form select,
.auth-form textarea,
.portal-form input,
.portal-form select,
.portal-form textarea,
.dashboard-form input,
.dashboard-form select,
.dashboard-form textarea,
.select-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: var(--text);
  padding: 14px 15px;
  outline: none;
  transition:
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.18s ease;
}

.auth-form textarea,
.portal-form textarea,
.dashboard-form textarea {
  resize: vertical;
  min-height: 120px;
}

.auth-form input::placeholder,
.portal-form input::placeholder,
.dashboard-form input::placeholder,
.auth-form textarea::placeholder,
.portal-form textarea::placeholder,
.dashboard-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.34);
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus,
.portal-form input:focus,
.portal-form select:focus,
.portal-form textarea:focus,
.dashboard-form input:focus,
.dashboard-form select:focus,
.dashboard-form textarea:focus,
.select-input:focus {
  border-color: rgba(255, 122, 0, 0.42);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 0 0 4px rgba(255, 122, 0, 0.08);
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.025);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.data-table thead th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 800;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.data-table tbody td {
  padding: 14px 16px;
  color: var(--text-soft);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  vertical-align: top;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover td {
  background: rgba(255,255,255,0.025);
}

.chart-shell {
  width: 100%;
  min-height: 360px;
  position: relative;
  border-radius: 22px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.025);
}

.chart-shell canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ---------- AUTH ---------- */

.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 122, 0, 0.16), transparent 25%),
    radial-gradient(circle at 90% 10%, rgba(95, 182, 255, 0.1), transparent 24%),
    linear-gradient(180deg, #050607 0%, #0b0d10 100%);
  color: var(--text);
}

.auth-shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  position: relative;
}

.single-panel-shell {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 122, 0, 0.1), transparent 24%),
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.035), transparent 22%),
    radial-gradient(circle at 75% 75%, rgba(95, 182, 255, 0.08), transparent 25%);
  filter: blur(8px);
  opacity: 0.95;
}

.auth-brand-panel,
.auth-form-panel {
  position: relative;
  z-index: 1;
}

.auth-brand-panel {
  padding: 56px 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.brand-topline {
  display: inline-flex;
  align-self: flex-start;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 122, 0, 0.12);
  border: 1px solid rgba(255, 122, 0, 0.18);
  color: #ffbb83;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.auth-brand-panel h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.auth-brand-panel p {
  margin: 0;
  max-width: 680px;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.7;
}

.brand-card-grid {
  display: grid;
  gap: 16px;
  margin-top: 10px;
}

.brand-card {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.brand-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 122, 0, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.brand-card-number {
  color: #ffb97d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-card-title {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 700;
}

.brand-card-text {
  margin-top: 6px;
  color: var(--text-muted);
  line-height: 1.55;
}

.brand-footer-note {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.auth-form-panel {
  padding: 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-form-panel.wide-panel {
  max-width: 680px;
  width: 100%;
}

.auth-form-panel::before {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow-strong);
  z-index: -1;
}

.auth-panel-glow {
  position: absolute;
  inset: 24px;
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(255, 122, 0, 0.14), transparent 24%),
    radial-gradient(circle at bottom left, rgba(95, 182, 255, 0.08), transparent 22%);
  pointer-events: none;
  z-index: -1;
}

.auth-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.auth-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255, 122, 0, 0.92), rgba(255, 122, 0, 0.72));
  color: white;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  box-shadow: 0 14px 34px rgba(255, 122, 0, 0.26);
}

.auth-header h2 {
  margin: 4px 0 0;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 108px;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.toggle-password:hover {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
}

.auth-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 2px;
}

.checkline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
  cursor: pointer;
}

.checkline input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.auth-info-box,
.password-rules-box {
  margin-top: 18px;
  border-radius: 16px;
  padding: 16px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.07);
}

.auth-info-title,
.password-rules-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #ffd0a7;
}

.auth-info-box p,
.password-rules-box ul {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.password-rules-box ul {
  padding-left: 18px;
}

.auth-footer-links {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.auth-footer-links a {
  color: #ffb77d;
  font-weight: 600;
}

/* ---------- LOGIN SPECIFIC POLISH ---------- */

.login-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 122, 0, 0.18), transparent 24%),
    radial-gradient(circle at 88% 10%, rgba(95, 182, 255, 0.1), transparent 22%),
    linear-gradient(180deg, #050607 0%, #0a0d11 100%);
}

.login-shell {
  width: 100%;
  min-height: 100vh;
  position: relative;
}

.login-background {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.login-background-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.38;
}

.login-background-glow-a {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -100px;
  background: rgba(255, 140, 42, 0.24);
}

.login-background-glow-b {
  width: 360px;
  height: 360px;
  right: -120px;
  bottom: -100px;
  background: rgba(255, 255, 255, 0.08);
}

.login-background-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.95), transparent 92%);
}

.login-layout {
  position: relative;
  z-index: 1;
  width: min(1380px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(420px, 1.15fr) minmax(360px, 0.85fr);
  gap: 28px;
  align-items: center;
  padding: 36px 0;
}

.login-hero-panel,
.login-form-panel {
  min-width: 0;
}

.login-hero-card,
.login-form-card {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.075);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow-strong);
  border-radius: 30px;
  position: relative;
  overflow: hidden;
}

.login-hero-card::before,
.login-form-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top right, rgba(255,122,0,0.12), transparent 24%),
    radial-gradient(circle at bottom left, rgba(95,182,255,0.06), transparent 20%);
}

.login-hero-card {
  padding: 40px;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-form-card {
  padding: 32px;
  max-width: 520px;
  width: 100%;
  margin-left: auto;
}

.login-logo-row {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.login-logo-badge {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
  background: linear-gradient(135deg, #ff9d3d, #e97c27);
  color: #0a0d12;
  box-shadow: 0 14px 30px rgba(255, 140, 42, 0.28);
  flex-shrink: 0;
}

.login-logo-copy h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.05;
  font-weight: 800;
  color: #f4f7fb;
}

.login-logo-copy p {
  margin: 6px 0 0;
  color: rgba(236,242,248,0.68);
  font-size: 15px;
}

.login-hero-copy,
.login-feature-list,
.login-form-head,
.login-form,
.login-info-box,
.brand-signature {
  position: relative;
  z-index: 1;
}

.login-hero-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: #f4f7fb;
  max-width: 760px;
}

.login-hero-copy p {
  margin: 0;
  max-width: 720px;
  font-size: 17px;
  line-height: 1.75;
  color: rgba(236,242,248,0.72);
}

.login-feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.login-feature-pill {
  padding: 11px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: rgba(236,242,248,0.84);
  font-size: 13px;
  line-height: 1;
}

.login-form-head h3 {
  margin: 4px 0 10px;
  font-size: 34px;
  line-height: 1.1;
  color: #f4f7fb;
}

.login-form-head p {
  margin: 0 0 24px;
  color: rgba(236,242,248,0.68);
  line-height: 1.7;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-form-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.login-submit-btn {
  min-height: 56px;
  width: 100%;
  border: 0;
  border-radius: 16px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
}

.login-info-box {
  margin-top: 22px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  padding: 16px 18px;
}

.login-info-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ff9d3d;
  margin-bottom: 8px;
}

.login-info-text {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(236,242,248,0.72);
}

/* ---------- BRANDING ---------- */

.brand-signature {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  opacity: 0.92;
}

.brand-signature-line {
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,122,0,0.95), rgba(255,255,255,0.08));
  flex-shrink: 0;
}

.brand-signature-text {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: rgba(236, 242, 248, 0.72);
}

.sidebar-branding {
  margin-top: 14px;
  padding: 16px 16px 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)),
    radial-gradient(circle at top left, rgba(255,122,0,0.10), transparent 55%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 14px 28px rgba(0,0,0,0.18);
}

.sidebar-branding-title {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(236, 242, 248, 0.82);
  word-break: break-word;
}

.topbar-branding {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(236, 242, 248, 0.62);
  padding: 0 14px;
  white-space: nowrap;
  position: relative;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.topbar-branding::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 18px;
  transform: translateY(-50%);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,122,0,0.45), rgba(255,255,255,0.04));
}

.topbar-branding:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.system-credit-panel {
  overflow: hidden;
}

/* ---------- PORTAL LAYOUT ---------- */

.portal-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 0% 0%, rgba(255,122,0,0.08), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(95,182,255,0.07), transparent 23%),
    linear-gradient(180deg, #060709 0%, #0a0d11 100%);
}

.portal-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 20px;
  padding: 20px;
}

.sidebar {
  position: sticky;
  top: 20px;
  height: calc(100vh - 40px);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(255,122,0,0.12), transparent 24%),
    radial-gradient(circle at bottom right, rgba(95,182,255,0.06), transparent 22%);
}

.sidebar-top,
.sidebar-bottom {
  position: relative;
  z-index: 1;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.sidebar-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 14px;
  padding: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
}

.sidebar-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-brand-copy strong {
  font-size: 18px;
  letter-spacing: -0.03em;
}

.sidebar-brand-copy span {
  color: var(--text-muted);
  font-size: 12px;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.nav-link {
  width: 100%;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
  font-weight: 600;
  text-align: left;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nav-link:hover {
  background: rgba(255,255,255,0.045);
  border-color: rgba(255,255,255,0.06);
  color: #fff;
}

.nav-link.active {
  background: rgba(255,122,0,0.12);
  color: #ffbe88;
  border-color: rgba(255,122,0,0.16);
  box-shadow: inset 0 0 0 1px rgba(255,122,0,0.06);
}

.nav-link-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav-icon {
  opacity: 0.9;
  flex-shrink: 0;
}

.nav-label {
  min-width: 0;
}

.nav-badge {
  background: linear-gradient(180deg, #ff8d1d 0%, #ff7a00 100%);
  color: #fff;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
  flex-shrink: 0;
  box-shadow: 0 8px 18px rgba(255,122,0,0.22);
}

.user-chip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}

.user-chip span {
  font-weight: 700;
}

.user-chip small {
  color: var(--text-muted);
}

.sidebar-credit {
  margin: 14px 0 16px;
  color: rgba(255,255,255,0.45);
  font-size: 12px;
  line-height: 1.5;
}

.portal-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.topbar {
  padding: 24px 26px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.topbar-copy h1,
.page-headline h1,
.page-headline #pageTitle {
  margin: 10px 0 10px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.topbar-subtext,
.page-subtitle,
#pageSubtitle {
  margin: 0;
  color: var(--text-muted);
  max-width: 760px;
  line-height: 1.65;
}

.topbar-meta,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.view {
  display: none;
  gap: 20px;
}

.view.active {
  display: flex;
  flex-direction: column;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 26px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255,122,0,0.14), transparent 25%),
    radial-gradient(circle at bottom left, rgba(95,182,255,0.06), transparent 20%);
  pointer-events: none;
}

.hero-copy,
.hero-badge {
  position: relative;
  z-index: 1;
}

.hero-copy h2 {
  margin: 10px 0 10px;
  font-size: clamp(26px, 3vw, 42px);
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.hero-copy p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 760px;
}

.hero-badge {
  min-width: 110px;
  min-height: 110px;
  border-radius: 26px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.hero-badge span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-badge strong {
  color: #ffb87d;
  font-size: 28px;
  letter-spacing: -0.04em;
}

/* ---------- STATS / KPI / DASHBOARD ---------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.compact-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 110px;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.09);
}

.stat-card span {
  color: var(--text-muted);
  line-height: 1.45;
  font-size: 13px;
}

.stat-card strong {
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.kpi-overview-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.metric-tile {
  min-height: 110px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.metric-tile:hover {
  transform: translateY(-2px);
}

.metric-tile span {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
}

.metric-tile strong {
  font-size: 26px;
  letter-spacing: -0.05em;
}

.tone-positive {
  border-color: rgba(85,214,149,0.22);
  background: rgba(85,214,149,0.07);
}

.tone-warning {
  border-color: rgba(255,207,98,0.22);
  background: rgba(255,207,98,0.07);
}

.tone-negative {
  border-color: rgba(255,115,115,0.22);
  background: rgba(255,115,115,0.07);
}

.tone-neutral {
  border-color: rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
}

/* ---------- CALENDAR ---------- */

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.calendar-cell {
  min-height: 112px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.035);
  border-radius: 18px;
  padding: 12px;
  color: var(--text);
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
}

.calendar-cell:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.055);
}

.calendar-cell-muted {
  opacity: 0.48;
}

.calendar-cell-selected {
  border-color: rgba(255,122,0,0.26);
  background: rgba(255,122,0,0.09);
}

.calendar-cell-today {
  box-shadow: inset 0 0 0 1px rgba(95,182,255,0.22);
}

.calendar-cell-day {
  font-weight: 700;
}

.calendar-cell-markers {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.calendar-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.calendar-dot-neutral { background: rgba(255,255,255,0.5); }
.calendar-dot-info { background: var(--blue); }
.calendar-dot-warning { background: var(--yellow); }
.calendar-dot-accent { background: var(--accent); }
.calendar-dot-positive { background: var(--green); }
.calendar-dot-negative { background: var(--red); }

/* ---------- DRAWER / MODAL ---------- */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.drawer.hidden {
  display: none !important;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.58);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.drawer-panel {
  position: absolute;
  top: 20px;
  right: 20px;
  width: min(860px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 24px;
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.drawer-head h2 {
  margin: 10px 0 0;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.drawer-block,
.drawer-section {
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
}

.drawer-block h3,
.drawer-section h4,
.drawer-section-title {
  margin: 0 0 12px;
  font-size: 17px;
  letter-spacing: -0.02em;
}

/* ---------- SECURITY / SYSTEM / PAPERCORB ---------- */

.system-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.security-box {
  min-height: 100px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.04);
}

.security-box-label {
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.security-box-value {
  margin-top: 10px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
}

/* ---------- TABLE FILTER / TOOLBAR ---------- */

.toolbar,
.filter-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar input,
.toolbar select,
.filter-toolbar input,
.filter-toolbar select {
  min-width: 170px;
}

.search-input {
  min-height: 46px;
}

/* ---------- SMALL HELPERS ---------- */

.separator-line {
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.06);
}

.text-muted {
  color: var(--text-muted);
}

.text-soft {
  color: var(--text-soft);
}

.text-accent {
  color: #ffbe88;
}

.text-green {
  color: #baf1d5;
}

.text-red {
  color: #ffc0c0;
}

.text-yellow {
  color: #ffe1a1;
}

.text-blue {
  color: #b9deff;
}

.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px !important; }
.mt-12 { margin-top: 12px !important; }
.mt-16 { margin-top: 16px !important; }
.mt-20 { margin-top: 20px !important; }

.w-full { width: 100% !important; }

/* ---------- ANIMATIONS ---------- */

.fade-in-up {
  animation: fadeUpSoft 0.6s ease both;
}

.glow-hover {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.glow-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255,122,0,0.08) inset;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeUpSoft {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseSoft {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255,122,0,0.16);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(255,122,0,0);
  }
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 1480px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kpi-overview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .security-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1280px) {
  .topbar-branding {
    display: none;
  }
}

@media (max-width: 1180px) {
  .portal-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    top: 0;
    height: auto;
  }

  .content-grid,
  .drawer-grid,
  .portal-form-grid,
  .dashboard-form-grid,
  .system-panel-grid {
    grid-template-columns: 1fr;
  }

  .kpi-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    padding-bottom: 16px;
  }

  .login-layout {
    grid-template-columns: 1fr;
    width: min(760px, calc(100% - 32px));
    padding: 24px 0 32px;
  }

  .login-hero-card {
    min-height: auto;
    padding: 30px;
  }

  .login-form-card {
    max-width: none;
    margin-left: 0;
  }
}

@media (max-width: 820px) {
  .portal-layout {
    padding: 14px;
    gap: 14px;
  }

  .topbar,
  .section-card,
  .hero-panel,
  .sidebar {
    padding: 18px;
  }

  .topbar {
    flex-direction: column;
  }

  .topbar-meta,
  .topbar-right {
    justify-content: flex-start;
  }

  .stats-grid,
  .compact-stats,
  .kpi-overview-grid,
  .security-grid {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    gap: 8px;
  }

  .calendar-cell {
    min-height: 86px;
  }

  .auth-form-panel,
  .auth-brand-panel {
    padding: 26px 18px;
  }

  .single-panel-shell {
    padding: 16px;
  }

  .auth-form-panel::before,
  .auth-panel-glow {
    inset: 0;
    border-radius: 24px;
  }

  .drawer-panel {
    top: 10px;
    right: 10px;
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    padding: 18px;
  }

  .brand-signature {
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
  }

  .brand-signature-text {
    font-size: 11px;
    white-space: normal;
  }

  .sidebar-branding {
    padding: 16px;
    border-radius: 16px;
  }

  .sidebar-branding-title {
    font-size: 12px;
  }
}

@media (max-width: 640px) {
  .login-layout {
    width: min(100%, calc(100% - 20px));
    gap: 18px;
  }

  .login-hero-card,
  .login-form-card {
    padding: 22px;
    border-radius: 22px;
  }

  .login-logo-copy h1 {
    font-size: 28px;
  }

  .login-hero-copy h2 {
    font-size: 34px;
  }

  .login-submit-btn,
  .auth-form input,
  .portal-form input,
  .portal-form select,
  .portal-form textarea,
  .dashboard-form input,
  .dashboard-form select,
  .dashboard-form textarea {
    min-height: 52px;
  }

  .toolbar,
  .filter-toolbar,
  .inline-tools {
    width: 100%;
  }

  .toolbar input,
  .toolbar select,
  .toolbar button,
  .filter-toolbar input,
  .filter-toolbar select,
  .filter-toolbar button,
  .inline-tools input,
  .inline-tools select,
  .inline-tools button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .hero-badge {
    min-width: 88px;
    min-height: 88px;
  }

  .hero-panel {
    flex-direction: column;
  }

  .btn,
  .primary-btn,
  .secondary-btn,
  .ghost-btn,
  .mini-btn,
  .accent-btn {
    width: 100%;
  }

  .form-actions,
  .row-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-actions-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .sidebar-brand {
    align-items: flex-start;
  }
}

/* =========================================================
   FINAL PORTAL COMPLETION BLOCK
   Ergänzungen für aktuelle HTML-/JS-Klassen
   ========================================================= */

/* ---------- TOPBAR / PAGE HEADER ---------- */

.topbar-left,
.topbar-right {
  min-width: 0;
}

.page-headline {
  min-width: 0;
}

.page-headline h1,
#pageTitle {
  margin: 8px 0 10px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.page-kicker,
#pageKicker {
  display: inline-flex;
}

.page-subtitle,
#pageSubtitle {
  margin: 0;
  color: var(--text-muted);
  max-width: 760px;
  line-height: 1.65;
}

/* ---------- SIDEBAR EXTENSIONS ---------- */

.sidebar-user-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  margin-top: 14px;
}

.sidebar-user-card strong {
  font-size: 15px;
  line-height: 1.4;
}

.sidebar-user-card span,
.sidebar-user-card small {
  color: var(--text-muted);
  line-height: 1.5;
}

.sidebar-logo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-logo-text strong {
  font-size: 18px;
  letter-spacing: -0.03em;
}

.sidebar-logo-text span {
  color: var(--text-muted);
  font-size: 12px;
}

.nav-link-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-icon {
  width: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.95;
}

/* ---------- HERO / WIDGETS ---------- */

.hero-copy {
  min-width: 0;
}

.hero-widget,
.hero-widget-card {
  min-width: 220px;
  border-radius: 22px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.045);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.hero-widget-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  color: var(--text-muted);
}

.hero-widget-value {
  margin-top: 10px;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 800;
  color: #ffbe88;
}

.hero-widget-subtitle {
  margin-top: 8px;
  color: var(--text-muted);
  line-height: 1.55;
  font-size: 13px;
}

/* ---------- CARD TITLE SYSTEM ---------- */

.card-title,
.panel-title,
.widget-title {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.card-subtitle,
.panel-subtitle,
.widget-subtitle {
  margin-top: 6px;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 14px;
}

/* ---------- STATUS / BADGES EXTRA ---------- */

.badge {
  white-space: nowrap;
}

.badge.badge-green,
.badge-green {
  background: var(--green-soft);
  border-color: rgba(85,214,149,0.2);
  color: #baf1d5;
}

.badge.badge-red,
.badge-red {
  background: var(--red-soft);
  border-color: rgba(255,115,115,0.2);
  color: #ffc0c0;
}

.badge.badge-accent,
.badge-accent {
  background: var(--yellow-soft);
  border-color: rgba(255,207,98,0.2);
  color: #ffe1a1;
}

.badge.badge-blue,
.badge-blue {
  background: var(--blue-soft);
  border-color: rgba(95,182,255,0.2);
  color: #b9deff;
}

/* ---------- FORM ACTIONS / GROUP HELPERS ---------- */

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

/* ---------- KPI / SMS / METRIC TABLE ENHANCEMENTS ---------- */

.metric-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.metric-line + .metric-line {
  margin-top: 10px;
}

.metric-line-label {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.metric-line-value {
  font-weight: 700;
  color: var(--text);
}

.kpi-trend-list,
.sms-trend-list {
  display: grid;
  gap: 12px;
}

.kpi-panel-note,
.sms-panel-note {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

/* ---------- TABLE VARIANTS ---------- */

.table-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.table-cell-strong {
  font-weight: 700;
  color: var(--text);
}

.table-cell-soft {
  color: var(--text-muted);
}

.table-cell-wrap {
  max-width: 320px;
  white-space: normal;
  line-height: 1.6;
}

.table-empty-row td {
  padding-top: 20px !important;
  padding-bottom: 20px !important;
}

/* ---------- DRAWER DETAILS ---------- */

.drawer-close,
.drawer-close-btn {
  min-height: 40px;
  min-width: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: var(--text-soft);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.drawer-close:hover,
.drawer-close-btn:hover {
  background: rgba(255,255,255,0.09);
  transform: translateY(-1px);
}

.drawer-meta {
  margin-top: 6px;
  color: var(--text-muted);
  line-height: 1.6;
}

.drawer-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.drawer-section + .drawer-section {
  margin-top: 16px;
}

/* ---------- STACK / LIST / COMMENTS ---------- */

.comment-item {
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
}

.comment-author {
  font-weight: 700;
  color: var(--text);
}

.comment-meta {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.comment-text {
  margin-top: 10px;
  color: var(--text-soft);
  line-height: 1.65;
}

/* ---------- EMPTY PANEL / PLACEHOLDER ---------- */

.panel-empty,
.widget-empty {
  border-radius: 18px;
  padding: 18px;
  border: 1px dashed rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.025);
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---------- SECURITY / PASSWORD ---------- */

.security-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.password-change-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.security-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

/* ---------- PAPERKORB / SYSTEM ---------- */

.trash-grid {
  display: grid;
  gap: 16px;
}

.system-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.system-card {
  min-height: 110px;
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.04);
}

.system-card-label {
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.system-card-value {
  margin-top: 10px;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 800;
  color: var(--text);
}

/* ---------- VEHICLES / MATERIAL / RESOURCE PANELS ---------- */

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.resource-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.resource-stat-card {
  min-height: 98px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.04);
}

.resource-stat-card span {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.resource-stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.05em;
}

/* ---------- FILTER TOOLBARS ---------- */

.filter-toolbar,
.toolbar {
  border-radius: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
}

/* ---------- AUTH / LOGIN SMALL FIXES ---------- */

.login-form-panel .status-bar {
  margin-bottom: 18px;
}

.login-form-panel .ghost-link {
  align-self: flex-start;
}

.login-form-card .form-field input {
  min-height: 56px;
}

.brand-signature-text {
  word-break: break-word;
}

/* ---------- RESPONSIVE ADDITIONS ---------- */

@media (max-width: 1480px) {
  .resource-stat-grid,
  .system-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .form-grid-3,
  .form-grid-4,
  .password-change-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .system-card-grid,
  .resource-stat-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .row-actions,
  .table-actions {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .sidebar-user-card,
  .system-card,
  .resource-stat-card,
  .security-box {
    padding: 16px;
  }

  .page-headline h1,
  #pageTitle {
    font-size: 30px;
  }

  .drawer-head h2 {
    font-size: 24px;
  }
}
html,
body {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

.app-shell,
.dashboard-shell,
.main-shell,
.portal-shell {
  min-height: 100vh;
  overflow: visible;
}

.main-content,
.content,
.dashboard-content,
.page-content {
  min-height: 100vh;
  overflow-y: auto;
  padding-bottom: 80px;
}

.section,
.view {
  overflow: visible;
}

.table-wrap,
.card-table-wrap,
.data-table-wrap {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
}

.drawer-body {
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  padding-bottom: 40px;
}

.modal,
.overlay-panel {
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.layout,
.portal-layout {
  height: 100vh;
  overflow: hidden;
}

main,
.main,
.content-area,
.dashboard-main {
  height: 100vh;
  overflow-y: auto;
  padding-bottom: 90px;
}

/* ---------- FIX: Portal Scroll + fixed left navigation ---------- */
html, body { height: 100%; min-height: 100%; overflow: hidden; }
.portal-body, body.portal-body { overflow: hidden; }
.app-shell { height: 100vh; min-height: 100vh; overflow: hidden; }
.sidebar { position: sticky; top: 0; height: 100vh; min-height: 100vh; overflow: hidden; align-self: start; }
.sidebar-top, .sidebar-footer { flex-shrink: 0; }
.sidebar-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding-bottom: 24px; }
.main-shell { height: 100vh; min-height: 100vh; overflow: hidden; }
.topbar { flex-shrink: 0; position: sticky; top: 0; z-index: 20; }
.content { flex: 1 1 auto; min-height: 0; height: calc(100vh - var(--header-height, 88px)); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding-bottom: 120px; }
.section.active { min-height: calc(100vh - var(--header-height, 88px) - 40px); }
.table-wrap, .data-table-wrap, .chart-wrap { overflow-x: auto; overflow-y: visible; }
.mini-stat-value .mini-stat-target { margin-top: 4px; font-size: 13px; line-height: 1.25; letter-spacing: 0; font-weight: 800; }
.mini-stat-target.ok { color: #55d695; }
.mini-stat-target.bad { color: #ff7373; }
.mini-stat-target.muted { color: rgba(245,247,251,.52); }

/* Step 2: Papierkorb Aktionen */
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tiny-btn {
  min-height: 30px;
  padding: 7px 10px;
  font-size: 11px;
  line-height: 1;
  border-radius: 10px;
  white-space: nowrap;
}

.danger-btn {
  border: 1px solid rgba(255, 90, 90, 0.35);
  background: rgba(255, 90, 90, 0.12);
  color: #ff9b9b;
  font-weight: 800;
  cursor: pointer;
}

.danger-btn:hover {
  border-color: rgba(255, 90, 90, 0.7);
  background: rgba(255, 90, 90, 0.2);
}


/* Step 3: sichere Löschbuttons in Tabellen */
.danger-btn.tiny-btn,
.row-actions .danger-btn {
  border: 1px solid rgba(255, 99, 99, 0.35);
  background: rgba(255, 75, 75, 0.12);
  color: #ffb4b4;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.danger-btn.tiny-btn:hover,
.row-actions .danger-btn:hover {
  background: rgba(255, 75, 75, 0.22);
  border-color: rgba(255, 99, 99, 0.65);
}

/* Step 4: feste linke Navigation + scrollbarer Inhaltsbereich + Refresh pro Bereich */
html,
body {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  overflow-y: auto;
}

.app-shell,
.dashboard-shell,
.portal-shell,
.layout,
.portal-layout {
  min-height: 100vh;
}

.sidebar,
.side-nav,
.app-sidebar,
aside.sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  max-height: 100vh;
  overflow-y: auto;
  z-index: 20;
}

.main-content,
.dashboard-content,
.page-content,
.content-area,
.dashboard-main,
main {
  min-height: 100vh;
  overflow-y: auto;
  padding-bottom: 96px;
}

.section-refresh-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}

.section-refresh-btn {
  white-space: nowrap;
}

.section,
.view {
  overflow: visible;
}

.table-wrap,
.card-table-wrap,
.data-table-wrap,
.table-responsive {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
}

.drawer-body {
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  padding-bottom: 48px;
}

.modal,
.overlay-panel {
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

/* Patch 2026-04-27: manuelle Aktualisierung ausblenden, automatische 5-Minuten-Aktualisierung bleibt aktiv */
#refreshAllBtn,
#operationsReloadBtn,
#vacationReloadBtn,
#sickReloadBtn,
#swapReloadBtn,
#trashReloadBtn,
.section-refresh-row,
[data-refresh-section] {
  display: none !important;
}

/* FINAL 20260429-10 SMS Auto-KW / Material / Dashboard UI */
.stock-inline-input{appearance:auto;background:rgba(255,255,255,.055);border:1px solid rgba(255,145,40,.34);color:#fff;border-radius:12px;min-height:34px;font-weight:850;}
