:root {
  --bg: #e8eff7;
  --sidebar: #111827;
  --sidebar-muted: rgba(255, 255, 255, 0.68);
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: #ffffff;
  --border: rgba(12, 68, 124, 0.12);
  --text: #172554;
  --muted: #64748b;
  --primary: #0C447C;
  --accent: #0f766e;
  --shadow: 0 24px 64px rgba(15, 23, 42, 0.1);
  --radius: 26px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(12, 68, 124, 0.16), transparent 26%),
    linear-gradient(135deg, #e8eff7 0%, #f8fafc 100%);
  color: var(--text);
}

.hidden {
  display: none !important;
}

.admin-auth-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.admin-auth-panel {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.admin-auth-panel {
  width: 100%;
  max-width: 560px;
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.admin-auth-card {
  min-height: min(760px, calc(100vh - 48px));
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.admin-auth-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.admin-auth-header h2 {
  margin: 0;
  font-size: 34px;
}

.admin-auth-description {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.admin-login-message {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.04);
  color: var(--muted);
  line-height: 1.75;
  white-space: pre-wrap;
}

.admin-login-message.error {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}

.admin-login-form {
  margin-top: 20px;
  display: grid;
  gap: 15px;
}

.admin-login-form label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

.admin-login-form span {
  color: var(--muted);
  font-size: 13px;
}

.admin-login-form input {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(12, 68, 124, 0.16);
  background: var(--panel-strong);
  padding: 14px 16px;
  font-size: 15px;
  color: var(--text);
}

.admin-login-form input:focus {
  outline: none;
  border-color: rgba(12, 68, 124, 0.4);
  box-shadow: 0 0 0 4px rgba(12, 68, 124, 0.1);
}

.admin-auth-footer {
  margin-top: auto;
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.admin-auth-footer-text {
  color: var(--muted);
  line-height: 1.7;
  max-width: 320px;
}

.admin-auth-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.admin-auth-link:hover {
  text-decoration: underline;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px 1fr;
  transition: grid-template-columns 0.2s ease;
}

.admin-shell.sidebar-compact {
  grid-template-columns: 1px 1fr;
}

.sidebar {
  position: relative;
  overflow: visible;
  background:
    linear-gradient(180deg, rgba(12, 68, 124, 0.22), transparent 22%),
    linear-gradient(180deg, #111827 0%, #0f172a 100%);
  color: #fff;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: padding 0.2s ease, background 0.2s ease;
}

.sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-right: 58px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  padding-left: 16px;
}

.admin-user-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

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

.brand-title {
  font-size: 18px;
  font-weight: 800;
}

.brand-subtitle,
.user-email {
  color: var(--sidebar-muted);
  font-size: 13px;
}

.sidebar-toggle {
  position: absolute;
  top: 18px;
  right: 0;
  width: 32px;
  height: 50px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: rgba(12, 68, 124, 0.42);
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
  flex-shrink: 0;
  z-index: 3;
  padding: 0;
  box-shadow: none;
  transition:
    color 0.2s ease,
    transform 0.2s ease,
    right 0.2s ease;
}

.sidebar-toggle:hover {
  color: rgba(12, 68, 124, 0.62);
}

.sidebar-toggle-icon {
  font-size: 16px;
  line-height: 1;
  display: inline-block;
  transform: scaleY(2.2);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5),
    0 -1px 1px rgba(12, 68, 124, 0.18);
  transition: transform 0.2s ease;
}

.admin-shell.sidebar-compact .sidebar-toggle-icon {
  transform: rotate(180deg) scaleY(2.2);
}

.sidebar-toggle::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 50%;
  right: calc(100% + 8px);
  transform: translateY(-50%);
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0s, visibility 0s;
}

.sidebar-toggle:hover::after,
.sidebar-toggle:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

.admin-user-card {
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  transition: padding 0.2s ease;
}

.user-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  font-size: 18px;
  font-weight: 800;
}

.user-name {
  font-weight: 700;
}

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

.nav-item,
.primary-btn,
.ghost-btn,
.secondary-btn,
.danger-btn {
  border: none;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.nav-item {
  padding: 14px 16px;
  background: transparent;
  color: #fff;
  text-align: left;
  transition: transform 0.2s ease, background 0.2s ease, padding 0.2s ease, font-size 0.2s ease;
}

.nav-item:hover,
.primary-btn:hover,
.ghost-btn:hover,
.secondary-btn:hover,
.danger-btn:hover {
  transform: translateY(-1px);
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.14);
}

.admin-shell.sidebar-compact .sidebar {
  padding: 0;
  gap: 0;
  background: transparent;
}

.admin-shell.sidebar-compact .sidebar::after {
  background: rgba(12, 68, 124, 0.2);
}

.admin-shell.sidebar-compact .sidebar-head {
  padding-right: 0;
}

.admin-shell.sidebar-compact .brand-block,
.admin-shell.sidebar-compact .admin-user-card,
.admin-shell.sidebar-compact .sidebar-nav,
.admin-shell.sidebar-compact .sidebar-footer {
  display: none;
}

.admin-shell.sidebar-compact .sidebar-toggle {
  right: -30px;
  justify-content: flex-start;
  color: var(--sidebar);
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.admin-shell.sidebar-compact .sidebar-toggle:hover {
  color: #0f172a;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.primary-btn,
.ghost-btn,
.secondary-btn,
.danger-btn {
  padding: 13px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), #1D9E75);
  color: #fff;
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.admin-light-btn {
  background: rgba(12, 68, 124, 0.08);
  color: var(--primary);
}

.warning-btn {
  background: rgba(217, 119, 6, 0.1);
  color: #b45309;
}
.warning-btn:hover {
  background: rgba(217, 119, 6, 0.2);
}

.secondary-btn {
  background: rgba(12, 68, 124, 0.1);
  color: var(--primary);
}

.danger-btn {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.danger-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.content {
  padding: 28px;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.page-kicker {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.content-header h1 {
  margin: 0;
  font-size: 36px;
  line-height: 1.05;
}

.page-desc {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.status-badge,
.panel-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(12, 68, 124, 0.1);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.page-section {
  display: none;
}

.page-section.active {
  display: block;
}

.stats-grid,
.panel-grid,
.feature-grid {
  display: grid;
  gap: 16px;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 20px;
}

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

.panel-grid {
  grid-template-columns: 1.35fr 0.85fr;
}

.stat-card,
.panel,
.section-card,
.feature-card,
.role-stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 20px;
}

.empty-placeholder {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
}

.stat-value {
  margin-top: 10px;
  font-size: 34px;
  font-weight: 800;
}

.panel,
.section-card {
  padding: 22px;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -6px 0 18px;
}

.subtab-btn {
  border: 1px solid rgba(12, 68, 124, 0.14);
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.subtab-btn:hover {
  border-color: rgba(12, 68, 124, 0.35);
  color: var(--primary);
}

.subtab-btn.active {
  background: rgba(12, 68, 124, 0.12);
  border-color: rgba(12, 68, 124, 0.34);
  color: var(--primary);
}

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

.toolbar-select-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(12, 68, 124, 0.16);
  border-radius: 16px;
  background: #ffffff;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.toolbar-select-field span {
  color: var(--muted);
  white-space: nowrap;
}

.toolbar-select-field select {
  min-width: 180px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  padding: 0;
  outline: none;
  cursor: pointer;
}

.results-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.results-pagination-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.results-pagination-actions .toolbar-select-field {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 14px;
}

.results-pagination-actions .toolbar-select-field select {
  min-width: 84px;
}

.results-export-card {
  margin: 0 0 18px;
  padding: 18px 20px;
  border: 1px solid rgba(12, 68, 124, 0.12);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(12, 68, 124, 0.04), rgba(255, 255, 255, 0.95));
}

.results-export-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
}

.results-export-head h3 {
  margin: 0;
  font-size: 18px;
}

.results-select-btn {
  min-width: 76px;
  padding: 7px 10px;
  border: 1px solid rgba(12, 68, 124, 0.18);
  border-radius: 12px;
  background: rgba(12, 68, 124, 0.06);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.results-select-btn:hover {
  border-color: rgba(12, 68, 124, 0.34);
  background: rgba(12, 68, 124, 0.12);
}

.results-select-btn.active {
  border-color: rgba(15, 118, 110, 0.28);
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent);
}

.results-select-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted);
}

.results-export-head p {
  margin: 6px 0 0;
  max-width: 720px;
}

.employee-actions {
  align-items: flex-end;
}

.modal-actions {
  margin: 16px 0 12px;
}

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

.panel-head h2,
.section-card h2 {
  margin: 0;
  font-size: 22px;
}

.section-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.panel-grid-organization {
  grid-template-columns: 0.86fr 1.14fr;
}

.org-tabbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.ops-tabbar {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.org-tab-btn {
  border: 1px solid rgba(12, 68, 124, 0.14);
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ops-tab-btn {
  border: 1px solid rgba(12, 68, 124, 0.14);
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s ease;
}

.org-tab-btn:hover {
  border-color: rgba(12, 68, 124, 0.35);
  color: var(--primary);
}

.ops-tab-btn:hover {
  border-color: rgba(12, 68, 124, 0.35);
  color: var(--primary);
}

.org-tab-btn.active {
  background: rgba(12, 68, 124, 0.12);
  border-color: rgba(12, 68, 124, 0.34);
  color: var(--primary);
}

.ops-tab-btn.active {
  background: rgba(12, 68, 124, 0.12);
  border-color: rgba(12, 68, 124, 0.34);
  color: var(--primary);
}

.org-tab-panel {
  display: none;
}

.ops-tab-panel {
  display: none;
}

.org-tab-panel.active {
  display: block;
}

.ops-tab-panel.active {
  display: block;
}

.module-list,
.role-stats {
  display: grid;
  gap: 12px;
}

.module-item,
.role-stat-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--panel-strong);
  border: 1px solid rgba(12, 68, 124, 0.1);
}

.module-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.module-name {
  font-weight: 800;
}

.module-status {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.module-desc {
  color: var(--muted);
  line-height: 1.7;
}

.feature-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.feature-card {
  padding: 18px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  min-height: 88px;
  font-weight: 700;
  background: var(--panel-strong);
}

.role-stat-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px;
}

.role-stat-label {
  color: var(--muted);
}

.role-stat-value {
  font-size: 24px;
  font-weight: 800;
}

.admin-form {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(12, 68, 124, 0.04);
  border: 1px solid rgba(12, 68, 124, 0.1);
  margin-bottom: 18px;
}

.import-hint,
.import-result {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  line-height: 1.7;
}

.import-hint {
  background: rgba(12, 68, 124, 0.06);
  border: 1px solid rgba(12, 68, 124, 0.12);
  color: var(--muted);
}

.import-result {
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.16);
  color: #115e59;
  white-space: pre-wrap;
}

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

.admin-form label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}

.admin-form span {
  color: var(--muted);
  font-size: 13px;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  color: var(--text);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
}

.admin-form textarea {
  resize: vertical;
  min-height: 96px;
}

.multi-select {
  position: relative;
}

.multi-select-trigger {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  color: var(--text);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}

.multi-select-trigger.placeholder .multi-select-value {
  color: var(--muted);
}

.multi-select-value {
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.multi-select-arrow {
  color: var(--muted);
  font-size: 12px;
  transition: transform 0.2s ease;
}

.multi-select.open .multi-select-arrow {
  transform: rotate(180deg);
}

.multi-select-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 240px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.multi-select-option {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}

.multi-select-option:hover {
  background: rgba(12, 68, 124, 0.06);
}

.multi-select-option.selected {
  background: rgba(12, 68, 124, 0.08);
  color: var(--primary);
  font-weight: 700;
}

.multi-select-option-label {
  flex: 1;
  min-width: 0;
}

.multi-select-check {
  width: 18px;
  text-align: center;
  color: var(--primary);
  font-weight: 800;
}

.multi-select-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
}

.form-grid-span-2 {
  grid-column: span 2;
}

.toggle-field {
  margin-top: 14px;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.toggle-field input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.toggle-field span {
  color: var(--text);
  font-size: 14px;
}

.form-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}

.form-actions.split-actions {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.cycle-form-hint {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(12, 68, 124, 0.06);
  border: 1px solid rgba(12, 68, 124, 0.12);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.table-wrap {
  overflow: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(12, 68, 124, 0.1);
  background: #fff;
}

.table-wrap.compact {
  max-height: 340px;
}

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

.data-table th,
.data-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  font-size: 14px;
  vertical-align: top;
}

.data-table th {
  background: rgba(12, 68, 124, 0.04);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.table-role-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.table-role-editor label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.table-role-editor input {
  margin: 0;
}

.table-actions {
  display: flex;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.tag.pending {
  background: rgba(217, 119, 6, 0.1);
  color: #b45309;
}

.tag.disabled {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}

.muted-text {
  color: var(--muted);
  font-size: 13px;
}

.floating-message {
  position: fixed;
  right: 24px;
  bottom: 24px;
  min-width: 220px;
  max-width: 420px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.24s ease;
}

.floating-message.show {
  opacity: 1;
  transform: translateY(0);
}

.floating-message.error {
  background: rgba(185, 28, 28, 0.92);
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 260;
}

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

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.modal-card {
  position: relative;
  width: min(520px, 92vw);
  background: var(--panel-strong);
  border-radius: var(--radius-md);
  border: 1px solid rgba(12, 68, 124, 0.12);
  box-shadow: var(--shadow);
  padding: 18px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-head h3 {
  margin: 0;
  font-size: 16px;
}

@media (max-width: 1100px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .panel-grid,
  .feature-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .admin-auth-layout {
    padding: 16px;
  }

  .admin-auth-card,
  .content,
  .sidebar {
    padding: 18px;
  }

  .admin-auth-header,
  .admin-auth-footer,
  .content-header {
    flex-direction: column;
  }
}
