:root {
    --ink: #12101a;
    --panel: #1d1929;
    --panel-2: #272039;
    --text: #f9f5ff;
    --muted: #aaa2ba;
    --pink: #ff4fba;
    --cyan: #68e7ff;
    --line: rgba(255,255,255,.11);
    --danger: #ff708f;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--ink); }
body {
    margin: 0; min-height: 100vh; color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        linear-gradient(rgba(104,231,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,79,186,.025) 1px, transparent 1px),
        radial-gradient(circle at 10% 0%, rgba(255,79,186,.12), transparent 28rem),
        #12101a;
    background-size: 32px 32px, 32px 32px, auto, auto;
}
a { color: inherit; }
.topbar {
    height: 68px; display: flex; align-items: center; justify-content: space-between;
    padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(18,16,26,.95);
    position: sticky; top: 0; z-index: 20;
}
.brand { font-weight: 900; text-decoration: none; letter-spacing: .05em; font-style: italic; }
.brand span { color: var(--pink); }
.userbox { display: flex; gap: 18px; align-items: center; color: var(--muted); font-size: 14px; }
.userbox form { margin: 0; }
.shell { display: grid; grid-template-columns: 220px minmax(0,1fr); min-height: calc(100vh - 68px); }
.sidebar { border-right: 1px solid var(--line); padding: 28px 18px; }
.sidebar nav { display: grid; gap: 8px; }
.sidebar a, .coming {
    padding: 11px 12px; border-radius: 8px; text-decoration: none; font-weight: 700; color: #ded8eb;
}
.sidebar a:hover { background: var(--panel); color: white; }
.coming { color: #6f687d; display: flex; justify-content: space-between; gap: 8px; }
.coming small { font-size: 9px; text-transform: uppercase; }
.nav-divider { color: var(--cyan); font-size: 10px; letter-spacing: .18em; font-weight: 900; margin: 22px 12px 4px; }
.content { padding: 42px; max-width: 1350px; width: 100%; }
.page-heading { margin-bottom: 32px; }
.page-heading.split { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
h1 { font-size: clamp(32px, 5vw, 58px); margin: 3px 0 9px; line-height: .95; letter-spacing: -.04em; }
h2 { margin: 8px 0; }
.eyebrow { color: var(--cyan); font-size: 11px; font-weight: 900; letter-spacing: .2em; }
.muted { color: var(--muted); max-width: 720px; line-height: 1.6; }
.grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.panel, .form-panel, .login-card, .table-wrap {
    background: linear-gradient(145deg,var(--panel-2),var(--panel)); border: 1px solid var(--line);
    border-radius: 14px; box-shadow: 0 22px 65px rgba(0,0,0,.25);
}
.panel { padding: 26px; min-height: 225px; }
.panel.accent { border-color: rgba(255,79,186,.4); }
.panel-number, .status {
    color: var(--pink); font-size: 10px; letter-spacing: .16em; font-weight: 900;
}
.panel p { color: var(--muted); line-height: 1.55; min-height: 74px; }
.button {
    display: inline-flex; align-items: center; justify-content: center; min-height: 42px;
    padding: 0 16px; border-radius: 7px; border: 1px solid var(--line); background: #312942;
    color: white; text-decoration: none; font: inherit; font-weight: 800; cursor: pointer;
}
.button.primary { background: var(--pink); color: #180914; border-color: transparent; }
.button.ghost { background: transparent; }
.link-button {
    appearance: none; background: none; border: 0; color: var(--cyan); padding: 0; cursor: pointer; font: inherit;
}
.login-stage { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(440px,100%); padding: 38px; position: relative; overflow: hidden; }
.login-card:before { content:""; position:absolute; inset:0 0 auto 0; height:4px; background:linear-gradient(90deg,var(--pink),var(--cyan)); }
.stack { display: grid; gap: 18px; margin-top: 28px; }
label { display: grid; gap: 8px; font-weight: 800; font-size: 13px; }
input, select, textarea {
    width: 100%; border: 1px solid var(--line); background: #100e17; color: white;
    padding: 13px 14px; border-radius: 7px; font: inherit; outline: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(104,231,255,.10); }
label small { color: var(--muted); font-weight: 500; }
.alert { padding: 13px 14px; border: 1px solid rgba(255,112,143,.35); background: rgba(255,112,143,.08); color: #ffd4de; border-radius: 7px; margin: 18px 0; }
.form-panel { padding: 28px; max-width: 680px; }
.actions { display: flex; gap: 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 15px 18px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
tr:last-child td { border-bottom: 0; }
.right { text-align: right; }
.right form { display: inline; }
.pill { font-size: 10px; font-weight: 900; color: var(--cyan); }
@media (max-width: 850px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
    .sidebar nav { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .nav-divider { grid-column: 1/-1; }
    .content { padding: 28px 18px; }
    .grid { grid-template-columns: 1fr; }
}

/* v0.2 Luchadors */
.success-alert { border-color: rgba(108,255,155,.35); background: rgba(108,255,155,.08); color: #d5ffe2; }
.text-link { color: var(--cyan); text-decoration: none; font-weight: 800; }
.table-subtext { margin-top: 4px; color: var(--muted); font-size: 12px; }
.status-active { color: #80ffad; font-weight: 800; }
.status-inactive { color: var(--muted); }
.row-actions { white-space: nowrap; }
.row-actions form { display: inline; margin-left: 14px; }
.empty-state { max-width: 720px; min-height: 0; }
.luchador-form { display: grid; gap: 22px; max-width: 980px; padding-bottom: 90px; }
.form-section { padding: 28px; background: linear-gradient(145deg,var(--panel-2),var(--panel)); border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 22px; }
.compact-section { gap: 12px; }
.section-heading { display: flex; align-items: flex-start; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.section-heading > span { color: var(--pink); font-size: 11px; font-weight: 900; letter-spacing: .15em; }
.section-heading h2 { margin: 0; }
.section-heading p { margin: 5px 0 0; color: var(--muted); }
.form-grid { display: grid; gap: 18px; }
.form-grid.two-col { grid-template-columns: repeat(2,minmax(0,1fr)); }
.full-span { grid-column: 1/-1; }
textarea { resize: vertical; line-height: 1.55; }
.rich-field { display: grid; gap: 8px; }
.rich-field > label { display: block; }
.rich-toolbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px solid var(--line); border-bottom: 0; border-radius: 7px 7px 0 0; background: #171322; }
.rich-toolbar button, .colour-tool { min-height: 32px; border: 1px solid var(--line); border-radius: 5px; background: #2a2338; color: white; padding: 0 9px; font: inherit; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.colour-tool input { width: 28px; height: 23px; padding: 0; border: 0; background: none; }
.rich-editor { min-height: 180px; padding: 15px; border: 1px solid var(--line); border-radius: 0 0 7px 7px; background: #100e17; line-height: 1.6; outline: 0; }
.rich-editor:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(104,231,255,.10); }
.rich-editor p:first-child { margin-top: 0; }
.check-label { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
.check-label input { width: auto; }
.form-savebar { position: sticky; bottom: 16px; display: flex; justify-content: flex-end; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(18,16,26,.94); backdrop-filter: blur(10px); }

/* Temporary public roster shell — not the final OSW frontend */
.public-body { min-height: 100vh; }
.public-shell { width: min(1120px, calc(100% - 36px)); margin: 0 auto; padding: 70px 0 100px; }
.public-kicker { color: var(--cyan); font-weight: 900; letter-spacing: .2em; font-size: 11px; }
.public-title { font-size: clamp(52px, 10vw, 110px); color: white; text-shadow: 4px 4px 0 rgba(255,79,186,.35); }
.public-intro { color: var(--muted); max-width: 680px; }
.roster-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-top: 36px; }
.roster-card { min-height: 190px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg,var(--panel-2),var(--panel)); text-decoration: none; display: flex; flex-direction: column; justify-content: flex-end; gap: 5px; }
.roster-card:hover { border-color: var(--pink); transform: translateY(-2px); }
.roster-name { font-size: 28px; font-weight: 900; }
.roster-card small, .roster-card > span:not(.roster-name) { color: var(--muted); }
.public-back { color: var(--cyan); text-decoration: none; font-weight: 800; }
.profile-shell { max-width: 920px; }
.profile-nicknames { color: var(--pink); font-size: 20px; font-weight: 800; }
.catchphrase { margin: 32px 0; padding: 20px 24px; border-left: 4px solid var(--pink); background: rgba(255,79,186,.08); font-size: 22px; }
.profile-facts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 32px 0; }
.profile-facts div { padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.profile-facts small { display: block; color: var(--cyan); text-transform: uppercase; letter-spacing: .12em; font-weight: 900; font-size: 9px; margin-bottom: 5px; }
.profile-section { margin-top: 32px; padding-top: 26px; border-top: 1px solid var(--line); }
.profile-section h2 { color: var(--pink); }
.prose { color: #e8e2ef; line-height: 1.75; }
.preline { white-space: pre-line; }
@media (max-width: 850px) {
    .form-grid.two-col, .roster-grid, .profile-facts { grid-template-columns: 1fr; }
    .form-savebar { bottom: 8px; }
}

/* v0.3 Luchador assets */
.asset-section { border-color: rgba(104,231,255,.24); }
.asset-preview { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #100e17; }
.image-preview img { width: min(420px,100%); max-height: 420px; object-fit: contain; object-position: left center; border-radius: 8px; background: #050508; }
.audio-preview audio { width: min(620px,100%); }
input[type="file"] { cursor: pointer; }

/* v0.3 exact comic roster artwork controls */
.artwork-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.artwork-upload {
    padding: 18px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    background: rgba(255,255,255,.025);
}
.artwork-upload h3 {
    margin: 0 0 14px;
    font-size: 16px;
    color: #7eeeff;
}
.artwork-upload .image-preview img {
    width: min(100%, 260px);
    max-height: 230px;
    object-fit: contain;
    object-position: center bottom;
    background: #05060a;
}
@media (max-width: 760px) {
    .artwork-grid { grid-template-columns: 1fr; }
}

/* v0.4 Issues */
.status-draft { color: #ffc66d; font-weight: 800; }
.issue-table table { min-width: 920px; }
.issue-form { max-width: 1080px; }
.issue-writing-section { border-color: rgba(255,79,186,.28); }
.issue-editor { min-height: 52vh; font-size: 16px; line-height: 1.75; }
.issue-status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.issue-status-line > span { color: var(--muted); }
.issue-status-line small { color: var(--muted); }
.issue-savebar { align-items: center; }
.danger-button { color: #ff9aae; border-color: rgba(255,112,143,.34); }
@media (max-width: 700px) {
    .issue-editor { min-height: 46vh; }
    .issue-savebar { flex-wrap: wrap; }
    .issue-savebar .button { flex: 1 1 auto; }
}
