@import './base.css';

/* Account pages: the landing's language (orange panels, black ink, white cards) on the app's class names,
   which the page scripts and tests rely on. */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.app-shell > main { flex: 1; }
.topbar { border-bottom: 2px solid var(--ink); }
.topbar-back { display: flex; align-items: center; gap: 24px; margin-left: auto; font-weight: 700; font-size: 15px; }
.app-nav { display: flex; gap: 22px; margin-left: auto; font-weight: 700; font-size: 15px; }
.app-nav a { text-decoration: none; }
.app-nav a:hover { color: var(--orange-ink); }
.app-nav + .topbar-back { margin-left: 0; }
.app-shell h1 { font: 700 clamp(34px, 4.8vw, 68px)/.98 var(--display); letter-spacing: -.05em; text-wrap: balance; }
.app-shell h2 { font-size: clamp(22px, 2.4vw, 34px); line-height: 1.08; }
.app-eyebrow { display: block; color: var(--mute); font-size: 14px; font-weight: 700; }
.link-button { padding: 0; border: 0; background: none; font-weight: 700; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.link-button:hover { color: var(--orange-ink); }

/* Buttons kept under their app names */
.app-button, .orange-button, .secondary-button, .danger-button { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 54px; padding: 0 26px; border: 0; border-radius: 999px; font: 700 16px/1.1 var(--text); text-align: center; text-decoration: none; touch-action: manipulation; transition: background-color .2s, color .2s, transform .2s; }
.app-button:active, .orange-button:active, .secondary-button:active, .danger-button:active { transform: translateY(2px); }
.app-button { width: 100%; background: var(--ink); color: var(--paper); }
.app-button:hover { background: var(--orange); color: var(--ink); }
.orange-button { background: var(--orange); color: var(--ink); }
.orange-button:hover { background: var(--paper); }
.secondary-button { min-height: 46px; padding: 0 20px; background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); font-size: 15px; }
.secondary-button:hover { background: var(--ink); color: var(--paper); }
.danger-button { width: 100%; background: var(--orange-ink); color: var(--paper); }
.danger-button:hover { background: #A82610; }
.button-link { text-decoration: none; }
.compact { width: auto; }
button:disabled { cursor: progress; opacity: .55; }

/* Forms */
.form-card, .editor-card { padding: clamp(22px, 2.6vw, 36px); border: 2px solid var(--ink); border-radius: 30px; background: var(--paper); }
.form-card h1, .form-card h2 { margin: 0 0 18px; }
.form-card form { display: grid; gap: 14px; }
form > label, .editor-card label { display: grid; gap: 7px; font-size: 14px; font-weight: 700; }
input, textarea, select { width: 100%; min-height: 50px; padding: 12px 16px; border: 2px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); font: 600 16px/1.4 var(--text); transition: border-color .18s; }
textarea { resize: vertical; }
select { background-color: var(--paper); color: var(--ink); }
input:hover, textarea:hover, select:hover { border-color: var(--ghost); }
input:focus-visible, textarea:focus-visible, select:focus-visible { border-color: var(--ink); outline-offset: 2px; }
input::placeholder, textarea::placeholder { color: var(--ghost); }
input[type="file"] { min-height: 0; padding: 10px; font-size: 14px; }
label small, .legal-small { color: var(--mute); font-size: 13px; font-weight: 600; }
.check { display: flex !important; align-items: flex-start; gap: 12px; font-size: 14px; font-weight: 600 !important; line-height: 1.45; cursor: pointer; }
.check input { flex-shrink: 0; width: 22px; min-height: 0; height: 22px; margin: 0; padding: 0; accent-color: var(--orange); cursor: pointer; }
.check a, .form-card p a { font-weight: 800; }
.form-link { justify-self: start; margin-top: -4px; font-size: 14px; font-weight: 700; }
.form-error { color: var(--orange-ink); font-size: 14px; font-weight: 800; }
.form-error:empty { display: none; }
.app-notice { display: grid; gap: 6px; padding: 16px 18px; border-radius: 16px; background: var(--fog); box-shadow: inset 4px 0 0 var(--proof); font-weight: 600; }
.app-notice p { margin: 0; }

/* Sign in */
.auth { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, 480px); align-items: start; gap: clamp(24px, 4vw, 56px); padding: clamp(28px, 4vw, 56px) 0 clamp(60px, 7vw, 100px); }
.auth-panel { display: grid; gap: 22px; padding: clamp(26px, 3.6vw, 52px); border-radius: 30px; background: var(--orange); }
.auth-panel p { max-width: 40ch; font-size: clamp(17px, 1.5vw, 20px); font-weight: 600; }
.ticks { display: grid; margin-top: 6px; }
.ticks li { display: flex; gap: 12px; align-items: baseline; padding: 14px 0; border-top: 2px solid var(--ink); font-weight: 700; }
.ticks li::before { content: ''; flex-shrink: 0; width: 12px; height: 12px; border-radius: 3px; background: var(--ink); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 22px; padding: 5px; border-radius: 999px; background: var(--fog); }
.auth-tabs button { min-height: 44px; border: 0; border-radius: 999px; background: transparent; font-weight: 700; font-size: 15px; transition: background-color .18s, color .18s; }
.auth-tabs button:hover { background: var(--paper); }
.auth-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* Single-card pages: reset, cancel, payment result */
.center-layout { display: grid; place-items: center; padding: clamp(36px, 6vw, 80px) 0; }
.center-layout .form-card { width: min(560px, 100%); display: grid; gap: 16px; }
.center-layout .form-card h1 { margin: 0; font-size: clamp(30px, 4vw, 46px); }
.center-layout .form-card > p { color: var(--mute); font-weight: 600; }
.center-layout #cancel-state { display: grid; gap: 12px; }
.center-layout #cancel-state:empty { display: none; }
.center-layout .secondary-button { width: 100%; }
.support-line { color: var(--mute); font-size: 14px; }
.result-card { text-align: center; justify-items: center; }
.result-mark { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--orange); color: var(--ink); font: 700 34px/1 var(--display); }
.result-mark.fail { background: var(--ink); color: var(--paper); }

/* Account */
.account-main { padding: clamp(28px, 4vw, 56px) 0 clamp(60px, 7vw, 100px); }
.account-welcome { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 20px 40px; }
.account-welcome h1 { font-size: clamp(32px, 4.4vw, 62px); overflow-wrap: anywhere; }
.verify-card { display: grid; gap: 10px; width: min(360px, 100%); padding: 20px; border-radius: 22px; background: #FFE1DA; }
.verify-card p { color: #7A1D0C; font-size: 14px; font-weight: 600; }
.verify-card a { font-weight: 800; }
.account-summary { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .8fr); gap: 16px; margin-top: clamp(26px, 3vw, 40px); }
.account-summary article { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 220px; padding: clamp(20px, 2.2vw, 30px); border: 2px solid var(--ink); border-radius: 26px; }
.account-summary article > span { color: var(--mute); font-weight: 700; }
.account-summary article > strong { font: 700 clamp(28px, 2.6vw, 38px)/1 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.account-summary article > p { color: var(--mute); font-size: 15px; font-weight: 600; }
.account-summary article > a, .account-summary article > button { margin-top: auto; }
.balance-card { border-color: var(--orange) !important; background: var(--orange); }
.balance-card > span, .balance-card > p { color: var(--ink) !important; }
.balance-card > strong { font-size: clamp(42px, 4.6vw, 72px) !important; letter-spacing: -.06em !important; }
.balance-card .orange-button { background: var(--ink); color: var(--paper); }
.balance-card .orange-button:hover { background: var(--paper); color: var(--ink); }
.account-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.account-tools article { display: grid; align-content: start; gap: 8px; padding: clamp(20px, 2.2vw, 28px); border-radius: 26px; background: var(--fog); }
.account-tools h2 { font-size: clamp(20px, 1.8vw, 24px); }
.account-tools p { color: var(--mute); font-size: 15px; font-weight: 600; }
.account-tools button { justify-self: start; margin-top: 6px; }
.account-section { margin-top: clamp(56px, 7vw, 96px); }
.account-section > h2 { margin-top: 6px; }
.section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 24px; margin-bottom: 18px; }
.catalog-search { display: grid; gap: 6px; width: min(320px, 100%); font-size: 14px; font-weight: 700; }
.catalog-filters { display: flex; flex-wrap: wrap; gap: 6px; width: max-content; max-width: 100%; margin-bottom: 20px; padding: 5px; border-radius: 999px; background: var(--fog); }
.catalog-filters button { min-height: 42px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; font-weight: 700; font-size: 15px; transition: background-color .18s, color .18s; }
.catalog-filters button:hover { background: var(--paper); }
.catalog-filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.activity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.activity-card { display: flex; flex-direction: column; gap: 12px; min-height: 340px; padding: 22px; border-radius: 22px; background: var(--fog); transition: background-color .18s; }
.activity-card:hover { background: #E9E9E5; }
.activity-cover { width: calc(100% + 44px); max-width: none; height: 150px; margin: -22px -22px 4px; border-radius: 22px 22px 0 0; object-fit: cover; }
.activity-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.activity-tags span { color: var(--mute); font-size: 13px; font-weight: 700; }
.activity-tags .activity-category { padding: 4px 10px; border-radius: 999px; background: var(--paper); color: var(--ink); }
.activity-card h3 { font-size: 18px; line-height: 1.25; overflow-wrap: anywhere; }
.activity-card > p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; color: var(--mute); font-size: 14px; font-weight: 600; }
.activity-card > div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.activity-card > div > strong { font: 700 17px/1.2 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.activity-card > div > strong small { font: 600 12px var(--text); letter-spacing: 0; color: var(--mute); }
.activity-card button { min-height: 42px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 700; font-size: 14px; transition: background-color .18s, color .18s; }
.activity-card button:hover { background: var(--orange); color: var(--ink); }
.activity-card button.quiet { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.activity-card small { color: var(--mute); font-size: 13px; font-weight: 700; }
.activity-card small.is-available { color: var(--proof); }
.activity-card > .activity-tags { margin-top: 0; padding-top: 0; border-top: 0; justify-content: flex-start; }
.catalog-empty { grid-column: 1 / -1; }
.catalog-rate { margin-top: 16px; color: var(--mute); font-size: 14px; }
.simple-list { display: grid; margin-top: 18px; border-top: 2px solid var(--ink); }
.simple-list article { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.simple-list article div { display: grid; gap: 3px; min-width: 0; }
.simple-list article > div:last-child { text-align: right; }
.simple-list strong { font-weight: 800; overflow-wrap: anywhere; }
.simple-list span { color: var(--mute); font-size: 14px; font-weight: 600; }
.simple-list b { font: 700 17px/1.2 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.positive { color: var(--proof); }
.empty { padding: 18px 0; color: var(--mute); font-weight: 600; }

/* Dialogs and toast */
dialog { width: min(600px, 100% - 32px); max-height: min(88vh, 900px); padding: clamp(24px, 3.6vw, 40px); border: 0; border-radius: 28px; background: var(--paper); color: var(--ink); overscroll-behavior: contain; }
dialog::backdrop { background: rgba(0, 0, 0, .55); }
dialog form { display: grid; gap: 14px; }
dialog h2 { margin: 6px 44px 6px 0; font-size: clamp(24px, 3vw, 34px); overflow-wrap: anywhere; }
dialog p { color: var(--mute); font-weight: 600; }
.dialog-x { position: absolute; right: 16px; top: 16px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper); font: 600 24px/1 var(--text); }
.dialog-x:hover { background: var(--ink); color: var(--paper); }
.dialog-price { margin: 14px 0; font: 700 32px/1 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.dialog-price small { display: block; margin-top: 8px; color: var(--orange-ink); font: 700 14px/1.3 var(--text); letter-spacing: 0; }
.condition { margin: 10px 0; padding: 14px 16px; border-radius: 16px; background: var(--fog); }
.condition p { margin-top: 4px; font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 40; max-width: calc(100% - 32px); padding: 14px 22px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 700; transform: translateX(-50%); }

/* Catalog editor */
.admin-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 520px); align-items: start; gap: clamp(24px, 3vw, 40px); padding: clamp(28px, 4vw, 56px) 0 clamp(60px, 7vw, 100px); }
.admin-layout > section > p { margin-top: 12px; color: var(--mute); font-weight: 600; }
.ops-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 22px 0; }
.ops-metrics article { padding: 16px; border-radius: 18px; background: var(--fog); }
.ops-metrics span { display: block; color: var(--mute); font-size: 13px; font-weight: 700; }
.ops-metrics strong { display: block; margin-top: 6px; font: 700 26px/1 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.admin-list { display: grid; gap: 8px; margin-top: 20px; }
.admin-list button { display: flex; justify-content: space-between; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; border: 0; border-radius: 18px; background: var(--fog); text-align: left; transition: background-color .18s; }
.admin-list button:hover { background: #E7E7E3; }
.admin-list button div { display: grid; gap: 4px; min-width: 0; }
.admin-list button strong { font-weight: 800; overflow-wrap: anywhere; }
.admin-list button small { color: var(--mute); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.admin-list button > b { font: 700 16px/1.2 var(--display); white-space: nowrap; font-variant-numeric: tabular-nums; }
.status { justify-self: start; padding: 3px 10px; border-radius: 999px; background: var(--paper); font-size: 12px; font-weight: 800; }
.status.published { background: var(--orange); color: var(--ink); }
.status.archived { background: var(--ink); color: var(--paper); }
.admin-requests { margin-top: 36px; }
.admin-requests .simple-list { max-height: 360px; overflow: auto; }
.request-message { max-width: 520px; color: var(--ink) !important; white-space: pre-wrap; }
.request-actions { justify-items: end; }
.request-actions .secondary-button { min-height: 38px; padding: 0 14px; font-size: 14px; }
.editor-card { position: sticky; top: 20px; }
.editor-card form { display: grid; gap: 14px; }
.editor-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.editor-head .dialog-x { position: static; flex-shrink: 0; }
.editor-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }

/* Local imitation of the bank's payment form: deliberately not Pressfinity-styled. */
.bank-button { width: 100%; margin: 20px 0; padding: 14px 20px; border: 0; border-radius: 8px; background: #FFDD2D; color: #111; font: 700 15px Arial, sans-serif; }

@media (max-width: 960px) {
  .auth, .admin-layout { grid-template-columns: minmax(0, 1fr); }
  .editor-card { position: static; display: none; }
  .editor-card.open { display: block; }
  .account-summary { grid-template-columns: 1fr 1fr; }
  .balance-card { grid-column: 1 / -1; }
  .activity-grid { grid-template-columns: 1fr 1fr; }
  .app-nav { display: none; }
  .app-nav + .topbar-back { margin-left: auto; }
}
@media (max-width: 640px) {
  .topbar-back { gap: 16px; font-size: 14px; }
  .auth-panel, .form-card, .editor-card { border-radius: 24px; }
  .account-summary, .account-tools, .activity-grid { grid-template-columns: minmax(0, 1fr); }
  .balance-card { grid-column: auto; }
  .account-summary article { min-height: 0; }
  .ops-metrics { grid-template-columns: 1fr 1fr; }
  .editor-columns { grid-template-columns: minmax(0, 1fr); }
  .simple-list article { align-items: flex-start; }
  .catalog-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .catalog-filters button { flex-shrink: 0; }
}
