@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

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

:root {
  color-scheme: dark;
  --bg: #030305;
  --bg-2: #07080b;
  --surface: rgba(18, 19, 23, 0.78);
  --surface-2: rgba(28, 29, 34, 0.82);
  --surface-3: rgba(44, 46, 54, 0.92);
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.095);
  --text: #f6f7fb;
  --text-2: #c9ccd5;
  --text-3: #8f95a3;
  --muted: #8f95a3;
  --line: rgba(255, 255, 255, 0.105);
  --border: rgba(255, 255, 255, 0.105);
  --line-2: rgba(255, 31, 61, 0.46);
  --accent: #ff1f3d;
  --accent-2: #b30f23;
  --accent-3: #ff6b7d;
  --accent-soft: rgba(255, 31, 61, 0.145);
  --accent-hover: #ff4b63;
  --ok: #22c55e;
  --ok-soft: rgba(34, 197, 94, 0.13);
  --bad: #ef4444;
  --bad-soft: rgba(239, 68, 68, 0.14);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, 0.14);
  --input-bg: rgba(8, 9, 12, 0.78);
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.52);
  --shadow-sm: 0 16px 42px rgba(0, 0, 0, 0.34);
  --glow: 0 0 0 1px rgba(255, 31, 61, 0.16), 0 0 36px rgba(255, 31, 61, 0.13);
  --radius: 20px;
  --radius-sm: 14px;
  --sidebar-w: 278px;
  --font: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.55;
  background:
    radial-gradient(circle at 18% -10%, rgba(255, 31, 61, 0.22), transparent 34%),
    radial-gradient(circle at 92% 8%, rgba(140, 17, 35, 0.22), transparent 30%),
    linear-gradient(135deg, #020203 0%, #08090d 48%, #15161b 100%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 78%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 18%, rgba(255, 31, 61, 0.06) 18% 18.5%, transparent 18.5% 100%),
    linear-gradient(300deg, transparent 0 62%, rgba(255, 255, 255, 0.04) 62% 62.2%, transparent 62.2% 100%);
  opacity: 0.7;
}

a {
  color: var(--accent-3);
  text-decoration: none;
  transition: color 0.16s, opacity 0.16s;
}

a:hover {
  color: #fff;
}

small {
  color: var(--muted);
}

/* Login */
.login-wrap,
.mhorfine-login-wrap,
.mhorfine-login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 16%, rgba(255, 31, 61, 0.30), transparent 30%),
    radial-gradient(circle at 82% 12%, rgba(107, 114, 128, 0.16), transparent 26%),
    linear-gradient(135deg, #020203 0%, #090a0f 50%, #17181e 100%);
}

.login-wrap::before,
.mhorfine-login-wrap::before,
.mhorfine-login-wrap::before {
  content: '';
  position: absolute;
  inset: 7%;
  background:
    linear-gradient(90deg, transparent, rgba(255, 31, 61, 0.16), transparent),
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 42px;
  filter: blur(0.2px);
  opacity: 0.7;
  transform: skewY(-4deg);
}

.login-card,
.mhorfine-login-card,
.mhorfine-login-card {
  width: 100%;
  max-width: 440px;
  padding: 2.45rem 2.05rem 2rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(24, 25, 31, 0.88), rgba(5, 6, 9, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 31, 61, 0.58);
  border-radius: 28px;
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.66), var(--glow);
  backdrop-filter: blur(24px);
}

.login-card::before,
.mhorfine-login-card::before,
.mhorfine-login-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 31, 61, 0.20), transparent 34%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.11), transparent 22% 72%, rgba(255, 31, 61, 0.06));
  opacity: 0.75;
}

.login-card::after,
.mhorfine-login-card::after,
.mhorfine-login-card::after {
  content: '';
  position: absolute;
  left: 2rem;
  right: 2rem;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.9;
}

.login-brand,
.mhorfine-login-brand,
.mhorfine-login-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.login-brand .mark,
.mhorfine-login-mark,
.mhorfine-login-mark {
  width: 76px !important;
  height: 76px !important;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(255, 31, 61, 0.88), rgba(102, 10, 24, 0.92)),
    #111217;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px !important;
  box-shadow: 0 0 0 6px rgba(255, 31, 61, 0.08), 0 18px 46px rgba(255, 31, 61, 0.20) !important;
}

.brand-monogram {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.mhorfine-login-logo,
.mhorfine-login-logo {
  display: block;
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter: drop-shadow(0 16px 26px rgba(0, 0, 0, 0.58));
}

.login-brand h1,
.mhorfine-login-brand h1,
.mhorfine-login-brand h1 {
  color: #fff;
  font-size: clamp(1.55rem, 4vw, 1.92rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.055em;
}

.mhorfine-login-subtitle,
.mhorfine-login-subtitle {
  position: relative;
  margin-bottom: 1.35rem;
  color: var(--accent-3);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.login-error {
  position: relative;
  margin-bottom: 1rem;
  padding: 0.82rem 1rem;
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, 0.30);
  border-radius: 15px;
  font-size: 0.88rem;
  font-weight: 750;
}

/* Layout */
.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 200;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 31, 61, 0.20), transparent 36%),
    linear-gradient(180deg, rgba(12, 13, 17, 0.96) 0%, rgba(5, 6, 9, 0.98) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 18px 0 52px rgba(0, 0, 0, 0.38);
  transition: transform 0.25s var(--ease);
  backdrop-filter: blur(22px);
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, rgba(255, 31, 61, 0.72), transparent);
}

.sidebar::after {
  content: '';
  position: absolute;
  inset: auto 18px 18px 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 31, 61, 0.5), transparent);
  opacity: 0.7;
}

.sidebar-head,
.mhorfine-sidebar-head,
.mhorfine-sidebar-head {
  min-height: 96px;
  padding: 1.35rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  background: linear-gradient(180deg, rgba(255, 31, 61, 0.10), transparent);
}

.sidebar-head .mark,
.mhorfine-sidebar-logo-wrap,
.mhorfine-sidebar-logo-wrap {
  width: 48px !important;
  height: 48px !important;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, rgba(255, 31, 61, 0.95), rgba(100, 9, 22, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(255, 31, 61, 0.18);
}

.mhorfine-sidebar-logo,
.mhorfine-sidebar-logo {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.sidebar-brand-text {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
}

.sidebar-brand-text span,
.sidebar-head > span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-brand-text small {
  color: var(--accent-3);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav {
  list-style: none;
  flex: 1;
  padding: 0.9rem 0.75rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 31, 61, 0.45) transparent;
}

.nav li a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  margin-bottom: 4px;
  padding: 0.68rem 0.85rem;
  color: var(--text-2);
  border: 1px solid transparent;
  border-radius: 15px;
  font-size: 0.91rem;
  font-weight: 750;
  transition: background 0.16s, border-color 0.16s, color 0.16s, transform 0.16s;
}

.nav li a i,
.nav li a svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.82;
}

.nav li a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.11);
  text-decoration: none;
  transform: translateX(2px);
}

.nav li a.active {
  color: #fff;
  background:
    linear-gradient(90deg, rgba(255, 31, 61, 0.22), rgba(255, 31, 61, 0.055)),
    rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 31, 61, 0.36);
  box-shadow: inset 0 0 22px rgba(255, 31, 61, 0.075);
}

.nav li a.active::before {
  content: '';
  width: 4px;
  height: 24px;
  position: absolute;
  left: -0.75rem;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--accent-hover), var(--accent-2));
  box-shadow: 0 0 18px rgba(255, 31, 61, 0.6);
}

.nav li a.active i,
.nav li a.active svg {
  opacity: 1;
  color: var(--accent-3);
}

.nav-divider {
  height: 1px;
  margin: 0.8rem 0.85rem;
  padding: 0;
  list-style: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
}

.sidebar-foot {
  padding: 1rem 1.25rem;
  color: var(--text-3);
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}

.main {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 74px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background:
    linear-gradient(90deg, rgba(255, 31, 61, 0.08), transparent 42%),
    rgba(7, 8, 12, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(22px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.topbar-title {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.topbar-left h1 {
  overflow: hidden;
  color: var(--text);
  font-size: clamp(1rem, 2.1vw, 1.22rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-kicker {
  color: var(--text-3);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: none;
  place-items: center;
  flex-shrink: 0;
  cursor: pointer;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  transition: border-color 0.16s, background 0.16s, color 0.16s, transform 0.16s;
}

.icon-btn:hover {
  color: #fff;
  background: rgba(255, 31, 61, 0.14);
  border-color: rgba(255, 31, 61, 0.38);
  transform: translateY(-1px);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 230px;
  padding: 0.4rem 0.85rem 0.4rem 0.42rem;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 750;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.user-chip .avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #fff;
  background: linear-gradient(145deg, var(--accent-hover), var(--accent-2));
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 900;
}

.page {
  width: 100%;
  max-width: 1360px;
  flex: 1;
  padding: 1.55rem;
}

/* Dashboard hero */
.dashboard-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.2rem;
  padding: 1.35rem;
  background:
    linear-gradient(135deg, rgba(255, 31, 61, 0.19), rgba(255, 255, 255, 0.045)),
    rgba(16, 17, 22, 0.72);
  border: 1px solid rgba(255, 31, 61, 0.24);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.dashboard-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 0 45%, rgba(255, 255, 255, 0.08) 45.2% 45.5%, transparent 45.7% 100%);
  opacity: 0.55;
}

.hero-kicker {
  position: relative;
  color: var(--accent-3);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dashboard-hero h2 {
  position: relative;
  margin-top: 0.12rem;
  font-size: clamp(1.45rem, 4vw, 2.45rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.dashboard-hero p {
  position: relative;
  max-width: 720px;
  margin-top: 0.42rem;
  color: var(--text-2);
}

.hero-status {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.88rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.75);
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stat {
  position: relative;
  overflow: hidden;
  min-height: 128px;
  padding: 1.1rem 1.15rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.032)),
    rgba(14, 15, 19, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.stat::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent-hover), var(--accent-2));
  box-shadow: 0 0 28px rgba(255, 31, 61, 0.5);
}

.stat::after {
  content: '';
  position: absolute;
  right: -26px;
  top: -26px;
  width: 96px;
  height: 96px;
  border: 1px solid rgba(255, 31, 61, 0.20);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 31, 61, 0.14), transparent 65%);
}

.stat:hover {
  border-color: rgba(255, 31, 61, 0.34);
  box-shadow: var(--shadow), var(--glow);
  transform: translateY(-2px);
}

.stat-label {
  position: relative;
  color: var(--text-3);
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-value {
  position: relative;
  margin-top: 0.35rem;
  color: var(--text);
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1;
}

/* Cards */
.card {
  position: relative;
  margin-bottom: 1rem;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.070), rgba(255, 255, 255, 0.025)),
    rgba(14, 15, 19, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 31, 61, 0.085), transparent 34% 78%, rgba(255, 255, 255, 0.035));
  opacity: 0.75;
}

.card-head,
.card-body {
  position: relative;
}

.card-head {
  min-height: 62px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: linear-gradient(90deg, rgba(255, 31, 61, 0.10), transparent 56%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.card-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.card-head h2::before {
  content: '';
  width: 9px;
  height: 9px;
  display: inline-block;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(255, 31, 61, 0.78);
}

.card-body {
  padding: 1.25rem;
}

.card-body.flush {
  padding: 0;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.field label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--text-2);
  font-size: 0.79rem;
  font-weight: 800;
}

.field-wide {
  grid-column: span 2;
}

.field-help {
  display: block;
  margin-top: 0.42rem;
  color: var(--text-3);
  font-size: 0.78rem;
}

.qr-preview-field {
  max-width: 210px;
}

.qr-preview {
  display: block;
  width: 136px;
  height: 136px;
  margin-bottom: 0.65rem;
  padding: 0.42rem;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.input-wrap {
  position: relative;
}

.input-wrap i,
.input-wrap svg {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  width: 16px;
  height: 16px;
  color: var(--text-3);
  pointer-events: none;
  transform: translateY(-50%);
}

.input-wrap input {
  padding-left: 2.55rem !important;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 0.68rem 0.9rem;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid rgba(255, 255, 255, 0.115);
  border-radius: 14px;
  font: inherit;
  font-size: 0.9rem;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s, transform 0.16s;
}

textarea {
  min-height: 118px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #6f7581;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  background: rgba(10, 11, 15, 0.98);
  border-color: rgba(255, 31, 61, 0.72);
  box-shadow: 0 0 0 4px rgba(255, 31, 61, 0.12), 0 0 22px rgba(255, 31, 61, 0.10);
}

input[type="file"] {
  padding: 0.52rem;
  color: var(--text-2);
  font-size: 0.85rem;
}

input[type="file"]::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.48rem 0.76rem;
  color: #fff;
  background: linear-gradient(145deg, var(--accent-hover), var(--accent-2));
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

select option {
  background: #111217;
  color: #fff;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.15rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.62rem 1.1rem;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(145deg, var(--accent-hover), var(--accent-2));
  border: 1px solid rgba(255, 31, 61, 0.36);
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(255, 31, 61, 0.16);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.16s, box-shadow 0.16s, transform 0.12s, border-color 0.16s, color 0.16s;
}

.btn:hover {
  color: #fff;
  background: linear-gradient(145deg, #ff6576, #d71932);
  border-color: rgba(255, 96, 116, 0.65);
  box-shadow: 0 18px 36px rgba(255, 31, 61, 0.25);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: scale(0.98);
}

.btn-sm {
  min-height: 34px;
  padding: 0.42rem 0.78rem;
  font-size: 0.8rem;
}

.btn-ghost {
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.052);
  border: 1px solid rgba(255, 255, 255, 0.115);
  box-shadow: none;
}

.btn-ghost:hover {
  color: #fff;
  background: rgba(255, 31, 61, 0.13);
  border-color: rgba(255, 31, 61, 0.35);
  box-shadow: none;
}

.btn-danger,
.branding-danger {
  color: #fff !important;
  background: linear-gradient(145deg, #ef4444, #991b1b) !important;
  border-color: rgba(239, 68, 68, 0.38) !important;
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.16) !important;
}

.btn-danger:hover,
.branding-danger:hover {
  color: #fff !important;
  background: linear-gradient(145deg, #ff6b6b, #bd1b1b) !important;
  box-shadow: 0 18px 36px rgba(239, 68, 68, 0.25) !important;
}

.btn-icon {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
}

.btn svg,
.btn i {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.mhorfine-login-btn,
.mhorfine-login-btn {
  min-height: 50px;
  border-radius: 17px;
}

/* Tables */
.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

th {
  padding: 0.86rem 1.25rem;
  color: var(--text-3);
  background: rgba(0, 0, 0, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.065em;
  text-align: left;
  text-transform: uppercase;
}

td {
  padding: 0.9rem 1.25rem;
  color: var(--text-2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tbody tr {
  transition: background 0.12s;
}

tbody tr:hover td {
  background: rgba(255, 31, 61, 0.045);
}

.empty {
  padding: 2.7rem 1rem !important;
  color: var(--text-3);
  text-align: center;
}

code,
.url-chip {
  padding: 0.24rem 0.5rem;
  color: #ffd0d7;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 31, 61, 0.20);
  border-radius: 9px;
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 0.8rem;
  word-break: break-all;
}

.url-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0.2rem 0.6rem;
  color: #d6d9e2;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.badge-ok {
  color: #bbf7d0;
  background: var(--ok-soft);
  border-color: rgba(34, 197, 94, 0.26);
}

.badge-bad {
  color: #fecaca;
  background: var(--bad-soft);
  border-color: rgba(239, 68, 68, 0.28);
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.4rem;
}

.row-actions .btn {
  white-space: nowrap;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.toolbar input[type="text"],
.toolbar input[type="search"] {
  flex: 1;
  min-width: 180px;
}

.thumb {
  height: 46px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
}

.preview-img {
  display: block;
  max-height: 82px;
  margin-top: 0.65rem;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
}

/* Overlay */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: none;
  opacity: 0;
  background: rgba(0, 0, 0, 0.70);
  backdrop-filter: blur(4px);
  transition: opacity 0.25s;
}

.backdrop.show {
  display: block;
  opacity: 1;
}

/* Toast */
.toast-stack {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  pointer-events: none;
}

.toast {
  max-width: 360px;
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  pointer-events: auto;
  color: var(--text);
  background: rgba(18, 19, 23, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-left: 4px solid var(--accent);
  border-radius: 15px;
  box-shadow: var(--shadow);
  font-size: 0.88rem;
  font-weight: 750;
  backdrop-filter: blur(18px);
  animation: toastIn 0.35s var(--ease);
}

.toast.ok { border-left-color: var(--ok); }
.toast.bad { border-left-color: var(--bad); }
.toast.warn { border-left-color: var(--warn); }

.toast.hide {
  animation: toastOut 0.3s var(--ease) forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(8px); }
}

/* API / Integração */
.endpoint-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}

.endpoint-chip {
  display: block;
  padding: 0.82rem 0.92rem;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.switch-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 46px;
  padding: 0.72rem 0.88rem;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.switch-field input,
table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.form-separator {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.105);
  margin: 1.4rem 0;
}

.inline-form {
  display: inline-flex;
  margin: 0;
}

.bulk-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0.75rem 0;
}

.request-filters {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

/* Aparência / Branding */
.branding-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.branding-card {
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  padding: 18px;
  background: rgba(255,255,255,.035);
}

.branding-card h3 {
  margin: 0 0 6px;
}

.branding-help {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.45;
  margin-bottom: 14px;
}

.branding-preview {
  height: 220px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #090a0e, #181a21);
  margin: 12px 0 15px;
  position: relative;
}

.branding-preview.logo img {
  max-width: 82%;
  max-height: 72%;
  object-fit: contain;
}

.branding-preview.background {
  background-size: cover;
  background-position: center;
}

.branding-preview.background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 18, var(--preview-overlay,.72));
}

.branding-preview.background span {
  position: relative;
  z-index: 1;
  font-weight: 800;
  color: #fff;
  text-align: center;
  padding: 16px;
}

.branding-empty {
  color: var(--muted);
  text-align: center;
  padding: 20px;
}

.branding-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.branding-status {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.branding-pill {
  border: 1px solid rgba(255, 31, 61, .30);
  background: rgba(255, 31, 61, .10);
  color: #ffd0d7;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: .86rem;
  font-weight: 800;
}

.branding-range-row {
  display: grid;
  grid-template-columns: 1fr 74px;
  gap: 12px;
  align-items: center;
}

.branding-range-row output {
  text-align: center;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 9px;
  font-weight: 900;
}

/* Config suporte */
.support-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}

.support-prefix {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 900;
  user-select: none;
}

.support-input-row input {
  flex: 1;
}

/* Responsive */
@media (max-width: 1100px) {
  .dashboard-hero {
    grid-template-columns: 1fr;
  }
  .hero-status {
    width: fit-content;
  }
}

@media (max-width: 960px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow);
  }

  .main {
    margin-left: 0;
  }

  .icon-btn {
    display: grid;
  }

  .branding-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .field-wide {
    grid-column: auto;
  }

  .qr-preview-field {
    max-width: none;
  }

  .page {
    padding: 1rem;
  }

  .topbar {
    padding: 0 1rem;
  }

  .card-body,
  .card-head {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  th,
  td {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .support-input-row {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .login-wrap,
  .mhorfine-login-wrap,
  .mhorfine-login-wrap {
    padding: 1rem;
  }

  .login-card,
  .mhorfine-login-card,
  .mhorfine-login-card {
    padding: 2rem 1.25rem 1.45rem;
  }

  .mhorfine-login-mark,
  .mhorfine-login-logo,
  .mhorfine-login-mark,
  .mhorfine-login-logo {
    width: 64px !important;
    height: 64px !important;
  }

  .login-brand h1,
  .mhorfine-login-brand h1,
  .mhorfine-login-brand h1 {
    font-size: 1.48rem;
  }

  .user-chip span:not(.avatar) {
    display: none;
  }
}
