/* ADS client portal (styles shared with the approved prototype) */
:root {
    --gold: #D4AF37; --gold-2: #F1DC93; --gold-dark: #A88A2A;
    --bg: #0B0B0C; --bg-2: #111113; --card: #151517; --card-2: #1B1B1E; --line: #26262A;
    --text: #F4F4F5; --muted: #9A9AA2; --ok: #3DBE7A; --warn: #E8B33C; --info: #6AA8FF;
    --radius: 16px; --font: 'Montserrat', system-ui, sans-serif; --script: 'Playfair Display', serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }


/* ---------------- LOGIN ---------------- */
.login {
    min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; 
}
.login-art { position: relative; overflow: hidden; }
.login-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: kb 18s ease-in-out infinite alternate; will-change: transform; backface-visibility: hidden; transform: translateZ(0); }
@keyframes kb { from { transform: scale(1.12); } to { transform: scale(1); } }
.login-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.25), rgba(11,11,12,1)), radial-gradient(ellipse at 20% 80%, rgba(212,175,55,.25), transparent 50%); }
.login-quote { position: absolute; left: 3rem; bottom: 3rem; z-index: 2; max-width: 420px; }
.login-quote p { font-family: var(--script); font-style: italic; font-size: 1.6rem; color: var(--gold-2); line-height: 1.35; }
.login-quote span { display: block; margin-top: .8rem; font-size: .75rem; letter-spacing: 2px; color: #ccc; text-transform: uppercase; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.login-box { width: 100%; max-width: 400px; }
.login-box .brand { display: flex; align-items: center; gap: 14px; margin-bottom: 2.5rem; }
.brand img { height: 46px; }
.brand-words strong { display: block; letter-spacing: 3px; font-size: .95rem; font-weight: 800; }
.brand-words span { font-size: .58rem; letter-spacing: 2.5px; color: var(--gold); font-weight: 600; text-transform: uppercase; }
.login-box h1 { font-size: 2rem; font-weight: 800; line-height: 1.1; margin-bottom: .5rem; }
.login-box h1 em { font-style: normal; background: linear-gradient(100deg, var(--gold-dark), var(--gold), var(--gold-2), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-box > p { color: var(--muted); margin-bottom: 2rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); margin-bottom: .45rem; }
.field input { width: 100%; padding: .95rem 1rem; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; transition: border-color .2s, box-shadow .2s; }
.field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(212,175,55,.15); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; border: 1px solid transparent; border-radius: 12px; padding: .8rem 1.3rem; font-weight: 700; font-size: .88rem; transition: all .2s ease; }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #111; box-shadow: 0 10px 25px rgba(212,175,55,.25); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(212,175,55,.35); }
.btn-ghost { background: var(--card-2); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-block { width: 100%; padding: 1rem; }
.login-help { margin-top: 1.4rem; font-size: .82rem; color: var(--muted); text-align: center; }
.login-help a { color: var(--gold); }

/* ---------------- APP LAYOUT ---------------- */
.app { display: none; min-height: 100vh;  }
.app.on { display: grid; grid-template-columns: 250px 1fr; }
.side { position: sticky; top: 0; height: 100vh; background: var(--bg-2); border-right: 1px solid var(--line); padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: 1.6rem; }
.side .brand { padding: 0 .6rem; }
.nav { display: grid; gap: 3px; }
.nav button { display: flex; align-items: center; gap: .8rem; padding: .75rem .9rem; border-radius: 10px; border: none; background: none; color: var(--muted); font-weight: 600; font-size: .88rem; text-align: left; position: relative; }
.nav button i { width: 20px; text-align: center; }
.nav button:hover { color: var(--text); background: var(--card); }
.nav button.on { color: #111; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); }
.nav .dot { margin-left: auto; background: #E25555; color: #fff; font-size: .65rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.nav button.on .dot { background: #111; color: var(--gold); }
.side-card { margin-top: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1rem; }
.side-card small { color: var(--muted); font-size: .7rem; letter-spacing: 1px; text-transform: uppercase; font-weight: 700; }
.side-card strong { display: block; margin: .2rem 0 .7rem; }
.side-card .row { display: flex; gap: .5rem; }
.side-card .row a { flex: 1; text-align: center; padding: .55rem; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line); color: var(--gold); }

.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 2rem; background: rgba(11,11,12,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar h2 { font-size: 1.15rem; font-weight: 700; }
.topbar .sub { color: var(--muted); font-size: .8rem; }
.top-actions { display: flex; align-items: center; gap: .7rem; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); display: inline-flex; align-items: center; justify-content: center; position: relative; }
.icon-btn:hover { border-color: var(--gold); color: var(--gold); }
.icon-btn .badge { position: absolute; top: -5px; right: -5px; background: #E25555; color: #fff; font-size: .62rem; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.avatar { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, #2b2b30, #1b1b1e); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--gold); }
.content { padding: 2rem; max-width: 1280px; }
.view { display: none; animation: fade .45s ease; }
.view.on { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.card h3 { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.card h3 i { color: var(--gold); }
.card h3 .more { margin-left: auto; font-size: .78rem; color: var(--gold); font-weight: 600; background: none; border: none; }
.grid { display: grid; gap: 1.2rem; }
.g-hero { grid-template-columns: 1.6fr 1fr; }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-2 { grid-template-columns: 1fr 1fr; }
.pill { display: inline-flex; align-items: center; gap: .4rem; font-size: .7rem; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; padding: .3rem .7rem; border-radius: 30px; }
.pill.ok { background: rgba(61,190,122,.12); color: var(--ok); }
.pill.warn { background: rgba(232,179,60,.12); color: var(--warn); }
.pill.info { background: rgba(106,168,255,.12); color: var(--info); }
.pill.mute { background: #222226; color: var(--muted); }
.pill.gold { background: rgba(212,175,55,.14); color: var(--gold); }

/* Overview hero */
.proj-hero { position: relative; overflow: hidden; padding: 0; display: grid; grid-template-columns: 1fr 230px; min-height: 280px; }
.proj-hero .bg { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(21,21,23,.97) 35%, rgba(21,21,23,.6)), url('https://images.unsplash.com/photo-1484154218962-a197022b5858?w=1400&q=70') center / cover; }
.proj-hero .info, .proj-hero .ring-box { position: relative; padding: 1.8rem; }
.proj-hero .eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: 2px; color: var(--gold); text-transform: uppercase; }
.proj-hero h1 { font-size: 2rem; font-weight: 800; margin: .3rem 0 .3rem; line-height: 1.1; }
.proj-hero .addr { color: var(--muted); font-size: .88rem; margin-bottom: 1.2rem; }
.facts { display: flex; gap: 1.8rem; flex-wrap: wrap; margin-top: 1.2rem; }
.facts div small { display: block; color: var(--muted); font-size: .68rem; letter-spacing: 1px; text-transform: uppercase; font-weight: 700; }
.facts div strong { font-size: 1.05rem; }
.ring-box { display: flex; align-items: center; justify-content: center; }
.ring { position: relative; width: 190px; height: 190px; }
.ring svg { transform: rotate(-90deg); }
.ring .track { stroke: rgba(255,255,255,.08); }
.ring .bar { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset 1.6s cubic-bezier(.2,.8,.2,1); filter: drop-shadow(0 0 8px rgba(212,175,55,.45)); }
.ring .label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .label strong { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.ring .label span { font-size: .7rem; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; margin-top: .3rem; }

.stage-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin-top: .4rem; }
.stage-strip .s { height: 8px; border-radius: 4px; background: #232327; position: relative; overflow: hidden; }
.stage-strip .s i { position: absolute; inset: 0; width: 0; background: linear-gradient(90deg, var(--gold-dark), var(--gold)); transition: width 1.2s ease; }
.stage-names { display: flex; justify-content: space-between; color: var(--muted); font-size: .72rem; margin-top: .5rem; }

.action { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; border-radius: 14px; background: linear-gradient(135deg, rgba(212,175,55,.16), rgba(212,175,55,.04)); border: 1px solid rgba(212,175,55,.4); }
.action .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--gold); color: #111; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(212,175,55,.5); } 50% { box-shadow: 0 0 0 10px rgba(212,175,55,0); } }
.action strong { display: block; }
.action span { color: var(--muted); font-size: .85rem; }
.action .btn { margin-left: auto; }

.visit { display: flex; gap: 1rem; align-items: center; }
.cal { width: 62px; border-radius: 12px; overflow: hidden; text-align: center; border: 1px solid var(--line); flex-shrink: 0; }
.cal b { display: block; background: var(--gold); color: #111; font-size: .65rem; letter-spacing: 1px; padding: 3px 0; }
.cal span { display: block; font-size: 1.6rem; font-weight: 800; padding: 3px 0 5px; }
.visit small { color: var(--muted); }

.mini-update { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; align-items: center; }
.mini-update img { width: 110px; height: 82px; object-fit: cover; border-radius: 10px; }
.mini-update small { color: var(--gold); font-weight: 700; font-size: .72rem; }
.mini-update p { color: var(--muted); font-size: .85rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.money-bar { height: 10px; border-radius: 6px; background: #232327; overflow: hidden; margin: .7rem 0 .5rem; }
.money-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ok), #7DE0A8); transition: width 1.4s ease; }
.money-row { display: flex; justify-content: space-between; font-size: .82rem; color: var(--muted); }

/* Progress timeline */
.timeline { position: relative; display: grid; gap: 1rem; }
.timeline::before { content: ''; position: absolute; left: 23px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--gold), #2a2a2e 60%); }
.tl { display: grid; grid-template-columns: 48px 1fr; gap: 1rem; position: relative; }
.tl .node { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--card-2); border: 2px solid #2f2f34; color: var(--muted); z-index: 1; }
.tl.done .node { background: var(--gold); border-color: var(--gold); color: #111; }
.tl.active .node { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 0 6px rgba(212,175,55,.12); }
.tl.active .node i { animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tl .box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.2rem; }
.tl.active .box { border-color: rgba(212,175,55,.5); }
.tl .head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; }
.tl .head strong { font-size: .98rem; }
.tl .head small { color: var(--muted); }
.tl p { color: var(--muted); font-size: .86rem; margin-top: .3rem; }
.tl .bar { height: 6px; border-radius: 4px; background: #232327; margin-top: .8rem; overflow: hidden; }
.tl .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-dark), var(--gold)); transition: width 1.2s ease; }

/* Design Studio */
.studio { display: grid; grid-template-columns: 1fr 340px; gap: 1.2rem; align-items: start; }
.stage-wrap { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; }
.stage-wrap canvas { width: 100%; height: auto; display: block; cursor: default; }
.stage-wrap.tap canvas { cursor: crosshair; }
.stage-tools { position: absolute; left: 1rem; right: 1rem; bottom: 1rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.chip-glass { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .9rem; border-radius: 30px; background: rgba(10,10,10,.6); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.15); color: #fff; font-size: .78rem; font-weight: 600; }
.chip-glass:hover, .chip-glass.on { border-color: var(--gold); color: var(--gold); }
.loading-studio { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: .8rem; color: var(--muted); background: #0d0d0e; }
.loading-studio i { font-size: 1.8rem; color: var(--gold); }
.tap-hint { position: absolute; top: 1rem; left: 50%; transform: translateX(-50%); display: none; }
.stage-wrap.tap .tap-hint { display: inline-flex; }
.ai-badge { position: absolute; top: 1rem; left: 1rem; }

.zones { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin-bottom: 1.2rem; }
.zone-btn { display: flex; align-items: center; gap: .6rem; padding: .75rem .8rem; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); font-size: .82rem; font-weight: 600; text-align: left; }
.zone-btn i { color: var(--muted); width: 16px; text-align: center; }
.zone-btn .sw { margin-left: auto; width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); }
.zone-btn.on { border-color: var(--gold); background: rgba(212,175,55,.08); }
.zone-btn.on i { color: var(--gold); }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin-bottom: 1rem; }
.swatch { border: none; background: none; color: var(--muted); font-size: .66rem; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center; line-height: 1.2; }
.swatch span { width: 54px; height: 54px; border-radius: 14px; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 6px 14px rgba(0,0,0,.35); transition: transform .2s, border-color .2s; }
.swatch:hover span { transform: translateY(-3px); }
.swatch.on { color: var(--gold); }
.swatch.on span { border-color: var(--gold); }
.swatch .orig { background: repeating-linear-gradient(45deg, #333 0 6px, #222 6px 12px); display: flex; align-items: center; justify-content: center; color: #aaa; font-size: 1rem; }
.custom-color { display: flex; align-items: center; gap: .7rem; padding: .7rem; border: 1px dashed var(--line); border-radius: 12px; margin-bottom: 1.2rem; font-size: .82rem; color: var(--muted); }
.custom-color input { width: 42px; height: 34px; border: none; background: none; padding: 0; cursor: pointer; }
.studio-actions { display: grid; gap: .6rem; }
.saved { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: 1rem; }
.saved img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; }
.concepts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.2rem; }
.concept { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4/3; }
.concept img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.concept:hover img { transform: scale(1.06); }
.concept span { position: absolute; left: .7rem; bottom: .7rem; }
.concept.gen { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; text-align: center; padding: 1rem; background: linear-gradient(135deg, rgba(212,175,55,.12), transparent); color: var(--muted); font-size: .85rem; }
.concept.gen i { font-size: 1.6rem; color: var(--gold); }

/* Updates */
.feed { display: grid; gap: 1.2rem; max-width: 860px; }
.post .meta { display: flex; align-items: center; gap: .8rem; margin-bottom: .9rem; }
.post .meta .avatar { width: 40px; height: 40px; }
.post .meta small { color: var(--muted); display: block; font-size: .78rem; }
.post h4 { font-size: 1.05rem; margin-bottom: .4rem; }
.post p { color: #cfcfd4; font-size: .92rem; }
.post .photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; margin-top: 1rem; }
.post .photos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; cursor: zoom-in; transition: transform .3s; }
.post .photos img:hover { transform: scale(1.02); }

/* Materials */
.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.filters button { padding: .5rem 1rem; border-radius: 30px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: .78rem; font-weight: 600; }
.filters button.on { border-color: var(--gold); color: var(--gold); }
.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
.mat { display: flex; flex-direction: column; gap: .5rem; }
.mat .top { display: flex; align-items: center; gap: .8rem; }
.mat .top .ic { width: 44px; height: 44px; border-radius: 12px; background: rgba(212,175,55,.1); color: var(--gold); display: flex; align-items: center; justify-content: center; }
.mat .top small { color: var(--muted); font-size: .72rem; letter-spacing: 1px; text-transform: uppercase; font-weight: 700; }
.mat .top strong { display: block; font-size: .92rem; line-height: 1.3; }
.mat .brand { font-size: .85rem; }
.mat .spec { color: var(--muted); font-size: .82rem; }
.mat .foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: .7rem; border-top: 1px solid var(--line); }
.tier { display: flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 700; color: var(--gold); }

/* Docs & payments */
.doc { display: flex; align-items: center; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.doc:last-child { border-bottom: none; }
.doc .ic { width: 42px; height: 42px; border-radius: 10px; background: var(--card-2); display: flex; align-items: center; justify-content: center; color: var(--gold); }
.doc small { color: var(--muted); display: block; font-size: .76rem; }
.doc .btn { margin-left: auto; padding: .5rem .8rem; }
.pay { display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; align-items: center; padding: .85rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.pay:last-child { border-bottom: none; }
.pay small { color: var(--muted); display: block; font-size: .76rem; }

/* Messages */
.chat { display: flex; flex-direction: column; height: calc(100vh - 220px); min-height: 420px; padding: 0; overflow: hidden; }
.chat-log { flex: 1; overflow-y: auto; padding: 1.4rem; display: flex; flex-direction: column; gap: .8rem; }
.msg { max-width: 72%; padding: .8rem 1rem; border-radius: 16px; font-size: .9rem; animation: fade .3s ease; }
.msg small { display: block; font-size: .68rem; opacity: .6; margin-top: .3rem; }
.msg.ads { background: var(--card-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.client { align-self: flex-end; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #111; border-bottom-right-radius: 4px; }
.msg.client small { opacity: .7; }
.msg img { border-radius: 10px; margin-top: .5rem; }
.typing { color: var(--muted); font-size: .8rem; padding: 0 1.4rem .6rem; display: none; }
.chat-form { display: flex; gap: .6rem; padding: 1rem; border-top: 1px solid var(--line); background: var(--bg-2); }
.chat-form input { flex: 1; padding: .85rem 1rem; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; }
.chat-form input:focus { outline: none; border-color: var(--gold); }

/* Lightbox & toast */
.lightbox { position: fixed; inset: 0; z-index: 400; background: rgba(0,0,0,.92); display: none; align-items: center; justify-content: center; padding: 2rem; }
.lightbox.on { display: flex; }
.lightbox img { max-height: 88vh; border-radius: 14px; }
.toast { position: fixed; left: 50%; bottom: 2rem; transform: translate(-50%, 30px); opacity: 0; z-index: 500; background: #1d1d20; border: 1px solid var(--gold); color: var(--text); padding: .85rem 1.2rem; border-radius: 12px; font-size: .88rem; display: flex; gap: .6rem; align-items: center; transition: all .35s ease; box-shadow: 0 20px 40px rgba(0,0,0,.5); pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast i { color: var(--gold); }

.notif-panel { position: absolute; right: 0; top: 52px; width: 320px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 40px rgba(0,0,0,.5); padding: .6rem; display: none; }
.notif-panel.on { display: block; animation: fade .25s ease; }
.notif { display: flex; gap: .7rem; padding: .7rem; border-radius: 10px; font-size: .84rem; }
.notif:hover { background: var(--card-2); }
.notif i { color: var(--gold); margin-top: 3px; }
.notif small { color: var(--muted); display: block; }

/* Mobile */
.bottom-nav { display: none; }
@media (max-width: 1100px) {
    .g-hero, .studio { grid-template-columns: 1fr; }
    .g-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    .login { grid-template-columns: 1fr; }
    .login-art { display: none; }
    .app.on { grid-template-columns: 1fr; }
    .side { display: none; }
    .topbar { padding: .8rem 1rem; }
    .content { padding: 1.1rem 1rem 6rem; }
    .g-3, .g-2 { grid-template-columns: 1fr; }
    .proj-hero { grid-template-columns: 1fr; }
    .proj-hero .ring-box { padding-top: 0; }
    .proj-hero h1 { font-size: 1.6rem; }
    .concepts { grid-template-columns: 1fr 1fr; }
    .msg { max-width: 88%; }
    .chat { height: calc(100vh - 250px); }
    .action { flex-wrap: wrap; }
    .action .btn { margin-left: 0; width: 100%; }
    .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; background: rgba(17,17,19,.95); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: .4rem .3rem calc(.4rem + env(safe-area-inset-bottom)); }
    .bottom-nav button { background: none; border: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: .2rem; font-size: .62rem; font-weight: 600; padding: .4rem 0; position: relative; }
    .bottom-nav button i { font-size: 1.1rem; }
    .bottom-nav button.on { color: var(--gold); }
    .bottom-nav .dot { position: absolute; top: 2px; right: 22%; width: 8px; height: 8px; border-radius: 50%; background: #E25555; }
    .topbar .sub { display: none; }
    .stage-tools { position: static; flex-wrap: nowrap; overflow-x: auto; padding: .6rem; background: #0d0d0e; }
    .stage-tools .chip-glass { flex-shrink: 0; }
    .ai-badge { display: none; }
    .swatches { grid-template-columns: repeat(4, 1fr); gap: .5rem; }
    .swatch span { width: 48px; height: 48px; }
    .notif-panel { position: fixed; left: 1rem; right: 1rem; top: 90px; width: auto; }
}
/* Systems set to "reduce animations": everything stays still. Endless animations must also
   stop repeating, otherwise a near-zero duration makes them flicker non-stop. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .login-art img, .action .ic, .tl.active .node i { animation: none !important; }
    .login-art img { transform: none; }
}

/* ---------- Real portal extras ---------- */
.flash { display: flex; gap: .6rem; align-items: center; padding: .85rem 1rem; border-radius: 12px; margin-bottom: 1.2rem; font-size: .9rem; font-weight: 500; background: rgba(61,190,122,.12); color: #8BE0B2; border: 1px solid rgba(61,190,122,.35); }
.flash.error { background: rgba(226,85,85,.12); color: #FF9C9C; border-color: rgba(226,85,85,.4); }
.login-box .brand { text-decoration: none; }
.muted { color: var(--muted); }
.mini-update.no-photo { grid-template-columns: 1fr; }
.nav .dot-muted { background: #2a2a2e; color: var(--muted); }
.nav button.on .dot-muted { background: #111; color: var(--gold); }
.card.empty { text-align: center; color: var(--muted); padding: 3rem 1.5rem; }
.card.empty i { font-size: 2.2rem; color: var(--gold); margin-bottom: .8rem; }
.side .brand { text-decoration: none; color: inherit; }
.pw-form .btn { margin-top: .4rem; }
.post .meta .avatar i { color: var(--gold); }
@media (max-width: 900px) { .bottom-nav { grid-template-columns: repeat(5, 1fr); } }

/* ---------- Design Studio (portal) ---------- */
#roomTabs { margin-bottom: 1rem; }
.studio-cta .ic { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); }
.my-designs { display: grid; gap: 1rem; }
.my-design { display: grid; grid-template-columns: 180px 1fr; gap: 1rem; align-items: start; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.my-design:last-child { border-bottom: none; padding-bottom: 0; }
.my-design img { width: 100%; border-radius: 10px; cursor: zoom-in; }
.my-design small { display: block; color: var(--muted); font-size: .76rem; }
.my-design p { color: #cfcfd4; font-size: .86rem; margin: .4rem 0 .6rem; }
.msg img { max-width: 100%; border-radius: 10px; margin-top: .5rem; cursor: zoom-in; }
.saved img { cursor: zoom-in; }
@media (max-width: 900px) {
    .bottom-nav { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
    .my-design { grid-template-columns: 1fr; }
}
.loading-studio.soft { background: rgba(10,10,12,.35); align-items: flex-end; padding-bottom: 1rem; font-size: .85rem; }

/* ---------- Design Studio (AI) ---------- */
.ai-studio { display: grid; grid-template-columns: 1fr 380px; gap: 1.2rem; align-items: start; }
.ai-stage { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; }
.ba { position: relative; user-select: none; }
.ba img { display: block; width: 100%; height: auto; }
.ba #imgAfter { position: relative; }
.ba-before-wrap { position: absolute; inset: 0; clip-path: inset(0 0 0 0); }
.ba-before-wrap img { width: 100%; height: 100%; object-fit: cover; }
.ba-line, .ba-tag, #baRange { display: none; }
.ba.compare .ba-line { display: block; position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; background: var(--gold); transform: translateX(-50%); pointer-events: none; }
.ba.compare .ba-line span { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 46px; height: 46px; border-radius: 50%; background: var(--gold); color: #111; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,.5); }
.ba.compare #baRange { display: block; position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.ba.compare .ba-tag { display: block; position: absolute; bottom: .9rem; background: rgba(0,0,0,.75); color: var(--gold); font-size: .68rem; font-weight: 700; letter-spacing: 1.5px; padding: .3rem .7rem; border-radius: 4px; pointer-events: none; }
.ba-tag.left { left: .9rem; } .ba-tag.right { right: .9rem; }
.stage-label { position: absolute; top: 1rem; left: 1rem; max-width: calc(100% - 2rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-working { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem; text-align: center; padding: 1.5rem; background: rgba(8,8,10,.78); backdrop-filter: blur(6px); }
.ai-working[hidden] { display: none; }
.ai-orb { width: 84px; height: 84px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #111; background: conic-gradient(from 0deg, var(--gold), var(--gold-2), var(--gold-dark), var(--gold)); animation: orb 2.4s linear infinite; box-shadow: 0 0 40px rgba(212,175,55,.5); }
@keyframes orb { to { transform: rotate(360deg); } }
.ai-orb i { animation: orb 2.4s linear infinite reverse; }
.ai-working strong { font-size: 1.1rem; }
.ai-working small { color: var(--muted); }
.ai-bar { width: min(320px, 80%); height: 6px; border-radius: 4px; background: #26262a; overflow: hidden; }
.ai-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-dark), var(--gold)); transition: width .5s linear; }
.result-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .9rem; }
.result-actions[hidden] { display: none; }
.ai-panel { display: grid; gap: 1.1rem; }
.ai-step { border-bottom: 1px solid var(--line); padding-bottom: 1.1rem; }
.ai-step-head { display: flex; gap: .8rem; align-items: center; margin-bottom: .8rem; }
.ai-step-head .num { width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: #111; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ai-step-head strong { display: block; font-size: .95rem; }
.ai-step-head small { color: var(--gold); font-size: .78rem; font-weight: 600; }
.deck-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .7rem; }
.deck-tabs button { padding: .35rem .7rem; border-radius: 20px; border: 1px solid var(--line); background: var(--card-2); color: var(--muted); font-size: .72rem; font-weight: 700; }
.deck-tabs button.on { border-color: var(--gold); color: var(--gold); }
.deck { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; }
.paint { border: 2px solid transparent; border-radius: 10px; background: #fff; padding: 0; overflow: hidden; display: flex; flex-direction: column; text-align: left; transition: transform .15s; }
.paint:hover { transform: translateY(-2px); }
.paint span { height: 46px; display: flex; align-items: center; justify-content: center; }
.paint b { font-size: .6rem; color: #333; padding: .3rem .35rem .4rem; line-height: 1.15; font-weight: 700; }
.paint.on { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(212,175,55,.35); }
.paint.none { background: var(--card-2); }
.paint.none span { color: var(--muted); }
.paint.none b { color: var(--muted); }
.chip-row { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .6rem; }
.chip-row button { padding: .5rem .8rem; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); font-size: .78rem; font-weight: 600; }
.chip-row button.on { border-color: var(--gold); background: rgba(212,175,55,.12); color: var(--gold); }
.finish-row { display: flex; gap: .45rem; flex-wrap: wrap; }
.finish { display: flex; flex-direction: column; align-items: center; gap: .25rem; border: none; background: none; color: var(--muted); font-size: .6rem; font-weight: 600; width: 52px; }
.finish span { width: 38px; height: 38px; border-radius: 10px; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.finish.on { color: var(--gold); }
.finish.on span { border-color: var(--gold); }
.decor-row { display: grid; grid-template-columns: 1fr 1.4fr 1.4fr; gap: .5rem; }
.decor { border: 1px solid var(--line); border-radius: 12px; background: var(--card-2); color: var(--text); padding: .8rem .6rem; display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; }
.decor i { font-size: 1.3rem; color: var(--gold); }
.decor b { font-size: .85rem; }
.decor small { font-size: .65rem; color: var(--muted); line-height: 1.3; }
.decor.on { border-color: var(--gold); background: rgba(212,175,55,.12); }
.ai-note { color: var(--muted); font-size: .75rem; text-align: center; margin-top: -.4rem; }
#createBtn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.creations { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .9rem; }
.creation { border: 1px solid var(--line); border-radius: 12px; background: var(--card-2); color: var(--text); padding: 0; overflow: hidden; text-align: left; display: flex; flex-direction: column; gap: .3rem; padding-bottom: .7rem; }
.creation:hover { border-color: var(--gold); }
.creation img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.creation span { font-size: .78rem; padding: 0 .7rem; }
.creation small { color: var(--muted); font-size: .7rem; padding: 0 .7rem; }
.creation .pill { margin: 0 .7rem; align-self: flex-start; }
@media (max-width: 1100px) { .ai-studio { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
    .deck { grid-template-columns: repeat(3, 1fr); }
    .decor-row { grid-template-columns: 1fr 1fr 1fr; }
    .result-actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .ai-orb, .ai-orb i { animation: none !important; } }
