/* Account, profile and banner crop visuals. */
.account-main { padding-top: 60px; padding-bottom: 120px; }
.account-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); align-items: start; gap: 22px; }
.account-sidebar, .account-panel { border: 1px solid rgba(255, 30, 30, .3); border-radius: 22px; background: rgba(13,2,2,.78); box-shadow: 0 22px 55px rgba(0,0,0,.24); }
.account-sidebar { position: sticky; top: calc(var(--nav-h) + 18px); padding: 14px; }
.account-identity { display: grid; justify-items: center; padding: 19px 12px 24px; border-bottom: 1px solid rgba(255,255,255,.08); text-align: center; }
.account-identity-avatar { display: grid; width: 84px; height: 84px; overflow: hidden; place-items: center; border: 2px solid var(--green); border-radius: 50%; color: #fff; background: linear-gradient(135deg,#ff4141,#5b0000); box-shadow: var(--green-glow); font-family: "Space Grotesk", sans-serif; font-size: 1.7rem; font-weight: 800; }
.account-identity-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-identity strong { max-width: 210px; margin-top: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; }
.account-identity small { margin-top: 4px; color: var(--muted); font-size: .62rem; }
.account-menu-list { display: grid; gap: 5px; padding-top: 14px; }
.account-menu-item { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 0 12px; border: 1px solid transparent; border-radius: 11px; color: #bdaaaa; background: transparent; font-size: .7rem; font-weight: 800; text-align: left; }
.account-menu-item i { width: 18px; color: var(--red-bright); text-align: center; }
.account-menu-item:hover, .account-menu-item.active { color: white; border-color: rgba(255, 20, 20, .36); background: rgba(255, 20, 20, .1); box-shadow: 0 0 18px rgba(255,16,16,.12); }
.account-panel { min-height: 660px; padding: clamp(21px, 4vw, 40px); }
.account-view { display: none; animation: fade-up .4s var(--ease) both; }
.account-view.active { display: block; }
.account-view-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.account-view-head h2 { margin: 0; font-family: "Space Grotesk", sans-serif; font-size: clamp(2rem, 4vw, 4rem); line-height: .92; letter-spacing: -.07em; }
.account-view-head h2 span { color: var(--red); }
.account-view-head p { max-width: 430px; margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.6; }
.profile-cover { position: relative; margin-bottom: 30px; overflow: hidden; border: 1px solid rgba(255,40,40,.35); border-radius: 20px; background: rgba(20,2,2,.72); box-shadow: 0 18px 50px rgba(0,0,0,.24); }
.profile-banner { position: relative; height: 220px; border-bottom: 1px solid rgba(255,255,255,.08); background: radial-gradient(circle at 78% 20%, rgba(255,40,40,.3), transparent 28%), linear-gradient(120deg, #3b0808, #120202 65%, #270505); background-position: center; background-size: cover; }
.profile-banner::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 35%, rgba(9,0,0,.8)); }
.profile-banner-menu-wrap { position: absolute; right: 18px; bottom: 16px; z-index: 4; }
.profile-banner-menu-wrap .profile-banner-camera { position: relative; right: auto; bottom: auto; }
.profile-media-menu { position: absolute; right: 0; bottom: 48px; display: grid; width: 165px; padding: 6px; border: 1px solid rgba(255,40,40,.45); border-radius: 12px; background: #180202; box-shadow: 0 15px 35px rgba(0,0,0,.55); }
.profile-media-menu button { display: flex; align-items: center; gap: 9px; min-height: 37px; padding: 0 10px; border: 0; border-radius: 8px; color: #dfcaca; background: transparent; font-size: .65rem; font-weight: 800; text-align: left; }
.profile-media-menu button:hover { color: #fff; background: rgba(255,30,30,.18); }
.profile-media-menu button i { width: 15px; color: var(--red-bright); text-align: center; }
.banner-crop-editor { padding: 15px 18px 18px; border-bottom: 1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.24); }
.banner-editor-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 10px; }
.banner-editor-heading > div { display: grid; gap: 3px; }
.banner-editor-heading .eyebrow { margin: 0; }
.banner-editor-heading strong { color: #fff; font-family: "Space Grotesk", sans-serif; font-size: .95rem; }
.banner-editor-heading > span { color: var(--muted); font-size: .62rem; }
.banner-crop-stage { overflow: hidden; border: 1px dashed rgba(255,255,255,.24); border-radius: 12px; background: #070000; }
.banner-crop-stage canvas { display: block; width: 100%; height: auto; max-height: 260px; cursor: grab; touch-action: none; user-select: none; }
.profile-media-menu[hidden], .profile-photo-actions[hidden], .banner-crop-editor[hidden] { display: none; }
.banner-crop-controls { display: flex; justify-content: flex-end; gap: 12px; margin-top: 12px; }
.banner-crop-controls .btn { min-height: 38px; padding-inline: 14px; font-size: .62rem; }
.profile-banner-camera, .profile-avatar-camera { position: absolute; z-index: 2; display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(255,255,255,.36); border-radius: 50%; color: #fff; background: rgba(0,0,0,.55); box-shadow: 0 8px 22px rgba(0,0,0,.32); }
.profile-banner-camera { right: 18px; bottom: 16px; }
.profile-banner-camera:hover, .profile-avatar-camera:hover { border-color: var(--red-bright); color: var(--red-bright); }
.profile-overview-row { position: relative; display: flex; align-items: center; gap: 18px; margin-top: -43px; padding: 0 25px; z-index: 3; }
.profile-overview-avatar { position: relative; flex: 0 0 auto; }
.profile-large-avatar { display: grid; width: 98px; height: 98px; place-items: center; overflow: hidden; border: 4px solid #180202; border-radius: 50%; color: #fff; background: linear-gradient(145deg,#ff3b3b,#8c0000); box-shadow: 0 0 0 1px rgba(255,40,40,.75), var(--glow); font-size: 1.8rem; font-weight: 800; }
.profile-large-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-camera { right: -3px; bottom: 2px; width: 31px; height: 31px; color: #fff; background: var(--red-deep); font-size: .65rem; }
.profile-photo-actions { position: absolute; top: 108px; left: 50%; z-index: 8; display: grid; width: 142px; padding: 6px; transform: translateX(-50%); border: 1px solid rgba(255,40,40,.45); border-radius: 11px; background: #180202; box-shadow: 0 15px 35px rgba(0,0,0,.55); }
.profile-photo-actions button { padding: 8px 9px; border: 0; color: #d8c4c4; background: transparent; font-size: .62rem; text-align: left; }
.profile-photo-actions button:hover { color: #fff; background: rgba(255,30,30,.18); }
.profile-overview-copy { min-width: 0; padding-top: 32px; }
.profile-overview-copy .eyebrow { margin-bottom: 5px; }
.profile-overview-copy h2 { margin: 0; color: #fff; font-family: "Space Grotesk", sans-serif; font-size: clamp(1.25rem, 3vw, 2rem); letter-spacing: -.05em; }
.profile-overview-copy p:last-child { margin: 4px 0 0; color: var(--muted); font-size: .7rem; }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 24px 25px 20px; }
.profile-stats > div { padding: 13px 10px; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; background: rgba(0,0,0,.2); text-align: center; }
.profile-stats strong { display: block; color: #fff; font-family: "Space Grotesk", sans-serif; font-size: 1.25rem; }
.profile-stats span { display: block; margin-top: 4px; color: var(--muted); font-family: "DM Mono", monospace; font-size: .5rem; text-transform: uppercase; }
.profile-quick-actions { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 25px 20px; }
.profile-quick-actions .btn { min-height: 36px; padding-inline: 12px; font-size: .59rem; }
.profile-quick-actions .profile-see-ads { border-color: rgba(255,80,90,.55); color: #fff; background: linear-gradient(135deg,#e3131b,#ff5260); box-shadow: 0 6px 17px rgba(227,19,27,.2); }
.account-menu-link { text-decoration: none; }
.message-page .contact-info h1 { max-width: 520px; }
@media (max-width: 640px) {
  .profile-banner { height: 145px; }
  .banner-crop-controls { align-items: stretch; flex-direction: column; }
  .banner-crop-controls input { width: 100%; }
  .profile-overview-row { gap: 12px; margin-top: -35px; padding: 0 16px; }
  .profile-large-avatar { width: 78px; height: 78px; border-width: 3px; font-size: 1.4rem; }
  .profile-overview-copy { padding-top: 25px; }
  .profile-overview-copy h2 { font-size: 1.25rem; }
  .profile-stats { gap: 6px; margin: 20px 16px 16px; }
  .profile-stats > div { padding: 10px 4px; }
  .profile-stats strong { font-size: 1rem; }
  .profile-stats span { font-size: .42rem; }
}

@media (max-width: 760px) {
  .messaging-head { align-items: start; flex-direction: column; }
  .messaging-head-actions { width: 100%; }
  .messaging-head-actions .btn { flex: 1; }
  .messaging-shell { grid-template-columns: 1fr; min-height: calc(100vh - 210px); }
  .messaging-sidebar { min-height: 285px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.1); }
  .conversation-list { max-height: 190px; }
  .conversation-active { height: 590px; }
  .conversation-empty { min-height: 400px; }
  .message-bubble { max-width: 87%; }
}
.account-guest { display: grid; min-height: 350px; place-items: center; padding: 30px; border: 1px dashed rgba(255,200,87,.4); border-radius: 18px; color: var(--muted); text-align: center; }
.account-guest h3 { margin: 0 0 8px; color: #fff; font-family: "Space Grotesk", sans-serif; font-size: 1.8rem; }
.account-guest p { max-width: 470px; margin: 0 auto 20px; font-size: .76rem; }
.account-content-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .7fr); gap: 24px; }
.account-form-card, .crop-card, .settings-card, .legal-card, .affiliate-card, .wallet-card { padding: 21px; border: 1px solid rgba(255,255,255,.1); border-radius: 17px; background: rgba(255,255,255,.027); }
.details-card-head { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.icon-action { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 10px; border: 1px solid rgba(255,255,255,.14); border-radius: 9px; color: #fff; background: rgba(255,255,255,.06); font-size: .62rem; font-weight: 800; }
.icon-action:hover { border-color: var(--red); background: rgba(255,25,25,.12); }
.profile-details-grid { margin-top: 18px; }
.profile-details-grid input[readonly], .profile-details-grid textarea[readonly] { color: #c8baba; border-color: rgba(255,255,255,.08); background: rgba(0,0,0,.13); cursor: default; }
.profile-details-grid input:not([readonly]), .profile-details-grid textarea:not([readonly]) { border-color: rgba(255,40,40,.55); background: rgba(255,25,25,.07); box-shadow: 0 0 0 3px rgba(255,25,25,.06); }
.field-control-textarea { align-items: start; padding-top: 12px; }
.field-control-textarea textarea { width: 100%; min-height: 92px; padding: 0 12px 12px 0; border: 0; outline: 0; resize: vertical; color: #fff; background: transparent; font: inherit; line-height: 1.55; }
.details-form-actions { display: flex; align-items: center; gap: 9px; margin-top: 18px; }
.details-form-actions .btn { min-height: 39px; padding-inline: 15px; font-size: .63rem; }
.profile-image-card { display: flex; flex-direction: column; }
.profile-image-preview { display: grid; width: min(100%, 210px); aspect-ratio: 1; margin: 13px auto 16px; place-items: center; overflow: hidden; border: 1px solid rgba(255,200,87,.45); border-radius: 18px; color: #fff; background: linear-gradient(145deg,#ff3b3b,#5b0000); box-shadow: 0 14px 35px rgba(0,0,0,.36); font-size: 2rem; }
.profile-image-preview img { width: 100%; height: 100%; object-fit: cover; }
.profile-image-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.profile-image-actions .profile-file { flex: 1 1 100%; }
.profile-image-actions .btn { min-height: 38px; padding-inline: 12px; font-size: .6rem; }
.account-form-card h3, .crop-card h3, .settings-card h3, .legal-card h3, .affiliate-card h3 { margin: 0 0 6px; font-family: "Space Grotesk", sans-serif; font-size: 1.15rem; }
.account-form-card > p, .crop-card > p, .settings-card > p, .legal-card > p, .affiliate-card > p { margin: 0 0 18px; color: var(--muted); font-size: .69rem; line-height: 1.6; }
.crop-stage { position: relative; width: min(100%, 340px); margin: 15px auto 13px; aspect-ratio: 1; overflow: hidden; border: 1px solid rgba(255,200,87,.55); border-radius: 18px; background: #100202; box-shadow: 0 14px 35px rgba(0,0,0,.36); }
.crop-stage::after { content: ""; position: absolute; inset: 10px; border: 1px dashed rgba(255,255,255,.62); border-radius: 13px; pointer-events: none; }
.crop-controls { display: grid; gap: 10px; }
.crop-controls label { display: flex; justify-content: space-between; color: var(--muted); font-family: "DM Mono", monospace; font-size: .6rem; text-transform: uppercase; letter-spacing: .08em; }
.crop-controls input[type="range"] { width: 100%; accent-color: var(--red); }
.profile-file { display: flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 12px; border: 1px dashed rgba(255,255,255,.18); border-radius: 10px; color: #dfcaca; background: rgba(0,0,0,.18); font-size: .69rem; font-weight: 800; cursor: pointer; }
.profile-file input { display: none; }
.wallet-card { position: relative; min-height: 170px; overflow: hidden; border-color: rgba(22,245,110,.35); background: linear-gradient(135deg, rgba(8,63,31,.8), rgba(3,19,11,.95)); box-shadow: var(--green-glow); }
.wallet-card small { color: #a8dcae; font-family: "DM Mono", monospace; font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; }
.wallet-card strong { display: block; margin-top: 18px; color: #fff; font-family: "Space Grotesk", sans-serif; font-size: 2.35rem; line-height: 1; }
.wallet-card button { position: relative; z-index: 2; margin-top: 17px; min-height: 33px; padding: 0 12px; border: 1px solid rgba(22,245,110,.42); border-radius: 8px; color: var(--green); background: rgba(22,245,110,.08); font-size: .62rem; font-weight: 800; }
.settings-list { display: grid; gap: 11px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(0,0,0,.2); }
.setting-row span { display: grid; gap: 4px; }
.setting-row strong { font-size: .72rem; }
.setting-row small { color: var(--muted); font-size: .62rem; }
.switch { position: relative; display: inline-flex; width: 41px; height: 23px; flex: 0 0 auto; }
.switch input { width: 0; height: 0; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #3d2929; transition: .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #c8baba; transition: .2s; }
.switch input:checked + span { background: var(--green-soft); box-shadow: var(--green-glow); }
.switch input:checked + span::after { transform: translateX(18px); background: var(--green); }
.affiliate-status { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 18px; padding: 7px 10px; border: 1px solid rgba(255,200,87,.32); border-radius: 999px; color: var(--gold); font-family: "DM Mono", monospace; font-size: .58rem; text-transform: uppercase; }
.affiliate-status i { font-size: .45rem; }
.affiliate-dashboard { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.affiliate-stat { padding: 18px; border: 1px solid rgba(168,85,247,.34); border-radius: 14px; background: rgba(168,85,247,.06); }
.affiliate-stat small { display: block; color: var(--muted); font-size: .6rem; }
.affiliate-stat strong { display: block; margin-top: 9px; color: #fff; font-family: "Space Grotesk", sans-serif; font-size: 1.55rem; }
.legal-copy { color: #cdbcbc; font-size: .78rem; line-height: 1.8; }
.legal-copy h4 { margin: 22px 0 6px; color: #fff; font-family: "Space Grotesk", sans-serif; }
.legal-copy h4:first-child { margin-top: 0; }
.form-note { margin-top: 11px; color: var(--dim); font-size: .6rem; line-height: 1.6; }
.auth-modal { max-width: 510px; margin: 0 auto; }
.modal.auth { max-height: calc(100dvh - 24px); overflow: hidden; }
.modal.auth .modal-content { max-height: calc(100dvh - 24px); overflow: hidden; }
.auth-modal-head { display: flex; align-items: start; justify-content: space-between; gap: 17px; margin-bottom: 20px; }
.auth-modal h2 { margin: 0; font-family: "Space Grotesk", sans-serif; font-size: clamp(2rem, 5vw, 3.3rem); line-height: .9; letter-spacing: -.07em; }
.auth-modal h2 span { color: var(--red); }
.auth-modal-copy { margin: 10px 0 0; color: var(--muted); font-size: .73rem; line-height: 1.6; }
.auth-tabs { display: flex; gap: 7px; padding: 5px; margin-bottom: 20px; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; background: rgba(0,0,0,.25); }
.auth-tab { flex: 1; min-height: 37px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: .68rem; font-weight: 800; }
.auth-tab.active { color: #fff; background: rgba(255,16,16,.15); box-shadow: inset 0 0 0 1px rgba(255,40,40,.36); }
.auth-divider { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 17px 0; color: var(--dim); font-family: "DM Mono", monospace; font-size: .57rem; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; background: rgba(255,255,255,.1); }
.google-btn { display: inline-flex; width: 100%; min-height: 46px; align-items: center; justify-content: center; gap: 9px; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; color: #fff; background: rgba(255,255,255,.055); font-size: .72rem; font-weight: 800; transition: .24s var(--ease); }
.google-btn i { color: #4285f4; font-size: 1rem; }
.google-btn:hover { border-color: #4285f4; background: rgba(66,133,244,.1); transform: translateY(-2px); }
.profile-initials { display: grid; width: 100%; height: 100%; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(145deg, #ff3b3b, #8c0000); font-family: "Space Grotesk", sans-serif; font-size: .75rem; font-weight: 800; }
.auth-foot-link { margin: 15px 0 0; color: var(--muted); font-size: .66rem; text-align: center; }
.auth-foot-link button { padding: 0; border: 0; color: var(--red-bright); background: none; font-weight: 800; }
@media (max-width: 900px) {
  .page-hero-grid, .account-content-grid { grid-template-columns: 1fr; }
  .page-hero-card { min-height: 210px; }
  .video-toolbar { align-items: start; flex-direction: column; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .account-layout { grid-template-columns: 1fr; }
  .account-sidebar { position: static; }
  .account-menu-list { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .container { width: min(var(--container), calc(100% - 34px)); }
  .page-hero { min-height: 0; padding-top: 53px; padding-bottom: 45px; }
  .page-hero h1 { font-size: clamp(2.8rem, 15vw, 5rem); }
  .video-hub { padding-top: 38px; padding-bottom: 75px; }
  .video-grid, .video-social-strip { grid-template-columns: 1fr; }
  .reel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-main { padding-top: 35px; padding-bottom: 70px; }
  .account-panel { padding: 18px; }
  .account-menu-list { grid-template-columns: repeat(2, 1fr); }
  .affiliate-dashboard { grid-template-columns: 1fr; }
  .chat-dock { right: 16px; bottom: 16px; }
  .notification-panel { right: 16px; }
  .profile-toggle-copy { display: none; }
}
.wallet-dashboard-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; margin-bottom: 14px; }
.wallet-card-premium, .wallet-spend-card, .wallet-creator-card { position: relative; overflow: hidden; padding: 24px; border: 1px solid rgba(255,40,40,.35); border-radius: 18px; background: linear-gradient(145deg, #260404, #090202); box-shadow: 0 15px 40px rgba(0,0,0,.22); }
.wallet-card-premium small, .wallet-spend-card > small { display: block; color: #bc9e9e; font: 600 .62rem/1 "DM Mono", monospace; letter-spacing: .12em; text-transform: uppercase; }
.wallet-card-premium strong { display: block; position: relative; z-index: 1; margin: 13px 0 4px; color: #fff; font: 800 clamp(2.5rem,5vw,4.2rem)/.9 "Space Grotesk", sans-serif; letter-spacing: -.08em; }
.wallet-card-premium > span { color: #ff9d9d; font-size: .68rem; }
.wallet-card-premium button { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 7px; margin-top: 20px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; color: #fff; background: rgba(255,255,255,.08); font-size: .68rem; font-weight: 800; }
.wallet-spend-card > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 19px; }
.wallet-action-link { display: flex; min-width: 0; min-height: 75px; align-items: center; gap: 10px; padding: 13px; border: 1px solid rgba(255,255,255,.11); border-radius: 12px; color: #fff; background: rgba(255,255,255,.04); text-align: left; }
.wallet-action-link:hover { border-color: var(--red); background: rgba(255,25,25,.12); }
.wallet-action-link > i { color: var(--green); font-size: 1.15rem; }
.wallet-action-link span { display: grid; gap: 5px; min-width: 0; font-size: .68rem; font-weight: 800; }
.wallet-action-link span small { color: var(--muted); font-size: .53rem; font-weight: 500; }
.wallet-credit-action > i { color: var(--red-bright); }
.wallet-creator-card { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 20px; border-color: rgba(255,196,63,.38); background: linear-gradient(100deg, rgba(68,39,4,.6), rgba(23,7,2,.9)); }
.wallet-card-label { color: #e4ae37; font: 600 .59rem/1 "DM Mono", monospace; letter-spacing: .17em; text-transform: uppercase; }
.wallet-creator-card h3 { margin: 9px 0 4px; color: #fff; font: 800 1.35rem/1 "Space Grotesk", sans-serif; }
.wallet-creator-card p { margin: 0; color: #bcac91; font-size: .7rem; }
.wallet-coming-soon { padding: 9px 11px; border: 1px solid rgba(255,196,63,.5); border-radius: 999px; color: #ffc43f; font: 700 .55rem/1 "DM Mono", monospace; white-space: nowrap; }
.wallet-lower-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 14px; }
.account-certificate-grid { display: grid; gap: 13px; }
.account-certificate-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 15px; padding: 18px; border: 1px solid rgba(255, 200, 87, .26); border-radius: 16px; background: linear-gradient(135deg, rgba(46, 25, 4, .5), rgba(16, 2, 3, .82)); }
.account-certificate-card:hover { border-color: rgba(255, 200, 87, .65); box-shadow: 0 12px 34px rgba(0, 0, 0, .2); }
.account-certificate-icon { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid rgba(255, 200, 87, .46); border-radius: 12px; color: #ffc857; background: rgba(255, 200, 87, .08); font-size: 1rem; }
.account-certificate-card h3 { margin: 6px 0 4px; color: #fff; font: 800 1.05rem/1.1 "Space Grotesk", sans-serif; }
.account-certificate-card p { margin: 0; color: var(--muted); font-size: .68rem; }
.account-certificate-card .wallet-card-label { font-size: .54rem; }
.account-certificate-empty { display: grid; justify-items: center; gap: 9px; padding: 65px 20px; border: 1px dashed rgba(255, 200, 87, .36); border-radius: 17px; color: var(--muted); text-align: center; }
.account-certificate-empty > i { color: #ffc857; font-size: 2rem; }
.account-certificate-empty h3 { margin: 0; color: #fff; font: 800 1.4rem/1 "Space Grotesk", sans-serif; }
.account-certificate-empty p { max-width: 420px; margin: 0 0 10px; font-size: .72rem; line-height: 1.6; }
@media (max-width: 650px) { .account-certificate-card { grid-template-columns: auto 1fr; } .account-certificate-card .btn { grid-column: 1 / -1; justify-self: start; } }
.wallet-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wallet-section-heading h3 { margin: 0; }
.wallet-section-heading > span { color: var(--green); font: 600 .6rem/1 "DM Mono", monospace; }
.wallet-transaction { display: flex; align-items: center; gap: 10px; margin-top: 13px; padding-top: 13px; border-top: 1px solid rgba(255,255,255,.07); }
.wallet-transaction-icon { display: grid; width: 29px; height: 29px; flex: 0 0 29px; place-items: center; border-radius: 9px; font-size: .65rem; }
.wallet-transaction-icon.credit { color: var(--green); background: rgba(22,245,110,.1); }
.wallet-transaction-icon.debit { color: #ff7070; background: rgba(255,40,40,.1); }
.wallet-transaction > span:nth-child(2) { display: grid; flex: 1; gap: 4px; min-width: 0; }
.wallet-transaction strong { color: #fff; font-size: .68rem; }
.wallet-transaction small { overflow: hidden; color: var(--muted); font-size: .55rem; text-overflow: ellipsis; white-space: nowrap; }
.wallet-transaction > b { font: 800 .8rem/1 "Space Grotesk", sans-serif; }
.credit-text { color: var(--green); }.debit-text { color: #ff7070; }
.wallet-empty { padding: 25px 5px 5px; color: var(--muted); text-align: center; font-size: .65rem; }.wallet-empty i { color: var(--gold); font-size: 1.2rem; }.wallet-empty p { margin: 8px 0 0; }
.wallet-payment-card h3 { margin: 10px 0 6px; }.wallet-payment-card > p { color: var(--muted); font-size: .67rem; line-height: 1.6; }
.wallet-qr-status { display: flex; align-items: center; gap: 7px; margin: 12px 0 0; color: var(--green) !important; font-size: .6rem !important; font-weight: 800; }
.wallet-qr-status i { font-size: .65rem; }
.wallet-payment-qr { display: block; width: min(100%, 180px); aspect-ratio: 1; margin: 15px auto; padding: 8px; border-radius: 13px; background: #fff; object-fit: contain; }
.wallet-qr-placeholder { display: grid; min-height: 140px; place-items: center; gap: 8px; margin: 15px 0; border: 1px dashed rgba(255,196,63,.35); border-radius: 13px; color: #a88f72; text-align: center; font-size: .62rem; }.wallet-qr-placeholder i { color: #ffc43f; font-size: 2rem; }
.wallet-payment-instructions { white-space: pre-line; }
.wallet-credit-form { display: grid; gap: 10px; margin-top: 16px; }
.wallet-credit-form .field { margin: 0; }
.wallet-credit-form button { width: 100%; margin-top: 3px; }
.ad-campaign-list { margin-top: 14px; }.ad-campaign-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-top: 1px solid rgba(255,255,255,.07); }.ad-campaign-row span { display: grid; gap: 4px; }.ad-campaign-row strong { color: #fff; font-size: .68rem; }.ad-campaign-row small { color: var(--muted); font-size: .56rem; }.ad-campaign-row button { padding: 7px 11px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; color: #fff; background: rgba(255,255,255,.06); font-size: .59rem; font-weight: 800; }.ad-campaign-row button:hover { border-color: var(--red); background: rgba(255,25,25,.12); }
@media (max-width: 760px) { .wallet-dashboard-grid, .wallet-lower-grid { grid-template-columns: 1fr; }.wallet-creator-card { grid-column: auto; align-items: flex-start; flex-direction: column; } }
@media (max-width: 900px) {
  .wallet-spend-card > div { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wallet-action-link { flex-direction: column; justify-content: center; align-items: center; min-height: 98px; gap: 6px; padding: 10px 5px; text-align: center; }
  .wallet-action-link > i { font-size: 1.3rem; }
  .wallet-action-link span { justify-items: center; gap: 3px; text-align: center; font-size: .63rem; line-height: 1.15; }
  .wallet-action-link span small { font-size: .48rem; line-height: 1.2; }
}

/* Manage Profile uses the full replaceable account surface: the sidebar stays
   attached to the left edge while the details panel gets the space that was
   previously reserved for the duplicate profile-image card. */
@media (min-width: 901px) {
  .account-main > .container { width: min(1640px, calc(100% - 40px)); max-width: none; }
  .account-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 16px; }
  .account-sidebar { top: calc(var(--nav-h) + 10px); }
  .account-panel { padding: clamp(24px, 3vw, 42px); }
}

.account-content-grid { grid-template-columns: minmax(0, 1fr); }
.profile-banner { height: 420px; min-height: 420px; overflow: hidden; background-color: #120202; background-repeat: no-repeat; }
.profile-banner-image { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 50%; transform: translate3d(var(--banner-shift-x, 0px), var(--banner-shift-y, 0px), 0) scale(var(--banner-zoom, 1)); transform-origin: center center; }
.profile-banner-image[hidden] { display: none !important; }
.profile-banner::after { z-index: 2; }
.profile-overview-copy { padding-top: 42px; }
.profile-overview-copy h2 { font-size: clamp(1.5rem, 3vw, 2.35rem); }
.profile-visibility-card { margin-top: 21px; padding: 17px; border: 1px solid rgba(255,255,255,.1); border-radius: 15px; background: rgba(0,0,0,.18); }
.profile-visibility-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.profile-visibility-head h4 { margin: 0 0 5px; color: #fff; font: 800 1rem/1.1 "Space Grotesk", sans-serif; }
.profile-visibility-head p { max-width: 570px; margin: 0; color: var(--muted); font-size: .65rem; line-height: 1.55; }
.profile-visibility-head > span { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; padding: 6px 9px; border: 1px solid rgba(22,245,110,.3); border-radius: 999px; color: var(--green); font: 700 .52rem/1 "DM Mono", monospace; text-transform: uppercase; }
.profile-visibility-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.profile-visibility-grid label { display: flex; align-items: center; gap: 7px; min-height: 34px; padding: 7px 9px; border: 1px solid rgba(255,255,255,.08); border-radius: 9px; color: #d7c5c5; background: rgba(255,255,255,.025); font-size: .61rem; cursor: pointer; }
.profile-visibility-grid label:hover { border-color: rgba(255,40,40,.4); background: rgba(255,30,30,.07); }
.profile-visibility-grid input { width: 14px; height: 14px; accent-color: var(--green); }
.profile-visibility-grid input:disabled { opacity: .58; cursor: not-allowed; }
.field-help { display: block; margin-top: 5px; color: var(--dim); font-size: .56rem; line-height: 1.4; }

/* Each public-profile detail owns its visibility control.  The legacy
   visibility card is only a server-rendered source for the inputs; account.js
   moves those inputs beside their matching field before the page is shown. */
.profile-visibility-card { display: none; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 25px; }
.field-label-row > label:first-child { flex: 1 1 auto; min-width: 0; }
.field-visibility-toggle { display: inline-flex; width: 26px; height: 26px; flex: 0 0 26px; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.14); border-radius: 7px; color: #877777; background: rgba(255,255,255,.035); cursor: pointer; transition: border-color .2s, color .2s, background .2s, box-shadow .2s; }
.field-visibility-toggle:hover { border-color: rgba(22,245,110,.55); color: var(--green); background: rgba(22,245,110,.08); }
.field-visibility-toggle input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); }
.field-visibility-mark { display: grid; width: 17px; height: 17px; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 5px; color: transparent; background: rgba(0,0,0,.2); font-size: .55rem; transition: border-color .2s, color .2s, background .2s, box-shadow .2s; }
.field-visibility-toggle input:checked + .field-visibility-mark { border-color: var(--green); color: #071b0e; background: var(--green); box-shadow: 0 0 12px rgba(22,245,110,.38); }
.field-visibility-toggle input:focus-visible + .field-visibility-mark { outline: 2px solid rgba(255,200,87,.85); outline-offset: 2px; }
.field-visibility-toggle input:disabled + .field-visibility-mark { opacity: .7; }

@media (max-width: 900px) {
  .profile-visibility-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .account-main > .container { width: calc(100% - 34px); }
  .profile-banner { height: 175px; min-height: 175px; }
  .profile-overview-copy { padding-top: 30px; }
  .profile-overview-copy h2 { font-size: 1.35rem; }
  .profile-visibility-head { flex-direction: column; }
  .profile-visibility-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Keep banner adjustment inside the banner itself.  It must overlay the
   saved background at the exact same height instead of becoming a new block
   that pushes the profile header down. */
.profile-cover { position: relative; }
.banner-crop-editor { position: absolute; inset: 0 0 auto; z-index: 7; display: flex; height: 420px; min-height: 420px; box-sizing: border-box; flex-direction: column; padding: 0; border: 0; background: #0d0202; }
.banner-crop-editor[hidden] { display: none; }
.banner-crop-editor .banner-crop-stage { position: absolute; inset: 0; z-index: 0; height: 100%; border: 0; border-radius: 0; }
.banner-crop-editor .banner-crop-stage canvas { width: 100%; height: 100%; max-height: none; cursor: grab; }
.banner-crop-editor .banner-editor-heading { position: relative; z-index: 2; align-items: start; min-height: 48px; box-sizing: border-box; margin: 0; padding: 13px 18px 9px; background: linear-gradient(180deg, rgba(8,0,0,.78), rgba(8,0,0,0)); }
.banner-crop-editor .banner-editor-heading > span { margin-top: 2px; color: rgba(255,255,255,.82); text-shadow: 0 1px 4px #000; }
.banner-crop-editor .banner-crop-controls { position: relative; z-index: 2; align-self: flex-end; margin: auto 18px 12px 0; padding: 7px; border-radius: 12px; background: rgba(5,0,0,.5); backdrop-filter: blur(5px); }
.banner-crop-editor .banner-crop-controls .btn { min-height: 36px; }

@media (max-width: 640px) {
  .profile-banner { height: 340px; min-height: 340px; }
  .banner-crop-editor { height: 340px; min-height: 340px; }
  .banner-crop-editor .banner-editor-heading { min-height: 43px; padding: 10px 12px 7px; }
  .banner-crop-editor .banner-editor-heading > span { display: none; }
  .banner-crop-editor .banner-crop-controls { margin-right: 10px; margin-bottom: 9px; }
  .banner-crop-editor .banner-crop-controls .btn { min-height: 32px; padding-inline: 10px; font-size: .56rem; }
}
/* Location is intentionally limited to Province and District.  Keep the
   legacy database fields out of the account editor while old rows migrate. */
#accountForm .field:has(#accountZone),
#accountForm .field:has(#accountLocalLevel),
#accountForm .field:has(#accountWard),
#accountForm .field:has(#accountPlace),
#profileForm .field:has(#accountZone),
#profileForm .field:has(#accountLocalLevel),
#profileForm .field:has(#accountWard),
#profileForm .field:has(#accountPlace),
.profile-visibility-card [data-profile-visibility="zone"],
.profile-visibility-card [data-profile-visibility="local_level"],
.profile-visibility-card [data-profile-visibility="ward"],
.profile-visibility-card [data-profile-visibility="place"] {
  display: none !important;
}

/* Mobile and tablet account pages are standalone app screens.  The profile
   summary/menu belongs only to mobile_profile_menu.html; it must not repeat
   above every account feature after a tile is opened. */
.account-mobile-appbar { display: none; }

@media (max-width: 1023px) {
  .account-main { padding-top: 28px; padding-bottom: 68px; }
  .account-main > .container { width: min(620px, calc(100% - 32px)); }
  .account-mobile-appbar {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    width: min(620px, calc(100% - 32px));
    margin: 0 auto 18px;
  }
  .account-mobile-back {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255, 45, 45, .34);
    border-radius: 13px;
    color: #ffe6e6;
    background: rgba(255, 16, 16, .07);
    text-decoration: none;
  }
  .account-mobile-back:hover {
    border-color: var(--red-bright);
    color: #fff;
    box-shadow: var(--glow);
  }
  .account-mobile-title h1 {
    margin: 4px 0 0;
    color: #fff5f5;
    font: 700 clamp(1.5rem, 5vw, 2rem) "Space Grotesk", sans-serif;
    letter-spacing: -.05em;
  }
  .account-layout { display: block; }
  .account-sidebar { display: none; }
  .account-panel {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .account-view-head {
    display: block;
    margin-bottom: 18px;
  }
  .account-view-head > p { margin-top: 10px; }
  .account-panel .account-view.active > .profile-cover,
  .account-panel .account-view.active > .account-form-card,
  .account-panel .account-view.active > .settings-card,
  .account-panel .account-view.active > .legal-card,
  .account-panel .account-view.active > .affiliate-card,
  .account-panel .account-view.active > .ad-campaign-list {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .account-panel .account-view.active > .profile-cover { margin-bottom: 24px; }
  .account-panel .account-view.active > .account-form-card,
  .account-panel .account-view.active > .settings-card,
  .account-panel .account-view.active > .legal-card,
  .account-panel .account-view.active > .affiliate-card,
  .account-panel .account-view.active > .ad-campaign-list { padding-inline: 0; }
  .account-panel .account-view.active > .profile-cover .profile-overview-row,
  .account-panel .account-view.active > .profile-cover .profile-stats,
  .account-panel .account-view.active > .profile-cover .profile-quick-actions { margin-inline: 0; }
  .account-panel .account-view.active > .profile-cover .profile-overview-row { padding-inline: 0; }
}

@media (max-width: 640px) {
  .account-main { padding-top: 22px; }
  .account-mobile-appbar { margin-bottom: 15px; }
  .account-mobile-back { width: 40px; height: 40px; }
}

/* Compact mobile/tablet Manage Profile screen.  Keep the desktop account
   editor unchanged, while making the smaller screen behave like a native
   app page: short banner, evenly sized actions and a flat field list. */
@media (max-width: 1023px) {
  .profile-banner,
  .banner-crop-editor {
    height: 220px;
    min-height: 220px;
  }

  .profile-overview-row {
    margin-top: -34px;
  }

  .profile-overview-copy {
    padding-top: 26px;
  }

  .profile-quick-actions {
    align-items: stretch;
    justify-content: space-around;
    flex-wrap: nowrap;
    gap: 12px;
    margin-top: 4px;
  }

  .profile-quick-actions .btn {
    min-width: 0;
    flex: 1 1 0;
    justify-content: center;
    white-space: nowrap;
  }

  .account-view-head,
  .details-card-head > div,
  .account-form-card > .form-note {
    display: none;
  }

  .account-panel .account-view.active .account-content-grid {
    gap: 0;
  }

  .account-panel .account-view.active .account-content-grid > .account-form-card {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }

  .details-card-head {
    justify-content: flex-end;
    margin-bottom: 8px;
  }

  .profile-details-grid {
    gap: 8px;
    margin-top: 0;
  }

  .profile-details-grid .field {
    gap: 4px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,.07);
  }

  .profile-details-grid .field:last-child {
    border-bottom: 0;
  }

  .profile-details-grid .field-error {
    min-height: 0;
  }

  .profile-details-grid .field-label-row {
    min-height: 0;
    gap: 6px;
  }

  .profile-details-grid input,
  .profile-details-grid select {
    height: 43px;
  }
}

@media (max-width: 640px) {
  .profile-banner,
  .banner-crop-editor {
    height: 190px;
    min-height: 190px;
  }

  .profile-overview-row {
    margin-top: -30px;
  }

  .profile-overview-copy {
    padding-top: 24px;
  }

  .profile-quick-actions {
    gap: 8px;
    margin-bottom: 14px;
  }

  .profile-quick-actions .btn {
    min-height: 34px;
    padding-inline: 8px;
    font-size: .57rem;
  }

  .profile-details-grid {
    gap: 6px;
  }

  .profile-details-grid .field {
    padding-bottom: 6px;
  }
}
