﻿body {
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  color: #000000;
}

/* ──────────────────────────────────────
   Account Layout (sidebar + content)
   ────────────────────────────────────── */
.account-layout {
  display: flex;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  min-height: 60vh;
  gap: 2.5rem;
  box-sizing: border-box;
}

/* Sidebar */
.account-sidebar {
  width: 220px;
  flex-shrink: 0;
}

.account-sidebar h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 1rem;
  padding: 0 1rem;
  color: #000000;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.account-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  color: #555;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.15s, color 0.15s;
}

.account-sidebar nav a i {
  width: 18px;
  text-align: center;
  font-size: 0.9rem;
}

.account-sidebar nav a:hover {
  background: #f5f5f5;
  color: #000;
}

.account-sidebar nav a.active {
  background: #e8f0fe;
  color: #007bff;
  font-weight: 500;
}

.account-sidebar nav .sidebar-divider {
  height: 1px;
  background: #e6e6e6;
  margin: 0.5rem 0;
}

.account-sidebar nav a.logout-link {
  color: #d93025;
}

.account-sidebar nav a.logout-link:hover {
  background: #fef0ef;
}

/* Main Content Area */
.account-content {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.account-content h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: #000000;
}

.account-content .page-subtitle {
  font-size: 1rem;
  color: #555;
  margin: 0 0 2rem;
  line-height: 1.5;
}

/* Cards / Sections */
.account-section {
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.account-section h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: #000;
}

.account-section p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  margin: 0 0 1rem;
}

/* Form fields inside account pages */
.account-field {
  margin-bottom: 1rem;
}

.account-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 0.35rem;
}

.account-field input {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid #dadce0;
  border-radius: 8px;
  background: #ffffff;
  color: #000000;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.account-field input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
}

.account-field input:disabled {
  background: #f5f5f5;
  color: #888;
  cursor: not-allowed;
}

/* Buttons inside account pages */
.account-btn {
  display: inline-block;
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
  border: 1px solid transparent;
  text-decoration: none;
}

.account-btn-primary {
  background: #007bff;
  color: #ffffff;
  border-color: #007bff;
}

.account-btn-primary:hover {
  background: #0069d9;
  border-color: #0062cc;
}

.account-btn-secondary {
  background: #f5f5f5;
  color: #333;
  border-color: #dadce0;
}

.account-btn-secondary:hover {
  background: #eee;
  border-color: #c6c6c6;
}

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

/* Status message */
.account-msg {
  min-height: 1.5rem;
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: #555;
}

.account-msg.error {
  color: #d93025;
}

.account-msg.success {
  color: #34a853;
}

/* Info row (label: value) */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.95rem;
}

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

.info-label {
  color: #555;
  font-weight: 500;
}

.info-value {
  color: #000;
}

/* Plan badge */
.plan-badge-inline {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.plan-badge-free {
  background: #f0f0f0;
  color: #555;
}

.plan-badge-premium {
  background: #e8f5e9;
  color: #2e7d32;
}

/* Quick links grid (dashboard) */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.quick-link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1rem 1.25rem;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  text-decoration: none;
  color: #333;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.quick-link-card:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.08);
}

.quick-link-card i {
  font-size: 1.25rem;
  color: #007bff;
  width: 24px;
  text-align: center;
}

.quick-link-card span {
  font-size: 0.95rem;
  font-weight: 500;
}

/* ──────────────────────────────────────
   Preference toggle groups
   ────────────────────────────────────── */
.pref-group {
  margin-bottom: 1.25rem;
}

.pref-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 0.5rem;
}

.toggle-group {
  display: inline-flex;
  border: 1px solid #dadce0;
  border-radius: 8px;
  overflow: hidden;
}

.toggle-option {
  padding: 8px 18px;
  font-size: 0.88rem;
  font-family: inherit;
  font-weight: 500;
  border: none;
  background: #ffffff;
  color: #555;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border-right: 1px solid #dadce0;
}

.toggle-option:last-child {
  border-right: none;
}

.toggle-option:hover {
  background: #f5f5f5;
}

.toggle-option.active {
  background: #007bff;
  color: #ffffff;
}

/* Checkbox list */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  color: #333;
  cursor: pointer;
}

.checkbox-item.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.checkbox-item input[type="checkbox"] {
  margin-top: 3px;
  accent-color: #007bff;
}

.checkbox-item span {
  line-height: 1.45;
}

/* Section badges */
.section-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
  vertical-align: middle;
}

.section-badge-soon {
  background: #fff3e0;
  color: #e65100;
}

/* API placeholder */
.api-placeholder {
  text-align: center;
  padding: 2rem 1rem;
  border: 2px dashed #dadce0;
  border-radius: 10px;
}

.api-placeholder-icon {
  font-size: 2rem;
  color: #bbb;
  margin-bottom: 0.75rem;
}

.api-placeholder p {
  margin: 0 0 0.5rem;
}

.api-placeholder-sub {
  font-size: 0.85rem;
  color: #888;
}

.api-placeholder-sub a {
  color: #007bff;
  text-decoration: none;
}

.api-placeholder-sub a:hover {
  text-decoration: underline;
}

/* ──────────────────────────────────────
   Dark Mode
   ────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #0a0a0a;
    color: #e0e0e0;
  }

  .account-sidebar h2 {
    color: #ffffff;
  }

  .account-sidebar nav a {
    color: #aaa;
  }

  .account-sidebar nav a:hover {
    background: #1a1a1a;
    color: #e0e0e0;
  }

  .account-sidebar nav a.active {
    background: #12243a;
    color: #4da6ff;
  }

  .account-sidebar nav .sidebar-divider {
    background: #2a2a2a;
  }

  .account-sidebar nav a.logout-link {
    color: #ff6b6b;
  }

  .account-sidebar nav a.logout-link:hover {
    background: #2a1515;
  }

  .account-content h1 {
    color: #ffffff;
  }

  .account-content .page-subtitle {
    color: #aaa;
  }

  .account-section {
    background: #111111;
    border-color: #2a2a2a;
  }

  .account-section h2 {
    color: #ffffff;
  }

  .account-section p {
    color: #aaa;
  }

  .account-field label {
    color: #ccc;
  }

  .account-field input {
    background: #1a1a1a;
    border-color: #333;
    color: #e0e0e0;
  }

  .account-field input:focus {
    border-color: #4da6ff;
    box-shadow: 0 0 0 2px rgba(77, 166, 255, 0.15);
  }

  .account-field input:disabled {
    background: #151515;
    color: #666;
  }

  .account-btn-primary {
    background: #1a5aa8;
    border-color: #1a5aa8;
  }

  .account-btn-primary:hover {
    background: #2070c0;
    border-color: #2070c0;
  }

  .account-btn-secondary {
    background: #1a1a1a;
    color: #e0e0e0;
    border-color: #333;
  }

  .account-btn-secondary:hover {
    background: #222;
    border-color: #444;
  }

  .account-msg {
    color: #aaa;
  }

  .account-msg.error {
    color: #ff6b6b;
  }

  .account-msg.success {
    color: #69db7c;
  }

  .info-row {
    border-bottom-color: #222;
  }

  .info-label {
    color: #aaa;
  }

  .info-value {
    color: #e0e0e0;
  }

  .plan-badge-free {
    background: #2a2a2a;
    color: #999;
  }

  .plan-badge-premium {
    background: #1b3a1e;
    color: #69db7c;
  }

  .quick-link-card {
    border-color: #2a2a2a;
    color: #e0e0e0;
  }

  .quick-link-card:hover {
    border-color: #4da6ff;
    box-shadow: 0 2px 8px rgba(77, 166, 255, 0.08);
  }

  .quick-link-card i {
    color: #4da6ff;
  }

  .pref-label {
    color: #ccc;
  }

  .toggle-group {
    border-color: #333;
  }

  .toggle-option {
    background: #1a1a1a;
    color: #aaa;
    border-right-color: #333;
  }

  .toggle-option:hover {
    background: #222;
  }

  .toggle-option.active {
    background: #1a5aa8;
    color: #ffffff;
  }

  .checkbox-item {
    color: #ccc;
  }

  .section-badge-soon {
    background: #3a2a15;
    color: #ffb74d;
  }

  .api-placeholder {
    border-color: #333;
  }

  .api-placeholder-icon {
    color: #555;
  }

  .api-placeholder-sub {
    color: #666;
  }

  .api-placeholder-sub a {
    color: #4da6ff;
  }
}

/* ──────────────────────────────────────
   Billing Toggle (Monthly / Annual)
   ────────────────────────────────────── */
.billing-toggle {
  display: inline-flex;
  border: 1px solid #dadce0;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.billing-toggle-btn {
  padding: 8px 20px;
  font-size: 0.88rem;
  font-family: inherit;
  font-weight: 500;
  border: none;
  background: #ffffff;
  color: #555;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border-right: 1px solid #dadce0;
}

.billing-toggle-btn:last-child {
  border-right: none;
}

.billing-toggle-btn:hover {
  background: #f5f5f5;
}

.billing-toggle-btn.active {
  background: #007bff;
  color: #ffffff;
}

.billing-save-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  background: #e8f5e9;
  color: #2e7d32;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
}

.billing-toggle-btn.active .billing-save-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* ──────────────────────────────────────
   Pricing Comparison Table
   ────────────────────────────────────── */
.pricing-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.pricing-col {
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
}

.pricing-col-pro {
  border-color: #007bff;
  box-shadow: 0 0 0 1px #007bff;
}

.pricing-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: #007bff;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.pricing-header {
  text-align: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 1rem;
}

.pricing-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: #000;
}

.pricing-price {
  font-size: 2.25rem;
  font-weight: 700;
  color: #000;
  line-height: 1;
}

.pricing-period {
  font-size: 0.9rem;
  font-weight: 400;
  color: #888;
}

.pricing-desc {
  font-size: 0.85rem;
  color: #888;
  margin: 0.5rem 0 0;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: #333;
  line-height: 1.4;
}

.pricing-check {
  color: #2e7d32;
  font-size: 0.8rem;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.pricing-x {
  color: #c0c0c0;
  font-size: 0.8rem;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.pricing-excluded {
  color: #aaa;
}

.pricing-footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
  text-align: center;
}

.pricing-current-label {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #2e7d32;
}

.pricing-current-label i {
  margin-right: 4px;
}

/* Pricing – Dark Mode */
@media (prefers-color-scheme: dark) {
  .billing-toggle {
    border-color: #333;
  }

  .billing-toggle-btn {
    background: #1a1a1a;
    color: #aaa;
    border-right-color: #333;
  }

  .billing-toggle-btn:hover {
    background: #222;
  }

  .billing-toggle-btn.active {
    background: #1a5aa8;
    color: #ffffff;
  }

  .billing-save-badge {
    background: #1b3a1e;
    color: #69db7c;
  }

  .billing-toggle-btn.active .billing-save-badge {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
  }

  .pricing-col {
    border-color: #2a2a2a;
    background: #111;
  }

  .pricing-col-pro {
    border-color: #4da6ff;
    box-shadow: 0 0 0 1px #4da6ff;
  }

  .pricing-badge {
    background: #1a5aa8;
  }

  .pricing-header {
    border-bottom-color: #222;
  }

  .pricing-header h3 {
    color: #fff;
  }

  .pricing-price {
    color: #fff;
  }

  .pricing-period {
    color: #777;
  }

  .pricing-desc {
    color: #777;
  }

  .pricing-features li {
    color: #ccc;
  }

  .pricing-check {
    color: #69db7c;
  }

  .pricing-x {
    color: #555;
  }

  .pricing-excluded {
    color: #666;
  }

  .pricing-footer {
    border-top-color: #222;
  }

  .pricing-current-label {
    color: #69db7c;
  }
}

/* Pricing – Responsive */
@media (max-width: 768px) {
  .pricing-table {
    grid-template-columns: 1fr;
  }
}

/* ──────────────────────────────────────
   Billing History Table
   ────────────────────────────────────── */
.billing-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.billing-history-table thead th {
  text-align: left;
  font-weight: 600;
  padding: 0.6rem 0.75rem;
  border-bottom: 2px solid #e6e6e6;
  color: #555;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.billing-history-table tbody td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
}

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

.billing-status {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: capitalize;
}

.billing-status-paid {
  background: #e6f4ea;
  color: #2e7d32;
}

.billing-status-other {
  background: #f0f0f0;
  color: #555;
}

.billing-receipt-link {
  color: #1a73e8;
  text-decoration: none;
  font-size: 0.85rem;
}

.billing-receipt-link:hover {
  text-decoration: underline;
}

/* Billing History – Dark Mode */
@media (prefers-color-scheme: dark) {
  .billing-history-table thead th {
    border-bottom-color: #333;
    color: #888;
  }

  .billing-history-table tbody td {
    border-bottom-color: #222;
    color: #ccc;
  }

  .billing-status-paid {
    background: #1b3a1e;
    color: #69db7c;
  }

  .billing-status-other {
    background: #222;
    color: #888;
  }

  .billing-receipt-link {
    color: #4da6ff;
  }
}

/* Billing History – Responsive */
@media (max-width: 768px) {
  .billing-history-table {
    font-size: 0.8rem;
  }

  .billing-history-table thead th,
  .billing-history-table tbody td {
    padding: 0.5rem;
  }
}

/* ──────────────────────────────────────
   Responsive
   ────────────────────────────────────── */
@media (max-width: 768px) {
  .account-layout {
    flex-direction: column;
    padding: 1.5rem 1rem;
    gap: 1.5rem;
  }

  .account-sidebar {
    width: 100%;
  }

  .account-sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .account-sidebar nav a {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 6px;
  }

  .account-sidebar nav .sidebar-divider {
    display: none;
  }

  .account-content h1 {
    font-size: 1.5rem;
  }

  .info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

/* ===========================================================================
   Danger zone — account deletion (P2 #25)
   =========================================================================== */
.account-section-danger {
  border: 1px solid #f3c2c2;
  background: #fff8f8;
}

.account-section-danger h2 {
  color: #b3261e;
}

.account-btn-danger {
  background: #b3261e;
  color: #ffffff;
  border: 1px solid #b3261e;
}

.account-btn-danger:hover {
  background: #8c1d17;
  border-color: #8c1d17;
}

.account-delete-dialog {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border: 1px solid #f3c2c2;
  border-radius: 8px;
  background: #ffffff;
}

.account-delete-dialog h3 {
  margin-top: 0;
  color: #b3261e;
  font-size: 1.05rem;
}

.account-delete-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.account-field-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #666;
}

@media (prefers-color-scheme: dark) {
  .account-section-danger {
    border-color: #5a2a2a;
    background: #2a1414;
  }
  .account-section-danger h2 {
    color: #ff6b6b;
  }
  .account-delete-dialog {
    background: #1a1a1a;
    border-color: #5a2a2a;
  }
  .account-delete-dialog h3 {
    color: #ff6b6b;
  }
  .account-field-hint {
    color: #aaa;
  }
}

.account-msg.success {
  color: #137333;
}

/* ============================================================================
 * Tonight's Sky — profile location & alerts sections
 * ============================================================================ */
.loc-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.loc-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.loc-profile-results {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  max-height: 220px;
  overflow-y: auto;
}
.loc-profile-results .loc-results-item {
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
}
.loc-profile-results .loc-results-item:last-child {
  border-bottom: none;
}
.loc-profile-results .loc-results-item:hover {
  background: rgba(120, 180, 255, 0.08);
}
.loc-profile-results .loc-results-item-meta {
  font-size: 0.78rem;
  opacity: 0.65;
  margin-top: 0.15rem;
}
.loc-profile-results .loc-results-empty {
  padding: 0.65rem 0.75rem;
  opacity: 0.7;
  font-size: 0.85rem;
}
#alertsMinScore {
  width: 100%;
  margin-top: 0.5rem;
}
#alertsMinScoreLabel {
  font-weight: 600;
  color: #4a8fff;
}
