/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --hero-blue: #1a73e8;
  --hero-blue-dark: #1557b0;
  --hero-blue-light: #e8f0fe;
  --hero-navy: #0d1b2a;
  --surface: #ffffff;
  --surface-raised: #f8f9fb;
  --border: #e2e6ed;
  --border-focus: #1a73e8;
  --text-primary: #0d1b2a;
  --text-secondary: #5f6b7a;
  --text-muted: #8a94a3;
  --success: #0f9d58;
  --success-bg: #e6f4ea;
  --error: #d93025;
  --error-bg: #fce8e6;
  --warning: #f9ab00;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(13,27,42,0.06), 0 1px 2px rgba(13,27,42,0.04);
  --shadow-md: 0 4px 16px rgba(13,27,42,0.08), 0 2px 4px rgba(13,27,42,0.04);
  --shadow-lg: 0 12px 40px rgba(13,27,42,0.12), 0 4px 12px rgba(13,27,42,0.06);
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--surface-raised);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== HEADER ===== */
.header {
  background: var(--hero-navy);
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.header-logo {
  height: 48px;
  width: auto;
  flex-shrink: 0;
}

.header-title {
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.header-subtitle {
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-user {
  color: rgba(255,255,255,0.6);
  font-size: 0.8125rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-user svg { width: 16px; height: 16px; }

.header-link {
  color: rgba(255,255,255,0.6);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

.header-link:hover { color: #ffffff; }

/* ===== LOGIN SCREEN ===== */
.login-screen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  overflow: hidden;
  animation: cardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.login-header {
  padding: 36px 32px 28px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.login-logo {
  height: 56px;
  width: auto;
  margin-bottom: 16px;
}

.login-header h1 {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.login-header p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.login-body { padding: 28px 32px 32px; }

.login-error {
  display: none;
  padding: 12px 14px;
  background: var(--error-bg);
  color: #a50e0e;
  border: 1px solid #f5c6c2;
  border-radius: var(--radius-md);
  font-size: 0.8375rem;
  font-weight: 500;
  margin-bottom: 20px;
  animation: bannerIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.login-error.visible { display: block; }

/* ===== MAIN LAYOUT — GRID ===== */
.main {
  flex: 1;
  display: none;
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  gap: 24px;
}

.main.visible {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
}

.card--history {
  grid-column: 1 / -1;
  max-width: 100%;
  animation-delay: 0.12s;
}

.card {
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  overflow: hidden;
  animation: cardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.card--favorites {
  animation-delay: 0.08s;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bannerIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-header {
  padding: 28px 32px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-header-text h1 {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.card-header-text p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.card-body { padding: 28px 32px 32px; }

/* ===== FORM ELEMENTS ===== */
.form-group { margin-bottom: 20px; }
.form-group:last-of-type { margin-bottom: 28px; }

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-label .required { color: var(--error); margin-left: 2px; }

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--transition);
  display: flex;
}

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

.form-input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input.no-icon { padding-left: 16px; }

.form-input::placeholder { color: var(--text-muted); font-weight: 400; }
.form-input:hover { border-color: #c4cad4; }

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

.form-input:focus ~ .input-icon,
.form-input:focus + .input-icon { color: var(--hero-blue); }

.form-textarea {
  width: 100%;
  min-height: 130px;
  padding: 14px 16px 14px 44px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  resize: vertical;
  line-height: 1.55;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-textarea.no-icon { padding-left: 16px; }

.form-textarea::placeholder { color: var(--text-muted); font-weight: 400; }
.form-textarea:hover { border-color: #c4cad4; }

.form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

.form-textarea:focus ~ .input-icon { color: var(--hero-blue); }

.char-count {
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.char-count.warn { color: var(--warning); }
.char-count.danger { color: var(--error); }

/* ===== BUTTONS ===== */
.btn-send, .btn-login {
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--hero-blue);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition), transform 100ms ease, box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-send:hover:not(:disabled), .btn-login:hover:not(:disabled) {
  background: var(--hero-blue-dark);
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.35);
}

.btn-send:active:not(:disabled), .btn-login:active:not(:disabled) { transform: scale(0.985); }

.btn-send:disabled, .btn-login:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-send svg, .btn-login svg { width: 18px; height: 18px; flex-shrink: 0; }

.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ===== STATUS BANNER ===== */
.status-banner {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 0.8625rem;
  font-weight: 500;
  line-height: 1.5;
  display: none;
  align-items: flex-start;
  gap: 10px;
  animation: bannerIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.status-banner.visible { display: flex; }
.status-banner.success { background: var(--success-bg); color: #137333; border: 1px solid #ceead6; }
.status-banner.error { background: var(--error-bg); color: #a50e0e; border: 1px solid #f5c6c2; }
.status-banner svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }

/* ===== FAVORITES CARD ===== */
.btn-add-fav {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hero-blue);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition), transform 100ms ease;
}

.btn-add-fav:hover { background: var(--hero-blue-dark); }
.btn-add-fav:active { transform: scale(0.92); }
.btn-add-fav:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-add-fav svg { width: 20px; height: 20px; }

.fav-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  background: var(--surface-raised);
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 4px;
}

.fav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fav-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface-raised);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.fav-item:hover {
  border-color: var(--hero-blue);
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.08);
  background: var(--hero-blue-light);
}

.fav-item-content { flex: 1; min-width: 0; }

.fav-item-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fav-item-preview {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fav-item-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity var(--transition);
}

.fav-item:hover .fav-item-actions { opacity: 1; }

.fav-action-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.fav-action-btn:hover { color: var(--text-primary); border-color: var(--text-muted); background: var(--surface); }
.fav-action-btn.delete:hover { color: var(--error); border-color: var(--error); background: var(--error-bg); }
.fav-action-btn svg { width: 14px; height: 14px; }

.fav-empty { text-align: center; padding: 32px 16px; color: var(--text-muted); }

.fav-empty-icon {
  width: 48px; height: 48px; margin: 0 auto 12px; background: var(--surface-raised);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

.fav-empty-icon svg { width: 22px; height: 22px; color: var(--text-muted); }
.fav-empty p { font-size: 0.8125rem; line-height: 1.5; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(13,27,42,0.45); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; z-index: 1000; padding: 24px;
}

.modal-overlay.visible { display: flex; }

.modal {
  width: 100%; max-width: 420px; background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header { padding: 24px 28px 20px; border-bottom: 1px solid var(--border); }
.modal-header h2 { font-size: 1.125rem; font-weight: 800; letter-spacing: -0.02em; }
.modal-body { padding: 24px 28px; }
.modal-body .form-group { margin-bottom: 18px; }
.modal-body .form-group:last-of-type { margin-bottom: 0; }
.modal-body .form-textarea { min-height: 100px; }

.modal-footer {
  padding: 16px 28px 24px; display: flex; gap: 10px; justify-content: flex-end;
}

.btn-modal {
  height: 42px; padding: 0 20px; font-family: inherit; font-size: 0.875rem; font-weight: 700;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  transition: background var(--transition), transform 100ms ease;
}

.btn-modal:active { transform: scale(0.97); }
.btn-modal--cancel { background: var(--surface-raised); color: var(--text-secondary); border: 1.5px solid var(--border); }
.btn-modal--cancel:hover { background: #eef0f4; }
.btn-modal--save { background: var(--hero-blue); color: #ffffff; }
.btn-modal--save:hover { background: var(--hero-blue-dark); }

/* ===== HISTORY TABLE ===== */
.history-table-wrap { max-height: 320px; overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8375rem;
}

.history-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0 16px 12px;
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}

.history-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text-primary);
}

.history-table tr:last-child td { border-bottom: none; }

.history-table tr:hover td { background: var(--surface-raised); }

.history-phone {
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.history-message {
  max-width: 380px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
  color: var(--text-secondary);
}

.history-time {
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.history-msg-count {
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.history-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.history-status--sent,
.history-status--queued,
.history-status--accepted {
  background: var(--success-bg);
  color: #137333;
}

.history-status--failed,
.history-status--undelivered {
  background: var(--error-bg);
  color: #a50e0e;
}

.history-status svg { width: 12px; height: 12px; }

.history-empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-muted);
}

.history-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  background: var(--surface-raised);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-empty-icon svg { width: 22px; height: 22px; }
.history-empty p { font-size: 0.8125rem; line-height: 1.5; }

.history-loading {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

/* ===== ADMIN USER LIST ===== */
.user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface-raised);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
}

.user-item-info { flex: 1; }

.user-item-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-item-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.badge-admin {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--hero-blue-light);
  color: var(--hero-blue);
}

/* ===== NOTIFICATION DOT ===== */
.notif-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  background: #e53e3e;
  border-radius: 50%;
  margin-left: 8px;
  vertical-align: middle;
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

.history-table tr { cursor: pointer; }

/* ===== CHAT WINDOW ===== */
.chat-modal {
  max-width: 540px;
  height: 80vh;
  max-height: 600px;
  display: flex;
  flex-direction: column;
}

.chat-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-info h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.chat-header-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chat-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--surface-raised);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.chat-close:hover { background: var(--border); }
.chat-close svg { width: 18px; height: 18px; }

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface-raised);
}

.chat-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.875rem;
  line-height: 1.45;
  word-wrap: break-word;
}

.chat-bubble--sent {
  align-self: flex-end;
  background: var(--hero-blue);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble--received {
  align-self: flex-start;
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.chat-bubble-time {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.chat-bubble--sent .chat-bubble-time { color: rgba(255,255,255,0.65); text-align: right; }

.chat-date-divider {
  text-align: center;
  font-size: 0.6875rem;
  color: var(--text-muted);
  padding: 8px 0;
  font-weight: 600;
}

.chat-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.chat-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  resize: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.875rem;
  font-family: inherit;
  line-height: 1.4;
  min-height: 42px;
  max-height: 120px;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  transition: border-color 0.2s;
}

.chat-input:focus { border-color: var(--hero-blue); }

.chat-send-btn {
  width: 42px;
  height: 42px;
  border: none;
  background: var(--hero-blue);
  color: #fff;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.chat-send-btn:hover { background: var(--hero-blue-dark); }
.chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.chat-send-btn svg { width: 18px; height: 18px; }

.chat-loading {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

/* ===== REVIEW PAGE PROFILE SETTINGS ===== */
.profile-preview-link {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--hero-blue);
  text-decoration: none;
  transition: color var(--transition);
}

.profile-preview-link:hover { color: var(--hero-blue-dark); }

.profile-slug-wrapper {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.profile-slug-wrapper:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

.profile-slug-prefix {
  padding: 0 0 0 14px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  user-select: none;
  background: var(--surface-raised);
  height: 42px;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--border);
  padding-right: 10px;
}

.profile-slug-input {
  border: none !important;
  border-radius: 0 !important;
  height: 42px !important;
  font-size: 0.875rem !important;
  box-shadow: none !important;
}

.profile-slug-input:focus {
  box-shadow: none !important;
}

.profile-slug-hint {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 5px;
}

.profile-section-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0 18px;
}

.profile-links-title {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* ===== FOOTER ===== */
.footer { text-align: center; padding: 24px; font-size: 0.75rem; color: var(--text-muted); }
.footer a { color: var(--hero-blue); text-decoration: none; font-weight: 600; }
.footer a:hover { text-decoration: underline; }

/* ===== QR CODE BUTTONS ===== */
.btn-qr {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  height: 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-qr:hover:not(:disabled) {
  border-color: var(--hero-blue);
  color: var(--hero-blue);
  background: var(--hero-blue-light);
}

.btn-qr:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
  .main.visible {
    grid-template-columns: 1fr;
    padding: 24px 16px 60px;
  }
  .card, .card--favorites, .card--history { max-width: 100%; }
  .card-header { padding: 22px 20px 20px; }
  .card-body { padding: 22px 20px 28px; }
  .header-subtitle { display: none; }
  .fav-item-actions { opacity: 1; }
  .card--history { grid-column: 1; }
}

@media (max-width: 540px) {
  .login-header { padding: 28px 20px 22px; }
  .login-body { padding: 22px 20px 28px; }
  .header-user { display: none; }
  .history-message { max-width: 200px; }
}
