:root {
    --bg: #0b141e;
    --panel: #111e2a;
    --panel-2: #152432;
    --line: rgba(255, 255, 255, .09);
    --text: #f4f8fb;
    --muted: #8da0b2;
    --lime: #b8ff63;
    --nav: #08111a;
    --blue: #70adff;
    --orange: #ffbd66;
    --red: #ff8a78;
}

* { box-sizing: border-box; }
html { background: var(--bg); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--text); }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 88% 0, rgba(68,132,188,.12), transparent 28rem), var(--bg); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0,1fr); max-width: 1600px; margin: auto; }
.sidebar { background: var(--nav); border-right: 1px solid var(--line); padding: 26px 20px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; letter-spacing: -.02em; }
.brand small { display: block; color: var(--lime); font-size: 10px; letter-spacing: .19em; margin-bottom: 2px; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--lime); color: #102018; font-weight: 900; box-shadow: 0 0 28px rgba(184,255,99,.15); }
nav { margin-top: 42px; display: grid; gap: 6px; }
nav a { display: flex; gap: 12px; align-items: center; min-height: 44px; padding: 0 13px; border-radius: 11px; text-decoration: none; color: #91a3b4; font-size: 14px; font-weight: 600; }
nav a:hover { background: rgba(255,255,255,.04); color: white; }
.nav-active { background: rgba(184,255,99,.09) !important; color: #c5ff7d !important; }
.sidebar-logout { margin-top: auto; }
.logout-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025); color: #9dafbd; padding: 0 15px; cursor: pointer; font-size: 12px; font-weight: 700; transition: border-color .18s ease, background .18s ease, color .18s ease; }
.sidebar-logout .logout-button { width: 100%; }
.logout-button:hover { border-color: rgba(255,138,120,.3); background: rgba(255,138,120,.06); color: #ffad9f; }

.content { padding: 34px 44px 70px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 25px; border-bottom: 1px solid var(--line); padding-bottom: 28px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.mobile-logout { display: none; margin: 0; }
.eyebrow { margin: 0 0 6px; color: var(--lime); font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.topbar h1 { margin: 0; font-size: 35px; letter-spacing: -.045em; }
.topbar p:last-child { margin: 7px 0 0; color: var(--muted); }
.primary-button, .open-site { display: inline-flex; align-items: center; justify-content: center; background: var(--lime); color: #13221a !important; padding: 12px 18px; border-radius: 11px; text-decoration: none; font-size: 14px; font-weight: 800; }
.notice { margin-top: 20px; padding: 13px 15px; border-radius: 10px; font-size: 14px; }
.notice-success { background: rgba(184,255,99,.09); border: 1px solid rgba(184,255,99,.2); color: #caff8b; }
.notice-error { background: rgba(255,112,94,.09); border: 1px solid rgba(255,112,94,.22); color: #ffa397; }

.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-top: 26px; }
.stats article { padding: 18px 19px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.stats span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.stats strong { font-size: 21px; letter-spacing: -.03em; }
.filters { display: flex; align-items: center; gap: 10px; margin: 25px 0; }
.filters label:first-child { flex: 1; max-width: 390px; }
.filters input, .filters select, .edit-form input, .edit-form select, .edit-form textarea { width: 100%; min-height: 43px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); padding: 9px 12px; font-size: 14px; outline: none; }
.filters input:focus, .filters select:focus, .edit-form input:focus, .edit-form select:focus, .edit-form textarea:focus { border-color: rgba(184,255,99,.5); box-shadow: 0 0 0 3px rgba(184,255,99,.07); }
.filters button, .edit-form button { min-height: 43px; border: 0; border-radius: 10px; padding: 0 16px; background: #263746; color: white; font-weight: 700; cursor: pointer; }
.filters > a { font-size: 13px; color: var(--muted); }

.project-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.project-card { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--panel); box-shadow: 0 14px 45px rgba(0,0,0,.12); }
.project-visual { height: 145px; padding: 17px; position: relative; overflow: hidden; display: flex; align-items: flex-end; background: linear-gradient(145deg,rgba(91,163,221,.26),#08131e 72%); border-bottom: 1px solid var(--line); }
.project-visual > span { font: 700 10px ui-monospace,SFMono-Regular,Consolas,monospace; letter-spacing: .16em; color: #a9c8e3; }
.project-visual::before { content: ""; position: absolute; width: 230px; height: 230px; border: 1px solid rgba(184,255,99,.18); border-radius: 50%; top: -150px; right: -20px; box-shadow: 0 0 0 32px rgba(184,255,99,.025),0 0 0 70px rgba(184,255,99,.018); }
.browser-art { position: absolute; right: 17px; top: 18px; width: 43%; min-width: 120px; height: 84px; padding: 19px 14px; border: 1px solid var(--line); border-radius: 9px; background: rgba(5,12,19,.62); transform: rotate(2deg); }
.browser-art::before { content: ""; display: block; width: 45%; height: 6px; border-radius: 20px; background: var(--lime); margin-bottom: 12px; }
.browser-art i { display: block; height: 4px; border-radius: 10px; background: rgba(255,255,255,.18); margin-top: 7px; }
.browser-art i:nth-child(2) { width: 82%; }
.browser-art i:nth-child(3) { width: 58%; }
.project-body { padding: 18px; }
.project-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.project-title h2 { margin: 0 0 4px; font-size: 19px; letter-spacing: -.025em; }
.project-title code { color: var(--muted); font-size: 11px; }
.status { display: inline-flex; padding: 5px 8px; border-radius: 20px; border: 1px solid var(--line); font-size: 10px; font-weight: 700; text-align: center; }
.status-ready, .status-accepted { background: rgba(184,255,99,.08); border-color: rgba(184,255,99,.2); color: #c4ff7f; }
.status-building { background: rgba(112,173,255,.08); border-color: rgba(112,173,255,.2); color: #91c2ff; }
.status-waiting { background: rgba(255,189,102,.08); border-color: rgba(255,189,102,.2); color: #ffca84; }
.status-archived { color: #8293a2; }
.quote { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; margin-top: 16px; font-size: 13px; }
.quote span { color: var(--muted); }
.notes { color: #b4c0ca; font-size: 13px; line-height: 1.55; max-height: 82px; overflow: auto; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 15px; }
.actions a { display: flex; align-items: center; justify-content: center; min-height: 38px; border-radius: 9px; text-decoration: none; color: #d8e3ec; font-size: 12px; font-weight: 750; border: 1px solid var(--line); }
.actions .open-site { border: 0; }

.share-box { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #0b1721; }
.share-box.is-enabled { border-color: rgba(184,255,99,.22); background: rgba(184,255,99,.035); }
.share-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.share-heading > div { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.share-toggle-form { margin: 0; }
.share-state-dot { width: 7px; height: 7px; border-radius: 50%; background: #6f8190; }
.share-box.is-enabled .share-state-dot { background: var(--lime); box-shadow: 0 0 9px rgba(184,255,99,.55); }
.share-toggle, .share-controls button, .copy-link { min-height: 34px; border: 1px solid transparent; border-radius: 8px; padding: 0 12px; cursor: pointer; font-size: 11px; font-weight: 750; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.share-toggle-on { background: var(--lime); color: #13221a; }
.share-toggle-on:hover { background: #c6ff82; }
.share-toggle-off { border-color: rgba(255,138,120,.23); background: rgba(255,138,120,.06); color: #ffad9f; }
.share-toggle-off:hover { border-color: rgba(255,138,120,.42); background: rgba(255,138,120,.11); }
.share-link-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; margin-top: 11px; }
.share-link-row input { min-width: 0; min-height: 38px; border: 1px solid var(--line); border-radius: 8px; background: #071019; color: #b9c7d2; padding: 8px 10px; font: 11px ui-monospace,SFMono-Regular,Consolas,monospace; }
.copy-link { min-height: 38px; background: #253746; color: white; }
.copy-link:hover { background: #304657; }
.share-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; }
.share-controls a, .share-controls button { color: #8fa2b2; font-size: 10px; font-weight: 700; }
.share-controls a { text-decoration: none; }
.share-controls a:hover { color: white; }
.share-controls form { margin: 0; }
.share-controls button { min-height: auto; padding: 0; border: 0; background: none; }
.share-controls button:hover { color: white; }

details { margin-top: 13px; border-top: 1px solid var(--line); padding-top: 12px; }
summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.edit-form { display: grid; gap: 11px; margin-top: 14px; }
.edit-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.edit-form textarea { resize: vertical; line-height: 1.45; }
.edit-form button { background: var(--lime); color: #13221a; }
.empty { min-height: 310px; display: grid; place-items: center; align-content: center; text-align: center; border: 1px dashed var(--line); border-radius: 16px; background: rgba(255,255,255,.018); }
.empty > span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: rgba(184,255,99,.1); color: var(--lime); font-weight: 900; }
.empty h2 { margin: 15px 0 4px; }
.empty p { margin: 0; color: var(--muted); max-width: 440px; }
.instruction { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-top: 28px; padding: 24px; border: 1px solid rgba(184,255,99,.16); border-radius: 16px; background: linear-gradient(115deg,rgba(184,255,99,.06),rgba(73,133,186,.06)); }
.instruction h2 { margin: 0 0 5px; font-size: 21px; }
.instruction p:last-child { margin: 0; color: var(--muted); font-size: 13px; max-width: 680px; }
.instruction code { white-space: nowrap; background: #071019; border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; color: #c4ff7e; font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.login-page { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; overflow-x: hidden; }
.login-page::before { content: ""; position: fixed; width: 430px; height: 430px; top: 50%; left: 50%; border-radius: 50%; background: rgba(184,255,99,.045); filter: blur(70px); transform: translate(-50%,-50%); pointer-events: none; }
.login-shell { position: relative; z-index: 1; width: min(410px,100%); margin: auto; }
.login-card { width: 100%; padding: 38px; border: 1px solid var(--line); border-radius: 18px; background: rgba(10,22,32,.96); box-shadow: 0 30px 85px rgba(0,0,0,.34); }
.login-brand { width: max-content; margin: 0 auto; }
.login-heading { margin-top: 34px; text-align: center; }
.login-heading h1 { margin: 0; font-size: 34px; letter-spacing: -.04em; }
.login-form { display: grid; gap: 15px; margin-top: 25px; }
.login-form label { display: grid; gap: 7px; color: #c6d2dc; font-size: 12px; font-weight: 650; }
.login-form input { width: 100%; min-height: 47px; border: 1px solid var(--line); border-radius: 10px; background: #0a151f; color: white; padding: 10px 12px; outline: none; }
.login-form input:focus { border-color: rgba(184,255,99,.55); box-shadow: 0 0 0 3px rgba(184,255,99,.07); }
.login-form button { min-height: 48px; margin-top: 2px; border: 0; border-radius: 10px; background: var(--lime); color: #13221a; font-weight: 800; cursor: pointer; transition: background .18s ease, transform .18s ease; }
.login-form button:hover { background: #c6ff82; transform: translateY(-1px); }
.login-form button:disabled { opacity: .45; cursor: not-allowed; }

@media (max-width: 1180px) {
    .project-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .stats { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 820px) {
    .shell { display: block; }
    .sidebar { display: none; }
    .content { padding: 24px 20px 55px; }
    .topbar { align-items: flex-start; }
    .topbar-actions { align-items: flex-end; flex-direction: column; }
    .mobile-logout { display: block; }
    .project-grid { grid-template-columns: 1fr; }
    .instruction { align-items: flex-start; flex-direction: column; }
    .instruction code { white-space: normal; }
}
@media (max-width: 560px) {
    .topbar { display: block; }
    .topbar-actions { display: block; }
    .primary-button { margin-top: 18px; }
    .mobile-logout { margin-top: 10px; }
    .mobile-logout .logout-button { width: 100%; }
    .topbar h1 { font-size: 30px; }
    .stats { grid-template-columns: 1fr 1fr; }
    .filters { align-items: stretch; flex-direction: column; }
    .filters label:first-child { max-width: none; }
    .project-title { display: block; }
    .status { margin-top: 11px; }
    .actions { grid-template-columns: 1fr; }
    .instruction { padding: 20px; }
    .login-card { padding: 26px 22px; }
    .share-link-row { grid-template-columns: 1fr; }
    .share-controls { align-items: flex-start; flex-direction: column; }
}
