@import "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap";
@import "https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,400..700,0..1,-50..200&display=swap";

/* src/styles/tokens.css */
:root {
  --font-sans:
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  --font-weight-body: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --color-primary: #4f46e5;
  --color-primary-hover: #4338ca;
  --color-primary-light: #eef2ff;
  --color-secondary: #06b6d4;
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --bg-page: #f8fafc;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 40px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
  --shadow-modal: 0 24px 60px rgba(15, 23, 42, 0.16);
  --shadow-focus: 0 0 0 3px rgba(79, 70, 229, 0.22);
  --danger: #ef4444;
  --danger-soft: #fef2f2;
  --success: #22c55e;
  --success-soft: #f0fdf4;
  --warning: #f59e0b;
  --warning-soft: #fffbeb;
  --info: #06b6d4;
  --info-soft: #ecfeff;
  --sidebar-width: 272px;
  --sidebar-collapsed: 80px;
  --topbar-height: 72px;
  --content-max: 1280px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration: 220ms;
  --duration-slow: 300ms;
  --transition: var(--duration) var(--ease-standard);
}

/* src/styles/themes.css */
.theme-admin {
  --theme-primary: #1A237E;
  --theme-primary-hover: #0E1656;
  --theme-primary-soft: #EEF1FA;
  --theme-primary-muted: rgba(26, 35, 126, 0.05);
  --theme-page-bg: #EEF1FA;
  --theme-sidebar-bg: #ffffff;
  --theme-sidebar-border: rgba(26, 35, 126, 0.1);
  --theme-nav-hover: #EEF1FA;
  --theme-nav-active-bg: rgba(26, 35, 126, 0.1);
  --theme-nav-active-text: #1A237E;
  --theme-brand-bg:
    linear-gradient(
      135deg,
      #3949AB,
      #1A237E);
  --theme-avatar-bg: #EEF1FA;
  --theme-avatar-text: #1A237E;
  --theme-focus-ring: rgba(26, 35, 126, 0.3);
  --theme-accent: #00BFA5;
}
.theme-parent {
  --theme-primary: #00BFA5;
  --theme-primary-hover: #00A38D;
  --theme-primary-soft: rgba(0, 191, 165, 0.1);
  --theme-primary-muted: #F8F9FA;
  --theme-page-bg: #F8F9FA;
  --theme-sidebar-bg: #ffffff;
  --theme-sidebar-border: #e2e8f0;
  --theme-nav-hover: #F8F9FA;
  --theme-nav-active-bg: rgba(0, 191, 165, 0.1);
  --theme-nav-active-text: #00A38D;
  --theme-brand-bg:
    linear-gradient(
      135deg,
      #00BFA5,
      #00A38D);
  --theme-avatar-bg: rgba(0, 191, 165, 0.1);
  --theme-avatar-text: #00A38D;
  --theme-focus-ring: rgba(0, 191, 165, 0.3);
  --theme-accent: #1A237E;
}
.theme-child {
  --theme-primary: #7E57C2;
  --theme-primary-hover: #673AB7;
  --theme-primary-soft: #F3E5F5;
  --theme-primary-muted: rgba(126, 87, 194, 0.05);
  --theme-page-bg: #F3E5F5;
  --theme-sidebar-bg: #ffffff;
  --theme-sidebar-border: rgba(126, 87, 194, 0.15);
  --theme-nav-hover: #F3E5F5;
  --theme-nav-active-bg: rgba(126, 87, 194, 0.15);
  --theme-nav-active-text: #673AB7;
  --theme-brand-bg:
    linear-gradient(
      135deg,
      #7E57C2,
      #FF4081);
  --theme-avatar-bg: rgba(255, 64, 129, 0.15);
  --theme-avatar-text: #FF4081;
  --theme-focus-ring: rgba(126, 87, 194, 0.3);
  --theme-accent: #FFCA28;
}
.theme-teacher {
  --theme-primary: #1A237E;
  --theme-primary-hover: #0E1656;
  --theme-primary-soft: #EEF1FA;
  --theme-primary-muted: rgba(26, 35, 126, 0.05);
  --theme-page-bg: #EEF1FA;
  --theme-sidebar-bg: #ffffff;
  --theme-sidebar-border: rgba(26, 35, 126, 0.1);
  --theme-nav-hover: #EEF1FA;
  --theme-nav-active-bg: rgba(26, 35, 126, 0.1);
  --theme-nav-active-text: #1A237E;
  --theme-brand-bg:
    linear-gradient(
      135deg,
      #3949AB,
      #1A237E);
  --theme-avatar-bg: rgba(255, 202, 40, 0.2);
  --theme-avatar-text: #FFCA28;
  --theme-focus-ring: rgba(26, 35, 126, 0.3);
  --theme-accent: #FFCA28;
}
.theme-neutral {
  --theme-primary: #1A237E;
  --theme-primary-hover: #0E1656;
  --theme-primary-soft: #EEF1FA;
  --theme-primary-muted: #F8F9FA;
  --theme-page-bg: #F8F9FA;
  --theme-brand-bg:
    linear-gradient(
      135deg,
      #3949AB,
      #1A237E);
  --theme-avatar-bg: #EEF1FA;
  --theme-avatar-text: #1A237E;
  --theme-focus-ring: rgba(26, 35, 126, 0.3);
}

/* src/styles/ui.css */
.material-symbols-outlined {
  font-variation-settings:
    "FILL" 0,
    "wght" 500,
    "GRAD" 0,
    "opsz" 20;
  font-size: 1.25rem;
  line-height: 1;
  -webkit-user-select: none;
  user-select: none;
}
.portal-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
  background: var(--theme-page-bg);
}
.portal-shell .sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--theme-sidebar-bg);
  border-right: 1px solid var(--theme-sidebar-border);
  color: var(--text-primary);
  padding: 1.25rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  z-index: 30;
  transition: width var(--duration-slow) var(--ease-out), padding var(--duration) var(--ease-standard);
}
.portal-shell .sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.65rem 0.85rem;
}
.portal-shell .brand-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  background: var(--theme-brand-bg);
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  text-transform: lowercase;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.28);
}
.portal-shell .sidebar-brand strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.portal-shell .sidebar-brand span {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
}
.portal-shell nav {
  display: grid;
  gap: 0.2rem;
  overflow-y: auto;
  padding: 0 0.15rem;
}
.portal-shell nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.72rem 0.9rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition:
    background var(--transition),
    color var(--transition),
    transform var(--duration-fast) var(--ease-out);
}
.portal-shell nav a .nav-label {
  flex: 1;
  min-width: 0;
}
.portal-shell .nav-badge {
  margin-left: auto;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #ef4444;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}
.portal-shell .icon-chip {
  position: relative;
}
.portal-shell .icon-chip .nav-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.3rem;
  font-size: 0.62rem;
  margin-left: 0;
}
.portal-shell nav a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: var(--radius-pill);
  background: var(--theme-primary);
  transform: translateY(-50%);
  transition: height var(--duration) var(--ease-out);
  opacity: 0;
}
.portal-shell nav a:hover {
  background: var(--theme-nav-hover);
  color: var(--text-primary);
  transform: translateX(2px);
}
.portal-shell nav a.active {
  background: var(--theme-nav-active-bg);
  color: var(--theme-nav-active-text);
  font-weight: 600;
}
.portal-shell nav a.active::before {
  height: 56%;
  opacity: 1;
}
.portal-shell .nav-icon {
  width: 1.35rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: inherit;
}
.portal-shell .nav-icon .material-symbols-outlined {
  font-size: 1.25rem;
}
.portal-shell .logout-btn {
  margin-top: auto;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    box-shadow var(--transition);
}
.portal-shell .logout-btn:hover {
  background: var(--danger-soft);
  border-color: #fecaca;
  color: var(--danger);
  box-shadow: var(--shadow-sm);
}
.portal-shell .main-area {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}
.portal-shell .topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: var(--topbar-height);
  padding: 0.85rem 1.75rem;
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
.portal-shell .eyebrow {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.portal-shell .topbar h1 {
  margin: 0.15rem 0 0;
  color: var(--text-primary);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.portal-shell .topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.portal-shell .topbar .avatar,
.portal-shell .icon-chip {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--theme-avatar-bg);
  color: var(--theme-avatar-text);
  font-weight: 700;
  border: 1px solid var(--border);
  transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--transition);
}
.portal-shell .icon-chip {
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: default;
}
.portal-shell .topbar .avatar:hover,
.portal-shell .icon-chip:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.portal-shell .content {
  padding: 1.25rem 1.75rem 2.25rem;
  animation: pageEnter var(--duration-slow) var(--ease-out);
}
@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(
      circle at 12% 18%,
      rgba(79, 70, 229, 0.12),
      transparent 36%),
    radial-gradient(
      circle at 88% 12%,
      rgba(6, 182, 212, 0.1),
      transparent 32%),
    var(--theme-page-bg);
}
.auth-card {
  width: min(100%, 440px);
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  animation: scaleIn var(--duration-slow) var(--ease-out);
}
.auth-page .brand {
  text-align: center;
  margin-bottom: 1.5rem;
}
.auth-page .brand-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.75rem;
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  background: var(--theme-brand-bg);
  color: #fff;
  font-size: 1.75rem;
  font-weight: 700;
  text-transform: lowercase;
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.28);
}
.auth-page .brand h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
.auth-page .brand p {
  margin: 0.25rem 0 0;
  color: var(--text-secondary);
}
.auth-page h2 {
  margin: 0 0 0.35rem;
  color: var(--text-primary);
  font-weight: 700;
}
.auth-page .subtitle {
  margin: 0 0 1.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.auth-page form {
  display: grid;
  gap: 1rem;
}
.auth-page label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}
.auth-page label > input,
.auth-page label > select,
.auth-page label > textarea,
.auth-page label > .password-wrap {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
}
.auth-page input,
.auth-page select,
.auth-page textarea {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  font: inherit;
  background: var(--surface);
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.auth-page input:focus,
.auth-page select:focus,
.auth-page textarea:focus {
  outline: none;
  border-color: var(--theme-primary);
  box-shadow: var(--shadow-focus);
}
.auth-page .form-meta {
  display: flex;
  justify-content: flex-end;
}
.auth-page .form-meta a {
  color: var(--theme-primary);
  font-size: 0.875rem;
  text-decoration: none;
  font-weight: 600;
}
.auth-page .form-meta a:hover {
  color: var(--theme-primary-hover);
}
.auth-page .btn-primary {
  border: 0;
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  background: var(--theme-primary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.25);
  transition:
    background var(--transition),
    transform var(--duration-fast) var(--ease-out),
    box-shadow var(--transition);
}
.auth-page .btn-primary:hover:not(:disabled) {
  background: var(--theme-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.32);
}
.auth-page .btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}
.auth-page .btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.auth-page .btn-link {
  border: 0;
  background: transparent;
  color: var(--theme-primary);
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem 0;
  text-align: center;
}
.auth-page .secure-note {
  margin: 1.25rem 0 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
}
.auth-page .secure-note a {
  color: var(--text-secondary);
  text-decoration: none;
}
.auth-page .secure-note a:hover {
  color: var(--theme-primary);
}
.portal-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(79, 70, 229, 0.1),
      transparent 40%),
    radial-gradient(
      circle at 80% 10%,
      rgba(6, 182, 212, 0.1),
      transparent 35%),
    var(--theme-page-bg);
}
.portal-card {
  width: min(100%, 760px);
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  animation: scaleIn var(--duration-slow) var(--ease-out);
}
.portal-page .brand {
  text-align: center;
  margin-bottom: 2rem;
}
.portal-page .brand-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.75rem;
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  background: var(--theme-brand-bg);
  color: #fff;
  font-size: 1.75rem;
  font-weight: 700;
  text-transform: lowercase;
}
.portal-page .brand h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
.portal-page .brand p {
  margin: 0.25rem 0 0;
  color: var(--text-secondary);
}
.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.portal-tile {
  display: grid;
  gap: 0.5rem;
  padding: 1.35rem;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  background: var(--surface);
  transition:
    transform var(--duration) var(--ease-out),
    box-shadow var(--transition),
    border-color var(--transition);
}
.portal-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--theme-primary) 28%, var(--border));
}
.portal-tile .icon {
  font-size: 1.75rem;
}
.portal-tile strong {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 700;
}
.portal-tile p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.45;
}
.portal-tile.admin {
  background:
    linear-gradient(
      180deg,
      #eef2ff,
      #ffffff);
  border-color: #c7d2fe;
}
.portal-tile.parent {
  background:
    linear-gradient(
      180deg,
      #ecfeff,
      #ffffff);
  border-color: #a5f3fc;
}
.portal-tile.child {
  background:
    linear-gradient(
      180deg,
      #f5f3ff,
      #ffffff);
  border-color: #ddd6fe;
}
.portal-tile.teacher {
  background:
    linear-gradient(
      180deg,
      #ecfdf5,
      #ffffff);
  border-color: #a7f3d0;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.page-header h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page-header p {
  margin: 0.35rem 0 0;
  color: var(--text-secondary);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.65rem;
  color: var(--theme-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: color var(--transition), gap var(--duration-fast) var(--ease-out);
}
.back-link:hover {
  color: var(--theme-primary-hover);
  gap: 0.4rem;
}
.btn {
  position: relative;
  overflow: hidden;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.65rem 1.1rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition:
    background var(--transition),
    color var(--transition),
    opacity var(--transition),
    transform var(--duration-fast) var(--ease-out),
    box-shadow var(--transition),
    border-color var(--transition);
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at var(--ripple-x, 50%) var(--ripple-y, 50%),
      rgba(255, 255, 255, 0.35),
      transparent 55%);
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out);
  pointer-events: none;
}
.btn:active::after {
  opacity: 1;
}
.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}
.btn:active:not(:disabled) {
  transform: scale(0.98);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}
.btn.primary {
  background: var(--theme-primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.22);
}
.btn.primary:hover:not(:disabled) {
  background: var(--theme-primary-hover);
  box-shadow: 0 12px 26px rgba(79, 70, 229, 0.28);
}
.btn.ghost {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  text-decoration: none;
}
.btn.ghost:hover:not(:disabled) {
  background: var(--surface-muted);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.btn.danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid #fecaca;
}
.btn.danger:hover:not(:disabled) {
  background: #fee2e2;
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.12);
}
.success-banner {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  background: var(--success-soft);
  color: #15803d;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #bbf7d0;
  animation: slideDown var(--duration) var(--ease-out);
}
.error-banner {
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  border: 1px solid #fecaca;
}
.loading-card,
.error-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.error-card {
  color: var(--danger);
  margin-bottom: 1rem;
  border-color: #fecaca;
  background:
    linear-gradient(
      180deg,
      #fff,
      var(--danger-soft));
}
.empty-state,
.empty,
.muted {
  color: var(--text-secondary);
}
.req {
  display: inline;
  margin-left: 0.15rem;
  color: #dc2626;
  font-weight: 700;
}
.field-error {
  display: block;
  margin-top: 0.28rem;
  color: #dc2626;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
}
.proof-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.45rem;
  color: var(--theme-primary);
  font-weight: 700;
  font-size: 0.84rem;
}
.field-invalid,
input.ng-invalid.ng-touched,
select.ng-invalid.ng-touched,
textarea.ng-invalid.ng-touched {
  border-color: #dc2626 !important;
}
.password-wrap {
  position: relative;
}
.password-wrap input {
  width: 100%;
  padding-right: 2.6rem;
}
.password-toggle {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
}
.password-toggle .material-symbols-outlined {
  font-size: 1.15rem;
}
.file-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}
.muted {
  color: var(--text-muted);
}
.empty-state {
  display: grid;
  place-items: center;
  gap: 0.5rem;
  text-align: center;
  padding: 2rem 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
}
.empty-state .empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--theme-primary-soft);
  color: var(--theme-primary);
}
.empty-state p {
  margin: 0;
  max-width: 320px;
}
.skeleton {
  position: relative;
  overflow: hidden;
  background: #e2e8f0;
  border-radius: var(--radius-md);
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.65),
      transparent);
  animation: shimmer 1.2s infinite;
}
.skeleton-line {
  height: 12px;
  margin-bottom: 0.65rem;
}
.skeleton-line.lg {
  height: 22px;
  width: 45%;
}
.skeleton-card {
  height: 110px;
  border-radius: var(--radius-lg);
}
@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transition:
    transform var(--duration) var(--ease-out),
    box-shadow var(--transition),
    border-color var(--transition);
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--theme-primary) 22%, var(--border));
}
.stat-card span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
}
.stat-card strong {
  display: block;
  margin-top: 0.4rem;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
.stat-card strong.small {
  font-size: 1.2rem;
}
.stat-card small {
  display: block;
  margin-top: 0.4rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}
.stat-card.teal strong {
  color: #0891b2;
}
.stat-card.purple strong {
  color: #4f46e5;
}
.stat-card.gold strong {
  color: #d97706;
}
.stat-card.blue strong {
  color: #2563eb;
}
.stat-card.green strong {
  color: #16a34a;
}
.stat-card.orange strong {
  color: #ea580c;
}
.panels {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
}
.panel {
  --card-header-bg: #eef2ff;
  --card-header-bg-end: #e0e7ff;
  --card-header-border: #c7d2fe;
  --card-header-accent: #4f46e5;
  --card-header-text: #312e81;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transition:
    transform var(--duration) var(--ease-out),
    box-shadow var(--transition),
    border-color var(--transition);
}
.panel:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.panel.wide {
  grid-column: 1 / -1;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: -1.25rem -1.25rem 1rem;
  padding: 0.9rem 1.25rem 0.9rem 1.1rem;
  background:
    linear-gradient(
      135deg,
      var(--card-header-bg) 0%,
      var(--card-header-bg-end) 100%);
  border-bottom: 1px solid var(--card-header-border);
  border-left: 4px solid var(--card-header-accent);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.panel-header h3 {
  margin: 0;
  color: var(--card-header-text);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.panel-header .count-badge,
.panel-header .badge {
  background: color-mix(in srgb, #fff 72%, var(--card-header-bg));
  color: var(--card-header-accent);
  border: 1px solid color-mix(in srgb, var(--card-header-accent) 22%, transparent);
}
.panel > h3:first-child {
  margin: -1.25rem -1.25rem 1rem;
  padding: 0.9rem 1.25rem 0.9rem 1.1rem;
  background:
    linear-gradient(
      135deg,
      var(--card-header-bg) 0%,
      var(--card-header-bg-end) 100%);
  border-bottom: 1px solid var(--card-header-border);
  border-left: 4px solid var(--card-header-accent);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  color: var(--card-header-text);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.panel-copy {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}
.badge,
.count-badge {
  background: var(--theme-primary-soft);
  color: var(--theme-primary);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
}
.badge {
  background: var(--warning-soft);
  color: #b45309;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}
th,
td {
  padding: 0.9rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #f8fafc;
}
tbody tr {
  transition: background var(--duration-fast) var(--ease-out);
}
tbody tr:hover {
  background: #f8fafc;
}
tbody tr:last-child td {
  border-bottom: none;
}
.name-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.name-cell .avatar,
.table-wrap .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--theme-primary-soft);
  color: var(--theme-primary);
  font-weight: 700;
  font-size: 0.85rem;
}
code {
  font-family:
    ui-monospace,
    "Cascadia Code",
    monospace;
  font-size: 0.85em;
  background: var(--surface-muted);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  color: var(--text-primary);
}
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--success-soft);
  color: #15803d;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.status-pill.pending {
  background: var(--warning-soft);
  color: #b45309;
}
.status-pill.parent-approved {
  background: #ede9fe;
  color: #6d28d9;
}
.status-pill.inactive {
  background: var(--danger-soft);
  color: var(--danger);
}
.status-pill.accepted {
  background: #dbeafe;
  color: #1d4ed8;
}
.status-pill.rejected {
  background: var(--danger-soft);
  color: var(--danger);
}
.status-pill.on-hold {
  background: #fef3c7;
  color: #b45309;
}
.status-pill.en-route {
  background: #e0e7ff;
  color: #4338ca;
}
.status-pill.arrived {
  background: #cffafe;
  color: #0e7490;
}
.status-pill.delivered {
  background: var(--success-soft);
  color: #15803d;
}
.status-pill.cancelled {
  background: #f1f5f9;
  color: #64748b;
}
.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.wishlist-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--duration) var(--ease-out),
    box-shadow var(--transition),
    border-color var(--transition);
  text-decoration: none;
  color: inherit;
}
.wishlist-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--theme-primary) 28%, var(--border));
}
.wishlist-card-media {
  position: relative;
  background: #fff;
  border-bottom: 1px solid var(--border);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.wishlist-card img,
.wishlist-card .thumb-placeholder {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  padding: 0.75rem;
  box-sizing: border-box;
}
.wishlist-card .thumb-placeholder {
  font-size: 2.75rem;
  background: var(--surface-muted);
}
.wishlist-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
}
.wishlist-card-body {
  padding: 0.85rem 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}
.wishlist-card-body h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wishlist-card-body p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wishlist-coins {
  margin-top: auto;
  padding-top: 0.45rem;
  font-weight: 800;
  font-size: 1.05rem;
  color: #b45309;
  letter-spacing: -0.02em;
}
.wishlist-coins small {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 0.1rem;
}
.wishlist-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}
.amz-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 1.5rem;
  align-items: start;
  margin-top: 0.75rem;
}
.amz-detail-info {
  display: grid;
  gap: 1rem;
}
.amz-buy-box,
.amz-info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
}
.amz-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.amz-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.35rem 0 0.75rem;
}
.amz-price {
  font-size: 1.65rem;
  font-weight: 800;
  color: #b45309;
  letter-spacing: -0.03em;
}
.amz-price-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.amz-desc {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
}
.amz-meta {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.amz-meta li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.5rem;
  font-size: 0.9rem;
}
.amz-meta .label {
  color: var(--text-muted);
}
.amz-meta .value {
  color: var(--text-primary);
  font-weight: 600;
}
.amz-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.5rem;
}
.amz-actions .btn {
  width: 100%;
  justify-content: center;
}
.amz-section-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}
@media (max-width: 900px) {
  .amz-detail {
    grid-template-columns: 1fr;
  }
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.timeline li {
  position: relative;
  padding-left: 1.25rem;
  border-left: 2px solid var(--border);
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--theme-primary);
  border: 2px solid var(--surface);
}
.timeline strong {
  display: block;
  color: var(--text-primary);
}
.timeline span,
.timeline time {
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}
.toolbar input,
.toolbar select {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  font: inherit;
  background: var(--surface);
  min-width: 180px;
}
.image-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.image-preview-grid .preview-item {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}
.image-preview-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-preview-grid button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  cursor: pointer;
  font-size: 0.7rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 1000;
  animation: fadeIn var(--duration) var(--ease-out);
}
.modal-card {
  width: min(520px, 100%);
  max-height: min(90vh, 720px);
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 0;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-modal);
  animation: scaleIn var(--duration-slow) var(--ease-out);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 1;
}
.modal-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 700;
}
.icon-btn {
  border: none;
  background: var(--surface-muted);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  transition:
    background var(--transition),
    color var(--transition),
    transform var(--duration-fast) var(--ease-out);
}
.icon-btn:hover {
  background: var(--border);
  color: var(--text-primary);
  transform: scale(1.04);
}
.parent-form,
.child-form,
.reward-form,
.modal-card form {
  display: grid;
  gap: 0.85rem;
  padding: 1.25rem 1.5rem 1.5rem;
}
.parent-form label,
.child-form label,
.reward-form label,
.modal-card form label {
  display: block;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
}
.parent-form label > input,
.parent-form label > select,
.parent-form label > textarea,
.child-form label > input,
.child-form label > select,
.child-form label > textarea,
.reward-form label > input,
.modal-card form label > input,
.modal-card form label > select,
.modal-card form label > textarea,
.modal-card form label > .password-wrap {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
}
.parent-form input,
.child-form input,
.child-form select,
.child-form textarea,
.reward-form input,
.modal-card form input,
.modal-card form select,
.modal-card form textarea {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  font: inherit;
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.parent-form input:focus,
.child-form input:focus,
.child-form select:focus,
.reward-form input:focus,
.modal-card form input:focus,
.modal-card form select:focus,
.modal-card form textarea:focus {
  outline: none;
  border-color: var(--theme-primary);
  box-shadow: var(--shadow-focus);
}
.checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}
.modal-body {
  padding: 1.25rem 1.5rem 1.5rem;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.tabs button {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-pill);
  padding: 0.55rem 1.05rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition:
    background var(--transition),
    color var(--transition),
    border-color var(--transition),
    transform var(--duration-fast) var(--ease-out),
    box-shadow var(--transition);
}
.tabs button:hover {
  background: var(--theme-nav-hover);
  transform: translateY(-1px);
}
.tabs button.active {
  background: var(--theme-primary);
  border-color: var(--theme-primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.22);
}
.detail-card {
  --card-header-bg: #eef2ff;
  --card-header-bg-end: #e0e7ff;
  --card-header-border: #c7d2fe;
  --card-header-accent: #4f46e5;
  --card-header-text: #312e81;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.detail-card > h3:first-child {
  margin: -1.25rem -1.25rem 1rem;
  padding: 0.9rem 1.25rem 0.9rem 1.1rem;
  background:
    linear-gradient(
      135deg,
      var(--card-header-bg) 0%,
      var(--card-header-bg-end) 100%);
  border-bottom: 1px solid var(--card-header-border);
  border-left: 4px solid var(--card-header-accent);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  color: var(--card-header-text);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.panel:nth-of-type(6n+1),
.detail-card:nth-of-type(6n+1) {
  --card-header-bg: #eef2ff;
  --card-header-bg-end: #e0e7ff;
  --card-header-border: #c7d2fe;
  --card-header-accent: #4f46e5;
  --card-header-text: #312e81;
}
.panel:nth-of-type(6n+2),
.detail-card:nth-of-type(6n+2) {
  --card-header-bg: #ecfeff;
  --card-header-bg-end: #cffafe;
  --card-header-border: #a5f3fc;
  --card-header-accent: #0891b2;
  --card-header-text: #155e75;
}
.panel:nth-of-type(6n+3),
.detail-card:nth-of-type(6n+3) {
  --card-header-bg: #fffbeb;
  --card-header-bg-end: #fef3c7;
  --card-header-border: #fde68a;
  --card-header-accent: #d97706;
  --card-header-text: #92400e;
}
.panel:nth-of-type(6n+4),
.detail-card:nth-of-type(6n+4) {
  --card-header-bg: #f0fdf4;
  --card-header-bg-end: #dcfce7;
  --card-header-border: #bbf7d0;
  --card-header-accent: #16a34a;
  --card-header-text: #166534;
}
.panel:nth-of-type(6n+5),
.detail-card:nth-of-type(6n+5) {
  --card-header-bg: #fff1f2;
  --card-header-bg-end: #ffe4e6;
  --card-header-border: #fecdd3;
  --card-header-accent: #e11d48;
  --card-header-text: #9f1239;
}
.panel:nth-of-type(6n),
.detail-card:nth-of-type(6n) {
  --card-header-bg: #f5f3ff;
  --card-header-bg-end: #ede9fe;
  --card-header-border: #ddd6fe;
  --card-header-accent: #7c3aed;
  --card-header-text: #5b21b6;
}
.card-header-indigo {
  --card-header-bg: #eef2ff;
  --card-header-bg-end: #e0e7ff;
  --card-header-border: #c7d2fe;
  --card-header-accent: #4f46e5;
  --card-header-text: #312e81;
}
.card-header-cyan {
  --card-header-bg: #ecfeff;
  --card-header-bg-end: #cffafe;
  --card-header-border: #a5f3fc;
  --card-header-accent: #0891b2;
  --card-header-text: #155e75;
}
.card-header-amber {
  --card-header-bg: #fffbeb;
  --card-header-bg-end: #fef3c7;
  --card-header-border: #fde68a;
  --card-header-accent: #d97706;
  --card-header-text: #92400e;
}
.card-header-green {
  --card-header-bg: #f0fdf4;
  --card-header-bg-end: #dcfce7;
  --card-header-border: #bbf7d0;
  --card-header-accent: #16a34a;
  --card-header-text: #166534;
}
.card-header-rose {
  --card-header-bg: #fff1f2;
  --card-header-bg-end: #ffe4e6;
  --card-header-border: #fecdd3;
  --card-header-accent: #e11d48;
  --card-header-text: #9f1239;
}
.card-header-violet {
  --card-header-bg: #f5f3ff;
  --card-header-bg-end: #ede9fe;
  --card-header-border: #ddd6fe;
  --card-header-accent: #7c3aed;
  --card-header-text: #5b21b6;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.detail-grid p {
  margin: 0.35rem 0;
  color: var(--text-primary);
}
.pin-note {
  margin: 1rem 0 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.wallet-highlight {
  background: var(--theme-primary-muted);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid var(--theme-primary-soft);
}
.wallet-highlight span {
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.wallet-highlight strong {
  display: block;
  font-size: 2rem;
  color: var(--theme-primary);
  margin-top: 0.25rem;
}
.wallet-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.wallet-card span {
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.wallet-card strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 2rem;
  color: var(--theme-primary);
}
.wallet-card small {
  color: var(--text-muted);
}
.profile-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  max-width: 720px;
}
.profile-card p {
  margin: 0.5rem 0;
  color: var(--text-primary);
}
.profile-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.profile-top .avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--theme-brand-bg);
  color: #fff;
  font-size: 1.75rem;
  font-weight: 700;
}
.profile-top h3 {
  margin: 0;
  color: var(--text-primary);
}
.profile-top p {
  margin: 0.25rem 0 0;
  color: var(--text-secondary);
}
dl {
  display: grid;
  gap: 1rem;
  margin: 0;
}
dl div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
dl div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
dt {
  color: var(--text-secondary);
  font-size: 0.9rem;
}
dd {
  margin: 0;
  color: var(--text-primary);
  font-weight: 600;
}
.list {
  display: grid;
  gap: 0.75rem;
}
.list-item,
.item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--duration-fast) var(--ease-out),
    box-shadow var(--transition),
    border-color var(--transition);
}
.list-item:hover,
.item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.list-item strong,
.item strong {
  color: var(--text-primary);
}
.list-item p,
.item p {
  margin: 0.25rem 0 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.list-item span,
.item span {
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}
.item.unread {
  border-left: 4px solid var(--theme-primary);
}
.list-item {
  padding: 0.9rem 1rem;
  background: var(--surface-muted);
  box-shadow: none;
}
.sub-section h4 {
  margin: 0 0 0.75rem;
  color: var(--text-primary);
}
.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.activity-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}
.activity-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.activity-list strong {
  display: block;
  color: var(--text-primary);
}
.activity-list span,
.activity-list time {
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.placeholder-page {
  display: grid;
  gap: 1rem;
}
.hero-card,
.highlight-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.hero-card {
  padding: 2rem;
  text-align: center;
}
.emoji {
  font-size: 2rem;
}
.hero-card h2 {
  margin: 0.5rem 0;
  color: var(--text-primary);
}
.hero-card p {
  margin: 0 auto;
  max-width: 640px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.highlight-card {
  padding: 1.25rem;
  transition: transform var(--duration) var(--ease-out), box-shadow var(--transition);
}
.highlight-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.highlight-card span {
  font-size: 1.25rem;
}
.highlight-card p {
  margin: 0.75rem 0 0;
  color: var(--text-primary);
  line-height: 1.5;
}
textarea {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.8rem;
  font: inherit;
  resize: vertical;
  background: var(--surface);
}
.toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1200;
  min-width: 280px;
  max-width: 380px;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: slideUp var(--duration) var(--ease-out);
}
.toast.success {
  border-color: #bbf7d0;
  background: var(--success-soft);
  color: #15803d;
}
.toast.warning {
  border-color: #fde68a;
  background: var(--warning-soft);
  color: #b45309;
}
.toast.error {
  border-color: #fecaca;
  background: var(--danger-soft);
  color: var(--danger);
}
.toast.info {
  border-color: #a5f3fc;
  background: var(--info-soft);
  color: #0e7490;
}
@media (max-width: 1100px) {
  .panels {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .portal-shell {
    grid-template-columns: 1fr;
  }
  .portal-shell .sidebar {
    position: sticky;
    top: 0;
    height: auto;
    z-index: 40;
    border-right: none;
    border-bottom: 1px solid var(--theme-sidebar-border);
    padding-bottom: 0.85rem;
  }
  .portal-shell nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .portal-shell nav a {
    flex-direction: column;
    gap: 0.3rem;
    text-align: center;
    font-size: 0.75rem;
    padding: 0.55rem 0.4rem;
  }
  .portal-shell nav a::before {
    display: none;
  }
  .portal-shell .logout-btn {
    margin-top: 0.5rem;
  }
  .page-header {
    flex-direction: column;
  }
  .portal-grid {
    grid-template-columns: 1fr;
  }
  .portal-shell .topbar,
  .portal-shell .content {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
@media (max-width: 700px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .highlight-grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.ad-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.ad-admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
  animation: ad-fade-up .35s ease both;
}
.ad-admin-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.ad-admin-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: #0f172a;
  overflow: hidden;
}
.ad-admin-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.ad-admin-card:hover .ad-admin-media img {
  transform: scale(1.04);
}
.ad-admin-body {
  padding: 1rem;
  display: grid;
  gap: .5rem;
}
.ad-admin-top {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  align-items: flex-start;
}
.ad-admin-top h3 {
  margin: 0;
  font-size: 1rem;
}
.ad-admin-top a {
  color: inherit;
  text-decoration: none;
}
.ad-admin-body > p {
  margin: 0;
  color: var(--text-secondary);
  font-size: .85rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ad-admin-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  color: var(--text-muted);
  font-size: .8rem;
}
.ad-admin-meta span {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
}
.ad-admin-meta .material-symbols-outlined {
  font-size: 1rem;
}
.ad-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .25rem;
}
.ad-video-cover {
  width: 100%;
  height: 100%;
  min-height: 120px;
  display: grid;
  place-content: center;
  gap: .35rem;
  color: #fff;
  background:
    linear-gradient(
      135deg,
      #1e293b,
      #0f172a);
  text-align: center;
}
.ad-video-cover .material-symbols-outlined {
  font-size: 2.5rem;
}
.ad-video-cover.small {
  min-height: 80px;
}
.ad-video-cover.feed {
  min-height: 220px;
}
.ad-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.ad-skeleton-card {
  height: 280px;
  border-radius: 14px;
  background:
    linear-gradient(
      90deg,
      #f1f5f9 25%,
      #e2e8f0 50%,
      #f1f5f9 75%);
  background-size: 200%;
  animation: ad-shimmer 1.4s infinite;
}
.ad-skeleton-card.tall {
  height: 360px;
}
.ad-feed {
  display: grid;
  gap: 1.1rem;
  max-width: 720px;
  margin: 0 auto;
}
.ad-feed-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  animation: ad-fade-up .4s ease both;
  transition: box-shadow .2s ease, transform .2s ease;
}
.ad-feed-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.ad-feed-media {
  position: relative;
  display: block;
  background: #0b1220;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.ad-feed-media img,
.ad-feed-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #0b1220;
}
.ad-feed-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-primary);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  z-index: 2;
  transition: transform 0.15s ease, background 0.15s ease;
}
.ad-feed-nav:hover {
  transform: translateY(-50%) scale(1.06);
  background: #fff;
}
.ad-feed-nav--prev {
  left: 10px;
}
.ad-feed-nav--next {
  right: 10px;
}
.ad-feed-nav .material-symbols-outlined {
  font-size: 1.4rem;
}
.ad-feed-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  gap: 0.35rem;
  z-index: 2;
}
.ad-feed-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}
.ad-feed-dot.active {
  background: #fff;
  transform: scale(1.15);
}
.ad-feed-counter {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}
.ad-comment-btn.open {
  background: color-mix(in srgb, var(--theme-primary) 12%, transparent);
  border-color: color-mix(in srgb, var(--theme-primary) 35%, var(--border));
  color: var(--theme-primary);
}
.ad-inline-comments {
  margin-top: 0.35rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  animation: ad-fade-up 0.28s ease both;
}
.ad-feed-body {
  padding: 1rem 1.1rem 1.15rem;
  display: grid;
  gap: .65rem;
}
.ad-feed-head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: flex-start;
}
.ad-feed-head h3 {
  margin: 0;
  font-size: 1.1rem;
}
.ad-feed-head a {
  color: inherit;
  text-decoration: none;
}
.ad-feed-desc {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.55;
  white-space: pre-wrap;
}
.ad-feed-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem;
}
.ad-like-btn,
.ad-comment-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text-primary);
  border-radius: 999px;
  padding: .4rem .8rem;
  font-weight: 600;
  font-size: .88rem;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform .15s ease,
    background .15s ease,
    color .15s ease,
    border-color .15s ease;
}
.ad-like-btn:hover,
.ad-comment-btn:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--theme-primary) 35%, var(--border));
}
.ad-like-btn.liked {
  background: #fff1f2;
  color: #e11d48;
  border-color: #fecdd3;
  animation: ad-heart .35s ease;
}
.ad-like-btn .material-symbols-outlined,
.ad-comment-btn .material-symbols-outlined {
  font-size: 1.15rem;
}
.ad-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
  color: var(--text-secondary);
  font-size: .9rem;
}
.ad-social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}
.ad-people-list,
.ad-comment-list {
  display: grid;
  gap: .75rem;
}
.ad-people-list.compact {
  max-height: 240px;
  overflow: auto;
}
.ad-person-row,
.ad-comment-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: .75rem;
  align-items: start;
  animation: ad-fade-up .3s ease both;
}
.ad-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--theme-primary-soft, #eef2ff);
  color: var(--theme-primary, #4f46e5);
  font-weight: 700;
}
.ad-comment-head {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
  margin-bottom: .25rem;
}
.ad-comment-item p {
  margin: 0;
  color: var(--text-primary);
  line-height: 1.45;
}
.ad-comment-form {
  display: grid;
  gap: .65rem;
  margin-bottom: 1rem;
}
.ad-comment-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 80px;
}
.wide-modal {
  width: min(640px, 100%);
}
@keyframes ad-fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes ad-shimmer {
  0% {
    background-position: 200%;
  }
  100% {
    background-position: -200%;
  }
}
@keyframes ad-heart {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}
@media (max-width: 900px) {
  .ad-social-grid {
    grid-template-columns: 1fr;
  }
}
.ad-comment-thread {
  display: grid;
  gap: 0.65rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}
.ad-comment-thread:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.ad-replies {
  display: grid;
  gap: 0.65rem;
  margin-left: 2.4rem;
  padding-left: 0.85rem;
  border-left: 2px solid color-mix(in srgb, var(--theme-primary) 25%, var(--border));
}
.ad-comment-item.reply .ad-avatar.small {
  width: 32px;
  height: 32px;
  font-size: 0.85rem;
}
.ad-reply-toggle {
  margin-top: 0.35rem;
  border: 0;
  background: transparent;
  color: var(--theme-primary);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
}
.ad-reply-toggle:hover {
  text-decoration: underline;
}
.ad-reply-form {
  margin-left: 2.4rem;
  display: grid;
  gap: 0.5rem;
  animation: ad-fade-up 0.25s ease both;
}
.ad-reply-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 64px;
}
.ad-reply-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* src/styles.css */
:root {
  color-scheme: light;
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-primary);
  font-weight: var(--font-weight-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
}
body {
  background: var(--bg-page);
}
button,
input,
select,
textarea {
  font: inherit;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
::selection {
  background: rgba(79, 70, 229, 0.18);
}

/* angular:styles/global:styles */
/*# sourceMappingURL=styles.css.map */
