/* ==============================
   MBS Student PWA — style.css
   Macaron 米黄色风格（对齐 musicbox-shell）
   ============================== */

/* ---------- Utility ---------- */
.hidden {
  display: none !important;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* 米黄色 Macaron 主题（对齐 musicbox-shell） */
  --bg: #faf7f5;
  --bg-warm: #f5f0ec;
  --card: rgba(255, 255, 255, 0.85);
  --border: #ede9e5;
  --text: #3a3a3c;
  --text-secondary: #9e95a7;

  /* 薛衣草紫 accent（对齐 shell 的 --accent） */
  --accent: #b39ddb;
  --accent-dark: #7e57c2;
  --accent-light: #f3eeff;

  /* Status Colors */
  --green: #BAFFC9;
  --green-text: #2D7A3E;
  --yellow: #FFE5B4;
  --yellow-text: #8B6914;
  --red: #FFB3BA;
  --red-text: #9B2C2C;
  --gray: #EFEFEF;
  --gray-text: #AAAAAA;

  /* Macaron Tag Colors */
  --macaron-pink: #F9C6CE;
  --macaron-blue: #BAE1FF;
  --macaron-green: #BAFFC9;
  --macaron-purple: #D8C8F0;
  --macaron-gold: #FFE5B4;

  /* Dimensions */
  --radius: 18px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.08);

  /* Safe area */
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

html,
body {
  height: 100%;
  font-family: -apple-system, 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  padding-top: var(--sat);
  padding-bottom: var(--sab);
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #D8C8F0;
  border-radius: 2px;
}

/* ---------- Layout ---------- */
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ---------- Header ---------- */
.header {
  padding: 28px 24px 18px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
}

.header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.25;
}

.header p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  font-weight: 400;
  line-height: 1.3;
}

.input-area {
  padding: 16px 24px 12px;
}

.input-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.input-field {
  flex: 1;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  box-shadow: 0 1px 8px rgba(120, 90, 200, 0.05);
}

.input-field::placeholder {
  color: #C5BCE0;
}

.input-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.btn-open {
  padding: 14px 22px;
  background: var(--accent);
  color: var(--accent-dark);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
  white-space: nowrap;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(179, 157, 219, 0.25);
  letter-spacing: 0.2px;
}

.btn-open:active {
  transform: scale(0.96);
}

.btn-open:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Paste hint */
.paste-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 9px 14px;
  background: var(--accent-light);
  border-radius: var(--radius-xs);
  font-size: 12px;
  color: var(--accent-dark);
  cursor: pointer;
  transition: background 0.2s;
  font-weight: 500;
}

.paste-hint:active {
  background: #ede8fa;
}

.paste-hint svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ---------- Section ---------- */
.section-title {
  padding: 20px 24px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* ---------- Report List ---------- */
.report-list {
  flex: 1;
  padding: 0 16px 100px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---------- Report Card ---------- */
.report-card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius);
  padding: 16px 16px 16px 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
  animation: slideUp 0.28s ease-out;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.report-card:active {
  transform: scale(0.98);
}

.report-card:hover {
  box-shadow: var(--shadow-lg);
}

/* Expired card */
.report-card.expired {
  opacity: 0.5;
}

.report-card.expired .card-title {
  text-decoration: line-through;
  color: var(--gray-text);
}

/* Status dot */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.green {
  background: var(--green);
  border: 2px solid var(--green-text);
}

.status-dot.yellow {
  background: var(--yellow);
  border: 2px solid var(--yellow-text);
}

.status-dot.red {
  background: var(--red);
  border: 2px solid var(--red-text);
}

.status-dot.gray {
  background: var(--gray);
  border: 2px solid var(--gray-text);
}

/* Card body */
.card-body {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-note {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.expiry-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.expiry-badge.green {
  background: var(--green);
  color: var(--green-text);
}

.expiry-badge.yellow {
  background: var(--yellow);
  color: var(--yellow-text);
}

.expiry-badge.red {
  background: var(--red);
  color: var(--red-text);
}

.expiry-badge.gray {
  background: var(--gray);
  color: var(--gray-text);
}

/* Card actions */
.card-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}

.btn-icon:active {
  transform: scale(0.9);
}

.btn-icon:hover {
  background: var(--border);
}

.btn-icon.starred {
  color: #C49FE0;
}

.btn-icon svg {
  width: 18px;
  height: 18px;
}

/* ---------- Empty State ---------- */
.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  text-align: center;
}

.empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.empty-icon svg {
  width: 36px;
  height: 36px;
  color: var(--accent);
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.viewer.hidden {
  display: none;
}

.viewer-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  padding-top: calc(14px + var(--sat));
}

.btn-back {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, background 0.2s;
  flex-shrink: 0;
}

.btn-back:active {
  transform: scale(0.9);
  background: #EDE8FA;
}

.btn-back svg {
  width: 20px;
  height: 20px;
}

.viewer-title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.viewer iframe {
  flex: 1;
  width: 100%;
  border: none;
  background: #fff;
}

.viewer-loading {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* ---------- Edit Note Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.hidden {
  display: none;
}

.modal-sheet {
  width: 100%;
  max-width: 480px;
  background: var(--card);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 24px 20px;
  padding-bottom: calc(24px + var(--sab));
  animation: sheetUp 0.3s ease;
}

.modal-sheet h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.modal-sheet input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}

.modal-sheet input:focus {
  border-color: var(--accent);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.modal-actions button {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.1s;
}

.modal-actions button:active {
  transform: scale(0.96);
}

.btn-cancel {
  background: var(--border);
  color: var(--text-secondary);
}

.btn-save {
  background: var(--accent);
  color: var(--accent-dark);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(179, 157, 219, 0.2);
}

/* ---------- iOS Install Banner ---------- */
.install-banner {
  margin: 0 16px 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #EDE8F8, #DDD4F4);
  border-radius: var(--radius-sm);
  border: 1px solid #D8C8F0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: slideUp 0.4s ease;
}

.install-banner.hidden {
  display: none;
}

.install-banner-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.install-banner-icon svg {
  width: 18px;
  height: 18px;
  color: var(--text);
}

.install-banner-body {
  flex: 1;
  min-width: 0;
}

.install-banner-body strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.install-banner-body span {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.install-banner .btn-close-banner {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.install-banner .btn-close-banner svg {
  width: 14px;
  height: 14px;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: calc(40px + var(--sab));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 24px;
  background: var(--accent-dark);
  color: #fff;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 6px 24px rgba(126, 87, 194, 0.3);
  z-index: 300;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Spinner ---------- */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

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

@keyframes sheetUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Context Menu (long press actions) ---------- */
.context-menu {
  position: fixed;
  z-index: 250;
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  min-width: 180px;
  padding: 6px;
  animation: fadeIn 0.15s ease;
}

.context-menu.hidden {
  display: none;
}

.context-menu button {
  width: 100%;
  padding: 12px 14px;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius-xs);
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s;
}

.context-menu button:hover,
.context-menu button:active {
  background: var(--border);
}

.context-menu button svg {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.context-menu button.danger {
  color: var(--red-text);
}

.context-menu button.danger svg {
  color: var(--red-text);
}

/* ---------- WeChat ID Area ---------- */
.wechat-area {
  padding: 0 24px 8px;
}

.wechat-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.wechat-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.wechat-input::placeholder {
  color: #C5BCE0;
}

.wechat-input:focus {
  border-color: var(--accent);
}

/* ---------- Submit Entry Button ---------- */
.submit-entry {
  padding: 0 24px 4px;
}

.btn-submit-entry {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #EDE8F8, #DDD4F4);
  border: 1.5px solid #D8C8F0;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
  font-family: inherit;
}

.btn-submit-entry:active {
  transform: scale(0.97);
}

.btn-submit-entry svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.btn-submit-entry .chevron-right {
  margin-left: auto;
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

.submit-entry-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.submit-entry-hint {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

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

.submit-chances {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(146, 120, 200, 0.15);
  color: var(--accent);
  white-space: nowrap;
}

.submit-chances.used-up {
  background: rgba(224, 107, 122, 0.12);
  color: #D05060;
}

/* ---------- Submit Page (full-screen) ---------- */
.submit-page {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.2s ease;
}

.submit-page.hidden {
  display: none;
}

.submit-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  padding-top: calc(14px + var(--sat));
}

.submit-header-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.submit-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
  padding-bottom: calc(24px + var(--sab));
}

.submit-form {
  max-width: 480px;
  margin: 0 auto;
}

/* Monthly info banner */
.submit-month-info {
  margin-top: 24px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  border: 1px solid #e2d9f3;
  text-align: center;
}

.submit-month-info .month-type {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
}

.submit-month-info .month-remaining {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 14px;
  border-radius: 12px;
  background: rgba(146, 120, 200, 0.12);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.submit-month-info .month-detail {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.submit-month-info.exhausted {
  background: #FDF5F6;
  border-color: #F0D8DB;
}

.submit-month-info.exhausted .month-type {
  color: #D05060;
}

.submit-month-info.exhausted .month-remaining {
  background: rgba(208, 80, 96, 0.1);
  color: #D05060;
}

/* Filming guidelines */
.filming-rules {
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--accent-light);
  border: 1px solid #e2d9f3;
  border-radius: var(--radius-sm);
}

.filming-rules-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.filming-rules-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.filming-rules-list li {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.filming-rules-list li strong {
  color: #D05060;
}

/* Form elements */
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  margin-top: 20px;
}

.form-label:first-child {
  margin-top: 0;
}

.form-label .required {
  color: #E06B7A;
  margin-left: 2px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.form-input::placeholder {
  color: #C5BCE0;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

/* File picker */
.file-picker {
  border: 2px dashed #D8C8F0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.file-picker:active {
  border-color: var(--accent);
  background: var(--accent-light);
}

.file-picker-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 20px;
  color: var(--accent);
}

.file-picker-empty svg {
  width: 36px;
  height: 36px;
  opacity: 0.7;
}

.file-picker-empty span {
  font-size: 14px;
  font-weight: 500;
}

.file-hint {
  font-size: 12px !important;
  color: var(--text-secondary) !important;
  font-weight: 400 !important;
}

/* Selected file */
.file-picker-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  gap: 12px;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.file-info svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
  flex-shrink: 0;
}

.file-details {
  min-width: 0;
}

.file-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.btn-file-remove {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.btn-file-remove svg {
  width: 16px;
  height: 16px;
}

.btn-file-remove:active {
  background: #E8E5E5;
}

/* Progress bar */
.upload-progress {
  margin-top: 20px;
  animation: fadeIn 0.3s ease;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.progress-track {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(135deg, #B8A2E0, #9278C8);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Submit button */
.btn-do-submit {
  width: 100%;
  padding: 16px;
  margin-top: 28px;
  background: var(--accent);
  color: var(--accent-dark);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(179, 157, 219, 0.25);
  transition: transform 0.1s, opacity 0.2s;
  letter-spacing: 0.5px;
}

.btn-do-submit:active {
  transform: scale(0.97);
}

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

/* ---------- Responsive ---------- */
@media (min-width: 481px) {
  #app {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
}

/* ---------- Splash Screen ---------- */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(160deg, #faf7f5 0%, #f0eaf8 50%, #faf7f5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.splash-screen.hide {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.04);
}

.splash-screen.gone {
  display: none;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  animation: splashIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.splash-logo-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.splash-logo {
  width: 110px;
  height: 110px;
  border-radius: 26px;
  object-fit: cover;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 8px 24px rgba(155, 127, 212, 0.30));
}

/* Pulsing halo ring */
.splash-ring {
  position: absolute;
  inset: -8px;
  border-radius: 34px;
  border: 2.5px solid rgba(155, 127, 212, 0.35);
  animation: splashRing 1.8s ease-in-out infinite;
  z-index: 1;
}

.splash-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.splash-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 1px;
  margin-bottom: 40px;
}

/* Loading dots */
.splash-dots {
  display: flex;
  gap: 8px;
}

.splash-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.3;
  animation: splashDot 1.2s ease-in-out infinite;
}

.splash-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.splash-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes splashIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.92);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes splashRing {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes splashDot {

  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }

  40% {
    opacity: 1;
    transform: scale(1.3);
  }
}

/* ---------- Header brand (icon + titles) ---------- */
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.header-icon {
  height: 52px;
  width: 52px;
  border-radius: 13px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(179, 157, 219, 0.2);
}

/* ---------- Lock Screen ---------- */
.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.lock-content {
  text-align: center;
  padding: 40px 32px;
  max-width: 320px;
}

.lock-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.lock-icon svg {
  width: 32px;
  height: 32px;
  color: var(--accent-dark);
}

.lock-content h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.lock-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.lock-content strong {
  color: var(--accent-dark);
  font-weight: 600;
}