:root {
  --blue-primary: #1E72B8;
  --blue-dark: #155A96;
  --blue-darker: #0D4070;
  --blue-light: #4A9FD4;
  --blue-lighter: #D6EAF8;
  --blue-faint: #EBF5FC;

  --orange: #F26522;
  --orange-dark: #D4551A;
  --orange-light: #F5874A;
  --orange-lighter: #FDE8DA;
  --orange-faint: #FEF3EC;

  --gray-900: #1A1A2E;
  --gray-800: #333333;
  --gray-700: #555555;
  --gray-600: #777777;
  --gray-500: #9CA3AF;
  --gray-400: #AAAAAA;
  --gray-300: #CCCCCC;
  --gray-200: #E5E5E5;
  --gray-100: #F5F5F5;
  --gray-50: #FAFAFA;

  --white: #FFFFFF;

  --success: #22C55E;
  --success-light: #DCFCE7;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --error: #EF4444;
  --error-light: #FEE2E2;
  --info: #3B82F6;
  --info-light: #DBEAFE;

  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --header-height: 64px;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 25px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.06);
  --shadow-lg: 0 20px 40px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.08);

  --transition: 0.2s ease;
  --transition-slow: 0.35s ease;
}

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

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* Layout */
.app-layout { display: flex; min-height: 100vh; }
.main-content {
  flex: 1; margin-left: var(--sidebar-width);
  transition: margin-left var(--transition-slow);
  min-height: 100vh; display: flex; flex-direction: column;
}
.main-content.collapsed { margin-left: var(--sidebar-collapsed); }
.page-body { padding: 24px; flex: 1; margin-top: var(--header-height); }

/* Typography */
.page-title { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; }
.page-subtitle { font-size: 0.875rem; color: var(--gray-600); margin-bottom: 24px; }
h1 { font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.375rem; font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

/* Cards */
.card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); padding: 24px; }
.card-sm { padding: 16px; border-radius: var(--radius); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: var(--radius); font-size: 0.875rem; font-weight: 600; transition: all var(--transition); cursor: pointer; border: none; white-space: nowrap; }
.btn-primary { background: var(--blue-primary); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-accent { background: var(--orange); color: var(--white); }
.btn-accent:hover { background: var(--orange-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; color: var(--blue-primary); border: 1.5px solid var(--blue-primary); }
.btn-outline:hover { background: var(--blue-faint); }
.btn-ghost { background: transparent; color: var(--gray-700); border: 1.5px solid var(--gray-200); }
.btn-ghost:hover { background: var(--gray-100); border-color: var(--gray-300); }
.btn-danger { background: var(--error); color: var(--white); }
.btn-danger:hover { background: #DC2626; }
.btn-sm { padding: 6px 14px; font-size: 0.8125rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge-blue { background: var(--blue-lighter); color: var(--blue-dark); }
.badge-orange { background: var(--orange-lighter); color: var(--orange-dark); }
.badge-green { background: var(--success-light); color: #166534; }
.badge-yellow { background: var(--warning-light); color: #92400E; }
.badge-red { background: var(--error-light); color: #991B1B; }
.badge-gray { background: var(--gray-200); color: var(--gray-700); }

/* Form elements */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius); font-size: 0.875rem; color: var(--gray-800);
  background: var(--white); transition: border-color var(--transition), box-shadow var(--transition); outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--blue-primary); box-shadow: 0 0 0 3px rgba(30,114,184,0.12); }
.form-textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.form-select { appearance: none; cursor: pointer; }

/* Progress bar */
.progress-bar { width: 100%; height: 8px; background: var(--gray-200); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue-primary), var(--blue-light)); transition: width 0.6s ease; }
.progress-fill.orange { background: linear-gradient(90deg, var(--orange), var(--orange-light)); }
.progress-fill.green { background: linear-gradient(90deg, var(--success), #4ADE80); }

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* Stat cards */
.stat-card { background: var(--white); border-radius: var(--radius-lg); padding: 20px; border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm); display: flex; align-items: flex-start; gap: 16px; transition: transform var(--transition), box-shadow var(--transition); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-icon { width: 48px; height: 48px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon.blue { background: var(--blue-faint); color: var(--blue-primary); }
.stat-icon.orange { background: var(--orange-faint); color: var(--orange); }
.stat-icon.green { background: var(--success-light); color: #16A34A; }
.stat-icon.yellow { background: var(--warning-light); color: #D97706; }
.stat-icon.red { background: var(--error-light); color: #DC2626; }
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--gray-900); line-height: 1; }
.stat-label { font-size: 0.8125rem; color: var(--gray-600); margin-top: 4px; }
.stat-delta { font-size: 0.75rem; font-weight: 600; margin-top: 6px; }
.stat-delta.up { color: var(--success); }
.stat-delta.down { color: var(--error); }

/* Table */
.table-wrapper { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th { text-align: left; padding: 12px 16px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-600); background: var(--gray-50); border-bottom: 1px solid var(--gray-200); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--gray-100); color: var(--gray-800); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--gray-50); }

/* Avatar */
.avatar { border-radius: 50%; flex-shrink: 0; background: var(--blue-faint); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--blue-primary); }
.avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar-md { width: 40px; height: 40px; font-size: 0.875rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1rem; }
.avatar-xl { width: 80px; height: 80px; font-size: 1.5rem; }

/* Tabs */
.tabs { display: flex; gap: 2px; background: var(--gray-100); border-radius: var(--radius); padding: 4px; margin-bottom: 24px; }
.tab-btn { flex: 1; padding: 8px 16px; border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 500; color: var(--gray-600); transition: all var(--transition); text-align: center; }
.tab-btn.active { background: var(--white); color: var(--blue-primary); font-weight: 600; box-shadow: var(--shadow-sm); }
.tab-btn:hover:not(.active) { color: var(--gray-800); }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes spin { to { transform: rotate(360deg); } }
.animate-fade { animation: fadeIn 0.3s ease; }
.animate-slide { animation: slideUp 0.3s ease; }

/* Divider */
.divider { height: 1px; background: var(--gray-200); margin: 16px 0; }

/* Empty state */
.empty-state { text-align: center; padding: 48px 24px; color: var(--gray-600); }

/* Flex utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }

/* Spacing */
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }

/* Text utilities */
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--gray-600); }
.text-primary { color: var(--blue-primary); }
.text-accent { color: var(--orange); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Section header */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-title { font-size: 1rem; font-weight: 700; color: var(--gray-900); }

/* Search input */
.search-wrapper { position: relative; }
.search-wrapper svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-400); pointer-events: none; }
.search-input { width: 100%; padding: 10px 14px 10px 38px; border: 1.5px solid var(--gray-200); border-radius: var(--radius); font-size: 0.875rem; outline: none; transition: border-color var(--transition), box-shadow var(--transition); background: var(--white); }
.search-input:focus { border-color: var(--blue-primary); box-shadow: 0 0 0 3px rgba(30,114,184,0.12); }

/* File upload */
.file-upload-area { border: 2px dashed var(--gray-300); border-radius: var(--radius-lg); padding: 32px; text-align: center; cursor: pointer; transition: all var(--transition); color: var(--gray-600); }
.file-upload-area:hover, .file-upload-area.drag-over { border-color: var(--blue-primary); background: var(--blue-faint); color: var(--blue-primary); }

/* ===== Sidebar ===== */
.sidebar { width: var(--sidebar-width); background: var(--gray-900); min-height: 100vh; position: fixed; left: 0; top: 0; bottom: 0; display: flex; flex-direction: column; transition: width var(--transition-slow); z-index: 100; overflow: hidden; }
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar-header { padding: 14px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid rgba(255,255,255,0.08); min-height: 76px; }
.sidebar-logo { display: flex; align-items: center; justify-content: center; min-width: 0; padding: 6px 8px; overflow: hidden; border: 1px solid rgba(255,255,255,0.72); border-radius: 12px; background: rgba(255,255,255,0.96); box-shadow: 0 8px 18px rgba(0,0,0,0.16); }
.sidebar-logo-img { display: block; width: 142px; height: 42px; object-fit: contain; flex-shrink: 1; filter: none; opacity: 1; }
.sidebar-logo.compact { width: 44px; height: 48px; padding: 1px; border: 0; background: transparent; box-shadow: none; }
.sidebar-logo.compact .sidebar-logo-img { width: 43px; height: 43px; object-fit: contain; }
.sidebar.collapsed .sidebar-logo.compact { width: 28px; height: 36px; }
.sidebar.collapsed .sidebar-logo.compact .sidebar-logo-img { width: 34px; height: 34px; max-width: none; }
.sidebar.collapsed .sidebar-toggle { width: 20px; height: 28px; }
.sidebar-toggle { width: 28px; height: 28px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); display: flex; align-items: center; justify-content: center; transition: all var(--transition); flex-shrink: 0; }
.sidebar-toggle:hover { background: rgba(255,255,255,0.15); color: white; }
.sidebar-role-badge { padding: 12px 16px 4px; }
.role-pill { display: inline-block; background: var(--role-accent, var(--blue-primary)); color: white; font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 3px 10px; border-radius: 999px; }
.sidebar-nav { flex: 1; padding: 8px 8px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; overflow-x: hidden; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--radius); color: rgba(255,255,255,0.55); font-size: 0.875rem; font-weight: 500; transition: all var(--transition); position: relative; white-space: nowrap; cursor: pointer; border: none; background: none; font-family: inherit; width: 100%; text-align: left; }
.nav-item:hover { color: white; background: rgba(255,255,255,0.08); }
.nav-item.active { color: white; background: var(--role-accent, var(--blue-primary)); font-weight: 600; }
.nav-item svg { flex-shrink: 0; }
.nav-active-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.6); margin-left: auto; }
.sidebar-footer { padding: 8px 8px 16px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 12px 12px 8px; overflow: hidden; }
.sidebar-user-avatar { background: var(--role-accent, var(--blue-primary)); color: white; flex-shrink: 0; }
.sidebar-user-info { overflow: hidden; flex: 1; }
.sidebar-user-name { display: block; font-size: 0.8125rem; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { display: block; font-size: 0.6875rem; color: rgba(255,255,255,0.4); }
.logout-btn { color: rgba(255,255,255,0.45); }
.logout-btn:hover { color: var(--error); background: rgba(239,68,68,0.1); }
.sidebar.collapsed .sidebar-nav .nav-item { justify-content: center; padding: 11px; }
.sidebar.collapsed .nav-item span { display: none; }
.sidebar.collapsed .nav-active-dot { display: none; }

/* ===== Header ===== */
.top-header { position: fixed; top: 0; right: 0; left: var(--sidebar-width); height: var(--header-height); background: var(--white); border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; z-index: 90; transition: left var(--transition-slow); box-shadow: var(--shadow-sm); }
.top-header.collapsed { left: var(--sidebar-collapsed); }
.header-left { min-width: 0; }
.header-title { font-size: 1.125rem; font-weight: 700; color: var(--gray-900); line-height: 1.2; }
.header-sub { font-size: 0.75rem; color: var(--gray-500); margin-top: 1px; }
.header-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.header-search { width: 220px; }
.header-icon-btn { width: 38px; height: 38px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; background: var(--gray-100); color: var(--gray-600); transition: all var(--transition); position: relative; cursor: pointer; }
.header-icon-btn:hover { background: var(--gray-200); color: var(--gray-800); }
.notif-badge { position: absolute; top: 4px; right: 4px; width: 16px; height: 16px; background: var(--orange); color: white; font-size: 0.625rem; font-weight: 700; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid white; }
.header-user { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: var(--radius); cursor: pointer; transition: background var(--transition); }
.header-user:hover { background: var(--gray-100); }
.header-avatar { background: var(--blue-faint); color: var(--blue-primary); font-weight: 700; }
.header-user-name { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--gray-900); white-space: nowrap; }
.header-user-role { display: block; font-size: 0.6875rem; color: var(--gray-500); }
.notification-wrap { position: relative; }
.notification-panel { position: absolute; top: 47px; right: 0; width: min(390px, calc(100vw - 28px)); overflow: hidden; border: 1px solid var(--gray-200); border-radius: 16px; background: var(--white); box-shadow: 0 22px 55px rgba(15,23,42,0.2); animation: slideUp 0.18s ease; }
.notification-panel[hidden] { display: none; }
.notification-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 17px; border-bottom: 1px solid var(--gray-100); background: linear-gradient(120deg, var(--blue-faint), var(--white)); }
.notification-panel-head span { color: var(--blue-primary); font-size: 0.58rem; font-weight: 800; letter-spacing: 0.1em; }
.notification-panel-head h3 { margin-top: 2px; font-size: 1rem; }
.notification-panel-head button { color: var(--blue-primary); font-size: 0.67rem; font-weight: 700; }
.notification-list { max-height: min(480px, calc(100vh - 130px)); overflow-y: auto; }
.notification-item { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr) 8px; align-items: center; gap: 10px; width: 100%; padding: 13px 15px; border-bottom: 1px solid var(--gray-100); color: var(--gray-800); text-align: left; }
.notification-item:hover { background: var(--gray-50); }
.notification-item.unread { background: var(--blue-faint); }
.notification-item-icon { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: var(--white); color: var(--blue-primary); box-shadow: var(--shadow-sm); }
.notification-item-copy strong, .notification-item-copy span, .notification-item-copy small { display: block; }
.notification-item-copy strong { font-size: 0.76rem; }
.notification-item-copy span { overflow: hidden; margin-top: 2px; color: var(--gray-600); font-size: 0.69rem; text-overflow: ellipsis; white-space: nowrap; }
.notification-item-copy small { overflow: hidden; margin-top: 3px; color: var(--gray-500); font-size: 0.61rem; text-overflow: ellipsis; white-space: nowrap; }
.notification-item > i { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.notification-empty { display: flex; min-height: 175px; align-items: center; justify-content: center; flex-direction: column; gap: 6px; padding: 24px; color: var(--success); text-align: center; }
.notification-empty strong { color: var(--gray-800); font-size: 0.82rem; }
.notification-empty span { color: var(--gray-500); font-size: 0.69rem; }

/* Diálogos e avisos internos */
.system-dialog-backdrop { position: fixed; inset: 0; z-index: 1800; display: flex; align-items: center; justify-content: center; padding: 22px; background: rgba(15,23,42,0.58); backdrop-filter: blur(4px); animation: fadeIn 0.17s ease; }
.system-dialog { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 17px; width: min(520px, 100%); padding: 24px; border: 1px solid var(--gray-200); border-radius: 20px; background: var(--white); box-shadow: 0 28px 70px rgba(15,23,42,0.26); animation: slideUp 0.2s ease; }
.system-dialog-icon { display: flex; align-items: center; justify-content: center; width: 55px; height: 55px; border-radius: 16px; background: var(--blue-faint); color: var(--blue-primary); }
.system-dialog-success .system-dialog-icon { background: var(--success-light); color: var(--success); }
.system-dialog-warning .system-dialog-icon { background: var(--warning-light); color: #B77900; }
.system-dialog-error .system-dialog-icon { background: var(--error-light); color: var(--error); }
.system-dialog-copy > span { color: var(--blue-primary); font-size: 0.61rem; font-weight: 800; letter-spacing: 0.1em; }
.system-dialog-warning .system-dialog-copy > span { color: #B77900; }
.system-dialog-error .system-dialog-copy > span { color: var(--error); }
.system-dialog-copy h2 { margin: 3px 0 7px; font-size: 1.15rem; }
.system-dialog-copy p { color: var(--gray-600); font-size: 0.79rem; line-height: 1.6; }
.system-dialog-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 4px; }
.system-toast-container { position: fixed; top: 78px; right: 20px; z-index: 1900; display: flex; width: min(390px, calc(100vw - 30px)); flex-direction: column; gap: 9px; }
.system-toast { display: grid; grid-template-columns: 31px minmax(0, 1fr) 24px; align-items: center; gap: 9px; padding: 12px; border: 1px solid var(--gray-200); border-left: 4px solid var(--success); border-radius: 13px; background: var(--white); box-shadow: var(--shadow-lg); animation: slideUp 0.2s ease; }
.system-toast-error { border-left-color: var(--error); }
.system-toast > span { display: flex; align-items: center; justify-content: center; width: 29px; height: 29px; border-radius: 8px; background: var(--success-light); color: var(--success); }
.system-toast-error > span { background: var(--error-light); color: var(--error); }
.system-toast p { color: var(--gray-700); font-size: 0.74rem; line-height: 1.45; }
.system-toast button { color: var(--gray-400); }
.system-toast.leaving { opacity: 0; transform: translateX(12px); transition: 0.18s ease; }

/* ===== Login Page ===== */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; background: linear-gradient(135deg, #f8f9fa 0%, #e8f4fd 100%); padding: 24px; }
.login-bg { position: absolute; inset: 0; pointer-events: none; }
.login-blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.25; }
.blob-1 { width: 500px; height: 500px; background: var(--blue-primary); top: -150px; left: -100px; }
.blob-2 { width: 400px; height: 400px; background: var(--orange); bottom: -100px; right: -100px; }
.blob-3 { width: 300px; height: 300px; background: var(--blue-light); top: 40%; left: 30%; }
.login-container { display: flex; gap: 60px; max-width: 1000px; width: 100%; position: relative; z-index: 1; align-items: center; }
.login-left { flex: 1; padding: 24px; }
.login-logo { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; margin-bottom: 30px; }
.login-logo img { display: block; width: min(360px, 100%); height: auto; max-height: 112px; object-fit: contain; }
.login-headline { font-size: 2.25rem; font-weight: 800; color: var(--gray-900); line-height: 1.15; margin-bottom: 16px; }
.login-headline span { color: var(--blue-primary); }
.login-tagline { font-size: 1rem; color: var(--gray-600); line-height: 1.7; margin-bottom: 40px; max-width: 380px; }
.login-stats { display: flex; align-items: center; gap: 24px; }
.login-stat { text-align: center; }
.login-stat-value { display: block; font-size: 1.75rem; font-weight: 800; color: var(--orange); }
.login-stat-label { display: block; font-size: 0.8125rem; color: var(--gray-600); font-weight: 500; }
.login-stat-divider { width: 1px; height: 40px; background: var(--gray-300); }
.login-right { width: 440px; flex-shrink: 0; }
.login-card { background: var(--white); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); padding: 36px; border: 1px solid rgba(255,255,255,0.8); }
.login-card-header { margin-bottom: 28px; text-align: center; }
.login-card-header h2 { font-size: 1.375rem; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; }
.login-card-header p { font-size: 0.875rem; color: var(--gray-600); }
.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 28px; }
.role-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px; border-radius: var(--radius-lg); border: 2px solid var(--gray-200); background: var(--white); cursor: pointer; transition: all var(--transition); text-align: center; }
.role-card:hover { border-color: var(--role-color, var(--blue-primary)); background: color-mix(in srgb, var(--role-color, var(--blue-primary)) 8%, white); }
.role-card.active { border-color: var(--role-color, var(--blue-primary)); background: color-mix(in srgb, var(--role-color, var(--blue-primary)) 8%, white); box-shadow: 0 0 0 3px color-mix(in srgb, var(--role-color, var(--blue-primary)) 20%, transparent); }
.role-icon { font-size: 1.75rem; }
.role-label { font-size: 0.8125rem; font-weight: 700; color: var(--gray-800); }
.login-form { margin-bottom: 16px; }
.login-hint { text-align: center; font-size: 0.75rem; color: var(--gray-500); margin-top: 16px; }
.login-spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }

/* ===== Student Dashboard ===== */
.sd-hero { padding: 28px; }
.sd-hero-top { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 24px; }
.sd-avatar-area { position: relative; flex-shrink: 0; }
.sd-avatar-ring { width: 80px; height: 80px; border-radius: 50%; background: linear-gradient(135deg, var(--blue-primary), var(--blue-light)); padding: 3px; display: flex; align-items: center; justify-content: center; }
.sd-avatar { width: 74px; height: 74px; font-size: 1.5rem; font-weight: 800; background: white; color: var(--blue-primary); border: none; }
.sd-avatar-badge { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); background: var(--orange); color: white; font-size: 0.625rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; white-space: nowrap; border: 2px solid white; text-transform: uppercase; letter-spacing: 0.04em; }
.sd-hero-body { flex: 1; padding-top: 4px; }
.sd-greeting { font-size: 0.8125rem; color: var(--gray-500); font-weight: 500; margin-bottom: 4px; }
.sd-name { font-size: 1.375rem; font-weight: 800; color: var(--gray-900); margin-bottom: 10px; line-height: 1.2; }
.sd-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.sd-tag { padding: 4px 12px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.sd-tag-blue { background: var(--blue-faint); color: var(--blue-dark); border: 1px solid var(--blue-lighter); }
.sd-tag-gray { background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-200); }
.sd-hero-progress-block { flex-shrink: 0; }
.sd-big-progress { width: 96px; height: 96px; position: relative; }
.sd-ring-svg { width: 100%; height: 100%; }
.sd-ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.sd-ring-pct { font-size: 1.25rem; font-weight: 800; color: var(--gray-900); line-height: 1; }
.sd-ring-sub { font-size: 0.625rem; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }
.sd-stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding-top: 20px; border-top: 1px solid var(--gray-100); }
.sd-stat-item { display: flex; align-items: center; gap: 10px; }
.sd-stat-icon { width: 38px; height: 38px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sd-stat-val { display: block; font-size: 1.125rem; font-weight: 800; line-height: 1.1; }
.sd-stat-lbl { display: block; font-size: 0.6875rem; color: var(--gray-500); font-weight: 500; margin-top: 1px; }
.sd-main-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sd-card-label { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; font-size: 0.8125rem; font-weight: 700; color: var(--gray-700); text-transform: uppercase; letter-spacing: 0.05em; }
.sd-card-label svg { color: var(--orange); }
.sd-label-count { margin-left: auto; font-size: 0.75rem; color: var(--gray-500); font-weight: 500; text-transform: none; letter-spacing: 0; }
.sd-mission-card { border-top: 3px solid var(--orange); }
.sd-mission-title { font-size: 1.125rem; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; }
.sd-mission-obj { font-size: 0.8125rem; color: var(--gray-600); line-height: 1.5; margin-bottom: 12px; }
.sd-mission-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.sd-meta-badge { padding: 3px 10px; border-radius: 999px; font-size: 0.6875rem; font-weight: 600; }
.sd-meta-blue { background: var(--blue-faint); color: var(--blue-dark); border: 1px solid var(--blue-lighter); }
.sd-meta-gray { background: var(--gray-100); color: var(--gray-600); border: 1px solid var(--gray-200); }
.sd-mission-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--gray-100); }
.sd-mission-progress { flex: 1; }
.sd-mini-bar { width: 100%; height: 6px; background: var(--gray-200); border-radius: 999px; overflow: hidden; margin-bottom: 4px; }
.sd-mini-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--orange), var(--orange-light)); }
.sd-mini-pct { font-size: 0.6875rem; color: var(--gray-500); font-weight: 600; }
.sd-cta-btn { display: flex; align-items: center; gap: 4px; padding: 8px 16px; border-radius: var(--radius); font-size: 0.8125rem; font-weight: 700; background: var(--orange); color: white; border: none; cursor: pointer; transition: all var(--transition); white-space: nowrap; }
.sd-cta-btn:hover { background: var(--orange-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(242,101,34,0.3); }
.sd-medals-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sd-medal { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: var(--radius); border: 1.5px solid var(--gray-200); text-align: center; position: relative; transition: all var(--transition); }
.sd-medal-on { border-color: var(--orange-lighter); background: var(--orange-faint); }
.sd-medal-off { opacity: 0.38; filter: grayscale(1); }
.sd-medal-ico { font-size: 1.375rem; }
.sd-medal-nm { font-size: 0.625rem; font-weight: 600; color: var(--gray-700); line-height: 1.3; }
.sd-medal-check { position: absolute; top: 4px; right: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--success); color: white; font-size: 0.5rem; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.sd-missions { display: flex; flex-direction: column; gap: 2px; }
.sd-mrow { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: var(--radius); transition: background var(--transition); }
.sd-mrow:hover { background: var(--gray-50); }
.sd-mrow-icon { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sd-mrow-icon-done { background: #F0FDF4; color: #22C55E; }
.sd-mrow-icon-pending { background: var(--gray-100); color: var(--gray-400); }
.sd-mrow-body { flex: 1; min-width: 0; }
.sd-mrow-title { display: block; font-size: 0.875rem; font-weight: 600; color: var(--gray-900); margin-bottom: 2px; }
.sd-mrow-sub { display: block; font-size: 0.75rem; color: var(--gray-500); }
.sd-mrow-meta { font-size: 0.6875rem; font-weight: 600; color: var(--gray-400); white-space: nowrap; flex-shrink: 0; }
.sd-link-btn { display: flex; align-items: center; gap: 2px; font-size: 0.75rem; font-weight: 600; color: var(--blue-primary); background: none; border: none; cursor: pointer; padding: 0; transition: color var(--transition); text-transform: none; letter-spacing: 0; }
.sd-link-btn:hover { color: var(--blue-dark); }

/* ===== Student Timeline ===== */
.timeline-legend { display: flex; gap: 24px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 8px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }
.module-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; padding-bottom: 16px; border-bottom: 1px solid var(--gray-100); }
.module-header-left { display: flex; align-items: center; gap: 16px; }
.module-badge { padding: 4px 14px; border-radius: var(--radius-sm); font-weight: 700; font-size: 0.8125rem; border: 1.5px solid; }
.module-progress-mini { display: flex; align-items: center; gap: 10px; }
.timeline-track { display: flex; flex-direction: column; gap: 0; }
.timeline-item { display: flex; align-items: flex-start; gap: 20px; position: relative; padding-bottom: 8px; }
.timeline-dot { width: 40px; height: 40px; border-radius: 50%; border: 2px solid; display: flex; align-items: center; justify-content: center; flex-shrink: 0; z-index: 2; margin-top: 4px; }
.timeline-connector { position: absolute; left: 19px; top: 44px; bottom: -8px; width: 2px; background: var(--gray-200); z-index: 1; }
.timeline-connector.active { background: var(--success); }
.timeline-card { flex: 1; background: var(--gray-50); border-radius: var(--radius); padding: 16px; border-left: 3px solid; margin-bottom: 16px; transition: all var(--transition); }
.timeline-card:hover { box-shadow: var(--shadow); background: white; }
.timeline-card.current { background: var(--orange-faint); border-left-color: var(--orange); box-shadow: var(--shadow); }

/* ===== Student Profile ===== */
.profile-header { display: flex; align-items: flex-start; gap: 24px; }
.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar { background: var(--blue-faint); color: var(--blue-primary); font-size: 1.75rem; border: 3px solid var(--blue-lighter); }
.profile-edit-btn { position: absolute; bottom: 0; right: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--blue-primary); color: white; display: flex; align-items: center; justify-content: center; border: 2px solid white; cursor: pointer; }
.profile-info { flex: 1; }
.profile-info h2 { margin-bottom: 4px; }

/* ===== CreateStore ===== */
.store-page { max-width: 1120px; margin: 0 auto; }
.store-hero {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 32px;
  min-height: 190px; margin-bottom: 28px; padding: 34px 38px; border-radius: 22px;
  background: linear-gradient(125deg, #102E50 0%, #155C95 58%, #2489C9 100%); color: white;
  box-shadow: 0 16px 38px rgba(16, 46, 80, 0.18);
}
.store-hero::after {
  content: ''; position: absolute; width: 330px; height: 330px; right: -105px; top: -145px;
  border: 48px solid rgba(255,255,255,0.07); border-radius: 50%;
}
.store-hero > * { position: relative; z-index: 1; }
.store-hero h1 { margin: 5px 0 7px; color: white; font-size: clamp(2.1rem, 5vw, 3.45rem); letter-spacing: -0.055em; }
.store-hero p { max-width: 570px; color: rgba(255,255,255,0.78); font-size: 0.98rem; }
.store-kicker { display: block; color: var(--orange); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.16em; }
.store-hero .store-kicker { color: #FFAF80; }
.store-balance-card {
  display: flex; align-items: center; gap: 13px; min-width: 205px; padding: 16px 18px;
  border: 1px solid rgba(255,255,255,0.18); border-radius: 16px; background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
}
.store-balance-icon { display: flex; align-items: center; justify-content: center; width: 45px; height: 45px; border-radius: 50%; background: var(--orange); color: white; }
.store-balance-card span { display: block; color: rgba(255,255,255,0.72); font-size: 0.72rem; font-weight: 600; }
.store-balance-card strong { display: block; margin-top: 2px; color: white; font-size: 1.28rem; }
.store-catalog { margin-bottom: 28px; }
.store-section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.store-section-title > div > span { color: var(--gray-400); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.14em; }
.store-section-title h3 { margin-top: 2px; }
.store-product-card {
  display: grid; grid-template-columns: minmax(300px, 0.9fr) minmax(320px, 1.1fr); overflow: hidden;
  border: 1px solid var(--gray-200); border-radius: 20px; background: white; box-shadow: var(--shadow);
}
.store-products-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.store-products-grid .store-product-card { display: flex; flex-direction: column; min-width: 0; }
.store-products-grid .store-product-visual { min-height: 190px; background: radial-gradient(circle at 50% 42%, white 0%, var(--store-surface) 68%, color-mix(in srgb, var(--store-accent) 18%, white) 100%); }
.store-products-grid .store-product-icon { width: 88px; height: 88px; border-radius: 24px; background: linear-gradient(145deg, var(--store-accent), color-mix(in srgb, var(--store-accent) 72%, #102E50)); box-shadow: 0 18px 30px color-mix(in srgb, var(--store-accent) 28%, transparent); }
.store-products-grid .store-visual-label { color: var(--store-accent); }
.store-products-grid .store-product-content { flex: 1; justify-content: flex-start; padding: 22px; }
.store-products-grid .store-category { color: var(--store-accent); background: var(--store-surface); }
.store-products-grid .store-product-content h2 { min-height: 2.6em; margin-bottom: 8px; font-size: 1.28rem; }
.store-products-grid .store-product-content > p { min-height: 4.7em; font-size: 0.82rem; line-height: 1.55; }
.store-products-grid .store-product-footer { align-items: center; margin-top: auto; padding-top: 18px; }
.store-products-grid .store-price { font-size: 1.55rem; }
.store-products-grid .store-request-button { min-width: 0; padding-left: 13px; padding-right: 13px; }
.store-product-visual {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 330px; overflow: hidden;
  background: radial-gradient(circle at 50% 42%, #E8F6FF 0%, #D8EEFC 45%, #C9E5F7 100%); color: var(--blue-primary);
}
.store-product-visual::before { content: ''; position: absolute; width: 240px; height: 80px; left: 50%; bottom: 48px; transform: translateX(-50%); border-radius: 50%; background: rgba(20, 87, 140, 0.1); filter: blur(8px); }
.store-product-icon {
  position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; width: 120px; height: 120px;
  border: 2px solid rgba(255,255,255,0.86); border-radius: 31px; transform: rotate(-7deg);
  background: linear-gradient(145deg, var(--blue-primary), #164E7C); color: white; box-shadow: 0 22px 36px rgba(30, 114, 184, 0.3);
}
.store-product-icon svg { transform: rotate(7deg); }
.store-visual-label { position: absolute; z-index: 3; bottom: 21px; padding: 6px 11px; border-radius: 99px; background: rgba(255,255,255,0.78); color: var(--blue-dark); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.12em; backdrop-filter: blur(5px); }
.store-shape { position: absolute; display: block; border-radius: 10px; transform: rotate(25deg); box-shadow: 0 10px 20px rgba(30, 114, 184, 0.14); }
.store-shape-one { width: 44px; height: 44px; top: 34px; left: 15%; background: #FF9861; }
.store-shape-two { width: 28px; height: 28px; right: 16%; top: 24%; background: white; transform: rotate(42deg); }
.store-shape-three { width: 34px; height: 34px; left: 21%; bottom: 28%; border-radius: 50%; background: #62C6A7; }
.store-product-content { display: flex; flex-direction: column; justify-content: center; padding: 38px 42px; }
.store-category { align-self: flex-start; margin-bottom: 13px; padding: 5px 10px; border-radius: 99px; background: var(--orange-faint); color: var(--orange); font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; }
.store-product-content h2 { margin-bottom: 10px; font-size: clamp(1.55rem, 3vw, 2.2rem); letter-spacing: -0.035em; }
.store-product-content > p { color: var(--gray-500); line-height: 1.65; }
.store-product-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-top: 32px; padding-top: 23px; border-top: 1px solid var(--gray-100); }
.store-price-label { display: block; margin-bottom: 2px; color: var(--gray-400); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; }
.store-price { color: var(--success); font-size: 2rem; line-height: 1; }
.store-price small { font-size: 0.8rem; }
.store-request-button { min-width: 176px; justify-content: center; }
.store-request-button:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; transform: none; }
.store-missing { margin-top: 12px; color: #B45309 !important; font-size: 0.78rem; text-align: right; }
.store-request-panel { margin-bottom: 28px; border-top: 4px solid var(--orange); }
.store-request-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.store-request-panel-head h3 { margin-top: 4px; }
.store-request-confirm { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; padding: 14px 16px; border-radius: var(--radius); background: var(--gray-50); }
.store-request-confirm > div { display: flex; align-items: center; gap: 9px; color: var(--gray-600); font-size: 0.85rem; }
.store-request-confirm strong { color: var(--success); font-size: 1.05rem; }
.store-policy-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; padding: 12px 14px; border: 1px solid #BAE6FD; border-radius: var(--radius); background: #F0F9FF; color: #075985; font-size: 0.8rem; line-height: 1.45; }
.store-policy-note svg { flex: 0 0 auto; margin-top: 1px; }
.store-policy-warning { border-color: #FDE68A; background: #FFFBEB; color: #92400E; }
.store-history .section-header { margin-bottom: 8px; }
.store-history .section-header h3 { margin-top: 3px; }
.store-history-list { display: flex; flex-direction: column; }
.store-history-item { display: flex; align-items: flex-start; gap: 14px; padding: 18px 0; border-top: 1px solid var(--gray-100); }
.store-history-item:first-child { border-top: 0; }
.store-history-icon { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; }
.store-history-main { flex: 1; min-width: 0; }
.store-history-heading { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.store-history-main > p { margin-top: 6px; color: var(--gray-600); font-size: 0.84rem; line-height: 1.5; white-space: pre-wrap; }
.store-status { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 99px; font-size: 0.68rem; font-weight: 700; }
.store-status-pending { background: var(--warning-light); color: #92400E; }
.store-status-approved { background: var(--success-light); color: #166534; }
.store-status-rejected { background: var(--error-light); color: #991B1B; }
.store-status-cancelled { background: var(--gray-100); color: var(--gray-500); }
.store-history-meta, .store-admin-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; color: var(--gray-400); font-size: 0.7rem; }
.store-history-side { display: flex; align-items: flex-end; flex-direction: column; gap: 8px; flex: 0 0 auto; }
.store-history-side > strong { color: var(--success); font-size: 0.9rem; }
.store-review-note { margin-top: 10px; padding: 9px 11px; border-left: 3px solid var(--blue-primary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--blue-faint); color: var(--blue-dark); font-size: 0.78rem; line-height: 1.45; }
.store-empty-history { padding: 32px 16px; }

/* ===== Store management ===== */
.store-admin-intro { display: flex; align-items: center; justify-content: space-between; gap: 30px; border-left: 4px solid var(--orange); }
.store-admin-intro h2 { margin: 5px 0; }
.store-admin-intro p { max-width: 700px; color: var(--gray-500); font-size: 0.88rem; line-height: 1.55; }
.store-admin-safety { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 11px 13px; border-radius: var(--radius); background: var(--success-light); color: #166534; font-size: 0.76rem; font-weight: 700; }
.store-filter-label { display: flex; align-items: center; gap: 9px; color: var(--gray-500); font-size: 0.76rem; font-weight: 600; }
.store-filter-label .form-select { width: auto; min-width: 150px; padding-top: 8px; padding-bottom: 8px; }
.store-admin-list { display: flex; flex-direction: column; gap: 12px; }
.store-admin-request { display: grid; grid-template-columns: auto minmax(0, 1fr) 205px; gap: 16px; padding: 20px; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); background: white; box-shadow: var(--shadow-sm); }
.store-admin-avatar { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 13px; background: var(--blue-faint); color: var(--blue-primary); font-size: 0.78rem; font-weight: 800; }
.store-admin-request-main { min-width: 0; }
.store-admin-request-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.store-admin-request-head .badge { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.store-admin-details { margin-top: 14px; padding: 11px 13px; border-radius: var(--radius); background: var(--gray-50); }
.store-admin-details > span { display: block; margin-bottom: 4px; color: var(--gray-400); font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.store-admin-details p { color: var(--gray-700); font-size: 0.8rem; line-height: 1.5; white-space: pre-wrap; }
.store-admin-request-side { display: flex; flex-direction: column; gap: 9px; padding-left: 18px; border-left: 1px solid var(--gray-100); }
.store-admin-cost, .store-admin-balance { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.store-admin-cost span, .store-admin-balance span { color: var(--gray-400); font-size: 0.68rem; }
.store-admin-cost strong { color: var(--success); font-size: 1rem; }
.store-admin-balance strong { color: var(--gray-700); font-size: 0.78rem; }
.store-admin-actions { display: flex; flex-direction: column; gap: 7px; margin-top: auto; padding-top: 10px; }
.store-admin-actions .btn { justify-content: center; }
.store-admin-actions .btn:disabled { opacity: 0.5; cursor: not-allowed; }
.store-balance-warning { color: #B45309; font-size: 0.68rem; font-weight: 700; text-align: center; }
.store-review-modal { width: min(620px, 100%); }
.store-review-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.store-review-summary > div { padding: 12px; border: 1px solid var(--gray-200); border-radius: var(--radius); background: var(--gray-50); }
.store-review-summary span { display: block; margin-bottom: 3px; color: var(--gray-400); font-size: 0.65rem; font-weight: 700; }
.store-review-summary strong { color: var(--gray-800); font-size: 0.85rem; }
.store-review-summary .store-review-balance-after { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; border-color: #BAE6FD; background: #F0F9FF; }
.store-review-summary .store-review-balance-after strong { color: var(--blue-primary); font-size: 1.05rem; }

/* ===== Administration forms ===== */
.admin-modal-backdrop {
  position: fixed; inset: 0; z-index: 1000; padding: 24px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15, 23, 42, 0.58); backdrop-filter: blur(3px);
  animation: fadeIn 0.18s ease;
}
.admin-modal {
  width: min(720px, 100%); max-height: calc(100vh - 48px); overflow: auto;
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24);
  animation: slideUp 0.22s ease;
}
.admin-modal-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding: 22px 24px; border-bottom: 1px solid var(--gray-200);
}
.admin-modal-header h2 { margin-bottom: 4px; }
.admin-modal-body { padding: 24px; }
.admin-user-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.admin-form-span-2 { grid-column: span 2; }
.admin-modal-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 18px 24px; background: var(--gray-50); border-top: 1px solid var(--gray-200);
}
.form-help { display: block; margin-top: 5px; color: var(--gray-500); font-size: 0.75rem; }
.admin-form-error {
  margin-top: 4px; padding: 11px 13px; border: 1px solid #FCA5A5;
  border-radius: var(--radius-sm); background: var(--error-light); color: #991B1B;
  font-size: 0.8125rem; font-weight: 600;
}
.admin-form-note {
  margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--blue-faint); color: var(--blue-dark); font-size: 0.8125rem;
}
.admin-modal .btn:disabled { opacity: 0.62; cursor: wait; transform: none; box-shadow: none; }
.admin-editor-backdrop { padding: 18px; background: rgba(15, 23, 42, 0.68); }
.admin-editor-page { width: min(980px, 100%); }
.admin-editor-page .admin-modal-header {
  position: sticky; top: 0; z-index: 2; background: var(--white);
}
.admin-editor-page .admin-modal-footer {
  position: sticky; bottom: 0; z-index: 2;
}
.admin-form-kicker {
  display: block; margin-bottom: 5px; color: var(--orange); font-size: 0.68rem;
  font-weight: 800; letter-spacing: 0.11em;
}
.admin-form-section {
  padding: 20px; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--white), var(--gray-50));
}
.admin-input-suffix { position: relative; }
.admin-input-suffix .form-input { padding-right: 62px; }
.admin-input-suffix > span {
  position: absolute; top: 50%; right: 13px; transform: translateY(-50%);
  color: var(--gray-400); font-size: 0.75rem; font-weight: 700; pointer-events: none;
}
.admin-color-input { min-height: 44px; padding: 5px 7px; cursor: pointer; }
.admin-check-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px;
  max-height: 220px; overflow: auto; padding: 4px;
}
.admin-check-option {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  background: var(--white); color: var(--gray-700); font-size: 0.8125rem;
  font-weight: 600; cursor: pointer; transition: var(--transition);
}
.admin-check-option:hover { border-color: var(--blue-lighter); background: var(--blue-faint); }
.admin-check-option:has(input:checked) { border-color: var(--blue-primary); background: var(--blue-faint); color: var(--blue-dark); }
.admin-check-option input { width: 16px; height: 16px; accent-color: var(--blue-primary); }
.admin-save-hint { margin-right: auto; color: var(--gray-400); font-size: 0.75rem; }

.admin-hub-intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.admin-hub-summary { display: grid; grid-template-columns: repeat(3, minmax(90px, 1fr)); gap: 10px; min-width: 330px; }
.admin-hub-summary > div { padding: 12px 14px; border: 1px solid var(--gray-200); border-radius: var(--radius); background: var(--gray-50); text-align: center; }
.admin-hub-summary strong { display: block; color: var(--blue-primary); font-size: 1.35rem; }
.admin-hub-summary span { display: block; margin-top: 2px; color: var(--gray-500); font-size: 0.75rem; }
.admin-hub-tabs { overflow-x: auto; justify-content: flex-start; }
.admin-hub-tabs .tab-btn { white-space: nowrap; }
.admin-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.admin-section-panel .table td { vertical-align: middle; }

/* ===== Student: clean dashboard ===== */
.student-dashboard-clean { display: flex; flex-direction: column; gap: 18px; }
.student-welcome { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px; }
.student-welcome-person { display: flex; align-items: center; gap: 14px; min-width: 0; }
.student-welcome-person .avatar { width: 52px; height: 52px; object-fit: cover; }
.student-welcome-person span, .student-section-label { color: var(--gray-500); font-size: 0.69rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.student-welcome-person h2 { margin-top: 2px; font-size: 1.3rem; }
.student-welcome-person p { margin-top: 2px; color: var(--gray-500); font-size: 0.8rem; }
.student-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.student-summary-stat { display: flex; align-items: center; gap: 13px; padding: 17px; border: 1px solid var(--gray-200); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-sm); }
.student-summary-stat > div:first-child { display: flex; align-items: center; justify-content: center; width: 39px; height: 39px; flex: 0 0 auto; border-radius: 12px; }
.student-summary-stat strong { display: block; color: var(--gray-900); font-size: 1.2rem; line-height: 1.1; }
.student-summary-stat span { color: var(--gray-500); font-size: 0.73rem; }
.student-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.75fr); gap: 18px; }
.student-next { display: flex; flex-direction: column; align-items: flex-start; min-height: 240px; padding: 25px; background: linear-gradient(135deg, var(--white) 55%, var(--orange-faint)); border-color: color-mix(in srgb, var(--orange) 22%, var(--gray-200)); }
.student-next h3 { margin: 15px 0 6px; font-size: 1.45rem; }
.student-next > p { max-width: 650px; color: var(--gray-500); line-height: 1.55; }
.student-next-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0; }
.student-next-meta span { padding: 5px 9px; border-radius: 999px; background: var(--gray-100); color: var(--gray-600); font-size: 0.72rem; font-weight: 700; }
.student-next-done { align-items: center; justify-content: center; text-align: center; color: var(--success); }
.student-next-submitted { border-color: var(--blue-light); background: linear-gradient(135deg, var(--white) 52%, var(--blue-faint)); }
.student-next-submitted .student-section-label { color: var(--blue-primary); }
.student-achievements { display: flex; flex-direction: column; padding: 24px; }
.student-achievements .student-section-label { display: flex; align-items: center; gap: 7px; color: var(--orange); }
.student-achievements .student-section-label > span { margin-left: auto; }
.student-achievements > div:nth-child(2) { display: flex; flex: 1; flex-direction: column; gap: 10px; margin: 18px 0; }
.student-earned-medal { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--gray-50); }
.student-earned-medal > span:first-child { font-size: 1.35rem; }
.student-earned-medal strong { display: block; font-size: 0.82rem; }
.student-earned-medal small { color: var(--gray-500); font-size: 0.7rem; }
.student-text-link { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: var(--blue-primary); font-size: 0.78rem; font-weight: 700; cursor: pointer; }

/* ===== Student: journey ===== */
.journey-page { max-width: 980px; margin: 0 auto; }
.journey-completed { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 11px 14px; border: 1px solid var(--success); border-radius: var(--radius); background: var(--success-light); }
.journey-completed > span { color: var(--gray-600); font-size: 0.72rem; font-weight: 800; text-transform: uppercase; }
.journey-completed > div { display: flex; flex-wrap: wrap; gap: 7px; }
.journey-completed-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 999px; background: var(--white); color: var(--success); font-size: 0.75rem; font-weight: 700; }
.journey-current { display: grid; grid-template-columns: minmax(0, 1fr) 240px; align-items: center; gap: 30px; overflow: hidden; margin-bottom: 24px; padding: 28px; border-top: 5px solid var(--module-color); background: linear-gradient(120deg, var(--white), color-mix(in srgb, var(--module-color) 8%, white)); }
.journey-current-main h2 { margin: 5px 0 7px; font-size: 1.7rem; }
.journey-current-main p { max-width: 650px; color: var(--gray-600); line-height: 1.55; }
.journey-progress { padding: 18px; border: 1px solid color-mix(in srgb, var(--module-color) 22%, var(--gray-200)); border-radius: var(--radius); background: rgba(255, 255, 255, 0.78); }
.journey-progress strong { display: block; color: var(--module-color); font-size: 1.75rem; }
.journey-progress span { display: block; margin: 1px 0 9px; color: var(--gray-500); font-size: 0.72rem; }
.journey-missions > .section-header { margin-bottom: 13px; }
.journey-missions h2 { margin-top: 2px; font-size: 1.25rem; }
.journey-mission-list { display: flex; flex-direction: column; gap: 10px; }
.journey-mission { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--gray-200); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-sm); }
.journey-mission-active { border-color: color-mix(in srgb, var(--orange) 45%, var(--gray-200)); box-shadow: 0 8px 24px color-mix(in srgb, var(--orange) 12%, transparent); }
.journey-mission-submitted { border-color: var(--blue-light); background: linear-gradient(100deg, var(--white), var(--blue-faint)); }
.journey-mission-blocked { opacity: 0.68; background: var(--gray-50); }
.journey-mission-order { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--blue-faint); color: var(--blue-primary); font-size: 0.78rem; font-weight: 800; }
.journey-mission-done .journey-mission-order { background: var(--success-light); color: var(--success); }
.journey-mission-blocked .journey-mission-order { background: var(--gray-200); color: var(--gray-500); }
.journey-mission-copy h3 { margin: 5px 0 3px; font-size: 0.98rem; }
.journey-mission-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: var(--gray-500); font-size: 0.7rem; }
.journey-status { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.journey-status-done { color: var(--success); }
.journey-status-submitted { color: var(--blue-primary); }
.journey-status-active { color: var(--orange); }
.journey-status-blocked { color: var(--gray-500); }
.journey-status-available { color: var(--blue-primary); }
.journey-locked-note { color: var(--gray-500); font-size: 0.7rem; }

/* ===== Student: mission selector and checklist ===== */
.mission-page { max-width: 1040px; margin: 0 auto; }
.mission-overview { margin-bottom: 20px; padding: 24px; }
.mission-overview .section-header { align-items: flex-start; gap: 16px; margin-bottom: 17px; }
.mission-overview h2 { margin: 3px 0 4px; font-size: 1.35rem; }
.mission-overview-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.mission-overview-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) 30px; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--gray-200); border-radius: 13px; background: var(--white); }
.mission-overview-item.selected { border-color: var(--blue-primary); box-shadow: 0 0 0 2px var(--blue-faint); }
.mission-overview-blocked { opacity: 0.62; background: var(--gray-50); }
.mission-overview-number { display: flex; align-items: center; justify-content: center; width: 31px; height: 31px; border-radius: 10px; background: var(--blue-faint); color: var(--blue-primary); font-size: 0.72rem; font-weight: 800; }
.mission-overview-done .mission-overview-number { background: var(--success-light); color: var(--success); }
.mission-overview-submitted { border-color: var(--blue-lighter); background: var(--blue-faint); }
.mission-overview-submitted .mission-overview-number { background: var(--blue-primary); color: var(--white); }
.mission-overview-copy > div { display: flex; align-items: center; gap: 6px; color: var(--gray-500); font-size: 0.65rem; }
.mission-overview-copy h3 { overflow: hidden; margin: 3px 0; font-size: 0.84rem; text-overflow: ellipsis; white-space: nowrap; }
.mission-overview-status { display: inline-flex; align-items: center; gap: 4px; font-size: 0.67rem; font-weight: 700; }
.mission-overview-status-done { color: var(--success); }
.mission-overview-status-submitted { color: var(--blue-primary); }
.mission-overview-status-active { color: var(--orange); }
.mission-overview-status-blocked { color: var(--gray-500); }
.mission-overview-status-available { color: var(--blue-primary); }
.mission-overview-action { display: flex; align-items: center; justify-content: center; width: 29px; height: 29px; border: 0; border-radius: 50%; background: var(--blue-faint); color: var(--blue-primary); cursor: pointer; }
.mission-overview-action:disabled { color: var(--gray-400); cursor: not-allowed; }
.mission-selection-hint { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 180px; padding: 30px; border: 1px dashed var(--gray-300); border-radius: var(--radius); color: var(--blue-primary); text-align: left; }
.mission-selection-hint p { margin-top: 4px; color: var(--gray-500); font-size: 0.8rem; }
.mission-detail { padding-top: 4px; }
.mission-detail-head { border-top: 4px solid var(--orange); }
.mission-completed-notice { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; padding: 14px 17px; border: 1px solid var(--success); border-radius: var(--radius); background: var(--success-light); color: var(--success); }
.mission-completed-notice p { margin-top: 2px; color: var(--gray-600); font-size: 0.78rem; }
.mission-submitted-notice, .mission-redo-notice { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 13px; padding: 17px; border-radius: var(--radius); }
.mission-submitted-notice { border: 1px solid var(--blue-light); background: var(--blue-faint); color: var(--blue-primary); }
.mission-redo-notice { border: 1px solid #FCA5A5; background: var(--error-light); color: var(--error); }
.mission-submitted-notice > div, .mission-redo-notice > div { min-width: 0; flex: 1; }
.mission-submitted-notice span:first-child, .mission-redo-notice span:first-child { display: block; margin-bottom: 2px; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.09em; }
.mission-submitted-notice h3, .mission-redo-notice h3 { color: var(--gray-900); font-size: 1rem; }
.mission-submitted-notice p, .mission-redo-notice p { margin-top: 3px; color: var(--gray-600); font-size: 0.76rem; line-height: 1.5; }
.mission-submitted-files { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.mission-submitted-file, .mission-submitted-no-file { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid var(--blue-lighter); border-radius: 9px; background: var(--white); color: var(--blue-primary); font-size: 0.7rem; font-weight: 700; }
.mission-files-optional { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 11px 13px; border-radius: 11px; background: var(--blue-faint); color: var(--blue-primary); }
.mission-files-optional strong, .mission-files-optional span { display: block; }
.mission-files-optional strong { font-size: 0.78rem; }
.mission-files-optional span { margin-top: 2px; color: var(--gray-600); font-size: 0.69rem; }
.mission-send-success { max-width: 620px; margin: 55px auto 0; padding: 42px 32px; border: 1px solid var(--blue-light); border-radius: 22px; background: linear-gradient(145deg, var(--white), var(--blue-faint)); box-shadow: var(--shadow-lg); text-align: center; }
.mission-send-success-icon { display: flex; align-items: center; justify-content: center; width: 76px; height: 76px; margin: 0 auto 17px; border-radius: 50%; background: var(--success-light); color: var(--success); }
.mission-send-success > span { color: var(--blue-primary); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.1em; }
.mission-send-success h2 { margin: 5px 0 8px; }
.mission-send-success p { max-width: 480px; margin: 0 auto 20px; color: var(--gray-600); font-size: 0.82rem; line-height: 1.55; }
.student-delivery-history { border-top: 4px solid var(--blue-primary); }
.mission-checklist { padding: 22px; }
.mission-checklist-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.mission-checklist-head h3 { margin-top: 2px; }
.mission-checklist-head > strong { color: var(--blue-primary); font-size: 0.78rem; }
.mission-check-list { display: flex; flex-direction: column; gap: 8px; }
.mission-check-item { display: grid; grid-template-columns: 27px minmax(0, 1fr); align-items: flex-start; gap: 10px; padding: 13px; border: 1px solid var(--gray-200); border-radius: 12px; background: var(--white); cursor: pointer; transition: var(--transition); }
.mission-check-item:hover { border-color: var(--blue-lighter); background: var(--blue-faint); }
.mission-check-item input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.mission-check-box { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 2px solid var(--gray-300); border-radius: 7px; color: transparent; }
.mission-check-item.completed { border-color: color-mix(in srgb, var(--success) 35%, var(--gray-200)); background: var(--success-light); }
.mission-check-item.completed .mission-check-box { border-color: var(--success); background: var(--success); color: var(--white); }
.mission-check-item.extra { border-left: 3px solid var(--orange); }
.mission-check-info { cursor: default; background: var(--gray-50); }
.mission-check-info:hover { border-color: var(--gray-200); background: var(--gray-50); }
.mission-check-info .mission-check-box { border: 0; background: var(--gray-200); color: var(--gray-600); }
.mission-check-title { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.mission-check-copy > span:not(.mission-check-title), .mission-check-info p { display: block; margin-top: 3px; color: var(--gray-600); font-size: 0.78rem; }
.mission-check-copy small, .mission-check-info small { display: block; margin-top: 5px; color: var(--gray-500); font-size: 0.69rem; }
.mission-check-empty { padding: 18px; }
.mission-submit-blocked { display: flex; align-items: center; justify-content: center; gap: 8px; max-width: 620px; margin: 0 auto 13px; padding: 11px 14px; border-radius: 10px; background: var(--warning-light); color: #8A6200; font-size: 0.78rem; font-weight: 700; }

/* ===== Store product photography ===== */
.store-product-image { position: relative; z-index: 2; width: min(86%, 250px); height: 145px; object-fit: contain; filter: drop-shadow(0 18px 16px rgba(16, 46, 80, 0.16)); }
.store-products-grid .store-product-image { transition: transform var(--transition); }
.store-products-grid .store-product-card:hover .store-product-image { transform: translateY(-4px) scale(1.025); }
.store-visual-label { z-index: 3; }

/* ===== Employee class grouping ===== */
.employee-classes { min-width: 170px; max-width: 250px; }
.employee-classes summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid var(--gray-200); border-radius: 10px; background: var(--gray-50); cursor: pointer; list-style: none; }
.employee-classes summary::-webkit-details-marker { display: none; }
.employee-classes summary span { color: var(--blue-primary); font-size: 0.75rem; font-weight: 800; }
.employee-classes summary small { overflow: hidden; max-width: 130px; color: var(--gray-500); font-size: 0.68rem; text-overflow: ellipsis; white-space: nowrap; }
.employee-classes[open] summary { border-color: var(--blue-lighter); background: var(--blue-faint); }
.employee-classes-list { display: flex; flex-direction: column; gap: 5px; margin-top: 7px; padding: 8px; border-left: 2px solid var(--blue-lighter); }
.employee-classes-list span { color: var(--gray-600); font-size: 0.72rem; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .store-products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sd-stat-row { grid-template-columns: repeat(2, 1fr); }
  .sd-main-grid { grid-template-columns: 1fr; }
  .sd-hero-progress-block { display: none; }
  .login-container { flex-direction: column; gap: 32px; }
  .login-left { text-align: center; padding: 0; }
  .login-tagline { margin-left: auto; margin-right: auto; }
  .login-stats { justify-content: center; }
  .login-right { width: 100%; max-width: 440px; }
  .login-headline { font-size: 1.75rem; }
  .store-product-card { grid-template-columns: minmax(250px, 0.8fr) minmax(300px, 1.2fr); }
  .store-product-content { padding: 30px; }
  .store-admin-request { grid-template-columns: auto minmax(0, 1fr); }
  .store-admin-request-side { grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--gray-100); }
  .store-admin-actions { grid-column: 1 / -1; flex-direction: row; }
  .student-dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .page-body { padding: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .sidebar, .sidebar.collapsed { width: 68px; }
  .sidebar-header { padding: 12px; justify-content: center; }
  .sidebar-toggle, .sidebar-role-badge, .sidebar-user { display: none; }
  .sidebar-logo, .sidebar-logo.compact { width: 44px; height: 48px; padding: 1px; border: 0; background: transparent; box-shadow: none; }
  .sidebar-logo .sidebar-logo-img { width: 43px; height: 43px; object-fit: contain; }
  .sidebar-nav .nav-item, .sidebar-footer .nav-item { justify-content: center; padding: 11px; }
  .sidebar .nav-item span, .sidebar .nav-active-dot { display: none; }
  .main-content, .main-content.collapsed { margin-left: 68px !important; min-width: 0; }
  .top-header, .top-header.collapsed { left: 68px !important; padding: 0 12px; }
  .header-search { display: none; }
  .header-user-info { display: none; }
  .header-title { font-size: 1rem; }
  .header-sub { display: none; }
  .sd-hero-top { flex-wrap: wrap; }
  .store-hero { align-items: flex-start; flex-direction: column; padding: 28px; }
  .store-balance-card { min-width: 0; }
  .store-product-card { grid-template-columns: 1fr; }
  .store-product-visual { min-height: 260px; }
  .student-welcome { align-items: flex-start; flex-direction: column; }
  .journey-current { grid-template-columns: 1fr; }
  .journey-progress { width: 100%; }
  .mission-overview-list { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .sd-stat-row { grid-template-columns: repeat(2, 1fr); }
  .profile-header { flex-wrap: wrap; }
  .admin-modal-backdrop { padding: 10px; align-items: flex-end; }
  .admin-modal { max-height: calc(100vh - 20px); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .admin-user-form-grid { grid-template-columns: 1fr; }
  .admin-form-span-2 { grid-column: span 1; }
  .admin-modal-header, .admin-modal-body { padding: 18px; }
  .admin-modal-footer { padding: 14px 18px; }
  .admin-editor-backdrop { padding: 0; align-items: stretch; }
  .admin-editor-page { width: 100%; max-height: 100vh; border-radius: 0; }
  .admin-form-section { padding: 14px; }
  .admin-check-grid { grid-template-columns: 1fr; }
  .admin-save-hint { display: none; }
  .admin-hub-intro, .admin-section-heading { align-items: stretch; flex-direction: column; }
  .admin-hub-summary { min-width: 0; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .admin-hub-summary > div { padding: 10px 4px; }
  .admin-section-panel > .flex.justify-between { align-items: stretch; flex-direction: column; }
  .admin-section-panel > .flex.justify-between > .btn { justify-content: center; }
  .store-hero { min-height: 0; padding: 24px 20px; border-radius: 16px; }
  .store-hero h1 { font-size: 2.35rem; }
  .store-balance-card { width: 100%; }
  .store-product-visual { min-height: 220px; }
  .store-product-content { padding: 24px 20px; }
  .store-product-footer { align-items: stretch; flex-direction: column; margin-top: 23px; }
  .store-product-footer .btn { width: 100%; }
  .store-missing { text-align: left; }
  .store-history-item { align-items: flex-start; flex-wrap: wrap; }
  .store-history-side { width: 100%; align-items: center; flex-direction: row; justify-content: space-between; padding-left: 52px; }
  .store-admin-intro { align-items: stretch; flex-direction: column; }
  .store-admin-safety { align-self: flex-start; }
  .store-admin-request { grid-template-columns: 1fr; padding: 16px; }
  .store-admin-avatar { display: none; }
  .store-admin-request-head { align-items: flex-start; flex-direction: column; }
  .store-admin-request-side { grid-column: 1; }
  .store-admin-actions { flex-direction: column; }
  .store-review-summary { grid-template-columns: 1fr 1fr; }
  .store-products-grid { grid-template-columns: 1fr; }
  .store-products-grid .store-product-content h2, .store-products-grid .store-product-content > p { min-height: 0; }
  .student-summary-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .student-summary-stat { gap: 9px; padding: 12px 10px; }
  .student-summary-stat > div:first-child { width: 34px; height: 34px; }
  .journey-completed { align-items: flex-start; flex-direction: column; }
  .journey-current { padding: 20px; }
  .journey-mission { grid-template-columns: 36px minmax(0, 1fr); }
  .journey-mission-action { grid-column: 2; }
  .journey-mission-action .btn { width: 100%; justify-content: center; }
  .mission-overview { padding: 17px; }
  .mission-overview .section-header { flex-direction: column; }
  .mission-checklist { padding: 17px; }
}

/* ===== Teacher workspace ===== */
.teacher-dashboard-classes { display: flex; flex-direction: column; gap: 12px; }
.teacher-dashboard-class { padding: 15px; border: 1px solid var(--gray-200); border-radius: 13px; background: var(--gray-50); }
.teacher-missions-page { max-width: 1180px; margin: 0 auto; }
.teacher-mission-filters { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 18px; padding: 24px; border-top: 4px solid var(--orange); }
.teacher-mission-filters h2 { margin: 3px 0 5px; }
.teacher-filter-fields { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(210px, 1.2fr); gap: 12px; width: min(500px, 100%); }
.teacher-filter-fields .form-group { margin: 0; }
.teacher-mission-summary { display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.teacher-mission-summary > div { display: flex; min-height: 92px; align-items: center; justify-content: center; flex-direction: column; gap: 4px; padding: 15px; border: 1px solid var(--gray-200); border-radius: 14px; background: var(--white); box-shadow: var(--shadow-sm); text-align: center; }
.teacher-mission-summary strong { font-size: 1.55rem; color: var(--gray-900); }
.teacher-mission-summary span:not(.badge) { font-size: 0.72rem; color: var(--gray-500); }
.teacher-mission-summary .badge { margin-bottom: 2px; }
.teacher-mission-list { display: flex; flex-direction: column; gap: 10px; }
.teacher-mission-card { overflow: hidden; border: 1px solid var(--gray-200); border-radius: 15px; background: var(--white); box-shadow: var(--shadow-sm); }
.teacher-mission-card[open] { border-color: var(--blue-lighter); box-shadow: 0 9px 24px rgba(30, 114, 184, 0.09); }
.teacher-mission-card summary { display: grid; grid-template-columns: 42px minmax(0, 1fr) 70px 22px; align-items: center; gap: 15px; padding: 18px 20px; cursor: pointer; list-style: none; }
.teacher-mission-card summary::-webkit-details-marker { display: none; }
.teacher-mission-order { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px; background: var(--blue-faint); color: var(--blue-primary); font-size: 0.8rem; font-weight: 800; }
.teacher-mission-main h3 { font-size: 0.98rem; }
.teacher-mission-main > p { overflow: hidden; margin: 4px 0 8px; color: var(--gray-600); font-size: 0.78rem; text-overflow: ellipsis; white-space: nowrap; }
.teacher-mission-counts { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; }
.teacher-mission-counts span { display: inline-flex; align-items: center; gap: 4px; font-size: 0.7rem; font-weight: 600; }
.teacher-mission-percent { text-align: center; }
.teacher-mission-percent strong, .teacher-mission-percent span { display: block; }
.teacher-mission-percent strong { color: var(--blue-primary); font-size: 1.12rem; }
.teacher-mission-percent span { color: var(--gray-500); font-size: 0.65rem; }
.teacher-mission-chevron { color: var(--gray-400); transition: transform 0.2s ease; }
.teacher-mission-card[open] .teacher-mission-chevron { transform: rotate(180deg); }
.teacher-mission-detail { padding: 0 20px 20px 77px; border-top: 1px solid var(--gray-100); }
.teacher-mission-description { display: flex; align-items: flex-start; gap: 12px; padding: 16px 0 12px; }
.teacher-mission-description > span { flex-shrink: 0; padding: 4px 8px; border-radius: 8px; background: var(--orange-faint); color: var(--orange); font-size: 0.68rem; font-weight: 700; }
.teacher-mission-description p { color: var(--gray-600); font-size: 0.78rem; line-height: 1.55; }
.teacher-student-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-bottom: 18px; padding: 23px; border-top: 4px solid var(--blue-primary); }
.teacher-student-toolbar h2 { margin-top: 3px; }
.teacher-student-filters { display: grid; grid-template-columns: minmax(240px, 1.5fr) minmax(170px, 1fr); gap: 10px; width: min(570px, 100%); }
.teacher-student-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.teacher-student-card { display: flex; flex-direction: column; gap: 17px; min-width: 0; padding: 19px; }
.teacher-student-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.teacher-student-head h3 { overflow: hidden; margin-bottom: 2px; font-size: 0.95rem; text-overflow: ellipsis; white-space: nowrap; }
.teacher-student-head > div > span { display: block; overflow: hidden; color: var(--gray-500); font-size: 0.7rem; text-overflow: ellipsis; white-space: nowrap; }
.teacher-student-tags { display: flex; flex-direction: column; gap: 7px; padding: 11px; border-radius: 11px; background: var(--gray-50); }
.teacher-student-tags span { display: flex; align-items: center; gap: 7px; color: var(--gray-600); font-size: 0.72rem; }
.teacher-student-progress span, .teacher-student-progress strong { font-size: 0.7rem; }
.teacher-student-empty { grid-column: 1 / -1; }
.teacher-student-balance { align-self: center; min-width: 145px; padding: 14px 18px; border: 1px solid var(--orange-light); border-radius: 13px; background: var(--orange-faint); text-align: right; }
.teacher-student-balance span, .teacher-student-balance strong { display: block; }
.teacher-student-balance span { margin-bottom: 3px; color: var(--gray-600); font-size: 0.7rem; }
.teacher-student-balance strong { color: var(--orange); font-size: 1.2rem; }
.teacher-centered-stat { align-items: center; flex-direction: column; text-align: center; }
.teacher-student-detail-grid { grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.75fr); align-items: start; }
.teacher-joy-card { border-top: 4px solid var(--orange); }
.teacher-joy-title { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }
.teacher-joy-title p { margin-top: 2px; color: var(--gray-500); font-size: 0.72rem; }
.teacher-joy-warning { display: flex; align-items: center; gap: 7px; margin: 4px 0 14px; padding: 10px; border-radius: 9px; background: var(--blue-faint); color: var(--blue-primary); font-size: 0.69rem; }
.teacher-joy-history { display: flex; flex-direction: column; gap: 10px; }
.teacher-joy-history-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 9px; padding-bottom: 10px; border-bottom: 1px solid var(--gray-100); }
.teacher-joy-history-row:last-child { padding-bottom: 0; border-bottom: 0; }
.teacher-joy-amount { font-size: 0.8rem; font-weight: 800; }
.teacher-joy-amount.positive { color: var(--success); }
.teacher-joy-amount.negative { color: var(--error); }
.teacher-joy-history-row strong, .teacher-joy-history-row span { display: block; }
.teacher-joy-history-row strong { font-size: 0.72rem; }
.teacher-joy-history-row div span, .teacher-joy-history-row small { color: var(--gray-500); font-size: 0.63rem; }
.teacher-joy-history-row small { grid-column: 2; }
.teacher-profile-page { max-width: 970px; margin: 0 auto; }
.teacher-profile-hero { display: flex; align-items: center; gap: 20px; margin-bottom: 18px; padding: 25px; border-top: 4px solid var(--orange); }
.teacher-profile-hero h2 { margin: 3px 0; }
.teacher-profile-hero p { color: var(--gray-500); }
.teacher-profile-grid { align-items: start; }
.teacher-photo-upload { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 9px; min-height: 58px; padding: 10px 13px; border: 1px dashed var(--blue-light); border-radius: 11px; background: var(--blue-faint); color: var(--blue-primary); cursor: pointer; }
.teacher-photo-upload svg { grid-row: span 2; }
.teacher-photo-upload span { font-size: 0.76rem; font-weight: 700; }
.teacher-photo-upload small { color: var(--gray-500); font-size: 0.65rem; }
.teacher-profile-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.teacher-profile-summary > div { padding: 15px; border-radius: 11px; background: var(--gray-50); text-align: center; }
.teacher-profile-summary strong, .teacher-profile-summary span { display: block; }
.teacher-profile-summary strong { color: var(--blue-primary); font-size: 1.35rem; }
.teacher-profile-summary span { margin-top: 3px; color: var(--gray-500); font-size: 0.68rem; }
.student-profile-edit-card { border-top: 4px solid var(--blue-primary); }
.student-avatar-editor { display: flex; min-height: 100%; align-items: stretch; }
.student-avatar-editor label { display: flex; width: 100%; min-height: 205px; align-items: center; justify-content: center; flex-direction: column; gap: 7px; padding: 20px; border: 2px dashed var(--blue-lighter); border-radius: 15px; background: var(--blue-faint); color: var(--blue-primary); text-align: center; cursor: pointer; transition: var(--transition); }
.student-avatar-editor label:hover { border-color: var(--blue-primary); background: #E1F1FC; }
.student-avatar-editor strong { font-size: 0.82rem; }
.student-avatar-editor span, .student-avatar-editor small { color: var(--gray-500); font-size: 0.67rem; }
.student-avatar-editor small { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.management-profile-page { max-width: 980px; margin: 0 auto; }
.management-profile-hero { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) 190px; align-items: center; gap: 20px; overflow: hidden; margin-bottom: 18px; padding: 27px; border-radius: 19px; background: linear-gradient(125deg, #0D2C4A, #174F7F 62%, #F26522 145%); color: var(--white); box-shadow: 0 17px 40px rgba(13,44,74,0.19); }
.management-profile-avatar img, .management-profile-avatar .avatar { width: 76px; height: 76px; object-fit: cover; }
.management-profile-hero > div:nth-child(2) > span:first-child { color: #BFE2FF; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.11em; }
.management-profile-hero h2 { margin: 3px 0; font-size: 1.45rem; }
.management-profile-hero p { margin-bottom: 8px; color: rgba(255,255,255,0.72); font-size: 0.75rem; }
.management-profile-scope { display: flex; align-items: center; flex-direction: column; gap: 3px; padding: 15px; border: 1px solid rgba(255,255,255,0.18); border-radius: 14px; background: rgba(255,255,255,0.1); text-align: center; }
.management-profile-scope strong { font-size: 0.76rem; }
.management-profile-scope span { color: rgba(255,255,255,0.66); font-size: 0.61rem; line-height: 1.4; }
.management-profile-grid { align-items: start; }
.management-profile-grid > .card { border-top: 4px solid var(--orange); }
.management-profile-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.management-profile-summary div { padding: 13px 8px; border-radius: 11px; background: var(--gray-50); text-align: center; }
.management-profile-summary strong, .management-profile-summary span { display: block; }
.management-profile-summary strong { color: var(--blue-primary); font-size: 1.3rem; }
.management-profile-summary span { margin-top: 2px; color: var(--gray-500); font-size: 0.63rem; }
.teacher-review-modal { width: min(900px, 100%); }
.teacher-review-header { position: sticky; top: 0; z-index: 2; border-top: 5px solid var(--orange); background: var(--white); }
.teacher-review-student { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 18px; padding: 14px; border-radius: 13px; background: var(--gray-50); }
.teacher-review-student span, .teacher-review-student strong, .teacher-review-student small { display: block; }
.teacher-review-student > div:nth-child(2) > span { color: var(--gray-500); font-size: 0.64rem; }
.teacher-review-student strong { margin: 2px 0; font-size: 0.86rem; }
.teacher-review-student small { color: var(--gray-500); font-size: 0.68rem; }
.teacher-review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.teacher-review-grid section { min-width: 0; }
.teacher-review-label { display: block; margin-bottom: 7px; color: var(--gray-500); font-size: 0.67rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.teacher-review-answer { min-height: 92px; padding: 13px; border: 1px solid var(--gray-200); border-radius: 11px; background: var(--white); color: var(--gray-700); font-size: 0.78rem; line-height: 1.55; white-space: pre-wrap; }
.teacher-review-files { margin-bottom: 18px; }
.teacher-review-files > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.teacher-review-file, .teacher-review-no-files { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--blue-lighter); border-radius: 11px; background: var(--blue-faint); }
.teacher-review-file > span { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; background: var(--white); color: var(--blue-primary); }
.teacher-review-file strong, .teacher-review-file small, .teacher-review-no-files strong, .teacher-review-no-files span { display: block; }
.teacher-review-file strong { overflow: hidden; color: var(--gray-800); font-size: 0.75rem; text-overflow: ellipsis; white-space: nowrap; }
.teacher-review-file small, .teacher-review-no-files span { margin-top: 2px; color: var(--gray-500); font-size: 0.64rem; }
.teacher-review-no-files { grid-column: 1 / -1; color: var(--gray-500); }
.teacher-review-feedback { margin-bottom: 0; }
.teacher-review-actions { position: sticky; bottom: 0; z-index: 2; flex-wrap: wrap; }
.teacher-review-redo { border-color: #FCA5A5; color: var(--error); }

@media (max-width: 1100px) {
  .teacher-student-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .teacher-mission-filters, .teacher-student-toolbar { align-items: stretch; flex-direction: column; }
  .teacher-filter-fields, .teacher-student-filters { width: 100%; }
}

@media (max-width: 768px) {
  .teacher-mission-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .teacher-mission-card summary { grid-template-columns: 38px minmax(0, 1fr) 20px; padding: 15px; }
  .teacher-mission-percent { display: none; }
  .teacher-mission-detail { padding: 0 15px 15px; }
  .teacher-student-grid { grid-template-columns: 1fr; }
  .teacher-student-detail-grid { grid-template-columns: 1fr; }
  .teacher-student-balance { width: 100%; text-align: left; }
  .teacher-review-backdrop { padding: 0; align-items: stretch; }
  .teacher-review-modal { max-height: 100vh; border-radius: 0; }
  .teacher-review-grid, .teacher-review-files > div { grid-template-columns: 1fr; }
  .teacher-review-actions { align-items: stretch; flex-direction: column-reverse; }
  .teacher-review-actions .btn { width: 100%; justify-content: center; }
  .management-profile-hero { grid-template-columns: auto minmax(0, 1fr); padding: 21px; }
  .management-profile-scope { grid-column: 1 / -1; align-items: flex-start; text-align: left; }
}

@media (max-width: 600px) {
  .teacher-filter-fields, .teacher-student-filters { grid-template-columns: 1fr; }
  .teacher-mission-summary { gap: 7px; }
  .teacher-mission-summary > div { min-height: 78px; padding: 10px; }
  .teacher-mission-main > p { white-space: normal; }
  .teacher-mission-counts { gap: 7px; }
  .teacher-profile-hero { align-items: flex-start; flex-direction: column; }
  .system-dialog { grid-template-columns: 46px minmax(0, 1fr); padding: 19px; }
  .system-dialog-icon { width: 44px; height: 44px; border-radius: 13px; }
  .system-dialog-actions { align-items: stretch; flex-direction: column-reverse; }
  .system-dialog-actions .btn { width: 100%; justify-content: center; }
  .notification-panel { position: fixed; top: var(--header-height); right: 8px; left: 8px; width: auto; }
  .management-profile-hero { grid-template-columns: 1fr; text-align: center; }
  .management-profile-avatar { display: flex; justify-content: center; }
  .management-profile-scope { align-items: center; text-align: center; }
}

/* Medalhas e conquistas */
.achievement-management-page { display: flex; flex-direction: column; gap: 18px; }
.achievement-hero { position: relative; display: flex; align-items: center; gap: 24px; overflow: hidden; padding: 30px 32px; border-radius: 22px; background: linear-gradient(125deg, #0D2C4A 0%, #174F7F 58%, #F26522 140%); color: white; box-shadow: 0 18px 44px rgba(13, 44, 74, 0.19); }
.achievement-hero::after { position: absolute; right: -45px; bottom: -75px; width: 220px; height: 220px; border: 34px solid rgba(255,255,255,0.07); border-radius: 50%; content: ''; }
.achievement-hero > div:first-child { position: relative; z-index: 1; flex: 1; }
.achievement-kicker { display: block; margin-bottom: 8px; color: #FFD3B8; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.14em; }
.achievement-hero h2 { margin-bottom: 7px; font-size: 1.65rem; }
.achievement-hero p { max-width: 650px; color: rgba(255,255,255,0.76); font-size: 0.85rem; line-height: 1.55; }
.achievement-hero-stat { position: relative; z-index: 1; min-width: 125px; padding: 14px 18px; border: 1px solid rgba(255,255,255,0.18); border-radius: 16px; background: rgba(255,255,255,0.1); text-align: center; backdrop-filter: blur(7px); }
.achievement-hero-stat strong, .achievement-hero-stat span { display: block; }
.achievement-hero-stat strong { color: #FFAA76; font-size: 1.7rem; }
.achievement-hero-stat span { margin-top: 2px; color: rgba(255,255,255,0.78); font-size: 0.66rem; }
.achievement-hero > .btn { position: relative; z-index: 1; border-color: rgba(255,255,255,0.4); color: white; }
.achievement-controls { display: grid; grid-template-columns: minmax(220px, 1.1fr) minmax(210px, 0.9fr) minmax(250px, 1.2fr); align-items: end; gap: 13px; padding: 18px; }
.achievement-controls .form-group { margin: 0; }
.achievement-controls .search-wrapper { width: 100%; }
.achievement-controls .search-input { width: 100%; }
.achievement-student-summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 15px; padding: 20px 24px; border: 1px solid var(--blue-lighter); border-radius: 17px; background: linear-gradient(100deg, var(--blue-faint), white); }
.achievement-student-summary > div:nth-child(2) > span { color: var(--blue-primary); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.1em; }
.achievement-student-summary h2 { margin: 3px 0; font-size: 1.18rem; }
.achievement-student-summary p { color: var(--gray-500); font-size: 0.73rem; }
.achievement-student-total { min-width: 105px; padding: 11px 15px; border-radius: 13px; background: white; text-align: center; box-shadow: var(--shadow-sm); }
.achievement-student-total strong, .achievement-student-total span { display: block; }
.achievement-student-total strong { color: var(--orange); font-size: 1.35rem; }
.achievement-student-total span { color: var(--gray-500); font-size: 0.65rem; }
.achievement-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.achievement-card { display: flex; flex-direction: column; min-height: 265px; padding: 19px; border: 1px solid var(--gray-200); border-radius: 17px; background: white; box-shadow: var(--shadow-sm); transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
.achievement-card:hover { transform: translateY(-2px); border-color: var(--blue-light); box-shadow: 0 12px 30px rgba(30,114,184,0.1); }
.achievement-card.is-earned { border-color: #F9B583; background: linear-gradient(155deg, #FFF 45%, #FFF4EC 100%); box-shadow: 0 10px 28px rgba(242,101,34,0.11); }
.achievement-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.achievement-medal-icon { display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; border: 1px solid #F9D3B8; border-radius: 17px; background: var(--orange-faint); font-size: 2rem; box-shadow: inset 0 0 0 5px rgba(255,255,255,0.65); }
.achievement-card-badges { display: flex; align-items: flex-end; flex-direction: column; gap: 5px; }
.achievement-card-badges .badge { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.achievement-card h3 { margin-bottom: 6px; color: var(--gray-900); font-size: 0.98rem; }
.achievement-card > p { flex: 1; color: var(--gray-600); font-size: 0.75rem; line-height: 1.55; }
.achievement-card-footer { margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--gray-100); }
.achievement-earned-note strong, .achievement-earned-note span, .achievement-earned-note small { display: block; }
.achievement-earned-note strong { color: var(--success); font-size: 0.75rem; }
.achievement-earned-note span { margin-top: 2px; color: var(--gray-500); font-size: 0.63rem; }
.achievement-earned-note small { margin-top: 5px; color: var(--gray-600); font-size: 0.65rem; font-style: italic; line-height: 1.4; }
.achievement-rule-note { color: var(--gray-500); font-size: 0.67rem; }
.achievement-empty { grid-column: 1 / -1; padding: 55px 24px; border: 1px dashed var(--gray-300); border-radius: 18px; background: white; text-align: center; }
.achievement-empty > span { display: block; margin-bottom: 10px; font-size: 2.6rem; }
.achievement-empty h3 { margin-bottom: 5px; }
.achievement-empty p { max-width: 560px; margin: 0 auto 16px; color: var(--gray-500); font-size: 0.78rem; line-height: 1.55; }
.achievement-empty.compact { padding: 25px; }
.achievement-grant-modal { overflow: hidden; width: min(620px, 100%); }
.achievement-grant-visual { padding: 28px 30px 24px; background: radial-gradient(circle at 20% 0%, rgba(255,255,255,0.22), transparent 35%), linear-gradient(130deg, #123C62, #1E72B8); color: white; text-align: center; }
.achievement-grant-visual > span { display: block; margin-bottom: 7px; font-size: 3.3rem; filter: drop-shadow(0 8px 10px rgba(0,0,0,0.18)); }
.achievement-grant-visual small { display: block; margin-bottom: 5px; color: #BFE2FF; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.achievement-grant-visual h2 { margin-bottom: 6px; font-size: 1.35rem; }
.achievement-grant-visual p { color: rgba(255,255,255,0.78); font-size: 0.76rem; line-height: 1.5; }
.achievement-recipient { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 13px; border-radius: 12px; background: var(--blue-faint); }
.achievement-recipient span, .achievement-recipient strong, .achievement-recipient small { display: block; }
.achievement-recipient span { color: var(--gray-500); font-size: 0.63rem; }
.achievement-recipient strong { margin: 2px 0; font-size: 0.85rem; }
.achievement-recipient small { color: var(--blue-primary); font-size: 0.66rem; }
.student-profile-medals { display: flex; flex-direction: column; gap: 10px; max-height: 460px; overflow: auto; padding-right: 4px; }
.student-profile-medal { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 10px; padding: 11px; border: 1px solid var(--orange-light); border-radius: 12px; background: var(--orange-faint); }
.student-profile-medal > span { font-size: 1.7rem; text-align: center; }
.student-profile-medal strong, .student-profile-medal small, .student-profile-medal em { display: block; }
.student-profile-medal strong { color: var(--gray-800); font-size: 0.78rem; }
.student-profile-medal small { margin-top: 2px; color: var(--gray-600); font-size: 0.66rem; line-height: 1.4; }
.student-profile-medal em { margin-top: 5px; color: var(--orange-dark); font-size: 0.61rem; font-style: normal; font-weight: 700; }

/* Celebração exibida ao aluno */
.achievement-popup-backdrop { position: fixed; z-index: 1400; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(6,22,38,0.72); backdrop-filter: blur(7px); animation: achievementFade 0.22s ease both; }
.achievement-popup { position: relative; overflow: hidden; width: min(480px, 100%); padding: 34px 34px 30px; border: 1px solid rgba(255,255,255,0.75); border-radius: 28px; background: radial-gradient(circle at 50% 12%, #FFFFFF 0%, #FFF8F2 56%, #FFE5D4 100%); text-align: center; box-shadow: 0 30px 90px rgba(0,0,0,0.32); animation: achievementPop 0.48s cubic-bezier(.2,.9,.22,1.2) both; }
.achievement-popup::before { position: absolute; top: -80px; left: 50%; width: 290px; height: 170px; border-radius: 50%; background: rgba(242,101,34,0.13); content: ''; transform: translateX(-50%); filter: blur(2px); }
.achievement-popup-kicker { position: relative; display: inline-block; padding: 6px 12px; border-radius: 999px; background: #123C62; color: white; font-size: 0.65rem; font-weight: 900; letter-spacing: 0.14em; }
.achievement-popup-medal { position: relative; display: flex; align-items: center; justify-content: center; width: 116px; height: 116px; margin: 22px auto 14px; border: 3px solid #FFB27D; border-radius: 36px; background: white; box-shadow: 0 15px 34px rgba(242,101,34,0.22), inset 0 0 0 8px #FFF2E8; transform: rotate(-3deg); }
.achievement-popup-medal span { font-size: 4.3rem; filter: drop-shadow(0 8px 8px rgba(0,0,0,0.12)); }
.achievement-popup-medal img { width: 82px; height: 82px; object-fit: contain; }
.achievement-popup-category { color: var(--orange-dark); font-size: 0.67rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.achievement-popup h2 { margin: 6px 0 9px; color: #0D2C4A; font-size: 1.65rem; }
.achievement-popup-description { max-width: 360px; margin: 0 auto; color: var(--gray-600); font-size: 0.82rem; line-height: 1.55; }
.achievement-popup-reward { display: inline-block; margin-top: 13px; padding: 7px 13px; border-radius: 999px; background: var(--blue-faint); color: var(--blue-primary); font-size: 0.75rem; font-weight: 800; }
.achievement-popup .btn { justify-content: center; width: 100%; margin-top: 22px; }
.achievement-confetti i { position: absolute; width: 8px; height: 18px; border-radius: 3px; animation: achievementConfetti 1.6s ease-in-out infinite; }
.achievement-confetti i:nth-child(1) { top: 11%; left: 10%; background: #F26522; transform: rotate(25deg); }
.achievement-confetti i:nth-child(2) { top: 18%; right: 12%; background: #1E72B8; animation-delay: .25s; transform: rotate(-30deg); }
.achievement-confetti i:nth-child(3) { top: 42%; left: 6%; background: #FBBF24; animation-delay: .5s; transform: rotate(65deg); }
.achievement-confetti i:nth-child(4) { top: 48%; right: 7%; background: #22C55E; animation-delay: .75s; transform: rotate(-50deg); }
.achievement-confetti i:nth-child(5) { top: 7%; left: 29%; background: #8B5CF6; animation-delay: 1s; transform: rotate(42deg); }
.achievement-confetti i:nth-child(6) { top: 8%; right: 30%; background: #EC4899; animation-delay: 1.2s; transform: rotate(-18deg); }
@keyframes achievementFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes achievementPop { from { opacity: 0; transform: translateY(24px) scale(.88); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes achievementConfetti { 0%,100% { translate: 0 0; } 50% { translate: 0 9px; } }

@media (max-width: 1120px) {
  .achievement-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .achievement-controls { grid-template-columns: 1fr 1fr; }
  .achievement-search { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .achievement-hero { align-items: flex-start; flex-direction: column; padding: 24px; }
  .achievement-hero-stat { min-width: 0; width: 100%; }
  .achievement-controls { grid-template-columns: 1fr; }
  .achievement-search { grid-column: auto; }
  .achievement-student-summary { grid-template-columns: auto minmax(0, 1fr); }
  .achievement-student-total { grid-column: 1 / -1; }
  .achievement-grid { grid-template-columns: 1fr; }
  .achievement-card { min-height: 0; }
  .achievement-popup { padding: 28px 22px 24px; }
}

/* ===== Indicadores do dashboard da supervisão ===== */
.dashboard-analytics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dashboard-chart-card { min-width: 0; padding: 20px; }
.dashboard-chart-heading { display: flex; align-items: center; gap: 11px; min-height: 43px; margin-bottom: 20px; }
.dashboard-chart-heading > div { min-width: 0; flex: 1; }
.dashboard-chart-heading h3, .dashboard-chart-heading p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-chart-heading h3 { color: var(--gray-900); font-size: .9rem; }
.dashboard-chart-heading p { margin-top: 2px; color: var(--gray-500); font-size: .64rem; }
.dashboard-chart-icon { display: flex; width: 41px; height: 41px; align-items: center; justify-content: center; flex: 0 0 auto; border-radius: 12px; }
.dashboard-chart-icon.is-blue { background: var(--blue-faint); color: var(--blue-primary); }
.dashboard-chart-icon.is-orange { background: var(--orange-faint); color: var(--orange); }
.dashboard-chart-icon.is-green { background: var(--success-light); color: var(--success); }
.gender-chart-layout { display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: center; gap: 18px; }
.gender-donut { position: relative; width: 132px; height: 132px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(15,23,42,.05); }
.gender-donut::after { position: absolute; z-index: 1; inset: 23px; border-radius: 50%; background: white; box-shadow: 0 0 0 1px rgba(15,23,42,.04); content: ''; }
.gender-donut-center { position: absolute; z-index: 2; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.gender-donut-center strong, .gender-donut-center span { display: block; }
.gender-donut-center strong { color: var(--gray-900); font-size: 1.35rem; line-height: 1; }
.gender-donut-center span { margin-top: 4px; color: var(--gray-500); font-size: .6rem; }
.gender-legend { display: flex; min-width: 0; flex-direction: column; gap: 9px; }
.gender-legend > div { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto auto; align-items: center; gap: 7px; }
.gender-legend span { overflow: hidden; color: var(--gray-600); font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.gender-legend strong { color: var(--gray-800); font-size: .74rem; }
.gender-legend small { min-width: 30px; color: var(--gray-400); font-size: .58rem; text-align: right; }
.analytics-dot { display: block; width: 9px; height: 9px; border-radius: 50%; }
.analytics-dot.is-female { background: #EC4899; }
.analytics-dot.is-male { background: #1E72B8; }
.analytics-dot.is-unknown { background: #CBD5E1; }
.analytics-total { display: flex; min-width: 55px; align-items: flex-end; flex-direction: column; color: var(--orange); font-size: 1.35rem; line-height: 1; }
.analytics-total small { margin-top: 4px; color: var(--gray-500); font-size: .55rem; font-weight: 700; }
.status-bars { display: flex; flex-direction: column; gap: 15px; }
.status-bar-row > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.status-bar-row span { color: var(--gray-600); font-size: .68rem; font-weight: 700; }
.status-bar-row strong { color: var(--gray-800); font-size: .72rem; }
.status-track { overflow: hidden; width: 100%; height: 8px; border-radius: 999px; background: var(--gray-100); }
.status-fill { display: block; height: 100%; border-radius: inherit; transition: width .35s ease; }
.status-fill.is-approved { background: linear-gradient(90deg, #16A34A, #4ADE80); }
.status-fill.is-pending { background: linear-gradient(90deg, #D97706, #FBBF24); }
.status-fill.is-rejected { background: linear-gradient(90deg, #DC2626, #FB7185); }
.analytics-footnote { margin-top: 15px; color: var(--gray-500); font-size: .59rem; line-height: 1.45; }
.top-product-highlight { margin: -2px 0 15px; padding: 13px 14px; border: 1px solid #BBF7D0; border-radius: 12px; background: linear-gradient(115deg, #F0FDF4, white); }
.top-product-highlight span, .top-product-highlight strong, .top-product-highlight small { display: block; }
.top-product-highlight span { color: var(--success); font-size: .55rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.top-product-highlight strong { overflow: hidden; margin: 3px 0; color: var(--gray-900); font-size: .79rem; text-overflow: ellipsis; white-space: nowrap; }
.top-product-highlight small { color: var(--gray-500); font-size: .59rem; }
.product-ranking { display: flex; flex-direction: column; gap: 9px; }
.product-rank-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.product-rank-row > b { display: flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 7px; background: var(--gray-100); color: var(--gray-600); font-size: .58rem; }
.product-rank-row > div { min-width: 0; }
.product-rank-row span { display: block; overflow: hidden; margin-bottom: 4px; color: var(--gray-700); font-size: .63rem; text-overflow: ellipsis; white-space: nowrap; }
.product-rank-row i { display: block; overflow: hidden; height: 5px; border-radius: 999px; background: var(--gray-100); }
.product-rank-row em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1E72B8, #60A5FA); }
.product-rank-row > strong { color: var(--blue-primary); font-size: .69rem; }
.analytics-empty { display: flex; min-height: 150px; align-items: center; justify-content: center; padding: 20px; border: 1px dashed var(--gray-300); border-radius: 12px; color: var(--gray-500); font-size: .69rem; text-align: center; }

@media (max-width: 1180px) {
  .dashboard-analytics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-top-products { grid-column: 1 / -1; }
  .dashboard-top-products .product-ranking { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; }
}
@media (max-width: 720px) {
  .dashboard-analytics-grid { grid-template-columns: 1fr; }
  .dashboard-top-products { grid-column: auto; }
  .dashboard-top-products .product-ranking { display: flex; }
}
@media (max-width: 390px) {
  .gender-chart-layout { grid-template-columns: 1fr; justify-items: center; }
  .gender-legend { width: 100%; }
}

/* ===== Paginação, catálogo administrativo e carteira educativa ===== */
.admin-list-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px; }
.admin-list-toolbar .search-wrapper { min-width: 240px; max-width: 520px; }
.admin-list-toolbar .form-select { width: auto; min-width: 165px; }
.list-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 15px; }
.list-pagination [data-page-info] { min-width: 170px; color: var(--gray-600); font-size: 0.72rem; font-weight: 700; text-align: center; }
.store-stock { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 999px; background: var(--success-light); color: var(--success); font-size: 0.62rem; font-weight: 800; white-space: nowrap; }
.store-stock.sold-out { background: var(--error-light); color: var(--error); }
.store-products-admin-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; padding: 28px; border-radius: 19px; background: linear-gradient(125deg, #0D2C4A, #174F7F 65%, #F26522 150%); color: white; box-shadow: 0 16px 38px rgba(13,44,74,.17); }
.store-products-admin-hero h2 { margin: 4px 0 7px; }
.store-products-admin-hero p { max-width: 720px; color: rgba(255,255,255,.72); font-size: .79rem; line-height: 1.55; }
.store-products-admin-hero .btn { flex: 0 0 auto; }
.admin-products-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.admin-product-card { overflow: hidden; border: 1px solid var(--gray-200); border-radius: 17px; background: white; box-shadow: var(--shadow-sm); }
.admin-product-image { position: relative; display: flex; min-height: 180px; align-items: center; justify-content: center; padding: 18px; background: radial-gradient(circle, white, var(--blue-faint)); color: var(--blue-primary); }
.admin-product-image img { width: 100%; height: 155px; object-fit: contain; }
.admin-product-image .badge { position: absolute; top: 12px; right: 12px; }
.admin-product-copy { display: flex; min-height: 245px; flex-direction: column; padding: 19px; }
.admin-product-copy h3 { margin: 7px 0; }
.admin-product-copy > p { flex: 1; color: var(--gray-600); font-size: .74rem; line-height: 1.5; }
.admin-product-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 15px 0; padding-top: 12px; border-top: 1px solid var(--gray-100); }
.admin-product-meta > strong { color: var(--orange); font-size: 1.05rem; }
.store-product-modal { width: min(820px, 100%); }
.store-product-form-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(220px, .65fr); gap: 20px; }
.store-product-image-picker { display: flex; min-height: 100%; align-items: center; justify-content: center; flex-direction: column; gap: 7px; padding: 15px; border: 2px dashed var(--blue-lighter); border-radius: 15px; background: var(--blue-faint); color: var(--blue-primary); cursor: pointer; text-align: center; }
.store-product-image-picker > span { display: flex; width: 100%; min-height: 150px; align-items: center; justify-content: center; }
.store-product-image-picker img { width: 100%; height: 165px; object-fit: contain; }
.store-product-image-picker strong { font-size: .78rem; }
.store-product-image-picker small { color: var(--gray-500); font-size: .65rem; }

.investment-page { display: flex; flex-direction: column; gap: 20px; }
.investment-hero { position: relative; display: flex; min-height: 205px; align-items: center; justify-content: space-between; gap: 24px; overflow: hidden; padding: 32px; border-radius: 22px; background: radial-gradient(circle at 82% 10%, rgba(255,255,255,.14), transparent 28%), linear-gradient(125deg, #0D2C4A, #1E72B8 68%, #F26522 145%); color: white; box-shadow: 0 18px 44px rgba(13,44,74,.2); }
.investment-hero > div:first-child { max-width: 670px; }
.investment-hero > div:first-child > span { color: #FFD0B1; font-size: .65rem; font-weight: 900; letter-spacing: .14em; }
.investment-hero h1 { margin: 6px 0 9px; font-size: 2rem; }
.investment-hero p { color: rgba(255,255,255,.76); font-size: .84rem; line-height: 1.6; }
.investment-wallet-balance { min-width: 210px; padding: 18px 20px; border: 1px solid rgba(255,255,255,.2); border-radius: 16px; background: rgba(255,255,255,.12); backdrop-filter: blur(8px); }
.investment-wallet-balance span, .investment-wallet-balance strong { display: block; }
.investment-wallet-balance span { color: rgba(255,255,255,.72); font-size: .68rem; }
.investment-wallet-balance strong { margin-top: 4px; color: #FFB17E; font-size: 1.35rem; }
.investment-notice { display: flex; align-items: flex-start; gap: 12px; padding: 15px 18px; border: 1px solid #FBD3A3; border-radius: 14px; background: #FFF8EC; color: #9A5B08; }
.investment-notice svg { flex: 0 0 auto; margin-top: 2px; }
.investment-notice strong { display: block; margin-bottom: 3px; font-size: .79rem; }
.investment-notice p { font-size: .72rem; line-height: 1.5; }
.investment-summary .stat-card { justify-content: center; text-align: center; }
.investment-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.investment-summary .stat-value, .investment-summary small { display: block; }
.investment-summary small { margin-top: 2px; color: var(--gray-500); font-size: .62rem; }
.investment-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.investment-card { display: flex; flex-direction: column; min-width: 0; padding: 20px; border: 1px solid color-mix(in srgb, var(--investment-accent) 28%, white); border-top: 5px solid var(--investment-accent); border-radius: 17px; background: white; box-shadow: var(--shadow-sm); }
.investment-card-head { display: flex; align-items: center; gap: 11px; }
.investment-icon { display: flex; width: 45px; height: 45px; align-items: center; justify-content: center; flex: 0 0 auto; border-radius: 13px; background: color-mix(in srgb, var(--investment-accent) 12%, white); color: var(--investment-accent); }
.investment-card-head span { color: var(--investment-accent); font-size: .61rem; font-weight: 900; text-transform: uppercase; }
.investment-card-head h3 { margin-top: 2px; font-size: 1rem; }
.investment-card-head > div:nth-child(2) { min-width: 0; flex: 1; }
.investment-card-head > div:nth-child(2) h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.investment-card-head > div:nth-child(2) small { display: block; margin-top: 2px; color: var(--gray-400); font-size: .56rem; font-weight: 800; letter-spacing: .08em; }
.investment-card > p { min-height: 67px; margin: 15px 0; color: var(--gray-600); font-size: .73rem; line-height: 1.55; }
.investment-rate { padding: 13px; border-radius: 12px; background: var(--gray-50); }
.investment-rate span, .investment-rate strong, .investment-rate small { display: block; }
.investment-rate span { color: var(--gray-500); font-size: .61rem; }
.investment-rate strong { margin: 3px 0; color: var(--investment-accent); font-size: 1.15rem; }
.investment-rate small { color: var(--gray-500); font-size: .59rem; line-height: 1.4; }
.investment-position { display: grid; gap: 8px; margin: 14px 0; }
.investment-position > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .68rem; }
.investment-position span { color: var(--gray-500); }
.investment-position > div > small { margin-left: auto; font-size: .57rem; font-weight: 700; white-space: nowrap; }
.investment-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.investment-actions .btn { justify-content: center; }
.investment-minimum { display: block; margin-top: 8px; color: var(--gray-500); font-size: .6rem; text-align: center; }
.investment-history { margin-top: 3px; }
.investment-modal { width: min(550px, 100%); }
.investment-modal-summary { padding: 17px; border-radius: 14px; background: linear-gradient(125deg, var(--blue-faint), white); text-align: center; }
.investment-modal-summary span, .investment-modal-summary strong, .investment-modal-summary small { display: block; }
.investment-modal-summary span { color: var(--gray-500); font-size: .67rem; }
.investment-modal-summary strong { margin: 4px 0; color: var(--blue-primary); font-size: 1.45rem; }
.investment-modal-summary small { color: var(--gray-500); font-size: .64rem; }
.investment-day-change { flex: 0 0 auto; padding: 6px 8px; border-radius: 9px; font-size: .69rem; font-weight: 900; text-align: right; }
.investment-day-change small { display: block; margin-top: 1px; color: currentColor; font-size: .51rem; font-weight: 700; opacity: .72; }
.investment-day-change.is-positive { background: #ECFDF5; color: #047857; }
.investment-day-change.is-negative { background: #FEF2F2; color: #B91C1C; }
.investment-day-change.is-neutral { background: var(--gray-100); color: var(--gray-500); }
.investment-quote { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; gap: 10px; padding: 13px; border-radius: 13px; background: var(--gray-50); }
.investment-quote > div:first-child span, .investment-quote > div:first-child strong, .investment-quote > div:first-child small { display: block; }
.investment-quote > div:first-child span { color: var(--gray-500); font-size: .57rem; }
.investment-quote > div:first-child strong { margin: 3px 0; color: var(--investment-accent); font-size: .91rem; }
.investment-quote > div:first-child small { color: var(--gray-400); font-size: .52rem; }
.investment-periods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.investment-periods > span { display: flex; align-items: center; flex-direction: column; padding: 6px 3px; border-radius: 8px; font-size: .58rem; font-weight: 900; text-align: center; }
.investment-periods small { display: block; margin-bottom: 2px; color: var(--gray-500); font-size: .48rem; font-weight: 700; }
.investment-periods .is-positive { background: #ECFDF5; color: #047857; }
.investment-periods .is-negative { background: #FEF2F2; color: #B91C1C; }
.investment-periods .is-neutral { background: var(--gray-100); color: var(--gray-500); }
.investment-chart { margin: 12px 0 5px; }
.investment-chart svg { display: block; width: 100%; height: 88px; overflow: visible; }
.investment-chart svg line { stroke: var(--gray-100); stroke-width: 1; stroke-dasharray: 4 4; }
.investment-chart svg polyline { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 3px 3px color-mix(in srgb, currentColor 22%, transparent)); }
.investment-chart.is-positive { color: #059669; }
.investment-chart.is-negative { color: #DC2626; }
.investment-chart > div { display: flex; align-items: center; justify-content: space-between; margin-top: -2px; color: var(--gray-400); font-size: .5rem; }
.investment-chart > div strong { color: var(--gray-500); font-size: .53rem; }
.investment-chart-empty { display: flex; min-height: 90px; align-items: center; justify-content: center; margin: 12px 0; color: var(--gray-400); font-size: .6rem; }
.investment-position .is-positive, .investment-summary .is-positive { color: #047857; }
.investment-position .is-negative, .investment-summary .is-negative { color: #B91C1C; }
.investment-position .is-neutral, .investment-summary .is-neutral { color: var(--gray-600); }

@media (max-width: 1050px) {
  .admin-products-grid, .investment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .investment-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .admin-list-toolbar { align-items: stretch; flex-direction: column; }
  .admin-list-toolbar .search-wrapper, .admin-list-toolbar .form-select { width: 100%; max-width: none; }
  .store-products-admin-hero, .investment-hero { align-items: stretch; flex-direction: column; padding: 24px; }
  .store-products-admin-hero .btn, .investment-wallet-balance { width: 100%; }
  .store-product-form-grid { grid-template-columns: 1fr; }
  .store-product-image-picker { min-height: 210px; }
  .investment-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .admin-products-grid { grid-template-columns: 1fr; }
  .list-pagination { gap: 7px; }
  .list-pagination [data-page-info] { min-width: 120px; font-size: .63rem; }
  .investment-hero h1 { font-size: 1.55rem; }
  .investment-summary { grid-template-columns: 1fr !important; }
  .investment-actions { grid-template-columns: 1fr; }
  .investment-quote { grid-template-columns: 1fr; }
}
