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

[hidden] {
  display: none !important;
}

:root {
  --bg-start: #f8f9fa;
  --bg-end: #e9ecef;
  --surface: rgba(255, 255, 255, 0.85);
  --surface-border: rgba(0, 0, 0, 0.08);
  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --text-muted: #adadb2;
  --border: rgba(0, 0, 0, 0.1);
  --accent: #007aff;
  --accent-hover: #0056b3;
  --accent-bg: rgba(0, 122, 255, 0.06);
  --accent-border: rgba(0, 122, 255, 0.2);
  --success: #34c759;
  --success-bg: rgba(52, 199, 89, 0.08);
  --success-border: rgba(52, 199, 89, 0.25);
  --error: #ff3b30;
  --error-bg: rgba(255, 59, 48, 0.08);
  --error-border: rgba(255, 59, 48, 0.2);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.08);
  --blur: 20px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body[data-theme="dark"] {
  --bg-start: #0f0f10;
  --bg-end: #000000;
  --surface: rgba(22, 22, 23, 0.8);
  --surface-border: rgba(255, 255, 255, 0.08);
  --text-primary: #f5f5f7;
  --text-secondary: #98989d;
  --text-muted: #636366;
  --border: rgba(255, 255, 255, 0.12);
  --accent: #0a84ff;
  --accent-hover: #409cff;
  --accent-bg: rgba(10, 132, 255, 0.12);
  --accent-border: rgba(10, 132, 255, 0.3);
  --success: #30d158;
  --success-bg: rgba(48, 209, 88, 0.12);
  --success-border: rgba(48, 209, 88, 0.35);
  --error: #ff453a;
  --error-bg: rgba(255, 69, 58, 0.12);
  --error-border: rgba(255, 69, 58, 0.35);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: radial-gradient(circle at 50% 0%, var(--bg-start) 0%, var(--bg-end) 100%) no-repeat;
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Page Layout */
.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px 40px;
}

.container {
  width: 100%;
  max-width: 480px;
  opacity: 0;
  transform: translateY(15px);
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 32px;
}

.header-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.header-icon svg {
  width: 32px;
  height: 32px;
}

.header:hover .header-icon {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.2);
}

.header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Glassmorphic Card */
.card {
  background: var(--surface);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  transition: var(--transition);
}

/* Forms */
.field {
  margin-bottom: 24px;
}

.field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

/* Custom File Upload Card */
.file-upload-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.015);
  cursor: pointer;
  overflow: hidden;
  transition: var(--transition);
}

body[data-theme="dark"] .file-upload-card {
  background: rgba(255, 255, 255, 0.015);
}

.file-upload-card:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.file-upload-card:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-bg);
  outline: none;
}

.file-upload-card input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-upload-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--border);
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: var(--transition);
}

.file-upload-card:hover .file-upload-icon {
  background: var(--accent);
  color: #ffffff;
}

.file-upload-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.file-upload-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: var(--transition);
}

.file-upload-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* File selected state */
.file-upload-card.has-file {
  border-style: solid;
  border-color: var(--success);
  background: var(--success-bg);
}

.file-upload-card.has-file .file-upload-icon {
  background: var(--success);
  color: #ffffff;
}

.file-upload-card.has-file .file-upload-title {
  color: var(--text-primary);
}

/* Password Input */
.input-text-wrapper {
  position: relative;
}

.field input[type="text"],
.field input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.02);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

body[data-theme="dark"] .field input[type="text"],
body[data-theme="dark"] .field input[type="password"] {
  background: rgba(255, 255, 255, 0.02);
}

.field input[type="text"]:focus,
.field input[type="password"]:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-bg);
}

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

/* Buttons */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 28px;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent) 0%, #0056b3 100%);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.25);
  transition: var(--transition);
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 122, 255, 0.35);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent) 0%, #0056b3 100%);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.25);
  transition: var(--transition);
}

.btn-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 122, 255, 0.35);
}

.btn-secondary {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-secondary);
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.02);
}

body[data-theme="dark"] .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Advanced Accordion */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

.advanced-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 4px 0;
  background: none;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.advanced-toggle:hover {
  color: var(--text-primary);
}

.advanced-toggle .chevron {
  display: flex;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.advanced-toggle[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

/* Smooth Accordion Height Animation */
.advanced-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.advanced-wrapper.expanded {
  grid-template-rows: 1fr;
}

.advanced-inner {
  overflow: hidden;
  min-height: 0;
}

.advanced-container {
  padding-top: 20px;
}

/* Custom styled Interactive Checkboxes */
.checkbox-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 16px;
}

@media (min-width: 400px) {
  .checkbox-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.01);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}

body[data-theme="dark"] .checkbox-item {
  background: rgba(255, 255, 255, 0.01);
}

.checkbox-item:hover {
  border-color: var(--text-secondary);
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 4px;
}

.checkbox-item:has(input[type="checkbox"]:checked) {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--accent);
}

/* Float Theme Toggle */
.toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--surface);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--surface-border);
  border-radius: 50%;
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  z-index: 999;
  transition: var(--transition);
}

.toggle:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.toggle svg {
  width: 20px;
  height: 20px;
}

/* Modal Overlay & Card with Transitions */
.overlay {
  display: flex;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  text-align: center;
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.overlay.show .modal {
  transform: scale(1);
}

.modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.modal.success .modal-icon {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
}

.modal.error .modal-icon {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error);
}

.modal h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.modal p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.45;
}

.modal p.error {
  color: var(--error);
}

.modal p.success {
  color: var(--success);
}

/* Install View Styles */
.install-info {
  text-align: center;
}

.install-info h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.install-meta {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  display: inline-block;
}

body[data-theme="dark"] .install-meta {
  background: rgba(255, 255, 255, 0.02);
}

.install-meta b {
  color: var(--text-primary);
  font-weight: 600;
}

.install-info .btn-link {
  margin-top: 24px;
}

/* Authentication and dashboard */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding: 0 4px;
}

.brand-link {
  color: var(--text-primary);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.02em;
}

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

.nav-link {
  color: var(--text-secondary);
  font-size: 0.88rem;
  text-decoration: none;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--accent);
}

.nav-button {
  padding: 0;
  font-family: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.auth-container {
  max-width: 520px;
}

.auth-card {
  padding: 32px;
}

.auth-heading {
  text-align: center;
}

.admin-login-card .auth-heading {
  margin-bottom: 28px;
}

.auth-heading .header-icon {
  margin-bottom: 16px;
}

.auth-heading h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.auth-heading p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 28px 0;
  padding: 4px;
  border-radius: var(--radius-md);
  background: var(--accent-bg);
}

.auth-tab {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-secondary);
  text-align: center;
  text-decoration: none;
  transition: var(--transition);
}

.auth-tab.active,
.auth-tab:hover {
  color: var(--accent);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.text-input {
  width: 100%;
  padding: 13px 14px;
  color: var(--text-primary);
  font: inherit;
  background: rgba(0, 0, 0, 0.02);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

body[data-theme="dark"] .text-input {
  background: rgba(255, 255, 255, 0.03);
}

.text-input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-bg);
}

.field-hint,
.auth-note,
.muted,
.table-subtext {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.field-hint {
  margin-top: 6px;
}

.auth-note {
  margin-top: 20px;
  line-height: 1.5;
  text-align: center;
}

.auth-note code {
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--accent-bg);
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.notice {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  background: var(--accent-bg);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.notice strong {
  color: var(--text-primary);
}

.notice-warning {
  border-color: var(--error-border);
  background: var(--error-bg);
}

.notice-warning strong {
  color: var(--error);
}

.notice-info {
  border-color: var(--accent-border);
  background: var(--accent-bg);
}

.compact-link {
  width: auto;
  margin-top: 8px;
  padding: 9px 14px;
  font-size: 0.88rem;
}

.form-message {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.form-message.error {
  color: var(--error);
  background: var(--error-bg);
}

.form-message.success {
  color: var(--success);
  background: var(--success-bg);
}

.page-top {
  align-items: flex-start;
  padding-top: 28px;
}

.wide-container {
  max-width: 1080px;
}

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

.dashboard-header h1 {
  margin: 2px 0 6px;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  letter-spacing: -0.04em;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.role-badge {
  flex-shrink: 0;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-bg);
  font-size: 0.82rem;
  font-weight: 700;
}

.role-admin {
  color: var(--error);
  background: var(--error-bg);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
  gap: 20px;
  align-items: start;
}

.dashboard-card {
  margin-bottom: 20px;
  padding: 26px;
}

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

.section-heading h2 {
  margin-bottom: 4px;
  font-size: 1.15rem;
}

.small-button {
  width: auto;
  margin: 0;
  padding: 8px 12px;
  font-size: 0.85rem;
}

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

.account-form .field {
  margin-bottom: 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.status-success {
  color: var(--success);
  font-weight: 700;
}

.status-failed {
  color: var(--error);
  font-weight: 700;
}

.status-processing {
  color: var(--accent);
  font-weight: 700;
}

.table-link,
.table-action {
  color: var(--accent);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.table-action {
  padding: 0;
  background: none;
  border: 0;
}

.table-link:hover,
.table-action:hover {
  text-decoration: underline;
}

.empty-state {
  padding: 22px 0 2px;
  color: var(--text-secondary);
  text-align: center;
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .dashboard-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-header {
    flex-direction: column;
  }

  .dashboard-card {
    padding: 20px;
  }
}

@media (max-width: 520px) {
  .top-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-actions {
    justify-content: flex-start;
  }

  .card,
  .auth-card {
    padding: 22px;
  }
}

/* Administrator dashboard shell */
.admin-shell {
  --admin-ink: #202a35;
  --admin-muted: #73808c;
  --admin-line: #e3e8eb;
  --admin-canvas: #f3f6f6;
  --admin-panel: #ffffff;
  min-height: 100vh;
  background: var(--admin-canvas);
  color: var(--admin-ink);
}

.admin-shell[data-theme="dark"] {
  --admin-ink: #e8eef0;
  --admin-muted: #9ca9ae;
  --admin-line: #343e43;
  --admin-canvas: #171d20;
  --admin-panel: #222a2e;
}

.admin-layout {
  min-height: 100vh;
}

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  width: 248px;
  flex-direction: column;
  padding: 24px 16px 14px;
  color: #dce5e7;
  background: #202c31;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 8px 38px;
  color: #f5f8f8;
  text-decoration: none;
}

.admin-brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: #102e2b;
  background: #91d4c1;
  font-size: 12px;
  font-weight: 800;
}

.admin-brand strong,
.admin-brand small,
.admin-account-copy strong,
.admin-account-copy small {
  display: block;
}

.admin-brand strong { font-size: 14px; }
.admin-brand small { margin-top: 2px; color: #9aaaae; font-size: 11px; }
.admin-nav-label { margin: 0 12px 10px; color: #91a1a6; font-size: 10px; font-weight: 700; }
.admin-nav-label-spaced { margin-top: 30px; }
.admin-nav { display: grid; gap: 4px; }

.admin-nav-link {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-radius: 6px;
  color: #bdc9cc;
  font-size: 13px;
  text-decoration: none;
  transition: background-color 140ms ease, color 140ms ease;
}

.admin-nav-link:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.admin-nav-link.active { color: #f2fffb; background: #34524f; box-shadow: inset 3px 0 #91d4c1; }
.admin-nav-link svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.admin-nav-count { margin-left: auto; padding: 2px 7px; border-radius: 10px; color: #d8e7e4; background: rgba(255, 255, 255, 0.11); font-size: 10px; font-variant-numeric: tabular-nums; }

.admin-sidebar-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 14px 4px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-account-avatar { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #143b37; background: #adddce; font-size: 12px; font-weight: 800; }
.admin-account-copy { min-width: 0; flex: 1; }
.admin-account-copy strong { overflow: hidden; color: #eef3f4; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.admin-account-copy small { margin-top: 3px; color: #9aaaae; font-size: 10px; }

.admin-logout,
.admin-icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.admin-logout:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.admin-logout svg, .admin-icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.admin-main { min-width: 0; min-height: 100vh; margin-left: 248px; }

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 34px;
  border-bottom: 1px solid var(--admin-line);
  background: var(--admin-panel);
}

.admin-topbar-left, .admin-topbar-actions { display: flex; align-items: center; gap: 14px; }
.admin-breadcrumb { display: flex; align-items: center; gap: 10px; color: var(--admin-muted); font-size: 12px; }
.admin-breadcrumb b { color: #a8b2b6; font-weight: 400; }
.admin-breadcrumb strong { color: var(--admin-ink); font-weight: 600; }
.admin-top-link { color: var(--admin-muted); font-size: 12px; text-decoration: none; }
.admin-top-link:hover { color: var(--accent); }
.admin-primary-link { padding: 8px 11px; border-radius: 5px; color: #fff; background: #226e66; }
.admin-primary-link:hover { color: #fff; background: #195b54; }
.admin-theme-toggle { border-color: var(--admin-line); color: var(--admin-muted); }
.admin-theme-toggle:hover, .admin-icon-button:hover { color: var(--admin-ink); background: var(--admin-canvas); }
.admin-menu-toggle { display: none; color: var(--admin-ink); }

.admin-content { width: min(100%, 1440px); margin: 0 auto; padding: 32px 34px 60px; }
.admin-overview, .admin-panel { scroll-margin-top: 84px; }
.admin-page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.admin-page-heading h1 { margin: 4px 0 5px; color: var(--admin-ink); font-size: 25px; font-weight: 700; }
.admin-page-heading .muted { color: var(--admin-muted); font-size: 12px; }
.admin-page-heading .eyebrow { color: #257a70; font-size: 10px; letter-spacing: 0; }
.admin-shell .role-badge { border-radius: 5px; color: #276e64; background: #e1f2ed; font-size: 11px; }
.admin-shell[data-theme="dark"] .role-badge { color: #a9ddd0; background: #29413c; }

.admin-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.admin-stat { position: relative; min-height: 122px; padding: 17px 18px; overflow: hidden; border: 1px solid var(--admin-line); border-radius: 7px; background: var(--admin-panel); }
.admin-stat-label { display: block; color: var(--admin-muted); font-size: 11px; }
.admin-stat > strong { display: block; margin: 10px 0 6px; color: var(--admin-ink); font-size: 26px; font-variant-numeric: tabular-nums; line-height: 1; }
.admin-stat > small { color: var(--admin-muted); font-size: 10px; }
.stat-dot { display: inline-block; width: 6px; height: 6px; margin: 0 5px 1px 0; border-radius: 50%; background: #43a994; }
.admin-stat-icon { position: absolute; top: 15px; right: 15px; display: grid; width: 32px; height: 32px; place-items: center; border-radius: 6px; }
.admin-stat-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.stat-icon-teal { color: #268274; background: #e2f3ee; }
.stat-icon-blue { color: #477cb6; background: #eaf1fa; }
.stat-icon-green { color: #388d61; background: #e7f4e9; }
.stat-icon-violet { color: #8267a7; background: #f0ebf6; }
.admin-shell[data-theme="dark"] .stat-icon-teal { background: #29413c; }
.admin-shell[data-theme="dark"] .stat-icon-blue { background: #293a4d; }
.admin-shell[data-theme="dark"] .stat-icon-green { background: #2c4435; }
.admin-shell[data-theme="dark"] .stat-icon-violet { background: #40374d; }

.admin-shell .notice { margin-bottom: 20px; border-radius: 6px; }
.admin-shell .dashboard-card { margin-bottom: 18px; padding: 20px; border: 1px solid var(--admin-line); border-radius: 7px; background: var(--admin-panel); box-shadow: none; }
.admin-shell .section-heading { align-items: center; margin-bottom: 15px; }
.admin-shell .section-heading h2 { color: var(--admin-ink); font-size: 14px; }
.admin-shell .section-heading .muted { color: var(--admin-muted); font-size: 11px; }
.admin-shell .table-wrap { border-color: var(--admin-line); border-radius: 5px; }
.admin-shell .data-table { color: var(--admin-ink); font-size: 11px; }
.admin-shell .data-table th, .admin-shell .data-table td { padding: 11px 12px; border-color: var(--admin-line); }
.admin-shell .data-table th { color: var(--admin-muted); font-size: 10px; letter-spacing: 0; }
.admin-shell .data-table tbody tr:hover { background: color-mix(in srgb, var(--admin-canvas) 65%, transparent); }
.admin-shell .table-action, .admin-shell .table-link { font-size: 11px; }
.admin-shell .small-button { min-height: 32px; padding: 6px 10px; border: 1px solid var(--admin-line); border-radius: 5px; color: var(--admin-muted); font-size: 11px; }
.admin-shell .form-grid { gap: 14px; }
.admin-shell .field { margin-bottom: 16px; }
.admin-shell .field-label { color: var(--admin-muted); font-size: 10px; letter-spacing: 0; text-transform: none; }
.admin-shell .text-input { border-color: var(--admin-line); border-radius: 5px; background: var(--admin-canvas); font-size: 12px; }
.admin-shell .btn { width: auto; min-height: 36px; margin-top: 8px; padding: 8px 14px; border-radius: 5px; background: #226e66; box-shadow: none; font-size: 12px; }
.admin-shell .btn:hover:not(:disabled) { background: #195b54; box-shadow: none; transform: none; }
.admin-scrim { display: none; }

.user-shell .admin-brand-mark { color: #143b37; background: #adddce; }
.user-shell .user-account-avatar { color: #143b37; background: #adddce; }
.user-shell .user-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.user-shell .user-stat-text { max-width: calc(100% - 36px); overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.user-shell .user-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.8fr); gap: 14px; align-items: start; }
.user-shell .user-dashboard-grid .dashboard-card { min-width: 0; }

/* User distribution workspace redesign */
.user-shell {
  --user-navy: #111c2d;
  --user-navy-2: #17263b;
  --user-blue: #2864d7;
  --user-blue-soft: #eaf1ff;
  --user-green: #17956b;
  --user-amber: #c47b17;
  --user-shadow: 0 14px 34px rgba(24, 48, 84, 0.07);
  --user-radius: 14px;
  background: #f5f7fb;
}
.user-shell[data-theme="dark"] { --user-shadow: 0 16px 34px rgba(0, 0, 0, 0.18); background: #141b28; }
.user-shell .admin-sidebar { width: 264px; padding: 26px 17px 14px; background: var(--user-navy); }
.user-shell .admin-brand { margin: 0 9px 38px; }
.user-shell .admin-brand-mark { border-radius: 11px; color: #fff; background: #2e6ee5; box-shadow: 0 7px 18px rgba(46, 110, 229, .28); }
.user-shell .admin-brand small { color: #8ea2bf; }
.user-shell .admin-nav-label { color: #7488a5; letter-spacing: .08em; text-transform: uppercase; }
.user-shell .admin-nav-link { position: relative; min-height: 44px; border-radius: 9px; color: #9aabc3; }
.user-shell .admin-nav-link:hover { color: #eaf1ff; background: rgba(255,255,255,.07); }
.user-shell .admin-nav-link.active { color: #fff; background: #233b5e; box-shadow: inset 3px 0 #55a2ff; }
.user-shell .admin-nav-link.active svg { color: #7db9ff; }
.user-shell .admin-nav-link svg { width: 18px; height: 18px; }
.user-shell .user-nav-tag { margin-left: auto; padding: 3px 6px; border: 1px solid rgba(159, 183, 216, .18); border-radius: 5px; color: #7890b1; font-size: 9px; line-height: 1; }
.user-shell .user-sidebar-bottom { margin-top: auto; padding: 15px 9px 12px; border-top: 1px solid rgba(255,255,255,.1); }
.user-shell .user-balance-mini { padding: 13px 13px 12px; border: 1px solid rgba(139, 178, 238, .16); border-radius: 10px; background: rgba(255,255,255,.055); }
.user-shell .user-balance-mini span, .user-shell .user-balance-mini a { display: block; color: #849bb9; font-size: 10px; }
.user-shell .user-balance-mini strong { display: block; margin: 5px 0 8px; color: #f5f9ff; font-size: 20px; font-variant-numeric: tabular-nums; }
.user-shell .user-balance-mini a { color: #8fc3ff; text-decoration: none; }
.user-shell .user-balance-mini a:hover { color: #fff; }
.user-shell .admin-sidebar-bottom { margin-top: 0; border-top: 0; padding-top: 6px; }
.user-shell .user-account-avatar { color: #0e3a73; background: #add4ff; }
.user-shell .admin-main { margin-left: 264px; }
.user-shell .admin-topbar { min-height: 70px; padding-right: 38px; padding-left: 38px; background: rgba(255,255,255,.94); }
.user-shell[data-theme="dark"] .admin-topbar { background: rgba(28, 37, 52, .94); }
.user-shell .admin-breadcrumb { font-size: 12px; }
.user-shell .user-topbar-actions { display: flex; align-items: center; gap: 20px; }
.user-shell .user-top-balance { display: flex; align-items: baseline; gap: 8px; color: var(--admin-muted); font-size: 11px; }
.user-shell .user-top-balance strong { color: var(--admin-ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.user-shell .user-top-link { color: var(--admin-muted); font-size: 12px; text-decoration: none; }
.user-shell .user-top-link:hover { color: var(--user-blue); }
.user-shell .admin-primary-link { background: var(--user-blue); }
.user-shell .admin-primary-link:hover { background: #1e53b9; }
.user-shell .admin-content { width: min(100%, 1480px); padding: 42px 38px 68px; }
.user-shell .user-content { min-height: calc(100vh - 70px); }
.user-shell .user-welcome-row, .user-shell .user-page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 30px; }
.user-shell .user-welcome-row h1, .user-shell .user-page-heading h1 { margin: 7px 0 7px; color: var(--admin-ink); font-size: clamp(26px, 3vw, 34px); letter-spacing: -.035em; }
.user-shell .user-welcome-copy, .user-shell .user-page-heading p { margin: 0; color: var(--admin-muted); font-size: 13px; }
.user-shell .user-welcome-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.user-shell .user-button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 7px; padding: 0 15px; border: 1px solid transparent; border-radius: 8px; font-size: 12px; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease; }
.user-shell .user-button:hover:not(:disabled) { transform: translateY(-1px); }
.user-shell .user-button:disabled { cursor: not-allowed; opacity: .55; }
.user-shell .user-button-primary { color: #fff; background: var(--user-blue); box-shadow: 0 8px 16px rgba(40, 100, 215, .18); }
.user-shell .user-button-primary:hover:not(:disabled) { color: #fff; background: #1f55bb; box-shadow: 0 10px 20px rgba(40, 100, 215, .24); }
.user-shell .user-button-secondary { border-color: var(--admin-line); color: var(--admin-ink); background: var(--admin-panel); }
.user-shell .user-button-secondary:hover:not(:disabled) { color: var(--user-blue); border-color: #a9c3ef; background: var(--user-blue-soft); }
.user-shell .user-button-light { color: var(--user-navy); background: #fff; }
.user-shell .user-overview-grid { display: grid; grid-template-columns: minmax(250px, .82fr) minmax(0, 1.68fr); gap: 16px; margin-bottom: 30px; }
.user-shell .user-balance-card { position: relative; min-height: 196px; overflow: hidden; padding: 25px 25px 21px; border-radius: var(--user-radius); color: #fff; background: linear-gradient(135deg, #152743 0%, #1f4c82 100%); box-shadow: var(--user-shadow); }
.user-shell .user-balance-card-top { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 12px; color: #b5cae6; font-size: 11px; }
.user-shell .user-live-dot { color: #8be7bd; }
.user-shell .user-live-dot::before { display: inline-block; width: 6px; height: 6px; margin: 0 5px 1px 0; border-radius: 50%; background: #4ed493; content: ''; }
.user-shell .user-balance-card > strong { position: relative; z-index: 1; display: block; margin: 23px 0 7px; font-size: 35px; font-weight: 700; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.user-shell .user-balance-card p { position: relative; z-index: 1; margin: 0; color: #a4bbd8; font-size: 11px; }
.user-shell .user-balance-action { position: relative; z-index: 1; display: inline-flex; gap: 8px; margin-top: 18px; color: #cce2ff; font-size: 11px; text-decoration: none; }
.user-shell .user-balance-action:hover { color: #fff; }
.user-shell .user-balance-decoration { position: absolute; right: -33px; bottom: -57px; width: 170px; height: 170px; border: 1px solid rgba(167, 212, 255, .25); border-radius: 50%; box-shadow: 0 0 0 22px rgba(167, 212, 255, .04), 0 0 0 45px rgba(167, 212, 255, .03); }
.user-shell .user-metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.user-shell .user-metric-card { position: relative; min-height: 90px; padding: 17px 18px 13px 61px; border: 1px solid var(--admin-line); border-radius: var(--user-radius); background: var(--admin-panel); box-shadow: var(--user-shadow); }
.user-shell .user-metric-card > span:not(.user-metric-icon) { display: block; color: var(--admin-muted); font-size: 11px; }
.user-shell .user-metric-card > strong { display: block; margin: 8px 0 4px; color: var(--admin-ink); font-size: 25px; line-height: 1; font-variant-numeric: tabular-nums; }
.user-shell .user-metric-card > small { color: var(--admin-muted); font-size: 10px; }
.user-shell .user-metric-icon { position: absolute; top: 17px; left: 18px; display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; }
.user-shell .user-metric-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.user-shell .icon-blue { color: #2870db; background: #eaf1ff; }.user-shell .icon-green { color: #16865f; background: #e5f6ee; }.user-shell .icon-amber { color: #b96c10; background: #fff2dc; }.user-shell .icon-slate { color: #65758f; background: #edf1f6; }
.user-shell .user-section-title { margin-bottom: 13px; }.user-shell .user-section-kicker { color: var(--user-blue); font-size: 9px; font-weight: 800; letter-spacing: .12em; }.user-shell .user-section-title h2 { margin: 5px 0 0; color: var(--admin-ink); font-size: 16px; }
.user-shell .user-quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 30px; }
.user-shell .user-quick-card { display: flex; min-height: 80px; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--admin-line); border-radius: 11px; background: var(--admin-panel); box-shadow: var(--user-shadow); color: var(--admin-ink); text-decoration: none; transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease; }
.user-shell .user-quick-card:hover { border-color: #a9c3ef; box-shadow: 0 14px 26px rgba(40, 100, 215, .1); transform: translateY(-2px); }
.user-shell .user-quick-icon { display: grid; width: 37px; height: 37px; flex: 0 0 auto; place-items: center; border-radius: 10px; }.user-shell .user-quick-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }.user-shell .quick-sign .user-quick-icon { color: #2870db; background: #eaf1ff; }.user-shell .quick-cert .user-quick-icon { color: #17855e; background: #e4f6ec; }.user-shell .quick-project .user-quick-icon { color: #a56612; background: #fff1d9; }
.user-shell .user-quick-card span:nth-child(2) { min-width: 0; }.user-shell .user-quick-card strong, .user-shell .user-quick-card small { display: block; }.user-shell .user-quick-card strong { margin-bottom: 5px; font-size: 12px; }.user-shell .user-quick-card small { overflow: hidden; color: var(--admin-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.user-shell .user-quick-card > b { margin-left: auto; color: #9ba9b9; font-size: 15px; font-weight: 500; }
.user-shell .user-overview-panels { grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr); }.user-shell .user-panel-card { min-width: 0; padding: 21px; border: 1px solid var(--admin-line); border-radius: var(--user-radius); background: var(--admin-panel); box-shadow: var(--user-shadow); }.user-shell .user-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 18px; }.user-shell .user-panel-heading h2 { margin: 5px 0 3px; color: var(--admin-ink); font-size: 15px; }.user-shell .user-panel-heading p { margin: 0; color: var(--admin-muted); font-size: 11px; }.user-shell .user-panel-heading a { flex: 0 0 auto; color: var(--user-blue); font-size: 11px; text-decoration: none; }.user-shell .user-panel-heading a:hover { text-decoration: underline; }
.user-shell .user-table-wrap { border-color: var(--admin-line); border-radius: 8px; }.user-shell .user-data-table { min-width: 580px; color: var(--admin-ink); font-size: 11px; }.user-shell .user-data-table th, .user-shell .user-data-table td { padding: 12px 11px; border-color: var(--admin-line); }.user-shell .user-data-table th { color: var(--admin-muted); font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }.user-shell .user-data-table tbody tr:hover { background: rgba(40, 100, 215, .035); }.user-shell .user-app-cell { font-weight: 700; }.user-shell .user-app-cell small { color: var(--admin-muted); font-size: 9px; font-weight: 400; }.user-shell .user-status { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; white-space: nowrap; }.user-shell .user-status i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }.user-shell .user-status.success { color: var(--user-green); }.user-shell .user-status.failed { color: #d34c4c; }.user-shell .user-status.processing { color: var(--user-amber); }.user-shell .user-status.refunded { color: #708096; }.user-shell .user-table-link { color: var(--user-blue); text-decoration: none; white-space: nowrap; }.user-shell .user-table-link:hover { text-decoration: underline; }.user-shell .user-text-button { margin-top: 13px; padding: 0; border: 0; color: var(--user-blue); background: none; font-size: 11px; cursor: pointer; }.user-shell .user-text-button:hover { text-decoration: underline; }
.user-shell .user-account-row { display: flex; justify-content: space-between; gap: 15px; padding: 12px 0; border-bottom: 1px solid var(--admin-line); }.user-shell .user-account-row span { color: var(--admin-muted); font-size: 11px; }.user-shell .user-account-row strong { max-width: 62%; overflow: hidden; color: var(--admin-ink); font-size: 11px; font-weight: 600; text-align: right; text-overflow: ellipsis; white-space: nowrap; }.user-shell .account-active { color: var(--user-green) !important; }.user-shell .account-frozen { color: #d34c4c !important; }.user-shell .user-account-notice, .user-shell .user-note-card { display: flex; gap: 8px; margin-top: 18px; padding: 12px; border-radius: 8px; color: var(--admin-muted); background: var(--user-blue-soft); font-size: 10px; line-height: 1.55; }.user-shell .notice-mark { display: grid; width: 15px; height: 15px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; background: var(--user-blue); font-size: 10px; font-weight: 800; }.user-shell .user-footer { margin-top: 24px; color: var(--admin-muted); font-size: 10px; text-align: center; }
.user-shell .user-page-heading { align-items: flex-start; }.user-shell .user-page-heading h1 { margin-top: 5px; }.user-shell .user-view[hidden] { display: none; }.user-shell .user-full-panel { margin-bottom: 18px; }.user-shell .user-feature-empty { display: flex; min-height: 480px; align-items: center; flex-direction: column; justify-content: center; padding: 35px 24px; border: 1px solid var(--admin-line); border-radius: var(--user-radius); background: var(--admin-panel); box-shadow: var(--user-shadow); text-align: center; }.user-shell .user-feature-empty h2 { margin: 8px 0 8px; color: var(--admin-ink); font-size: 23px; letter-spacing: -.02em; }.user-shell .user-feature-empty p { max-width: 530px; margin: 0 0 20px; color: var(--admin-muted); font-size: 12px; line-height: 1.75; }.user-shell .user-feature-label { color: var(--user-blue); font-size: 10px; font-weight: 800; letter-spacing: .1em; }.user-shell .user-coming-badge { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid #f0d9aa; border-radius: 999px; color: #a76a13; background: #fff8e9; font-size: 10px; }.user-shell .user-coming-badge > span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }.user-shell .feature-art { position: relative; width: 180px; height: 145px; margin-bottom: 18px; }.user-shell .app-art, .user-shell .device-art { display: grid; place-items: center; }.user-shell .art-phone { display: flex; width: 72px; height: 122px; align-items: center; flex-direction: column; justify-content: center; gap: 3px; border: 5px solid #223b5e; border-radius: 17px; color: #fff; background: linear-gradient(160deg, #4c94ef, #1e4e9a); box-shadow: 12px 12px 0 #eaf1ff; transform: rotate(-7deg); }.user-shell .art-phone::before { width: 22px; height: 3px; margin-bottom: 13px; border-radius: 3px; background: rgba(255,255,255,.65); content: ''; }.user-shell .art-phone b { font-size: 13px; }.user-shell .art-phone small { color: #bdd9ff; font-size: 8px; letter-spacing: .15em; }.user-shell .art-spark { position: absolute; color: var(--user-blue); font-size: 20px; }.user-shell .spark-one { top: 12px; right: 20px; }.user-shell .spark-two { bottom: 10px; left: 22px; color: #eca842; font-size: 25px; }.user-shell .project-art { display: flex; align-items: center; justify-content: center; }.user-shell .project-window { position: relative; display: flex; width: 133px; height: 91px; align-items: center; justify-content: center; border: 1px solid #b7c9e5; border-radius: 11px; background: #f4f8ff; box-shadow: 15px 15px 0 #fff2d9; transform: rotate(4deg); }.user-shell .project-window::before { position: absolute; top: 10px; left: 12px; width: 6px; height: 6px; border-radius: 50%; background: #73a8ec; box-shadow: 11px 0 #f0bd68, 22px 0 #7fd3ab; content: ''; }.user-shell .project-window b { color: #4274b9; font-size: 13px; letter-spacing: .18em; }.user-shell .project-node { position: absolute; display: grid; width: 35px; height: 35px; place-items: center; border-radius: 10px; color: #fff; background: #2864d7; box-shadow: 0 7px 13px rgba(40,100,215,.2); font-size: 9px; font-weight: 800; }.user-shell .node-left { bottom: 2px; left: 10px; }.user-shell .node-right { top: 8px; right: 9px; background: #e39c37; font-size: 16px; }.user-shell .device-outline { display: flex; width: 77px; height: 125px; align-items: center; flex-direction: column; justify-content: center; gap: 8px; border: 5px solid #6885aa; border-radius: 17px; color: #4d74a8; background: #eff5ff; box-shadow: -13px 12px 0 #e4f6ec; transform: rotate(7deg); }.user-shell .device-outline::before { width: 22px; height: 3px; margin-bottom: 14px; border-radius: 3px; background: #9eb4d0; content: ''; }.user-shell .device-outline b { font-size: 11px; }.user-shell .device-check { position: absolute; right: 20px; bottom: 13px; display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; color: #fff; background: #28a373; box-shadow: 0 7px 13px rgba(40,163,115,.22); font-size: 20px; font-weight: 800; }.user-shell .compact-empty { min-height: 430px; }.user-shell .user-certificate-intro { display: flex; align-items: center; gap: 24px; margin-bottom: 18px; padding: 28px; border: 1px solid #cddcf3; border-radius: var(--user-radius); background: linear-gradient(135deg, #f0f6ff 0%, #fff 70%); box-shadow: var(--user-shadow); }.user-shell[data-theme="dark"] .user-certificate-intro { border-color: var(--admin-line); background: var(--admin-panel); }.user-shell .certificate-shield { display: grid; width: 72px; height: 72px; flex: 0 0 auto; place-items: center; border-radius: 20px; color: #2864d7; background: #dce9ff; }.user-shell .certificate-shield svg { width: 37px; height: 37px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }.user-shell .user-certificate-intro h2 { margin: 6px 0 7px; color: var(--admin-ink); font-size: 20px; }.user-shell .user-certificate-intro p { max-width: 650px; margin: 0 0 15px; color: var(--admin-muted); font-size: 12px; line-height: 1.7; }.user-shell .user-note-card { display: block; max-width: 760px; }.user-shell .user-note-card strong { display: block; margin-bottom: 5px; color: var(--admin-ink); font-size: 11px; }.user-shell .user-note-card p { margin: 0; }.user-shell .user-billing-grid { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr); gap: 16px; margin-bottom: 18px; }.user-shell .user-billing-balance { padding: 25px; border-radius: var(--user-radius); color: #fff; background: linear-gradient(135deg, #17365a 0%, #2569a4 100%); box-shadow: var(--user-shadow); }.user-shell .user-billing-balance > span { color: #b8d1ed; font-size: 11px; }.user-shell .user-billing-balance > strong { display: block; margin: 19px 0 8px; font-size: 34px; font-variant-numeric: tabular-nums; }.user-shell .user-billing-balance p { margin: 0 0 20px; color: #bad0e9; font-size: 11px; line-height: 1.6; }.user-shell .user-billing-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }.user-shell .user-billing-summary article { display: flex; min-height: 150px; align-items: flex-start; flex-direction: column; justify-content: center; padding: 20px; border: 1px solid var(--admin-line); border-radius: var(--user-radius); background: var(--admin-panel); box-shadow: var(--user-shadow); }.user-shell .user-billing-summary span, .user-shell .user-billing-summary small { color: var(--admin-muted); font-size: 11px; }.user-shell .user-billing-summary strong { margin: 12px 0 5px; color: var(--admin-ink); font-size: 29px; }.user-shell .ledger-positive { color: var(--user-green); font-weight: 700; }.user-shell .ledger-negative { color: #d34c4c; font-weight: 700; }.user-shell .user-ledger-count { color: var(--admin-muted); font-size: 11px; }.user-shell .user-profile-card, .user-shell .user-security-card { max-width: 860px; }.user-shell .user-profile-hero { display: flex; align-items: center; gap: 15px; padding-bottom: 23px; border-bottom: 1px solid var(--admin-line); }.user-shell .user-profile-avatar { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 17px; color: #0e3a73; background: #add4ff; font-size: 21px; font-weight: 800; }.user-shell .user-profile-hero h2 { margin: 6px 0 4px; color: var(--admin-ink); font-size: 19px; }.user-shell .user-profile-hero p { margin: 0; color: var(--admin-muted); font-size: 11px; }.user-shell .user-profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }.user-shell .user-profile-grid > div { display: flex; min-height: 63px; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--admin-line); }.user-shell .user-profile-grid span { color: var(--admin-muted); font-size: 11px; }.user-shell .user-profile-grid strong { color: var(--admin-ink); font-size: 12px; text-align: right; }.user-shell .user-password-form { max-width: 510px; }.user-shell .user-password-form .field { margin-bottom: 16px; }.user-shell .user-mobile-nav { display: none; }
.user-shell[data-theme="dark"] .user-quick-card, .user-shell[data-theme="dark"] .user-metric-card, .user-shell[data-theme="dark"] .user-panel-card, .user-shell[data-theme="dark"] .user-feature-empty, .user-shell[data-theme="dark"] .user-billing-summary article, .user-shell[data-theme="dark"] .user-button-secondary { background: var(--admin-panel); }
.user-shell[data-theme="dark"] .user-certificate-intro { color: var(--admin-ink); }.user-shell[data-theme="dark"] .user-note-card { color: #a9bfdd; background: #1d2b43; }.user-shell[data-theme="dark"] .user-button-secondary { color: var(--admin-ink); }

@media (max-width: 1120px) {
  .user-shell .admin-sidebar { width: 232px; }.user-shell .admin-main { margin-left: 232px; }.user-shell .admin-content { padding-right: 24px; padding-left: 24px; }.user-shell .user-overview-grid, .user-shell .user-overview-panels { grid-template-columns: 1fr; }.user-shell .user-balance-card { min-height: 175px; }.user-shell .user-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .user-shell .admin-sidebar { width: 264px; transform: translateX(-100%); transition: transform 180ms ease; }.user-shell.admin-sidebar-open .admin-sidebar { transform: translateX(0); }.user-shell .admin-main { margin-left: 0; }.user-shell .admin-topbar { padding: 0 16px; }.user-shell .admin-content { padding: 28px 16px 88px; }.user-shell .user-topbar-actions { gap: 9px; }.user-shell .user-top-balance { display: none; }.user-shell .user-welcome-row, .user-shell .user-page-heading { align-items: flex-start; flex-direction: column; gap: 16px; }.user-shell .user-welcome-row h1, .user-shell .user-page-heading h1 { font-size: 27px; }.user-shell .user-welcome-actions { width: 100%; }.user-shell .user-welcome-actions .user-button { flex: 1; }.user-shell .user-metric-grid { gap: 10px; }.user-shell .user-metric-card { padding-left: 52px; }.user-shell .user-metric-icon { left: 13px; }.user-shell .user-quick-grid { grid-template-columns: 1fr; }.user-shell .user-certificate-intro { align-items: flex-start; flex-direction: column; padding: 21px; }.user-shell .user-billing-grid { grid-template-columns: 1fr; }.user-shell .user-profile-grid { grid-template-columns: 1fr; }.user-shell .user-mobile-nav { position: fixed; right: 12px; bottom: 12px; left: 12px; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px 6px 7px; border: 1px solid var(--admin-line); border-radius: 16px; background: rgba(255,255,255,.95); box-shadow: 0 10px 30px rgba(16, 28, 45, .16); backdrop-filter: blur(12px); }.user-shell[data-theme="dark"] .user-mobile-nav { background: rgba(30, 40, 55, .96); }.user-shell .user-mobile-nav a { display: flex; align-items: center; flex-direction: column; gap: 3px; color: var(--admin-muted); font-size: 9px; text-decoration: none; }.user-shell .user-mobile-nav a span { font-size: 16px; line-height: 1; }.user-shell .user-mobile-nav a.active { color: var(--user-blue); font-weight: 700; }
}
@media (max-width: 520px) {
  .user-shell .user-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.user-shell .user-metric-card { min-height: 105px; padding: 14px 10px 12px 45px; }.user-shell .user-metric-icon { top: 13px; left: 10px; width: 27px; height: 27px; }.user-shell .user-metric-icon svg { width: 15px; height: 15px; }.user-shell .user-metric-card > strong { font-size: 22px; }.user-shell .user-metric-card > small { font-size: 9px; }.user-shell .user-panel-card { padding: 16px; }.user-shell .user-balance-card { padding: 20px; }.user-shell .user-balance-card > strong { font-size: 31px; }.user-shell .user-feature-empty { min-height: 420px; padding: 25px 16px; }.user-shell .feature-art { transform: scale(.9); }.user-shell .user-page-heading .user-button { width: 100%; }.user-shell .user-welcome-actions .user-button { padding: 0 10px; font-size: 11px; }.user-shell .user-top-link { display: none; }
}

@media (max-width: 1050px) {
  .user-shell .user-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-shell .user-dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .user-shell .user-stat-grid { gap: 9px; }
  .user-shell .user-stat-text { font-size: 13px; }
}

@media (max-width: 1050px) {
  .admin-sidebar { width: 220px; }
  .admin-main { margin-left: 220px; }
  .admin-content { padding-right: 24px; padding-left: 24px; }
  .admin-topbar { padding-right: 24px; padding-left: 24px; }
  .admin-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .admin-sidebar { width: 256px; transform: translateX(-100%); transition: transform 180ms ease; }
  .admin-sidebar-open .admin-sidebar { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .admin-menu-toggle { display: grid; }
  .admin-scrim:not([hidden]) { position: fixed; inset: 0; z-index: 40; display: block; width: 100%; height: 100%; border: 0; background: rgba(18, 29, 32, 0.42); }
  .admin-topbar { min-height: 58px; padding: 0 16px; }
  .admin-topbar-left, .admin-topbar-actions { gap: 9px; }
  .admin-breadcrumb { gap: 6px; font-size: 11px; }
  .admin-top-link { font-size: 11px; }
  .admin-primary-link { padding: 7px 8px; }
  .admin-content { padding: 24px 16px 40px; }
}

@media (max-width: 520px) {
  .admin-topbar-actions { gap: 5px; }
  .admin-top-link:first-child { display: none; }
  .admin-theme-toggle { width: 32px; height: 32px; }
  .admin-page-heading h1 { font-size: 22px; }
  .admin-stat-grid { gap: 9px; }
  .admin-stat { min-height: 112px; padding: 14px 12px; }
  .admin-stat > strong { font-size: 23px; }
  .admin-stat-icon { top: 12px; right: 10px; width: 28px; height: 28px; }
  .admin-stat-label { padding-right: 30px; }
  .admin-shell .dashboard-card { padding: 15px; }
  .admin-shell .section-heading { align-items: flex-start; flex-direction: column; }
  .admin-shell .form-grid { grid-template-columns: 1fr; }
}

.input-with-suffix { display: flex; align-items: stretch; }
.input-with-suffix .text-input { border-radius: 10px 0 0 10px; flex: 1; min-width: 0; }
.input-suffix { display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--border, #d9e0e6); border-left: 0; border-radius: 0 10px 10px 0; background: #eef1f4; color: #27313a; font-weight: 600; }
.code-input-row { display: flex; gap: 10px; align-items: stretch; }
.code-input-row .text-input { flex: 1 1 auto; min-width: 0; width: 100%; min-height: 50px; font-size: 1rem; }
.code-input-row .btn-secondary { flex: 0 0 150px; min-width: 150px; min-height: 50px; margin-top: 0; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.table-action.danger { color: #c53d3d; }
.checkbox-row { display: inline-flex; align-items: center; gap: 8px; margin: 12px 0; color: var(--text, #1f2933); }
[data-theme="dark"] .input-suffix { background: #27313a; color: #f4f7f8; border-color: #46535d; }
.admin-textarea { resize: vertical; min-height: 84px; line-height: 1.6; }

.site-announcement { margin: 0 0 20px; white-space: pre-line; }
.public-user-announcement { display: block; margin: 0 0 18px; padding: 14px 16px; border: 1px solid #dbe3ef; border-radius: 14px; color: #293548; background: #fff; text-align: left; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.public-user-announcement > strong { display: block; margin-bottom: 4px; font-size: 14px; }
.public-user-announcement p { margin: 0 0 6px; }
.public-user-announcement p:last-child { margin-bottom: 0; }
.public-user-announcement a { color: inherit; text-decoration: underline; }
.public-user-announcement img { display: inline-block; max-width: 100%; height: auto; vertical-align: middle; }
.public-user-announcement ul, .public-user-announcement ol { margin: 6px 0 6px 20px; }
.site-footer { margin: 20px auto 0; max-width: 680px; color: var(--text-secondary); font-size: 0.82rem; line-height: 1.6; text-align: center; }
.site-description { margin-top: 6px; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.55; }

@media (max-width: 420px) {
  .code-input-row { gap: 8px; }
  .code-input-row .btn-secondary { flex-basis: 124px; min-width: 124px; padding-left: 10px; padding-right: 10px; font-size: 0.86rem; }
}

/* User application library and public App Store-style catalog */
.apps-heading{align-items:flex-start}.apps-heading-actions,.public-preview-actions{display:flex;gap:10px;flex-wrap:wrap}.apps-tabs{display:flex;gap:8px;border-bottom:1px solid var(--border);margin:22px 0 18px}.apps-tab{border:0;background:transparent;color:var(--text-secondary);padding:11px 14px;cursor:pointer;border-bottom:2px solid transparent}.apps-tab.active{color:var(--accent);border-bottom-color:var(--accent);font-weight:700}.apps-toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.apps-toolbar span{display:block;color:var(--text-secondary);font-size:.85rem}.user-app-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:16px}.user-app-card{display:grid;grid-template-columns:64px 1fr;gap:14px;padding:18px;border:1px solid var(--border);border-radius:18px;background:var(--surface);box-shadow:var(--shadow-sm)}.user-app-icon{width:64px;height:64px;border-radius:16px;background:var(--accent-bg);display:grid;place-items:center;color:var(--accent);font-weight:800;overflow:hidden}.user-app-icon img{width:100%;height:100%;object-fit:cover}.user-app-card-copy h3{font-size:1.05rem}.user-app-card-copy p,.user-app-card-copy small{display:block;color:var(--text-secondary);margin-top:3px}.app-source,.app-status{display:inline-block;margin-top:8px;margin-right:6px;font-size:.75rem}.app-status{padding:3px 8px;border-radius:999px;background:var(--success-bg);color:var(--success)}.app-status.hidden{background:var(--accent-bg);color:var(--text-secondary)}.user-app-card-actions{grid-column:1/-1;display:flex;gap:8px;flex-wrap:wrap}.user-button-danger{border:1px solid var(--error-border);color:var(--error);background:transparent}.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.45);display:grid;place-items:center;padding:20px;z-index:50}.app-modal{width:min(720px,100%);max-height:90vh;overflow:auto;background:var(--surface);border:1px solid var(--border);border-radius:22px;padding:22px;box-shadow:var(--shadow-lg)}.app-modal-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:18px}.app-modal-close{border:0;background:transparent;font-size:28px;color:var(--text-secondary);cursor:pointer}.app-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.app-form-full{display:block;margin-top:14px}.package-url-row{display:flex;gap:8px;align-items:center}.package-url-row .text-input{flex:1}.upload-status{display:block;color:var(--success);font-size:.85rem;margin-top:6px}.public-preview-toolbar{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:14px}.public-preview-frame-wrap{border:1px solid var(--border);border-radius:18px;overflow:hidden;background:var(--bg-end);min-height:460px}.public-preview-frame-wrap iframe{border:0;width:100%;height:560px;background:white}.public-page-settings{margin-top:18px;padding:18px;border:1px solid var(--border);border-radius:18px}.public-page-form-row{display:grid;grid-template-columns:1fr 1fr 110px;gap:12px;margin:14px 0}.color-input{min-height:44px;padding:4px}.public-app-page{background:#f5f7fb;color:#142033}.public-app-shell{width:min(980px,calc(100% - 32px));margin:0 auto;padding:30px 0 48px}.public-app-header{display:flex;justify-content:space-between;align-items:center;gap:16px}.public-app-brand{display:flex;align-items:center;gap:12px}.public-app-logo{width:46px;height:46px;border-radius:14px;background:var(--public-accent,#2563eb);color:white;display:grid;place-items:center;font-weight:800;overflow:hidden}.public-app-logo img{width:100%;height:100%;object-fit:cover}.public-app-brand strong,.public-app-brand span{display:block}.public-app-brand span{color:#65738a;font-size:.85rem}.public-app-count{color:#65738a}.public-app-hero{margin:34px 0 24px;padding:34px;border-radius:28px;background:linear-gradient(135deg,var(--public-accent,#2563eb),#172554);color:white}.public-app-hero p{opacity:.82}.public-app-search{margin-top:22px;background:white;border-radius:14px;padding:11px 14px;color:#64748b}.public-app-search input{border:0;outline:0;width:calc(100% - 30px);font-size:1rem}.public-app-list{display:grid;gap:12px}.public-app-card{display:grid;grid-template-columns:58px 1fr auto;gap:14px;align-items:center;padding:16px;background:white;border:1px solid #e4eaf2;border-radius:18px}.public-app-icon{width:58px;height:58px;border-radius:15px;background:#e8efff;color:var(--public-accent,#2563eb);display:grid;place-items:center;font-weight:800;overflow:hidden}.public-app-icon img{width:100%;height:100%;object-fit:cover}.public-app-copy h2{font-size:1.05rem}.public-app-copy p,.public-app-copy small{display:block;color:#65738a}.public-app-action{color:var(--public-accent,#2563eb);font-weight:700;text-decoration:none;white-space:nowrap}.public-detail-card{max-width:620px;margin:34px auto;padding:34px;border-radius:24px;background:white;border:1px solid #e4eaf2;text-align:center}.public-detail-icon{margin:0 auto 18px;width:86px;height:86px}.public-install-placeholder{margin-top:24px;padding:12px 20px;border:0;border-radius:12px;background:#dbe4f2;color:#718096}.public-detail-note{margin-top:12px;color:#718096;font-size:.85rem}@media(max-width:640px){.app-form-grid,.public-page-form-row{grid-template-columns:1fr}.public-preview-toolbar,.apps-heading{flex-direction:column}.public-app-card{grid-template-columns:48px 1fr}.public-app-icon{width:48px;height:48px}.public-app-action{grid-column:2}.user-app-card{grid-template-columns:52px 1fr}.user-app-icon{width:52px;height:52px}}
.upload-spinner{display:inline-block;width:13px;height:13px;margin-right:6px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;vertical-align:-2px;animation:upload-spin .7s linear infinite}.is-uploading{cursor:wait;opacity:.8}@keyframes upload-spin{to{transform:rotate(360deg)}}
.ios-modal-backdrop{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:22px;background:rgba(0,0,0,.38);backdrop-filter:blur(7px);animation:ios-fade-in .18s ease}.ios-modal{width:min(360px,calc(100vw - 44px));border-radius:20px;background:rgba(250,250,252,.96);box-shadow:0 24px 70px rgba(0,0,0,.28);text-align:center;overflow:hidden;color:#111}.ios-modal strong{display:block;padding:20px 20px 7px;font-size:17px}.ios-modal p{margin:0;padding:0 22px 18px;color:#555;font-size:14px;line-height:1.5;white-space:pre-wrap}.ios-modal-input{display:block;width:calc(100% - 36px);margin:0 18px 18px;padding:11px 12px;border:1px solid #d5d5da;border-radius:10px;background:#fff;font-size:15px;outline:none}.ios-modal-actions{display:flex;border-top:1px solid #dedee3}.ios-modal-button{flex:1;min-height:46px;border:0;border-right:1px solid #dedee3;background:transparent;color:#1677ff;font-size:16px;cursor:pointer}.ios-modal-button:last-child{border-right:0}.ios-modal-button-primary{font-weight:700}.ios-modal-button:active{background:#e9e9ee}@keyframes ios-fade-in{from{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}
.station-editor-backdrop{z-index:1100}.station-editor-modal{width:min(680px,calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto;text-align:left;padding:0 20px 20px}.station-editor-modal > strong{padding:20px 0 14px}.station-editor-modal .account-form{display:block}.station-editor-modal .button-row{margin-top:18px}.station-editor-modal .muted{margin-top:12px}
[data-theme="dark"] .ios-modal{background:rgba(38,38,42,.97);color:#fff}.admin-shell .ios-modal{background:var(--admin-panel,#fff);color:var(--admin-ink,#111)}
.public-app-mobile{background:#f2f2f7;color:#1c1c1e}.appstore-mobile-shell{width:min(100%,620px);min-height:100vh;margin:0 auto;padding:calc(18px + env(safe-area-inset-top)) 18px calc(30px + env(safe-area-inset-bottom));background:#f2f2f7}.appstore-mobile-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.appstore-brand{display:flex;align-items:center;gap:11px}.appstore-brand-icon,.appstore-detail-icon{width:46px;height:46px;border-radius:12px;background:var(--public-accent,#2563eb);color:#fff;display:grid;place-items:center;font-weight:800;overflow:hidden}.appstore-brand-icon img,.appstore-detail-icon img{width:100%;height:100%;object-fit:cover}.appstore-brand strong,.appstore-brand span{display:block}.appstore-brand span{font-size:12px;color:#8e8e93}.appstore-count{color:#8e8e93;font-size:12px}.appstore-search{display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:11px;background:#e5e5ea;color:#8e8e93;margin-bottom:14px}.appstore-search input{border:0;outline:0;background:transparent;width:100%;font-size:16px}.appstore-list{border-radius:14px;overflow:hidden;background:#fff}.appstore-row{display:flex;align-items:center;gap:12px;padding:13px 14px;text-decoration:none;color:inherit;border-bottom:1px solid #e5e5ea}.appstore-row:last-child{border-bottom:0}.appstore-row-icon{width:58px;height:58px;border-radius:14px;background:#e8efff;color:var(--public-accent,#2563eb);display:grid;place-items:center;flex:none;font-weight:800;overflow:hidden}.appstore-row-icon img{width:100%;height:100%;object-fit:cover}.appstore-row-copy{min-width:0;flex:1}.appstore-row-copy strong,.appstore-row-copy span,.appstore-row-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.appstore-row-copy span,.appstore-row-copy small{color:#8e8e93;font-size:12px;margin-top:3px}.appstore-row-chevron{font-size:28px;color:#c7c7cc}.appstore-empty{padding:50px 20px;text-align:center;color:#8e8e93}.appstore-back{display:inline-block;margin-bottom:20px;color:var(--public-accent,#2563eb);text-decoration:none;font-size:16px}.appstore-detail-hero{display:flex;align-items:center;gap:13px}.appstore-detail-icon{width:82px;height:82px;border-radius:19px;flex:none}.appstore-detail-main{min-width:0;flex:1}.appstore-detail-main h1{font-size:24px;margin:0;overflow:hidden;text-overflow:ellipsis}.appstore-detail-main p,.appstore-detail-main span{display:block;color:#8e8e93;margin-top:4px;font-size:13px}.appstore-install-button{border:0;border-radius:18px;padding:8px 18px;background:#dbe8ff;color:var(--public-accent,#2563eb);font-weight:700;font-size:15px}.appstore-divider{height:1px;background:#d1d1d6;margin:24px 0}.appstore-info{padding:15px 0;border-bottom:1px solid #d1d1d6}.appstore-info h2{font-size:17px;margin:0 0 10px}.appstore-info p{font-size:15px;line-height:1.65;color:#3a3a3c;white-space:pre-wrap}.appstore-info-row{display:flex;justify-content:space-between;padding:8px 0;color:#8e8e93;font-size:14px}.appstore-info-row strong{color:#3a3a3c;font-weight:500}.appstore-note{text-align:center;color:#8e8e93;font-size:12px;margin-top:24px}
.public-appstore-page{background:#f5f5f7;color:#1d1d1f}.appstore-real-shell{width:min(100%,680px);min-height:100vh;margin:auto;padding:calc(18px + env(safe-area-inset-top)) 18px 40px}.appstore-real-nav{display:flex;justify-content:space-between;align-items:center;gap:12px}.appstore-real-brand{display:flex;align-items:center;gap:11px}.appstore-real-logo{width:42px;height:42px;border-radius:10px;background:var(--public-accent,#007aff);display:grid;place-items:center;color:#fff;font-size:22px;font-weight:700;overflow:hidden}.appstore-real-logo img{width:100%;height:100%;object-fit:cover}.appstore-real-brand strong,.appstore-real-brand small{display:block}.appstore-real-brand small,.appstore-real-count{color:#86868b;font-size:12px}.appstore-real-hero{margin:26px 0 18px;padding:25px 22px;border-radius:22px;background:linear-gradient(135deg,var(--public-accent,#007aff),#5856d6);color:white}.appstore-real-hero span{font-size:12px;font-weight:700;opacity:.8}.appstore-real-hero h1{margin-top:8px;font-size:31px;letter-spacing:-.6px}.appstore-real-hero p{margin-top:7px;opacity:.86;font-size:14px}.appstore-real-search{display:flex;gap:8px;align-items:center;padding:11px 13px;background:#e5e5ea;border-radius:11px;color:#86868b}.appstore-real-search input{border:0;outline:0;background:transparent;width:100%;font-size:16px}.appstore-real-section{margin-top:24px}.appstore-real-section-head{display:flex;align-items:center;justify-content:space-between;margin:0 2px 10px}.appstore-real-section-head h2{font-size:22px}.appstore-real-section-head span{color:#86868b}.appstore-real-list{background:#fff;border-radius:16px;overflow:hidden}.appstore-product-card{display:flex;align-items:center;gap:13px;padding:14px;text-decoration:none;color:inherit;border-bottom:1px solid #e5e5ea}.appstore-product-card:last-child{border-bottom:0}.appstore-product-art{width:68px;height:68px;border-radius:16px;background:#eef2ff;color:var(--public-accent,#007aff);display:grid;place-items:center;font-weight:800;overflow:hidden;flex:none}.appstore-product-art img{width:100%;height:100%;object-fit:cover}.appstore-product-copy{min-width:0;flex:1}.appstore-product-copy strong,.appstore-product-copy span,.appstore-product-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.appstore-product-copy span,.appstore-product-copy small{margin-top:4px;color:#86868b;font-size:12px}.appstore-product-arrow{font-size:29px;color:#c7c7cc}.appstore-real-footer{text-align:center;color:#86868b;font-size:12px;margin-top:28px}

/* Announcement settings and SunEditor integration. */
html.announcement-modal-open, .announcement-modal-open body { overflow: hidden; }
.public-user-announcement.announcement-dialog { position: fixed; inset: 0; width: min(440px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 48px); max-height: min(740px, calc(100dvh - 48px)); margin: auto; padding: 0; border: 0; border-radius: 22px; box-shadow: 0 24px 80px rgba(0, 0, 0, .24); overflow: hidden; }
.announcement-dialog:not([open]) { display: none; }
.announcement-dialog[open] { display: flex; flex-direction: column; }
.announcement-dialog::backdrop { background: rgba(0, 0, 0, .4); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.announcement-dialog-header { position: relative; flex: none; padding: 24px 56px 14px; text-align: center; }
.announcement-dialog-header h2 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.4; color: inherit; }
.announcement-dialog .announcement-dialog-close { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 32px; height: 32px; margin: 0; padding: 0; border: 0; border-radius: 50%; color: inherit; background: rgba(128, 128, 128, .12); font: 24px/1 -apple-system, BlinkMacSystemFont, sans-serif; cursor: pointer; box-shadow: none; }
.announcement-dialog-content { min-height: 0; padding: 4px 24px 24px; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.announcement-dialog-footer { flex: none; border-top: 1px solid rgba(128, 128, 128, .2); }
.announcement-dialog-footer button { display: block; width: 100%; min-height: 54px; margin: 0; padding: 14px 24px; border: 0; border-radius: 0; background: rgba(255, 255, 255, .45); color: #0064d9; font-size: 16px; font-weight: 600; cursor: pointer; box-shadow: none; }
.announcement-dialog button:focus { outline: none; box-shadow: none; }
.announcement-dialog button:focus-visible { background: #f2f2f7; }
.user-shell .announcement-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--admin-line); margin: -4px 0 24px; }
.user-shell .announcement-tabs button { width: auto; margin: 0; padding: 12px 2px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--admin-muted); font-size: 14px; cursor: pointer; }
.user-shell .announcement-tabs [aria-selected="true"] { border-color: var(--user-blue); color: var(--user-blue); font-weight: 600; }
.announcement-settings-form [hidden] { display: none !important; }
.announcement-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.announcement-panel-heading h2 { font-size: 16px; margin: 0 0 6px; }
.announcement-panel-heading p { color: var(--admin-muted); font-size: 12px; }
.announcement-toggle { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 13px; }
.announcement-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--user-blue); }
.announcement-toggle small { color: var(--admin-muted); font-size: 11px; }
.announcement-content-field { margin: 20px 0; }
.announcement-content-field > .field-label { display: block; margin-bottom: 10px; }
.announcement-content-field > textarea { width: 100%; min-height: 340px; }
.announcement-settings-form .sun-editor { border-radius: 12px; border: 1px solid #dbe3ef; --se-color-primary: #2864d7; }
.announcement-settings-form .sun-editor .se-toolbar { background: #f7f9fc; border-radius: 12px 12px 0 0; }
.announcement-settings-form .sun-editor button { margin: 0; box-shadow: none; }
.announcement-settings-form .sun-editor .sun-editor-editable { background: #fff; color: #293548; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.announcement-preview-wrap { margin: 20px 0; }
.announcement-preview-wrap summary { width: fit-content; cursor: pointer; font-size: 13px; color: var(--admin-muted); }
.announcement-preview { margin-top: 14px; min-height: 70px; }
.announcement-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; border-top: 1px solid var(--admin-line); }
.announcement-footer > span { color: var(--admin-muted); font-size: 12px; }
.announcement-saving #announcementEditors, .announcement-saving .announcement-tabs { pointer-events: none; opacity: .7; }
.maintenance-static-value { display: flex; min-height: 44px; align-items: center; box-sizing: border-box; color: var(--admin-muted); background: var(--admin-soft, #f3f6f8); }
.public-user-announcement .announcement-content { font-size: 14px; line-height: 1.75; }
.public-user-announcement .announcement-content table { border-collapse: collapse; max-width: 100%; display: block; overflow-x: auto; }
.public-user-announcement .announcement-content td, .public-user-announcement .announcement-content th { border: 1px solid #d0d5dd; padding: 5px 8px; }
.public-user-announcement .announcement-content ul { list-style: disc; padding-left: 18px; }
.public-user-announcement .announcement-content ol { list-style: decimal; padding-left: 18px; }
.public-user-announcement .announcement-content blockquote { border-left: 3px solid currentColor; padding-left: 12px; margin: 8px 0; }
.public-user-announcement .announcement-content pre { white-space: pre-wrap; }
@media (max-width: 640px) {
  .announcement-panel-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .announcement-footer { align-items: flex-start; flex-direction: column; }
  .announcement-footer .user-button { width: 100%; }
  .user-shell .announcement-settings-form { padding: 16px 12px; }
}
