.system-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.system-brand__logo-shell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 16px;
  background: #05070a;
  border: 1px solid rgba(148, 163, 184, .24);
  box-shadow: 0 10px 24px rgba(2, 6, 23, .16);
}

.system-brand__logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.system-brand__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.system-brand__copy strong {
  display: block;
  font-family: Cairo, sans-serif;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.system-brand__copy small {
  display: block;
  color: inherit;
  opacity: .72;
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.system-brand--sidebar {
  width: 100%;
  color: #fff;
}
.system-brand--sidebar .system-brand__logo-shell { width: 58px; height: 58px; border-radius: 18px; }
.system-brand--sidebar .system-brand__copy strong { font-size: 18px; }

.system-brand--auth {
  color: #fff;
  align-items: center;
}
.system-brand--auth .system-brand__logo-shell { width: 86px; height: 86px; border-radius: 22px; }
.system-brand--auth .system-brand__copy strong { font-size: 24px; }
.system-brand--auth .system-brand__copy small { font-size: 13px; }

.system-brand--auth-mobile .system-brand__logo-shell { width: 54px; height: 54px; }
.system-brand--auth-mobile .system-brand__copy strong { font-size: 17px; }

.system-brand--public,
.system-brand--order {
  color: #0f172a;
}
.system-brand--public .system-brand__logo-shell { width: 58px; height: 58px; }
.system-brand--order .system-brand__logo-shell { width: 52px; height: 52px; }
.system-brand--public .system-brand__copy strong,
.system-brand--order .system-brand__copy strong { font-size: 18px; }
.system-brand--public .system-brand__copy small,
.system-brand--order .system-brand__copy small { color: #64748b; opacity: 1; }

.system-branding-settings {
  margin-bottom: 24px;
  padding: 24px;
  border-radius: 26px;
  border: 1px solid rgba(59, 130, 246, .18);
  background: linear-gradient(135deg, rgba(239, 246, 255, .96), rgba(255, 255, 255, .98));
  box-shadow: 0 18px 46px rgba(15, 23, 42, .07);
}
.system-branding-settings__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.system-branding-settings__eyebrow,
.system-branding-settings__status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, .1);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}
.system-branding-settings h2 { margin: 8px 0 4px; font-size: 22px; color: #0f172a; }
.system-branding-settings p { margin: 0; color: #64748b; font-size: 14px; line-height: 1.8; }
.system-branding-settings__form { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 22px; }
.system-branding-settings__preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  background: #0b2c55;
  color: #fff;
}
.system-branding-settings__logo-frame { width: 92px; height: 92px; flex: 0 0 92px; border-radius: 20px; overflow: hidden; background: #05070a; }
.system-branding-settings__logo-frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.system-branding-settings__preview div { min-width: 0; display: grid; gap: 4px; }
.system-branding-settings__preview small { opacity: .7; }
.system-branding-settings__preview strong { font-size: 19px; overflow-wrap: anywhere; }
.system-branding-settings__preview span { font-size: 12px; opacity: .72; }
.system-branding-settings__fields { display: grid; gap: 14px; }
.system-branding-settings__field { display: grid; gap: 7px; color: #334155; font-size: 13px; font-weight: 700; }
.system-branding-settings__field input[type="text"],
.system-branding-settings__field input[type="file"] {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, .35); background: #fff; color: #0f172a;
}
.system-branding-settings__field small { color: #64748b; font-size: 11px; font-weight: 500; }
.system-branding-settings__error { color: #dc2626 !important; }
.system-branding-settings__remove { display: flex; gap: 9px; align-items: center; font-size: 12px; color: #475569; }
.system-branding-settings__actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; justify-content: flex-end; padding-top: 4px; }
.system-branding-settings__actions button {
  min-height: 46px; padding: 0 18px; border: 0; border-radius: 14px; cursor: pointer;
  background: linear-gradient(135deg, #2563eb, #155eef); color: #fff; font-family: Cairo, sans-serif; font-weight: 800;
}
.system-branding-settings__actions span { color: #64748b; font-size: 12px; }

.dark .system-branding-settings { background: linear-gradient(135deg, rgba(15,23,42,.96), rgba(30,41,59,.96)); border-color: rgba(96,165,250,.24); }
.dark .system-branding-settings h2,
.dark .system-branding-settings__field { color: #f8fafc; }
.dark .system-branding-settings p,
.dark .system-branding-settings__field small,
.dark .system-branding-settings__remove,
.dark .system-branding-settings__actions span { color: #cbd5e1; }
.dark .system-branding-settings__field input[type="text"],
.dark .system-branding-settings__field input[type="file"] { background: rgba(15,23,42,.75); color: #fff; border-color: rgba(148,163,184,.25); }

@media (max-width: 900px) {
  .system-branding-settings__form { grid-template-columns: 1fr; }
  .system-branding-settings__actions { grid-column: auto; flex-direction: column; align-items: stretch; }
}

@media (max-width: 640px) {
  .system-brand__copy small { display: none; }
  .system-brand--auth .system-brand__logo-shell { width: 64px; height: 64px; }
  .system-branding-settings { padding: 18px; }
  .system-branding-settings__head { flex-direction: column; }
}

@media (min-width: 1280px) {
  body.app-sidebar-collapsed .app-sidebar:not(:hover) .system-brand--sidebar .system-brand__copy {
    display: none !important;
  }

  body.app-sidebar-collapsed .app-sidebar:not(:hover) .system-brand--sidebar {
    justify-content: center;
  }

  body.app-sidebar-collapsed .app-sidebar:not(:hover) .system-brand--sidebar .system-brand__logo-shell {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }
}
