/* FloorPlan Creator — auth & account pages. */

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

:root {
  --accent: #4f46e5;
  --accent-dark: #4338ca;
  --accent-soft: #eef2ff;
  --ink: #111527;
  --ink-2: #4b5365;
  --ink-3: #828b9e;
  --line: #e6e9ef;
  --bg: #f7f8fb;
  --danger: #dc2626;
  --ok: #16a34a;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(17, 21, 39, 0.10);
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

.logo { display: inline-flex; align-items: center; gap: 9px; font-size: 17px; text-decoration: none; color: var(--ink); font-weight: 500; }
.logo b { color: var(--accent); font-weight: 700; }

/* ============ Auth page ============ */
.auth-body {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 28px 16px;
  background:
    radial-gradient(800px 400px at 80% -5%, #ede9ff 0%, transparent 60%),
    radial-gradient(600px 320px at 5% 100%, #f0f7ff 0%, transparent 55%),
    var(--bg);
}
.auth-card {
  width: 100%; max-width: 400px; background: #fff;
  border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); padding: 36px 34px 30px;
}
.auth-card .logo { margin-bottom: 26px; }
.auth-card h1 { font-size: 23px; letter-spacing: -.02em; }
.auth-sub { color: var(--ink-2); font-size: 14px; margin: 6px 0 20px; }

.auth-error {
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
  font-size: 13.5px; border-radius: 9px; padding: 10px 13px; margin-bottom: 16px;
}

.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); font-weight: 600; font-size: 14.5px;
  text-decoration: none; transition: border-color .15s, box-shadow .15s;
}
.btn-google:hover { border-color: #c9cfdb; box-shadow: 0 2px 10px rgba(17,21,39,.06); }

.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--ink-3); font-size: 12.5px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }
.field input {
  width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 9px;
  padding: 0 13px; font: inherit; font-size: 14.5px; color: var(--ink);
  transition: border-color .12s, box-shadow .12s; background: #fff;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,.13); }
.field-hint { font-size: 12px; color: var(--ink-3); margin-top: 5px; }

.btn-submit {
  width: 100%; height: 44px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--accent); color: #fff; font: inherit; font-weight: 700; font-size: 15px;
  box-shadow: 0 4px 14px rgba(79,70,229,.3); transition: background .15s;
  margin-top: 4px;
}
.btn-submit:hover { background: var(--accent-dark); }
.btn-submit:disabled { opacity: .6; cursor: default; }

.auth-switch { text-align: center; font-size: 13.5px; color: var(--ink-2); margin-top: 18px; }
.auth-switch button { border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
.auth-switch button:hover { text-decoration: underline; }
.auth-foot { margin-top: 22px; font-size: 13px; color: var(--ink-3); }

/* ============ Account page ============ */
.account-nav {
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.account-nav-inner {
  max-width: 880px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; height: 60px; gap: 18px;
}
.account-nav .spacer { flex: 1; }
.btn-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none;
  border: 1px solid var(--line); background: #fff; border-radius: 9px;
  padding: 8px 14px; cursor: pointer; font-family: inherit; transition: all .13s;
}
.btn-link:hover { border-color: var(--accent); color: var(--accent); }
.btn-link.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-link.primary:hover { background: var(--accent-dark); }
.btn-link.danger { color: var(--danger); }
.btn-link.danger:hover { border-color: var(--danger); }

.account-main { max-width: 880px; margin: 0 auto; padding: 34px 20px 80px; }
.account-main h1 { font-size: 24px; letter-spacing: -.02em; margin-bottom: 24px; }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 26px; margin-bottom: 20px;
}
.card h2 { font-size: 16px; margin-bottom: 16px; letter-spacing: -.01em; }
.card .row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.profile-row { display: flex; align-items: center; gap: 16px; }
.avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 20px; overflow: hidden; flex: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-fields { flex: 1; min-width: 220px; }
.profile-fields .field { margin-bottom: 10px; max-width: 320px; }
.muted { color: var(--ink-3); font-size: 13px; }

.plan-badge {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; border-radius: 99px; padding: 3px 11px;
}
.plan-badge.free { background: #eef1f6; color: #5b6472; }
.plan-badge.pro { background: var(--accent-soft); color: var(--accent); }
.plan-badge.studio { background: #111527; color: #fff; }

.plan-line { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.plan-line b { font-size: 20px; }
.plan-meta { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; }
.plan-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.notice {
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
  border-radius: 10px; padding: 11px 14px; font-size: 13.5px; margin-top: 14px;
}
.notice.info { background: var(--accent-soft); border-color: #ddd9ff; color: var(--accent-dark); }

.usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.usage-tile {
  border: 1px solid var(--line); border-radius: 11px; padding: 15px 16px;
}
.usage-tile b { font-size: 22px; display: block; letter-spacing: -.02em; }
.usage-tile span { font-size: 12.5px; color: var(--ink-3); }
.usage-bar { height: 6px; background: #eef1f6; border-radius: 4px; margin-top: 10px; overflow: hidden; }
.usage-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .3s; }
.usage-bar i.warn { background: #f59e0b; }
.usage-bar i.full { background: var(--danger); }

.feature-list { list-style: none; margin-top: 4px; }
.feature-list li { font-size: 14px; color: var(--ink-2); padding: 5px 0 5px 24px; position: relative; }
.feature-list li::before { content: '✓'; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.feature-list li.locked { color: var(--ink-3); }
.feature-list li.locked::before { content: '–'; color: var(--ink-3); }

/* plan chooser (account + in-app modal share these) */
.cycle-toggle {
  display: flex; gap: 0; width: fit-content; background: var(--bg);
  border: 1px solid var(--line); border-radius: 11px; padding: 4px; margin: 0 auto 22px;
}
.cycle-toggle button {
  border: 0; background: transparent; font: inherit; font-weight: 600; font-size: 13.5px;
  color: var(--ink-2); padding: 7px 18px; border-radius: 8px; cursor: pointer;
}
.cycle-toggle button.active { background: var(--accent); color: #fff; }
.cycle-toggle button em { font-style: normal; font-size: 11px; opacity: .85; margin-left: 3px; }

.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tier {
  border: 1.5px solid var(--line); border-radius: 13px; padding: 18px 16px;
  display: flex; flex-direction: column; position: relative; background: #fff;
}
.tier.popular { border-color: var(--accent); }
.tier .pop-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700;
  border-radius: 99px; padding: 2px 10px; letter-spacing: .04em; white-space: nowrap;
}
.tier h3 { font-size: 15.5px; }
.tier .t-price { margin: 8px 0 2px; }
.tier .t-price b { font-size: 26px; letter-spacing: -.02em; }
.tier .t-price span { font-size: 12.5px; color: var(--ink-3); }
.tier .t-billed { font-size: 11.5px; color: var(--ink-3); min-height: 16px; }
.tier ul { list-style: none; margin: 12px 0 16px; flex: 1; }
.tier li { font-size: 12.8px; color: var(--ink-2); padding: 3.5px 0 3.5px 18px; position: relative; }
.tier li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.tier .btn-tier {
  border: 0; border-radius: 9px; height: 38px; font: inherit; font-weight: 700;
  font-size: 13.5px; cursor: pointer; background: var(--accent); color: #fff;
  transition: background .13s;
}
.tier .btn-tier:hover { background: var(--accent-dark); }
.tier .btn-tier.ghost { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.tier .btn-tier.ghost:hover { border-color: var(--accent); color: var(--accent); }
.tier .btn-tier.current { background: #eef1f6; color: var(--ink-3); cursor: default; }
.tier .btn-tier:disabled { opacity: .65; cursor: default; }

.demo-note { text-align: center; font-size: 12px; color: var(--ink-3); margin-top: 14px; }

@media (max-width: 720px) {
  .tier-grid { grid-template-columns: 1fr; }
  .card { padding: 20px 18px; }
}

/* toast (account page) */
#toast-container { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 99; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--ink); color: #fff; font-size: 13.5px; font-weight: 500;
  border-radius: 10px; padding: 10px 18px; box-shadow: 0 8px 26px rgba(0,0,0,.25);
  animation: toast-in .18s ease-out;
}
.toast.error { background: var(--danger); }
.toast.fading { opacity: 0; transition: opacity .3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
