/**
 * Account Pages Styles
 * Extracted from: templates/accounts/*.html
 * 
 * Consolidated styles for login, register, profile, and password change pages
 */

/* ============================================
   AUTH PAGE BASE
   ============================================ */
.auth-page {
  min-height: 100vh;
  background: #fff;
  padding-top: 72px;
  padding-bottom: 80px;
}

/* ============================================
   AUTH CONTAINER
   ============================================ */
.auth-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 48px 32px;
}

/* ============================================
   AUTH HEADER
   ============================================ */
.auth-header {
  text-align: center;
  margin-bottom: 48px;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #EAF4FB;
  color: var(--color-accent);
  border: 1.5px solid #C5E0F0;
  padding: 7px 18px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.auth-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: #0D1F35;
  margin-bottom: 16px;
  line-height: 1.15;
}

.auth-title span {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-strong) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-subtitle {
  font-size: 16px;
  color: #4A6580;
  line-height: 1.65;
  max-width: 440px;
  margin: 0 auto;
}

/* ============================================
   AUTH CARD
   ============================================ */
.auth-card {
  background: #F8FCFF;
  border: 1px solid #D4EBF5;
  border-radius: 24px;
  padding: 48px;
}

.auth-card h2 {
  font-size: 24px;
  font-weight: 700;
  color: #0D1F35;
  margin-bottom: 8px;
}

.auth-card p {
  font-size: 15px;
  color: #4A6580;
  margin-bottom: 32px;
}

/* ============================================
   FORM GROUPS
   ============================================ */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #0D1F35;
  margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
  width: 100%;
  padding: 14px 18px;
  background: #fff;
  border: 1.5px solid #C5DFF0;
  border-radius: 12px;
  color: #0D1F35;
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(14, 116, 186, 0.12);
  background: #fff;
}

.form-group input::placeholder {
  color: #8FAEC0;
}

.form-group input[type="submit"] {
  width: 100%;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-strong) 100%);
  border: none;
  color: white;
  font-weight: 700;
  font-size: 16px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  border-radius: 12px;
}

.form-group input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   AUTH FOOTER
   ============================================ */
.auth-footer {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid #D4EBF5;
  font-size: 14px;
  color: #4A6580;
}

.auth-footer a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ============================================
   QUICK CREDENTIALS (DEV)
   ============================================ */
.quick-cred {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid #D4EBF5;
}

.quick-cred-title {
  font-size: 13px;
  font-weight: 600;
  color: #4A6580;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quick-cred button {
  padding: 12px 16px;
  background: #EAF4FB;
  border: 1.5px solid #C5DFF0;
  border-radius: 10px;
  color: var(--color-accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.quick-cred button:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}

/* ============================================
   FORM HELP & ERRORS
   ============================================ */
.helptext {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.errorlist {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}

.errorlist li {
  background: var(--color-danger-bg);
  border: 1px solid var(--color-danger);
  color: var(--color-danger);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
}

/* ============================================
   PROFILE PAGE
   ============================================ */
.profile-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border-subtle);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--color-accent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: var(--color-accent);
}

.profile-info h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
}

.profile-info p {
  margin: 4px 0 0;
  color: var(--color-text-muted);
  font-size: 14px;
}

.profile-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.profile-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ============================================
   PROFILE PAGE COMPONENTS
   ============================================ */
.profile-page-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.profile-page-header .material-symbols-outlined {
  font-size: 36px;
  color: var(--color-accent);
}

.profile-page-header h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text);
}

.profile-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.profile-card h2 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
}

.profile-card h2 .material-symbols-outlined {
  font-size: 22px;
  color: var(--color-accent);
}

.profile-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--space-2);
}

.profile-info {
  margin-bottom: var(--space-4);
}

.profile-info p {
  margin: var(--space-2) 0;
  color: var(--color-text);
  font-size: 0.95rem;
}

.profile-info p strong {
  color: var(--color-text);
  font-weight: 600;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.profile-actions--inline {
  margin-top: 0;
}

.profile-actions--spaced {
  margin-top: var(--space-3);
}

.profile-coins-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.profile-coins-header h2 {
  margin: 0;
}

.profile-coins-balance {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.profile-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-3);
}

.profile-table th,
.profile-table td {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border-subtle);
  font-size: 0.9rem;
}

.profile-table th {
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-bg);
}

.profile-table td {
  color: var(--color-text);
}

.profile-table__th--when {
  width: 180px;
}

.profile-table__th--type {
  width: 120px;
}

.profile-table__th--amount {
  width: 120px;
}

.profile-referral-row {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.profile-referral-row input {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--color-text);
}

.profile-referral-row input:focus {
  border-color: var(--color-accent);
  outline: none;
}

.profile-commission {
  margin-top: var(--space-3);
}

.profile-commission label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.profile-commission input {
  width: 100%;
  max-width: 200px;
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

/* Settings Section */
.profile-settings-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.profile-settings-row > div:first-child {
  flex: 1;
}

.profile-settings-row label.muted {
  display: block;
  margin-bottom: var(--space-2);
  font-size: 0.9rem;
}

.timezone-input-wrapper {
  position: relative;
}

.timezone-input-wrapper input {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-size: 14px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
}

.timezone-input-wrapper input:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#timezoneDropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  margin-top: 4px;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.timezone-dropdown-empty {
  padding: var(--space-3);
  color: var(--color-text-muted);
  text-align: center;
  font-size: 0.9rem;
}

#timezoneDropdown > div {
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  border-bottom: 1px solid var(--color-border-subtle);
  font-size: 14px;
  user-select: none;
  color: var(--color-text);
}

#timezoneDropdown > div:hover {
  background: var(--color-bg);
}

#timezoneDropdown > div:last-child {
  border-bottom: none;
}

#tzHint {
  display: block;
  margin-top: var(--space-1);
}

.timezone-saved-indicator {
  color: #059669;
  font-size: 0.85em;
  margin-left: 4px;
}

.profile-settings-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.profile-settings-controls .button.secondary .material-symbols-outlined {
  font-size: 18px;
}

.clock-display {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.clock-display .material-symbols-outlined {
  font-size: 18px;
  color: var(--color-accent);
}

.clock-display #live-clock {
  font-family: monospace;
  font-size: 0.9rem;
}

/* Empty message */
.profile-empty-message {
  margin-top: var(--space-1);
}

/* Referral intro text */
.profile-referral-intro {
  margin-top: 0;
  margin-bottom: var(--space-2);
}

/* Referral code display */
.profile-referral-code {
  margin-top: var(--space-2);
}

/* Inner card for commission */
.profile-card--inner {
  margin-top: var(--space-3);
  border: 1px solid var(--color-border-subtle);
  background: var(--color-bg);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-3);
}

.profile-stat {
  text-align: center;
  padding: var(--space-3);
  background: var(--color-bg);
  border-radius: var(--radius-md);
}

.profile-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-accent);
}

.profile-stat-label {
  font-size: 12px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   PASSWORD CHANGE PAGE
   ============================================ */
.password-page-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.password-page-header .material-symbols-outlined {
  font-size: 32px;
  color: var(--color-accent);
}

.password-page-header h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text);
}

.password-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-4);
}

.password-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.password-card h2 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
}

.password-card h2 .material-symbols-outlined {
  font-size: 22px;
  color: var(--color-accent);
}

.password-card form p {
  margin-bottom: var(--space-3);
}

.password-card form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.password-card form input[type="password"] {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

.password-card form input[type="password"]:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.password-card form .helptext {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.password-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-3);
}

.password-tips {
  list-style: none;
  padding: 0;
  margin: 0;
}

.password-tips li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  color: var(--color-text);
  font-size: 0.9rem;
}

.password-tips li .material-symbols-outlined {
  font-size: 18px;
  color: var(--color-success, #059669);
}

.password-change-form {
  max-width: 500px;
  margin: 0 auto;
}

.password-requirements {
  background: var(--color-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.password-requirements h4 {
  margin: 0 0 var(--space-2);
  font-size: 14px;
  font-weight: 600;
}

.password-requirements ul {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.password-requirements li {
  margin-bottom: 4px;
}

@media (max-width: 768px) {
  .password-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
  .auth-container {
    padding: 24px;
  }

  .auth-card {
    padding: 32px 24px;
  }

  .auth-title {
    font-size: 32px;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .profile-stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .auth-title {
    font-size: 28px;
  }

  .auth-card {
    padding: 24px 16px;
  }

  .auth-card h2 {
    font-size: 24px;
  }
}
