/* ==============================================
   ELDARDO ACCOUNT - Consistent with Site Theme
   Light mode only, matching /app styles
   ============================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Same as /app light theme */
  --bg: #f8f9fa;
  --bg-elevated: #ffffff;
  --panel: #ffffff;
  --surface: #f1f3f5;
  --fg: #1a1a1a;
  --fg-dim: #555555;
  --muted: #888888;
  --border: #e1e4e8;
  --border-subtle: #f0f0f0;
  --brand: #ff914d;
  --brand-dim: rgba(255, 145, 77, 0.12);
  --brand-hover: #ffab70;
  --error: #dc3545;
  --error-bg: #f8d7da;
  --success: #28a745;
  --success-bg: #d4edda;

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

html,
body {
  height: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Auth Pages - Plain background like rest of site */
.auth-bg {
  min-height: 100%;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

/* Centered Container */
.centered {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* Card */
.card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px;
}

.card.compact {
  max-width: 380px;
  padding: 28px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.brand img.logo {
  height: 32px;
}

/* Titles */
.title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  color: var(--fg);
}

.muted {
  color: var(--fg-dim);
  font-size: 14px;
  text-align: center;
  margin-bottom: 20px;
}

/* Form */
form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Input Group with Icon */
.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group .icon {
  position: absolute;
  left: 14px;
  color: var(--muted);
  font-size: 20px;
  pointer-events: none;
  transition: color 0.2s ease;
}

.input-group input {
  width: 100%;
  padding: 14px 14px 14px 46px;
  font-size: 15px;
  font-family: inherit;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: all 0.2s ease;
}

.input-group input::placeholder {
  color: var(--muted);
}

.input-group input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-dim);
}

.input-group:focus-within .icon {
  color: var(--brand);
}

/* Password Toggle */
.input-group .toggle-password {
  position: absolute;
  right: 14px;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  transition: color 0.2s ease;
  user-select: none;
}

.input-group .toggle-password:hover {
  color: var(--fg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
}

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

.btn.secondary {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn.secondary:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-dim);
}

/* Links */
.link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.link:hover {
  opacity: 0.8;
}

.forgot-link {
  display: block;
  font-size: 13px;
  color: var(--fg-dim);
  text-decoration: none;
  text-align: right;
  margin-top: -8px;
  margin-bottom: 8px;
  transition: color 0.2s ease;
}

.forgot-link:hover {
  color: var(--brand);
}

/* Actions Row */
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}

/* Messages */
.error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--error);
  background: var(--error-bg);
  border: 1px solid var(--error);
  border-radius: var(--radius-sm);
}

.success {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid var(--success);
  border-radius: var(--radius-sm);
}

/* Navigation Bar - Same as site */
.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav .logo {
  height: 24px;
}

.nav .spacer {
  flex: 1;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* Grid Layout */
.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

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

  .panel.wide {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .account-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* Panel */
.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title .material-symbols-outlined {
  color: var(--brand);
  font-size: 22px;
}

/* Avatar */
.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  transition: border-color 0.2s ease;
}

.avatar:hover {
  border-color: var(--brand);
}

.avatar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* Note */
.note {
  font-size: 12px;
  color: var(--muted);
}

/* Code Input (2FA) */
.code-input {
  font-size: 24px;
  letter-spacing: 8px;
  text-align: center;
  font-weight: 600;
}

/* File Input */
.file-input-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.file-input-wrapper input[type=file] {
  position: absolute;
  left: -9999px;
}

.file-input-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--brand);
  background: var(--brand-dim);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-input-label:hover {
  background: var(--brand);
  color: #fff;
}

/* Login History Entry */
.login-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  transition: background 0.2s ease;
}

.login-entry:hover {
  background: var(--border-subtle);
}

.device-tag {
  background: var(--brand-dim);
  color: var(--brand);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  margin-left: 8px;
}

/* Info Grid */
.info-grid {
  display: grid;
  gap: 4px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.info-item:last-child {
  border-bottom: none;
}

.info-label {
  font-weight: 500;
  color: var(--fg-dim);
}

.info-value {
  color: var(--fg);
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 13px;
}

/* Footer - Same as site, NOT fixed */
.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  margin-top: auto;
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--brand);
}

.footer-copy {
  font-size: 12px;
  color: var(--muted);
}

/* Language Select in Footer */
.footer-settings {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.setting-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.setting-group label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--fg-dim);
}

.setting-group select {
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--fg);
  cursor: pointer;
}

.setting-group select:focus {
  outline: none;
  border-color: var(--brand);
}

/* Responsive */
@media (max-width: 480px) {
  .card {
    padding: 24px 20px;
  }

  .title {
    font-size: 20px;
  }

  .actions {
    flex-direction: column;
  }

  .actions .btn {
    width: 100%;
  }

  .actions .link {
    order: 1;
    margin-top: 8px;
  }

  .footer-links {
    gap: 12px;
  }
}