/* ----------------------------------------------------------------
   Account dashboard (/dashboard/) — loaded only by dashboard.php.
   Everything is scoped under .acct so nothing leaks into the site.
-----------------------------------------------------------------*/

.acct {
  --navy: #202080;
  --navy-deep: #16165c;
  --ink: #1d1d1f;
  --muted: #6b6b76;
  --line: #e6e6ec;
  --bg: #f5f5f8;
  --card: #ffffff;
  --accent: #5dc7ec;
  --ok: #1a8f4e;
  --danger: #c0392b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 20, 60, .06), 0 8px 24px -12px rgba(20, 20, 60, .18);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}
.acct h1, .acct h2, .acct h3, .acct h4 { color: var(--ink); letter-spacing: -.01em; }
.acct a { color: var(--navy); }
.acct a:hover { color: var(--navy-deep); }
.acct .content-wrap { padding: 0; }

/* Header band ---------------------------------------------------------- */
.acct-hero {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 60%, #2b2ba6 100%);
  color: #fff;
  padding: 2.25rem 0 0;
}
.acct-hero-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.acct-id { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.acct-avatar {
  width: 56px; height: 56px; border-radius: 50%; flex: 0 0 56px;
  background: rgba(255,255,255,.14); border: 2px solid rgba(255,255,255,.35);
  display: grid; place-items: center; font-weight: 700; font-size: 1.25rem; letter-spacing: .02em;
}
.acct-name { font-size: 1.35rem; font-weight: 700; line-height: 1.2; color: #fff; }
.acct-email { color: rgba(255,255,255,.72); font-size: .92rem; overflow: hidden; text-overflow: ellipsis; }
.acct-signout {
  color: #fff !important; text-decoration: none; font-weight: 600; font-size: .92rem;
  padding: .55rem 1rem; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; white-space: nowrap;
  transition: background .15s;
}
.acct-signout:hover { background: rgba(255,255,255,.12); }

/* Tab nav */
.acct-nav {
  display: flex; gap: .25rem; margin-top: 1.75rem; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.acct-nav::-webkit-scrollbar { display: none; }
.acct-tab {
  display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap;
  padding: .8rem 1rem; color: rgba(255,255,255,.78) !important; text-decoration: none !important;
  font-weight: 600; font-size: .95rem; border-bottom: 3px solid transparent; transition: color .15s, border-color .15s;
}
.acct-tab i { font-size: 1.05rem; line-height: 1; }
.acct-tab:hover { color: #fff !important; }
.acct-tab.is-active { color: #fff !important; border-bottom-color: var(--accent); }

/* Body ------------------------------------------------------------------ */
.acct-body { padding: 2rem 0 4rem; }
.acct-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.6rem 1.75rem; margin-bottom: 1.5rem;
}
.acct-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.acct-card h2 { font-size: 1.25rem; font-weight: 700; margin: 0; }
.acct-card h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 .5rem; }
.acct-sub { color: var(--muted); margin: .2rem 0 0; font-size: .92rem; }
.acct-flash {
  display: flex; gap: .6rem; align-items: center; padding: .85rem 1.1rem; margin-bottom: 1.25rem;
  background: #e8f6ee; color: #145c33; border: 1px solid #bfe6cf; border-radius: 10px; font-weight: 600;
}
.acct-flash.is-error { background: #fdeceb; color: #7a1f16; border-color: #f5c3be; }

/* Stat tiles */
.acct-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.acct-stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.2rem 1.4rem; text-decoration: none !important; color: var(--ink) !important; display: block; transition: transform .15s, box-shadow .15s;
}
.acct-stat:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(20,20,60,.06), 0 14px 28px -12px rgba(20,20,60,.25); }
.acct-stat .k { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; align-items: center; gap: .4rem; }
.acct-stat .v { font-size: 2rem; font-weight: 800; line-height: 1.15; margin-top: .25rem; color: var(--navy); }
.acct-stat .s { font-size: .88rem; color: var(--muted); }

/* Quick actions */
.acct-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.acct-action {
  display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 12px;
  text-decoration: none !important; color: var(--ink) !important; background: #fafafc; transition: background .15s, border-color .15s;
}
.acct-action:hover { background: #fff; border-color: var(--navy); }
.acct-action i { font-size: 1.3rem; color: var(--navy); }
.acct-action strong { display: block; font-size: .95rem; }
.acct-action span { font-size: .85rem; color: var(--muted); }

/* Buttons */
.acct .acct-btn {
  display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.25rem; border-radius: 999px; border: 1px solid var(--navy);
  background: var(--navy); color: #fff !important; font-weight: 600; font-size: .95rem; text-decoration: none !important; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.acct .acct-btn:hover { background: var(--navy-deep); border-color: var(--navy-deep); }
.acct .acct-btn.is-ghost { background: transparent; color: var(--navy) !important; }
.acct .acct-btn.is-ghost:hover { background: #eef0fa; }
.acct .acct-btn.is-danger { background: transparent; border-color: #e6b8b3; color: var(--danger) !important; }
.acct .acct-btn.is-danger:hover { background: #fdeceb; }
.acct .acct-btn.is-sm { padding: .45rem .9rem; font-size: .85rem; }

/* Forms */
.acct .acct-form label { font-weight: 600; font-size: .9rem; margin-bottom: .35rem; display: block; }
.acct .acct-form .form-control {
  border: 1px solid #cfd0da; border-radius: 10px; padding: .7rem .9rem; font-size: 1rem; height: auto; box-shadow: none;
}
.acct .acct-form .form-control:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(32,32,128,.12); }
.acct .acct-form .form-control[readonly] { background: #f3f3f6; color: var(--muted); }
.acct .acct-form .hint { font-size: .85rem; color: var(--muted); margin-top: .35rem; }
.acct .acct-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.acct .acct-form fieldset { border: 0; padding: 0; margin: 0 0 1.75rem; }
.acct .acct-form legend { font-size: 1.05rem; font-weight: 700; margin-bottom: .75rem; padding: 0; float: none; width: auto; }

/* Tables → responsive list */
.acct-table { width: 100%; border-collapse: collapse; }
.acct-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; text-align: left; padding: .5rem .75rem; border-bottom: 1px solid var(--line); }
.acct-table td { padding: .9rem .75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.acct-table tr:last-child td { border-bottom: 0; }
.acct-table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.acct-table .act { text-align: right; white-space: nowrap; }
.acct-badge { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: #eef0fa; color: var(--navy); white-space: nowrap; }
.acct-empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.acct-empty i { font-size: 2rem; display: block; margin-bottom: .5rem; color: #b8b9c7; }

/* Saved cards */
.acct-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.acct-cc {
  border-radius: 14px; padding: 1.1rem 1.25rem; color: #fff; position: relative; min-height: 130px;
  background: linear-gradient(135deg, #2c2c3a, #4a4a62); box-shadow: var(--shadow);
}
.acct-cc.visa { background: linear-gradient(135deg, #1a3a8f, #2b5bd7); }
.acct-cc.mastercard { background: linear-gradient(135deg, #7a1f1f, #e0552c); }
.acct-cc.amex { background: linear-gradient(135deg, #0f6b6b, #2aa198); }
.acct-cc.discover { background: linear-gradient(135deg, #8a4b00, #f28b1e); }
.acct-cc .brand { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; opacity: .85; }
.acct-cc .num { font-size: 1.25rem; font-weight: 700; letter-spacing: .12em; margin: .6rem 0 .2rem; font-variant-numeric: tabular-nums; }
.acct-cc .exp { font-size: .85rem; opacity: .85; }
.acct-cc .cc-actions { margin-top: .75rem; }
.acct-cc .cc-actions a { color: #fff !important; font-size: .85rem; font-weight: 600; text-decoration: underline; }
.acct-cc .cc-confirm { margin-top: .6rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.acct-cc .cc-confirm a { text-decoration: none; padding: .35rem .75rem; border-radius: 999px; background: #fff; color: var(--danger) !important; }
.acct-cc .cc-confirm a.cancel { background: rgba(255,255,255,.18); color: #fff !important; }
.acct-secure { font-size: .85rem; color: var(--muted); display: flex; gap: .5rem; align-items: flex-start; margin-top: 1rem; }

/* Reports */
.acct-reports { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.acct-report {
  display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; text-decoration: none !important; color: var(--ink) !important; font-weight: 600; transition: border-color .15s, transform .15s;
}
.acct-report:hover { border-color: var(--navy); transform: translateY(-1px); }
.acct-report i { color: var(--navy); font-size: 1.25rem; }

/* Details / disclosure */
.acct details { border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1.1rem; background: #fafafc; }
.acct details summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: .5rem; }
.acct details summary::-webkit-details-marker { display: none; }
.acct details summary::before { content: "\203A"; font-size: 1.3rem; line-height: 1; transition: transform .15s; color: var(--muted); }
.acct details[open] summary::before { transform: rotate(90deg); }
.acct details ul { margin: .75rem 0 0; }

/* Signed-out auth layout ------------------------------------------------- */
.acct-auth { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; max-width: 960px; margin: 2rem auto; }
.acct-auth-intro h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: .75rem; }
.acct-auth-intro p { color: var(--muted); font-size: 1.05rem; }
.acct-auth-card { padding: 2rem; }

/* LoginRegisterPro form overrides (scoped) */
.acct .LoginRegisterPro h2, .acct .LoginRegisterPro h3 { font-size: 1.3rem; font-weight: 700; margin: 0 0 1rem; }
.acct .Inputfields { display: block; }
.acct .Inputfield { background: none !important; border: 0 !important; padding: 0 !important; margin: 0 0 1.1rem !important; box-shadow: none !important; }
.acct .InputfieldHeader { font-weight: 600 !important; font-size: .9rem !important; margin: 0 0 .35rem !important; padding: 0 !important; display: block; color: var(--ink) !important; }
.acct .InputfieldContent { padding: 0 !important; }
.acct .LoginRegisterPro input[type=text], .acct .LoginRegisterPro input[type=email], .acct .LoginRegisterPro input[type=password] {
  width: 100% !important; max-width: 100% !important; border: 1px solid #cfd0da; border-radius: 10px; padding: .7rem .9rem; font-size: 1rem; background: #fff; box-shadow: none;
}
.acct .LoginRegisterPro input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(32,32,128,.12); }
.acct .LoginRegisterPro .ui-button, .acct .LoginRegisterPro button[type=submit] {
  display: inline-flex !important; align-items: center; padding: .75rem 1.5rem !important; border-radius: 999px !important; border: 0 !important;
  background: var(--navy) !important; color: #fff !important; font-weight: 600 !important; font-size: 1rem !important; cursor: pointer; box-shadow: none !important;
}
.acct .LoginRegisterPro .ui-button:hover, .acct .LoginRegisterPro button[type=submit]:hover { background: var(--navy-deep) !important; }
.acct .LoginRegisterPro .ui-button-text { padding: 0 !important; }
.acct .LoginRegisterPro ul { list-style: none; padding: 0 !important; margin: 1.25rem 0 0 !important; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.acct .LoginRegisterPro ul li { margin: 0 !important; font-size: .92rem; }
.acct .LoginRegisterPro .InputfieldStateRequired .InputfieldHeader::after { content: " *"; color: var(--danger); }
.acct .LoginRegisterPro .InputfieldCheckbox label { font-weight: 400 !important; }
.acct .LoginRegisterPro .InputfieldStateError input { border-color: var(--danger); }
.acct .LoginRegisterPro .NoticeError, .acct .LoginRegisterPro .error, .acct .LoginRegisterPro .input-error { color: var(--danger); font-size: .88rem; margin-top: .3rem; }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 991px) {
  .acct-stats { grid-template-columns: 1fr 1fr; }
  .acct-auth { grid-template-columns: 1fr; gap: 1.5rem; margin-top: 0; }
  .acct-auth-intro { text-align: center; }
}
@media (max-width: 640px) {
  .acct-hero { padding-top: 1.5rem; }
  .acct-avatar { width: 46px; height: 46px; flex-basis: 46px; font-size: 1rem; }
  .acct-name { font-size: 1.15rem; }
  .acct-signout span { display: none; }
  .acct-nav { margin-top: 1.25rem; margin-left: -12px; margin-right: -12px; padding: 0 12px; }
  .acct-tab { padding: .7rem .8rem; font-size: .9rem; }
  .acct-body { padding-top: 1.25rem; }
  .acct-card { padding: 1.25rem 1.1rem; border-radius: 12px; }
  .acct-stats, .acct-actions, .acct .acct-form-grid { grid-template-columns: 1fr; }
  .acct-stat .v { font-size: 1.6rem; }

  /* Tables collapse into stacked rows */
  .acct-table thead { display: none; }
  .acct-table tr { display: block; padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .acct-table tr:last-child { border-bottom: 0; }
  .acct-table td { display: block; padding: .15rem 0; border: 0; }
  .acct-table td[data-label]::before { content: attr(data-label); display: inline-block; min-width: 6rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
  .acct-table .num, .acct-table .act { text-align: left; }
  .acct-table .act { padding-top: .5rem; }
}

/* legacy delete-card JS toggles this class */
.acct .hidden { display: none !important; }

/* Auth views (signed out) ------------------------------------------------ */
.acct-eyebrow { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--navy); margin: 0 0 .5rem; }
.acct-auth-switch { display: inline-flex; background: #e9e9f0; border-radius: 999px; padding: 4px; margin-top: 1.25rem; }
.acct-auth-switch a {
  padding: .5rem 1.1rem; border-radius: 999px; font-weight: 600; font-size: .9rem; text-decoration: none !important; color: var(--muted) !important;
  transition: background .15s, color .15s;
}
.acct-auth-switch a.is-active { background: #fff; color: var(--navy) !important; box-shadow: 0 1px 3px rgba(20,20,60,.15); }
.acct-auth-card h2 { font-size: 1.3rem; font-weight: 700; margin: 0 0 .5rem; }
.acct-auth-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .92rem; }
.acct-auth-links a { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; text-decoration: none; }
.acct-auth-links a:hover { text-decoration: underline; }
.acct .LoginRegisterLinks { display: none !important; }   /* we render our own links */

/* Generic form controls inside the auth card (LoginRegisterPro + ProcessForgotPassword + ours) */
.acct .acct-auth-card input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]),
.acct .acct-auth-card select, .acct .acct-auth-card textarea {
  width: 100% !important; max-width: 100% !important; border: 1px solid #cfd0da; border-radius: 10px; padding: .7rem .9rem; font-size: 1rem; background: #fff; box-shadow: none; height: auto;
}
.acct .acct-auth-card input:focus, .acct .acct-auth-card select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(32,32,128,.12); }
.acct .acct-auth-card .InputfieldForm h2 { font-size: 1.3rem; font-weight: 700; margin: 0 0 1rem; }
.acct .acct-auth-card .InputfieldForm button, .acct .acct-auth-card .ui-button {
  display: inline-flex !important; align-items: center; padding: .75rem 1.5rem !important; border-radius: 999px !important; border: 0 !important;
  background: var(--navy) !important; color: #fff !important; font-weight: 600 !important; font-size: 1rem !important; cursor: pointer; box-shadow: none !important; margin-top: .25rem;
}
.acct .acct-auth-card .InputfieldForm button:hover, .acct .acct-auth-card .ui-button:hover { background: var(--navy-deep) !important; }
.acct .acct-auth-card .InputfieldCheckbox label, .acct .acct-auth-card .InputfieldCheckbox .InputfieldHeader { font-weight: 400 !important; }
.acct .acct-auth-card .InputfieldCheckbox input { margin-right: .5rem; }
.acct .acct-auth-card .InputfieldStateError input { border-color: var(--danger); }
.acct .acct-auth-card .InputfieldForm .description, .acct .acct-auth-card .InputfieldForm .notes { font-size: .85rem; color: var(--muted); margin: .35rem 0 0; }
.acct .acct-auth-card .NoticeError, .acct .acct-auth-card .uk-alert-danger, .acct .acct-auth-card .error {
  background: #fdeceb; color: #7a1f16; border: 1px solid #f5c3be; border-radius: 10px; padding: .7rem 1rem; margin-bottom: 1rem; font-size: .92rem;
}
.acct .acct-auth-card .NoticeMessage, .acct .acct-auth-card .uk-alert-success, .acct .acct-auth-card .success {
  background: #e8f6ee; color: #145c33; border: 1px solid #bfe6cf; border-radius: 10px; padding: .7rem 1rem; margin-bottom: 1rem; font-size: .92rem;
}

/* "Check your email" state */
.acct-sent { text-align: center; padding: 1rem 0 .5rem; }
.acct-sent-icon { width: 64px; height: 64px; border-radius: 50%; background: #eef0fa; color: var(--navy); display: grid; place-items: center; font-size: 1.8rem; margin: 0 auto 1rem; }
.acct-sent h2 { margin-bottom: .5rem; }
.acct-sent p { margin: 0 0 .75rem; }
