/* ToMaS — sign-in, user menu, users, announcements, rankings and landing builder. */
[hidden] { display: none !important; }
.btn-block { width: 100%; }

/* Sign-in, activation and reset: MajlisKita's dark-first public page, as a floodlit night match. */
.auth {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; color: #e2e8f0;
  background: radial-gradient(ellipse at top left, rgb(37 99 235 / .32), transparent 46%), radial-gradient(ellipse at bottom right, rgb(132 204 22 / .16), transparent 44%), radial-gradient(ellipse at 70% 10%, rgb(6 182 212 / .14), transparent 40%), #050816;
}
/* Pitch markings across the backdrop. */
.auth::before {
  content: ''; position: absolute; inset: 40px; pointer-events: none; border: 2px solid rgb(255 255 255 / .05); border-radius: 22px;
  background: radial-gradient(circle at 50% 50%, transparent 0 118px, rgb(255 255 255 / .05) 119px 121px, transparent 122px), linear-gradient(90deg, transparent calc(50% - 1px), rgb(255 255 255 / .05) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
}
.auth > * { position: relative; z-index: 1; }
.auth-brand { padding: 64px 72px; display: flex; flex-direction: column; justify-content: center; }
.auth-crest { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--grad-tile); color: #fff; margin-bottom: 26px; box-shadow: 0 16px 40px rgb(37 99 235 / .35); }
.auth-crest svg { width: 30px; height: 30px; }
.auth-brand .kicker { color: #67e8f9; }
.auth-brand h1 { font-size: 52px; color: #fff; line-height: 1.02; margin: 8px 0 14px; letter-spacing: -.035em; }
.auth-brand p { max-width: 460px; color: #94a3b8; font-size: 15px; }
.auth-brand h1 { font-size: 64px; }
.auth-brand .auth-tagline { margin: -6px 0 14px; font-size: 13px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: #cbd5e1; }
.auth-events { margin-top: 38px; max-width: 460px; }
.auth-events .nav-label { color: #94a3b8; padding: 0 0 4px; }
.auth-event { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-top: 8px; border: 1px solid rgb(255 255 255 / .1); border-radius: 14px; background: rgb(255 255 255 / .035); color: #cbd5e1; backdrop-filter: blur(8px); transition: border-color .15s, background .15s; }
.auth-event:hover { border-color: rgb(103 232 249 / .5); background: rgb(255 255 255 / .06); color: #fff; }
.auth-event > span { flex: 1; }
.auth-event strong { display: block; color: #fff; font-weight: 600; }
.auth-event small { display: block; color: #94a3b8; font-size: 12px; }
.auth-event .ico { color: #67e8f9; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { position: relative; overflow: hidden; width: 100%; max-width: 430px; padding: 34px 32px; border-radius: 24px; border: 1px solid rgb(255 255 255 / .1); background: rgb(15 23 42 / .85); backdrop-filter: blur(18px); box-shadow: 0 30px 80px rgb(0 0 0 / .45); }
.auth-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); }
.auth-card .kicker { color: #67e8f9; }
.auth-card h2 { font-size: 28px; color: #fff; margin-bottom: 6px; letter-spacing: -.025em; }
.auth-card .muted { color: #94a3b8; }
.auth-card strong { color: #fff; }
.auth-card form { display: flex; flex-direction: column; gap: 15px; margin-top: 22px; }
.auth-card .field label { color: #cbd5e1; }
.auth-card .field input, .auth-card .field select { background: rgb(2 6 23 / .6); border-color: rgb(255 255 255 / .14); color: #f1f5f9; }
.auth-card .field input:focus, .auth-card .field select:focus { border-color: #22d3ee; box-shadow: 0 0 0 4px rgb(34 211 238 / .2); }
.auth-card .btn-primary { height: 46px; background: var(--grad); color: #04121f; font-weight: 700; box-shadow: 0 14px 30px rgb(6 182 212 / .25); }
.auth-card .btn-ghost { background: rgb(255 255 255 / .05); border-color: rgb(255 255 255 / .14); color: #e2e8f0; }
.auth-card .btn-ghost:hover { background: rgb(255 255 255 / .1); color: #fff; }
.auth-card a:not(.btn) { color: #67e8f9; }
.auth-card p + .btn { margin-top: 18px; }
.auth-error { color: #fda4af; font-size: 13px; }
.auth-error:empty { display: none; }
.auth-ok { display: flex; gap: 8px; font-size: 13px; color: #a7f3d0; background: rgb(16 185 129 / .12); border: 1px solid rgb(52 211 153 / .25); padding: 10px 12px; border-radius: 12px; }
.auth-ok .ico { margin-top: 2px; flex: none; }
.auth-switch { text-align: center; font-size: 13px; color: #94a3b8; }
.auth-switch a { font-weight: 600; }
.auth-note { display: flex; gap: 8px; font-size: 12px; color: #94a3b8; background: rgb(255 255 255 / .04); border: 1px solid rgb(255 255 255 / .08); padding: 10px 12px; border-radius: 12px; }
.auth-note .ico { color: #bef264; margin-top: 1px; }
.link-box { display: flex; gap: 8px; margin-top: 12px; }
.link-box input { flex: 1; min-width: 0; font-size: 12px; }

/* User menu (MajlisKita header chip with gradient avatar). */
.user-menu { position: relative; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; border: 1px solid var(--line); background: var(--surface); border-radius: 16px; cursor: pointer; font: inherit; color: var(--ink); text-align: left; box-shadow: var(--shadow); }
.user-chip:hover { background: var(--muted-bg); }
.user-chip .avatar { background: var(--grad-tile) !important; color: #fff !important; border-radius: 11px; }
.user-chip > .ico { transform: rotate(90deg); color: var(--muted); }
.uc-text strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.2; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-text small { display: block; font-size: 11.5px; color: var(--muted); }
.user-pop { display: none; position: absolute; right: 0; top: 52px; width: 270px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; }
.user-pop.open { display: block; }
.user-pop a, .user-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--ink-2); border-radius: 10px; cursor: pointer; text-align: left; }
.user-pop a:hover, .user-pop button:hover { background: var(--muted-bg); color: var(--ink); }
.up-head { padding: 10px 10px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }
.up-head strong { display: block; }
.up-head small { display: block; color: var(--muted); margin-bottom: 8px; }
.impersonation { display: flex; align-items: center; gap: 12px; padding: 10px 32px; background: linear-gradient(90deg, rgb(132 204 22 / .16), rgb(6 182 212 / .12)); border-bottom: 1px solid rgb(132 204 22 / .3); color: var(--ink); font-size: 13px; }
.impersonation .ico { color: #65a30d; }
.impersonation .btn { margin-left: auto; }

.role-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.role-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; text-align: left; cursor: pointer; font: inherit; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.role-tile strong { display: block; font-family: var(--display); font-size: 32px; font-weight: 700; line-height: 1.05; }
.role-tile span { font-size: 12px; color: var(--muted); }
.role-tile:hover { transform: translateY(-2px); }
.role-tile.on { border-color: rgb(37 99 235 / .4); background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgb(37 99 235 / .25); }
.perm-table td:first-child { min-width: 280px; }

.ann-list { display: flex; flex-direction: column; gap: 14px; }
.ann { padding: 18px 20px; }
.ann + .ann { border-top: 1px solid var(--line-2); }
.ann.pinned { box-shadow: inset 4px 0 0 var(--brand-3); }
.ann-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ann-meta .ann-del { margin-left: auto; }
.ann h4 { font-size: 17px; margin: 8px 0 4px; }
.ann p { color: var(--ink-2); margin-bottom: 8px; }
.ready { display: inline-flex; width: 26px; height: 26px; border-radius: 9px; align-items: center; justify-content: center; background: var(--muted-bg); color: var(--muted); }
.ready.ok { background: var(--green-soft); color: var(--green); }
.me-hero { position: relative; overflow: hidden; }
.me-hero::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); }
.me-hero-main { display: flex; gap: 20px; align-items: center; padding: 24px; flex-wrap: wrap; }
.me-hero-main h2 { font-size: 30px; letter-spacing: -.03em; }

.lp-builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; align-items: start; }
.lp-builder > * { min-width: 0; }
.lp-preview-col { position: sticky; top: 90px; }
.lp-preview { overflow-y: auto; max-height: calc(100vh - 190px); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.lp-sizer { position: relative; overflow: hidden; }
.lp-scale { width: 1280px; transform-origin: top left; }
.lp-url { display: flex; gap: 8px; }
.lp-url input { flex: 1; min-width: 0; }
.tpl-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tpl-swatch { display: flex; flex-direction: column; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; font: 600 11.5px var(--sans); color: var(--ink-2); text-align: left; }
.tpl-swatch:hover { border-color: var(--brand-1); }
.tpl-swatch.on { border-color: var(--brand-1); box-shadow: 0 0 0 3px rgb(37 99 235 / .18); color: var(--ink); }
.tpl-swatch .sw { height: 34px; border-radius: 8px; display: flex; align-items: flex-end; gap: 4px; padding: 5px; }
.tpl-swatch .sw i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .7); box-shadow: 0 0 0 1px rgb(0 0 0 / .08); }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.tpl-card { overflow: hidden; display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s; }
.tpl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tpl-thumb { height: 230px; overflow: hidden; border-bottom: 1px solid var(--line); position: relative; }
.tpl-thumb .lp-scale { pointer-events: none; }
.tpl-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tpl-body h3 { font-size: 17px; }
.tpl-body .btn-row { margin-top: auto; padding-top: 8px; }

@media (max-width: 1080px) {
  .lp-builder { grid-template-columns: minmax(0, 1fr); }
  .lp-preview-col { position: static; }
  .role-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth::before { inset: 12px; }
  .auth-brand { padding: 36px 24px 8px; }
  .auth-brand h1 { font-size: 34px; }
  .auth-card { padding: 28px 22px; }
  .uc-text, .user-chip > .ico { display: none; }
  .user-chip { padding: 3px; }
  .impersonation { padding: 10px 16px; flex-wrap: wrap; }
  .tpl-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
