:root {
    color-scheme: dark;
    --black: #0B0B0B;
    --black-soft: #101311;
    --green: #0F7D57;
    --green-bright: #24b981;
    --white: #FFFFFF;
    --muted: #929a96;
    --line: rgba(255, 255, 255, .11);
    font-family: Pretendard, "Pretendard Variable", "Noto Sans KR", Inter, system-ui, sans-serif;
    background: var(--black);
    color: var(--white);
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-width: 320px;
    min-height: 100%;
    margin: 0;
    background: var(--black);
}

body {
    min-height: 100vh;
    overflow-x: hidden;
}

button,
input {
    font: inherit;
}

[hidden] {
    display: none !important;
}

.admin-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(520px, 1.08fr) minmax(440px, .92fr);
    min-height: 100vh;
    overflow: hidden;
    isolation: isolate;
}

.admin-shell::before {
    position: absolute;
    z-index: -2;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
    background-size: 52px 52px;
    content: "";
    mask-image: linear-gradient(90deg, #000 0%, transparent 72%);
}

.ambient {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(4px);
    pointer-events: none;
}

.ambient-top {
    top: -34vw;
    left: -24vw;
    width: 72vw;
    height: 72vw;
    background: radial-gradient(circle, rgba(15, 125, 87, .23), transparent 68%);
}

.ambient-bottom {
    right: -22vw;
    bottom: -45vw;
    width: 76vw;
    height: 76vw;
    background: radial-gradient(circle, rgba(15, 125, 87, .13), transparent 66%);
}

.brand-stage {
    position: relative;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(40px, 5vw, 76px) 0 42px clamp(40px, 6vw, 104px);
    overflow: hidden;
}

.brand-stage::after {
    position: absolute;
    top: 7%;
    right: 0;
    width: 1px;
    height: 86%;
    background: linear-gradient(transparent, rgba(15,125,87,.62), rgba(255,255,255,.11), transparent);
    content: "";
}

.brand-copy {
    position: relative;
    z-index: 4;
    max-width: 540px;
}

.system-label,
.panel-kicker {
    display: inline-flex;
    align-items: center;
    color: var(--green-bright);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .2em;
}

.system-label i {
    width: 7px;
    height: 7px;
    margin-right: 10px;
    border-radius: 50%;
    background: var(--green-bright);
    box-shadow: 0 0 14px var(--green-bright);
    animation: pulse 2.4s ease-in-out infinite;
}

.brand-logo {
    display: block;
    width: min(480px, 74%);
    height: auto;
    margin: 27px 0 24px;
}

.brand-copy p {
    margin: 0;
    color: rgba(255, 255, 255, .56);
    font-size: clamp(14px, 1.15vw, 17px);
    font-weight: 420;
    line-height: 1.75;
    letter-spacing: -.02em;
}

.character-scene {
    position: absolute;
    right: -2%;
    bottom: 0;
    width: 92%;
    height: 76%;
    pointer-events: none;
}

.character-scene::before {
    position: absolute;
    right: 8%;
    bottom: 4%;
    width: 72%;
    height: 22%;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(15,125,87,.35), transparent 68%);
    filter: blur(18px);
    content: "";
}

.character {
    position: absolute;
    z-index: 2;
    object-fit: contain;
    filter: drop-shadow(0 22px 44px rgba(0, 0, 0, .48));
    user-select: none;
}

.character-console {
    right: 2%;
    bottom: -6%;
    width: min(61%, 610px);
    animation: float 5.8s ease-in-out infinite;
}

.character-walk {
    z-index: 3;
    right: 47%;
    bottom: -1%;
    width: min(46%, 450px);
    transform: rotate(-2deg);
    animation: float 5.8s 1.1s ease-in-out infinite reverse;
}

.orbit {
    position: absolute;
    z-index: 1;
    border: 1px solid rgba(15, 125, 87, .25);
    border-radius: 50%;
}

.orbit::before,
.orbit::after {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green-bright);
    box-shadow: 0 0 12px var(--green-bright);
    content: "";
}

.orbit-large {
    right: 4%;
    bottom: 2%;
    width: 73%;
    aspect-ratio: 1;
    transform: rotate(-18deg);
}

.orbit-large::before { top: 16%; left: 12%; }
.orbit-large::after { right: 2%; bottom: 34%; }

.orbit-small {
    right: 19%;
    bottom: 15%;
    width: 46%;
    aspect-ratio: 1;
    border-color: rgba(255, 255, 255, .08);
}

.orbit-small::before { top: 5%; right: 24%; }
.orbit-small::after { bottom: 11%; left: 10%; }

.signal {
    position: absolute;
    z-index: 1;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 0 12px rgba(255,255,255,.8);
}

.signal-one { top: 19%; right: 24%; }
.signal-two { top: 33%; left: 15%; }

.scene-caption {
    position: absolute;
    z-index: 4;
    bottom: 34px;
    left: 8px;
    display: grid;
    gap: 6px;
    padding-left: 15px;
    border-left: 2px solid var(--green);
}

.scene-caption span {
    color: rgba(255,255,255,.4);
    font-size: 9px;
    letter-spacing: .18em;
}

.scene-caption strong {
    color: var(--green-bright);
    font-size: 12px;
    font-weight: 650;
}

.access-stage {
    position: relative;
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 56px clamp(38px, 6vw, 112px);
    background: linear-gradient(120deg, rgba(255,255,255,.018), transparent 32%);
}

.login-panel {
    width: min(100%, 430px);
}

.mobile-brand {
    display: none;
}

.panel-heading {
    margin-bottom: 38px;
}

.panel-heading h1,
.dashboard-header h1 {
    margin: 13px 0 10px;
    color: var(--white);
    font-size: clamp(30px, 3vw, 42px);
    font-weight: 760;
    line-height: 1.2;
    letter-spacing: -.055em;
}

.panel-heading p,
.dashboard-copy {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: -.02em;
}

#login-form {
    display: grid;
    gap: 24px;
}

.field-group {
    display: grid;
    gap: 10px;
}

.field-group label {
    color: rgba(255,255,255,.82);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: -.01em;
}

.input-wrap {
    position: relative;
}

.input-wrap svg {
    position: absolute;
    top: 50%;
    left: 17px;
    width: 19px;
    height: 19px;
    transform: translateY(-50%);
    fill: none;
    stroke: #69716d;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
    transition: stroke .2s ease;
}

.input-wrap input {
    width: 100%;
    height: 56px;
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: 0;
    padding: 0 17px 0 50px;
    background: rgba(255, 255, 255, .035);
    color: var(--white);
    caret-color: var(--green-bright);
    font-size: 14px;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.input-wrap input::placeholder {
    color: #525855;
}

.input-wrap input:focus {
    border-color: var(--green);
    background: rgba(15,125,87,.055);
    box-shadow: 0 0 0 3px rgba(15,125,87,.12), 0 12px 30px rgba(0,0,0,.2);
}

.input-wrap:focus-within svg {
    stroke: var(--green-bright);
}

.login-button {
    position: relative;
    display: flex;
    width: 100%;
    height: 58px;
    align-items: center;
    justify-content: center;
    gap: 13px;
    margin-top: 7px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    background: var(--green);
    color: var(--white);
    cursor: pointer;
    font-size: 14px;
    font-weight: 720;
    letter-spacing: -.01em;
    box-shadow: 0 15px 35px rgba(15,125,87,.18);
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.login-button::before {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 25%, rgba(255,255,255,.12), transparent 70%);
    content: "";
    transform: translateX(-110%);
    transition: transform .55s ease;
}

.login-button:hover {
    background: #119466;
    box-shadow: 0 18px 42px rgba(15,125,87,.3);
    transform: translateY(-2px);
}

.login-button:hover::before {
    transform: translateX(110%);
}

.login-button:active {
    transform: translateY(0);
}

.login-button:disabled {
    cursor: wait;
    opacity: .65;
    transform: none;
}

.login-button svg {
    width: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.error {
    margin: -10px 0 0;
    padding: 12px 14px;
    border: 1px solid rgba(255, 100, 100, .22);
    border-radius: 8px;
    background: rgba(190, 40, 40, .08);
    color: #ff9999;
    font-size: 12px;
    line-height: 1.5;
}

.security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 30px;
    color: #555d59;
    font-size: 10px;
    letter-spacing: -.01em;
}

.security-note svg {
    width: 15px;
    fill: none;
    stroke: var(--green);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
}

.copyright {
    position: absolute;
    bottom: 25px;
    margin: 0;
    color: rgba(255,255,255,.22);
    font-size: 8px;
    letter-spacing: .16em;
}

.dashboard-panel {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255,255,255,.025);
}

.dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
}

.logout-button {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 14px;
    background: transparent;
    color: var(--white);
    cursor: pointer;
    font-size: 12px;
}

.session-info {
    display: grid;
    grid-template-columns: 90px 1fr;
    margin: 28px 0 0;
    padding: 17px;
    border: 1px solid rgba(15,125,87,.25);
    border-radius: 8px;
    background: rgba(15,125,87,.07);
}

.session-info dt {
    color: var(--green-bright);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .12em;
}

.session-info dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: rgba(255,255,255,.8);
    font-size: 12px;
}

@keyframes pulse {
    0%, 100% { opacity: .45; transform: scale(.85); }
    50% { opacity: 1; transform: scale(1.1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
}

@media (max-width: 1100px) {
    .admin-shell {
        grid-template-columns: minmax(430px, .9fr) minmax(400px, 1.1fr);
    }

    .brand-stage {
        padding-left: 48px;
    }

    .brand-logo {
        width: 82%;
    }

    .character-scene {
        width: 110%;
    }

    .character-walk {
        right: 45%;
    }
}

@media (max-width: 820px) {
    .admin-shell {
        display: block;
        min-height: 100svh;
    }

    .brand-stage {
        position: absolute;
        inset: 0;
        min-height: 100%;
        padding: 0;
        opacity: .22;
    }

    .brand-stage::after,
    .brand-copy,
    .character-walk,
    .scene-caption {
        display: none;
    }

    .character-scene {
        right: -25%;
        bottom: -8%;
        width: 100%;
        height: 66%;
    }

    .character-console {
        right: 0;
        width: min(90%, 520px);
    }

    .access-stage {
        z-index: 2;
        min-height: 100svh;
        padding: 36px 24px 70px;
        background: linear-gradient(180deg, rgba(11,11,11,.75), rgba(11,11,11,.94));
    }

    .login-panel {
        width: min(100%, 440px);
        padding: 28px;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: rgba(11, 11, 11, .78);
        box-shadow: 0 24px 70px rgba(0,0,0,.48);
        backdrop-filter: blur(18px);
    }

    .mobile-brand {
        display: block;
        margin-bottom: 36px;
    }

    .mobile-brand img {
        width: 180px;
        height: auto;
    }

    .copyright {
        bottom: 22px;
    }
}

@media (max-width: 480px) {
    .access-stage {
        align-items: center;
        padding: 22px 16px 62px;
    }

    .login-panel {
        padding: 25px 21px;
    }

    .mobile-brand {
        margin-bottom: 29px;
    }

    .mobile-brand img {
        width: 154px;
    }

    .panel-heading {
        margin-bottom: 30px;
    }

    .panel-heading h1 {
        font-size: 30px;
    }

    .input-wrap input {
        height: 53px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* Authenticated workspace */
/* 세션 확인이 끝나기 전에는 로그인 패널과 대시보드를 모두 가린다. 전체 페이지 이동마다 로그인 화면이
   약 0.1초 깜빡이던 문제(2026-09-28)를 막는다. admin.js가 결과를 정하면 클래스를 지운다. */
.admin-shell.session-pending > * {
    visibility: hidden;
}

.admin-shell.dashboard-mode {
    display: block;
    overflow: visible;
}

.dashboard-mode .brand-stage,
.dashboard-mode .copyright {
    display: none;
}

.dashboard-mode .ambient {
    display: none;
}

.dashboard-mode .access-stage {
    display: block;
    min-height: 100vh;
    padding: 0;
}

.dashboard-panel {
    position: relative;
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    width: 100%;
    min-height: 100vh;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #0b0b0b;
}

.dashboard-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    height: 100vh;
    flex-direction: column;
    padding: 34px 22px 22px;
    border-right: 1px solid var(--line);
    background: #0e100f;
}

.sidebar-logo {
    width: 164px;
    height: auto;
    margin: 0 10px 48px;
}

.nav-label {
    margin: 0 12px 12px;
    color: #48504c;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .18em;
}

.nav-item {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 13px 14px;
    background: transparent;
    color: #8c9691;
    cursor: pointer;
    font-size: 13px;
    font-weight: 650;
    text-align: left;
}

.nav-item.active {
    border-color: rgba(15,125,87,.3);
    background: linear-gradient(90deg, rgba(15,125,87,.18), rgba(15,125,87,.05));
    color: #fff;
    box-shadow: inset 3px 0 var(--green);
}

.nav-item svg,
.sidebar-profile svg,
.primary-action svg,
.search-box svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
}

.sidebar-profile {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 40px;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 15px 8px 0;
    border-top: 1px solid var(--line);
}

.profile-avatar {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(36,185,129,.35);
    border-radius: 10px;
    background: rgba(15,125,87,.14);
    color: var(--green-bright);
    font-size: 13px;
    font-weight: 800;
}

.sidebar-profile strong,
.sidebar-profile span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-profile strong { color: #dce2df; font-size: 11px; }
.sidebar-profile > div { min-width: 0; }
.sidebar-profile span { margin-top: 3px; color: #5b645f; font-size: 8px; }
.sidebar-profile button { border: 0; padding: 6px; background: transparent; color: #66706b; cursor: pointer; }
.sidebar-profile button:hover { color: var(--green-bright); }

.dashboard-content {
    width: 100%;
    max-width: 1540px;
    margin: 0 auto;
    padding: 48px clamp(34px, 5vw, 76px) 70px;
}

.dashboard-topbar {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
}

.dashboard-topbar h1 {
    margin: 10px 0 7px;
    font-size: clamp(30px, 3.2vw, 44px);
    letter-spacing: -.055em;
}

.dashboard-topbar p,
.data-toolbar p {
    margin: 0;
    color: #66706b;
    font-size: 12px;
}

.home-view { display: grid; align-content: start; gap: 34px; }
.home-hero {
    position: relative;
    display: flex;
    min-height: 164px;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(36,185,129,.2);
    border-radius: 18px;
    padding: 28px clamp(28px, 5vw, 50px);
    background:
        radial-gradient(circle at 82% 42%, rgba(36,185,129,.2), transparent 27%),
        linear-gradient(125deg, rgba(15,125,87,.16), rgba(255,255,255,.018) 54%), #101311;
}
.home-hero::after { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px); background-size: 32px 32px; content: ""; mask-image: linear-gradient(90deg, transparent 30%, #000); }
.home-hero > div { position: relative; z-index: 2; max-width: calc(100% - 180px); }
.home-hero h1 { margin: 13px 0 12px; font-size: clamp(31px, 4vw, 50px); letter-spacing: -.06em; }
.home-hero p { margin: 0; color: rgba(255,255,255,.82); font-size: 15px; line-height: 1.8; }
.home-hero > img { position: absolute; z-index: 1; right: clamp(18px, 4vw, 56px); bottom: -58px; width: 190px; height: 190px; object-fit: contain; filter: drop-shadow(0 20px 28px rgba(0,0,0,.48)); animation: float 6.5s ease-in-out infinite; }
.section-heading h2 { margin: 10px 0 0; font-size: 26px; letter-spacing: -.04em; }
.quick-menu-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 18px; }
.quick-menu-card { position: relative; display: grid; min-height: 150px; grid-template-columns: 52px minmax(0, 1fr) 24px; align-items: start; gap: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; padding: 30px; background: linear-gradient(135deg, rgba(255,255,255,.045), rgba(255,255,255,.014)); color: #fff; cursor: pointer; text-align: left; transition: border-color .2s, transform .2s, background .2s; }
.quick-menu-card:hover { border-color: rgba(36,185,129,.38); background: rgba(15,125,87,.08); transform: translateY(-3px); }
.quick-menu-card.featured { border-color: rgba(36,185,129,.24); background: linear-gradient(135deg, rgba(15,125,87,.17), rgba(255,255,255,.018)); }
.quick-menu-icon { display: grid; width: 52px; height: 52px; place-items: center; border: 1px solid rgba(36,185,129,.32); border-radius: 13px; background: rgba(15,125,87,.16); color: #55d9a7; }
.quick-menu-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.quick-menu-card small, .quick-menu-card strong, .quick-menu-card em { display: block; }
.quick-menu-card small { color: #58dcaa; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.quick-menu-card strong { margin-top: 10px; color: #fff; font-size: 20px; }
.quick-menu-card em { margin-top: 11px; color: rgba(255,255,255,.82); font-size: 13px; font-style: normal; line-height: 1.65; }
.quick-menu-card b { align-self: center; color: rgba(255,255,255,.78); font-size: 23px; font-weight: 400; }
.home-guide { position: relative; display: flex; min-height: 88px; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; padding: 20px 130px 20px 24px; background: rgba(255,255,255,.018); }
.home-guide > div { display: grid; grid-template-columns: 10px 1fr; align-items: center; column-gap: 10px; }
.home-guide .status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-bright); box-shadow: 0 0 12px rgba(36,185,129,.8); }
.home-guide strong { color: #cbd2ce; font-size: 12px; }
.home-guide p { grid-column: 2; margin: 6px 0 0; color: #626b66; font-size: 9px; }
.home-guide > img { position: absolute; right: 18px; bottom: -58px; width: 126px; height: 126px; object-fit: contain; }

.primary-action,
.secondary-action,
.danger-action {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    padding: 0 17px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: transform .18s, background .18s, opacity .18s;
}

.primary-action { border: 1px solid rgba(255,255,255,.08); background: var(--green); color: #fff; box-shadow: 0 10px 26px rgba(15,125,87,.17); }
.primary-action:hover { background: #119466; transform: translateY(-1px); }
.primary-action.wide { width: 100%; margin-top: 20px; }
.secondary-action { border: 1px solid var(--line); background: rgba(255,255,255,.04); color: #c1c8c4; }
.danger-action { border: 1px solid rgba(218,78,78,.35); background: rgba(160,40,40,.14); color: #ff9696; }
.primary-action:disabled, .secondary-action:disabled { cursor: wait; opacity: .55; transform: none; }

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 38px 0 22px;
}

.summary-grid article {
    position: relative;
    overflow: hidden;
    min-height: 118px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 22px;
    background: linear-gradient(135deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
}

.summary-grid article::after {
    position: absolute;
    right: -35px;
    bottom: -55px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(15,125,87,.09);
    content: "";
}

.summary-grid span { display: block; color: #747d78; font-size: 11px; }
.summary-grid strong { display: block; margin-top: 13px; font-size: 29px; letter-spacing: -.04em; }
.summary-grid i { position: absolute; top: 22px; right: 20px; color: rgba(36,185,129,.42); font-size: 8px; font-style: normal; letter-spacing: .15em; }

.data-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255,255,255,.018);
}

.data-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--line);
}

.data-toolbar h2 { margin: 0 0 6px; font-size: 15px; }

.toolbar-filters { display: flex; align-items: end; gap: 10px; }
.context-filter { display: grid; gap: 6px; color: #aeb7b2; font-size: 9px; font-weight: 700; }
.context-filter select { min-width: 126px; height: 39px; border: 1px solid var(--line); border-radius: 8px; outline: 0; padding: 0 32px 0 12px; background: #0d0f0e; color: #fff; font-size: 11px; }
.context-filter select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(15,125,87,.1); }
.search-box { position: relative; display: block; width: min(280px, 36vw); }
.search-box svg { position: absolute; top: 50%; left: 13px; width: 15px; transform: translateY(-50%); color: #56605b; }
.search-box input { width: 100%; height: 39px; border: 1px solid var(--line); border-radius: 8px; outline: 0; padding: 0 13px 0 39px; background: #0d0f0e; color: #fff; font-size: 11px; }
.search-box input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(15,125,87,.1); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { height: 43px; padding: 0 18px; background: rgba(255,255,255,.018); color: #59615d; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-align: left; white-space: nowrap; }
td { min-height: 68px; padding: 15px 18px; border-top: 1px solid rgba(255,255,255,.06); color: #aab2ae; font-size: 11px; }
tbody tr { cursor: pointer; transition: background .15s; }
tbody tr:hover { background: rgba(15,125,87,.045); }
.member-table-row:hover { background: rgba(15,125,87,.1); box-shadow: inset 3px 0 #0f7d57; }
.member-table-row:focus-visible { outline: 2px solid #0f7d57; outline-offset: -2px; background: rgba(15,125,87,.12); }
.muted-row { opacity: .53; }
.term-identity { display: flex; align-items: center; gap: 11px; min-width: 190px; }
.term-mark { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(15,125,87,.28); border-radius: 9px; background: rgba(15,125,87,.09); color: var(--green-bright); font-weight: 800; }
.term-identity strong, .term-identity code { display: block; }
.term-identity strong { margin-bottom: 4px; color: #e4e9e6; font-size: 12px; }
.term-identity code { color: #59625d; font-family: ui-monospace, monospace; font-size: 8px; }
.type-badge, .status-badge { display: inline-flex; align-items: center; border-radius: 20px; padding: 5px 9px; font-size: 9px; font-weight: 700; }
.type-badge.required { background: rgba(15,125,87,.12); color: var(--green-bright); }
.type-badge.optional { background: rgba(255,255,255,.05); color: #7a837f; }
.status-badge.active { border: 1px solid rgba(36,185,129,.2); color: #69d9ae; }
.status-badge.inactive { border: 1px solid rgba(255,255,255,.1); color: #737b77; }
.status-badge::before { width: 5px; height: 5px; margin-right: 6px; border-radius: 50%; background: currentColor; content: ""; }
.active-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.active-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.active-toggle-control { position: relative; width: 34px; height: 19px; border-radius: 20px; background: #303633; transition: background .2s, opacity .2s; }
.active-toggle-control::after { position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #8b9490; content: ""; transition: transform .2s, background .2s; }
.active-toggle input:checked + .active-toggle-control { background: var(--green); }
.active-toggle input:checked + .active-toggle-control::after { background: #fff; transform: translateX(15px); }
.active-toggle input:focus-visible + .active-toggle-control { outline: 2px solid var(--green-bright); outline-offset: 3px; }
.active-toggle input:disabled + .active-toggle-control { opacity: .45; }
.active-toggle-label { min-width: 28px; color: #d5dcd8; font-size: 9px; font-weight: 700; }
.order-cell { font-family: ui-monospace, monospace; }
.actions-cell { text-align: right; white-space: nowrap; }
.table-action { border: 0; padding: 6px 7px; background: transparent; color: #7d8782; cursor: pointer; font-size: 9px; }
.table-action:hover { color: var(--green-bright); }
.danger-text { color: #9d6262; }
.table-state { display: grid; min-height: 230px; place-items: center; align-content: center; color: #606964; text-align: center; }
.table-state strong { color: #b7bfbb; font-size: 13px; }
.table-state p { margin: 8px 0; font-size: 10px; }
.spinner { width: 24px; height: 24px; border: 2px solid rgba(255,255,255,.08); border-top-color: var(--green-bright); border-radius: 50%; animation: spin .8s linear infinite; }

.version-drawer {
    position: fixed;
    z-index: 30;
    top: 0;
    right: 0;
    width: min(440px, 94vw);
    height: 100vh;
    overflow-y: auto;
    border-left: 1px solid rgba(36,185,129,.2);
    padding: 30px;
    background: #101311;
    box-shadow: -30px 0 80px rgba(0,0,0,.48);
    opacity: 0;
    transform: translateX(100%);
    transition: transform .24s ease, opacity .24s;
}
.version-drawer.open { opacity: 1; transform: translateX(0); }
.version-drawer > header { display: flex; align-items: start; justify-content: space-between; }
.version-drawer h2 { margin: 8px 0 0; font-size: 24px; letter-spacing: -.045em; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: #828b86; cursor: pointer; font-size: 20px; }
.selected-term-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 28px; padding: 17px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025); }
.selected-term-summary strong { width: 100%; font-size: 13px; }
.selected-term-summary code { color: #5f6863; font-size: 9px; }
.versions-list { display: grid; gap: 12px; margin-top: 26px; }
.version-card { border: 1px solid var(--line); border-radius: 11px; padding: 17px; background: rgba(255,255,255,.02); }
.version-card.active { border-color: rgba(36,185,129,.38); }
.version-card.scheduled { border-color: rgba(212,168,87,.35); }
.version-card.expired { border-color: rgba(255,255,255,.09); opacity: .62; }
.version-card-top { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.version-card-top strong, .version-status { display: block; }
.version-card-top strong { margin-top: 6px; font-size: 13px; }
.version-status { color: var(--green-bright); font-size: 7px; font-weight: 800; letter-spacing: .13em; }
.version-card.draft .version-status { color: #d4a857; }
.version-card.scheduled .version-status { color: #e2bc72; }
.version-card.expired .version-status { color: #8b9490; }
.version-card time { color: #67706b; font-size: 8px; }
.version-card dl { display: grid; grid-template-columns: 72px 1fr; gap: 7px; margin: 17px 0; padding: 13px 0; border-top: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06); }
.version-card dt { color: #59615d; font-size: 8px; }
.version-card dd { overflow: hidden; margin: 0; color: #87908b; font-size: 8px; text-overflow: ellipsis; }
.version-card footer { text-align: right; }
.table-action.publish { color: var(--green-bright); }
.locked-copy { color: #555e59; font-size: 8px; }
.version-empty { padding: 32px 15px; color: #626b66; font-size: 10px; text-align: center; }
.version-empty strong { display: block; margin-bottom: 7px; color: #a5ada9; font-size: 12px; }

.modal-backdrop { position: fixed; z-index: 80; inset: 0; background: rgba(0,0,0,.72); opacity: 0; backdrop-filter: blur(5px); transition: opacity .18s; }
.modal-backdrop.visible { opacity: 1; }
.modal { position: fixed; z-index: 90; top: 50%; left: 50%; width: min(540px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow-y: auto; border: 1px solid rgba(36,185,129,.22); border-radius: 15px; padding: 28px; background: #111412; box-shadow: 0 32px 100px rgba(0,0,0,.7); opacity: 0; transform: translate(-50%, -47%) scale(.98); transition: opacity .18s, transform .18s; }
.modal.visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.modal > header { display: flex; align-items: start; justify-content: space-between; margin-bottom: 26px; }
.modal h2 { margin: 8px 0 0; font-size: 22px; letter-spacing: -.045em; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 19px 15px; }
.form-grid label { display: grid; gap: 8px; color: #aab2ae; font-size: 10px; font-weight: 650; }
.form-grid label.full { grid-column: 1 / -1; }
.form-grid input:not([type="checkbox"]), .form-grid select { width: 100%; height: 45px; border: 1px solid var(--line); border-radius: 8px; outline: 0; padding: 0 13px; background: #0b0d0c; color: #fff; font-size: 11px; }
.form-grid input:focus, .form-grid select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(15,125,87,.1); }
.form-grid input:disabled { color: #626a66; cursor: not-allowed; }
.form-grid small { color: #515955; font-size: 8px; font-weight: 400; }
.toggle-field { display: flex !important; align-items: center; align-self: end; min-height: 45px; grid-template-columns: auto auto !important; }
.toggle-field input { position: absolute; opacity: 0; }
.toggle { position: relative; width: 34px; height: 19px; border-radius: 20px; background: #303633; transition: background .2s; }
.toggle::after { position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #9ba39f; content: ""; transition: transform .2s, background .2s; }
.toggle-field input:checked + .toggle { background: var(--green); }
.toggle-field input:checked + .toggle::after { background: #fff; transform: translateX(15px); }
.modal form > footer, .confirm-modal footer { display: flex; justify-content: flex-end; gap: 9px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.file-field input { position: absolute; width: 1px !important; height: 1px !important; opacity: 0; }
.file-drop { display: grid; min-height: 130px; place-items: center; align-content: center; border: 1px dashed rgba(15,125,87,.45); border-radius: 10px; background: rgba(15,125,87,.045); cursor: pointer; text-align: center; }
.file-drop strong { color: #cbd2ce; font-size: 12px; }
.file-drop small { margin: 7px 0 12px; }
.file-drop em { max-width: 90%; overflow: hidden; color: var(--green-bright); font-size: 9px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.upload-progress { margin-top: 18px; }
.upload-progress > span { display: block; height: 3px; overflow: hidden; border-radius: 3px; background: rgba(255,255,255,.06); }
.upload-progress i { display: block; width: 35%; height: 100%; background: var(--green-bright); animation: progress 1.1s ease-in-out infinite alternate; }
.upload-progress p { color: #6c7570; font-size: 9px; text-align: center; }
.confirm-modal { width: min(400px, calc(100vw - 32px)); text-align: center; }
.confirm-icon { display: grid; width: 48px; height: 48px; place-items: center; margin: 0 auto 18px; border: 1px solid rgba(212,168,87,.3); border-radius: 50%; background: rgba(212,168,87,.08); color: #d4a857; font-size: 19px; font-weight: 800; }
.confirm-modal h2 { margin: 0; }
.confirm-modal > p { margin: 13px 0 0; color: #7c8580; font-size: 11px; line-height: 1.7; }
.confirm-modal footer { justify-content: center; }

.error-modal {
    display: grid;
    width: min(650px, calc(100vw - 32px));
    grid-template-columns: minmax(210px, .9fr) minmax(260px, 1.1fr);
    align-items: center;
    gap: 18px;
    overflow: hidden;
    padding: 0;
    border-color: rgba(15,125,87,.34);
    background:
        radial-gradient(circle at 18% 58%, rgba(15,125,87,.18), transparent 42%),
        #111412;
}

.error-character-stage {
    position: relative;
    align-self: stretch;
    min-height: 360px;
    overflow: hidden;
    border-right: 1px solid rgba(255,255,255,.07);
    background-image:
        linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
    background-size: 30px 30px;
}

.error-character-stage::after {
    position: absolute;
    right: 10%;
    bottom: 4%;
    left: 10%;
    height: 24px;
    border-radius: 50%;
    background: rgba(15,125,87,.24);
    filter: blur(14px);
    content: "";
}

.error-character-stage img {
    position: absolute;
    z-index: 2;
    right: -10px;
    bottom: -34px;
    width: 112%;
    height: 112%;
    object-fit: contain;
    filter: drop-shadow(0 20px 28px rgba(0,0,0,.48));
}

.error-signal {
    position: absolute;
    z-index: 3;
    top: 21px;
    left: 21px;
    display: inline-flex;
    align-items: center;
    color: var(--green-bright);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .17em;
}

.error-signal::before {
    width: 6px;
    height: 6px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--green-bright);
    box-shadow: 0 0 10px var(--green-bright);
    content: "";
    animation: pulse 1.5s infinite;
}

.error-modal-copy { padding: 38px 34px 22px 16px; }
.error-modal-copy h2 { margin: 13px 0 12px; font-size: 25px; line-height: 1.3; }
.error-modal-copy p { margin: 0; color: #89928d; font-size: 12px; line-height: 1.75; }
.error-modal-copy small { display: block; min-height: 14px; margin-top: 17px; color: #4e5752; font-family: ui-monospace, monospace; font-size: 7px; letter-spacing: .08em; }
.error-modal > footer { grid-column: 2; margin: -20px 34px 34px 16px; }
.error-modal > footer .primary-action { width: 100%; }

.toast-region { position: fixed; z-index: 120; top: 22px; right: 22px; display: grid; width: min(350px, calc(100vw - 32px)); gap: 10px; }
.toast { display: grid; grid-template-columns: 34px 1fr 24px; align-items: center; gap: 11px; border: 1px solid rgba(36,185,129,.25); border-radius: 11px; padding: 13px; background: rgba(16,20,18,.96); box-shadow: 0 18px 50px rgba(0,0,0,.42); opacity: 0; transform: translateX(24px); transition: opacity .22s, transform .22s; backdrop-filter: blur(12px); }
.toast.visible { opacity: 1; transform: translateX(0); }
.toast.error { border-color: rgba(255,100,100,.24); }
.toast-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; background: rgba(15,125,87,.15); color: var(--green-bright); font-weight: 800; }
.toast.error .toast-icon { background: rgba(180,50,50,.13); color: #ff9292; }
.toast strong { display: block; color: #dce2df; font-size: 10px; }
.toast p { margin: 4px 0 0; color: #737c77; font-size: 9px; line-height: 1.45; }
.toast button { border: 0; background: transparent; color: #59615d; cursor: pointer; font-size: 17px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.modal-open { overflow: hidden; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes progress { from { transform: translateX(-100%); } to { transform: translateX(285%); } }

@media (max-width: 900px) {
    .dashboard-panel { grid-template-columns: 74px minmax(0, 1fr); }
    .dashboard-sidebar { padding: 26px 12px 18px; }
    .sidebar-logo { width: 48px; height: 38px; margin: 0 auto 40px; object-fit: cover; object-position: left; }
    .nav-label, .nav-item span, .sidebar-profile > div:not(.profile-avatar) { display: none; }
    .nav-item { justify-content: center; padding: 13px; }
    .sidebar-profile { grid-template-columns: 1fr; justify-items: center; }
    .dashboard-content { padding: 38px 26px 60px; }
    .home-hero > img { right: 8px; }
}

@media (max-width: 650px) {
    .dashboard-panel { display: block; }
    .dashboard-sidebar { position: fixed; z-index: 25; top: auto; right: 0; bottom: 0; left: 0; display: grid; width: 100%; height: 64px; grid-template-columns: 52px 1fr 52px; align-items: center; padding: 8px 15px; border-top: 1px solid var(--line); border-right: 0; background: rgba(14,16,15,.96); backdrop-filter: blur(14px); }
    .sidebar-logo { width: 40px; height: 30px; margin: 0; }
    .dashboard-sidebar nav { justify-self: center; }
    .nav-item { width: auto; }
    .sidebar-profile { display: block; margin: 0; padding: 0; border: 0; }
    .profile-avatar, .sidebar-profile > div { display: none; }
    .sidebar-profile button { display: block; margin-left: auto; }
    .dashboard-content { padding: 28px 16px 100px; }
    .dashboard-topbar { align-items: start; }
    .dashboard-topbar p { display: none; }
    .home-view { gap: 24px; }
    .home-hero { min-height: 176px; align-items: center; padding: 24px; }
    .home-hero > div { max-width: calc(100% - 90px); }
    .home-hero > img { right: -30px; bottom: -45px; width: 140px; height: 140px; opacity: .72; }
    .quick-menu-card, .quick-menu-card.featured { min-height: 150px; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 24px 20px; }
    .quick-menu-card b { display: none; }
    .quick-menu-icon { width: 44px; height: 44px; }
    .quick-menu-card em { font-size: 12px; }
    .primary-action { padding: 0 13px; }
    .summary-grid { gap: 8px; margin-top: 26px; }
    .summary-grid article { min-height: 95px; padding: 15px; }
    .summary-grid strong { font-size: 24px; }
    .summary-grid i { display: none; }
    .data-toolbar { align-items: stretch; flex-direction: column; }
    .toolbar-filters { align-items: stretch; flex-direction: column; }
    .context-filter select { width: 100%; }
    .search-box { width: 100%; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid label.full { grid-column: auto; }
    .toggle-field { min-height: 30px; }
    .modal { padding: 22px 18px; }
    .error-modal { display: block; padding: 0; }
    .error-character-stage { min-height: 210px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.07); }
    .error-character-stage img { right: 50%; bottom: -48px; width: 230px; height: 230px; transform: translateX(50%); }
    .error-modal-copy { padding: 25px 22px 12px; text-align: center; }
    .error-modal-copy h2 { font-size: 21px; }
    .error-modal > footer { margin: 0; padding: 12px 22px 24px; }
}

/* Expanded operations workspace */
.sidebar-logo-button { display: block; margin: 0 0 40px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.sidebar-logo-button .sidebar-logo { margin: 0; transition: opacity .2s, transform .2s; }
.sidebar-logo-button:hover .sidebar-logo { opacity: .82; transform: translateY(-1px); }
.quick-menu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.quick-menu-card { min-width: 0; }
.member-toolbar .search-box { width: min(340px, 100%); }
.filter-row { display: flex; align-items: end; gap: 10px; margin: 0 0 20px; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.018); }
.filter-row label { display: grid; min-width: 135px; gap: 7px; }
.filter-row label > span { color: #dce2df; font-size: 10px; font-weight: 700; }
.filter-row select, .filter-row input { height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; background: #0c0f0d; color: #f4f7f5; outline: 0; }
.filter-row select:focus, .filter-row input:focus { border-color: var(--green-bright); }
.filter-row .grow { flex: 1; }
.compact { min-height: 40px; height: 40px; white-space: nowrap; }
.member-identity, #sub-admins-table-body td:first-child { display: grid; gap: 5px; }
.member-identity code, #sub-admins-table-body code { color: #77817b; font-size: 8px; }
.provider-list { display: flex; flex-wrap: wrap; gap: 5px; }
.provider-badge { padding: 5px 8px; border: 1px solid rgba(15,125,87,.25); border-radius: 20px; background: rgba(15,125,87,.08); color: #d8eee5; font-size: 8px; font-weight: 700; }
.provider-badge.provider-google { border-color: #4285f4; background: #fff; color: #1f1f1f; }
.provider-badge.provider-kakao { border-color: #fee500; background: #fee500; color: #191919; }
.provider-badge.provider-naver { border-color: #03c75a; background: #03c75a; color: #fff; }
.provider-badge.provider-apple { border-color: #d2d2d7; background: #f5f5f7; color: #111; }
.status-badge.warning { border-color: rgba(224,164,67,.28); background: rgba(224,164,67,.1); color: #f0c477; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 22px; }
.pagination button { border: 1px solid var(--line); border-radius: 8px; padding: 9px 13px; background: transparent; color: #e8ecea; cursor: pointer; }
.pagination button:disabled { opacity: .3; cursor: default; }
.pagination span { color: #aab2ae; font-size: 10px; font-weight: 700; }
.admin-tabs { display: flex; gap: 7px; margin: 28px 0 14px; border-bottom: 1px solid var(--line); }
.admin-tab { position: relative; padding: 13px 18px; border: 0; background: transparent; color: #818a85; cursor: pointer; font-size: 11px; font-weight: 700; }
.admin-tab.active { color: #fff; }
.admin-tab.active::after { position: absolute; right: 10px; bottom: -1px; left: 10px; height: 2px; background: var(--green-bright); content: ""; }
.admin-tab-panel { margin-top: 0; }
.member-detail-modal { width: min(720px, calc(100vw - 32px)); overflow: hidden; padding: 0; }
.member-detail-modal > header { margin: 0; padding: 26px 28px 18px; }
.member-detail-hero { position: relative; display: flex; min-height: 170px; align-items: center; overflow: hidden; padding: 25px 30px 25px 245px; border-block: 1px solid var(--line); background: radial-gradient(circle at 18% 90%, rgba(15,125,87,.24), transparent 42%), #0c100e; }
.member-detail-hero .member-inspector-character { position: absolute; bottom: -55px; left: 8px; width: 230px; height: 230px; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(0,0,0,.4)); }
.member-profile-summary { display: grid; justify-items: start; gap: 9px; }
.member-profile-name-row { display: flex; align-items: center; gap: 13px; }
.member-profile-avatar { width: 58px; height: 58px; flex: 0 0 58px; border: 2px solid rgba(255,255,255,.86); border-radius: 50%; object-fit: cover; background: #111a16; box-shadow: 0 0 0 4px rgba(15,125,87,.24), 0 12px 28px rgba(0,0,0,.3); }
.member-profile-avatar.fallback { display: grid; place-items: center; color: #fff; font-size: 22px; font-weight: 800; background: linear-gradient(145deg, #13936a, #0a4d39); }
.member-profile-avatar[hidden] { display: none; }
.member-detail-hero strong { color: #fff; font-size: 24px; letter-spacing: -.04em; }
.member-detail-hero code { color: #75817b; font-size: 9px; }
.member-detail-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 24px 28px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.detail-entry { min-width: 0; padding: 14px 16px; background: #111412; }
.detail-entry dt { margin-bottom: 6px; color: #87908b; font-size: 9px; }
.detail-entry dd { overflow-wrap: anywhere; margin: 0; color: #f2f5f3; font-size: 11px; font-weight: 600; }
.member-detail-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 0 28px 28px; }

@media (max-width: 1100px) {
    .quick-menu-grid { grid-template-columns: 1fr; }
    .filter-row { align-items: stretch; flex-wrap: wrap; }
    .filter-row label { flex: 1 1 150px; }
}

@media (max-width: 650px) {
    .sidebar-logo-button { margin: 0; }
    .dashboard-sidebar nav { display: flex; overflow-x: auto; }
    .nav-item { padding: 10px; }
    .filter-row { flex-direction: column; }
    .filter-row label, .filter-row .grow { width: 100%; }
    .member-detail-hero { min-height: 190px; padding: 28px 20px 28px 170px; }
    .member-detail-hero .member-inspector-character { left: -30px; width: 210px; height: 210px; }
    .member-profile-avatar { width: 48px; height: 48px; flex-basis: 48px; }
    .member-detail-hero strong { font-size: 19px; }
    .member-detail-content { grid-template-columns: 1fr; margin: 18px; }
    .member-detail-actions { padding: 0 18px 20px; }
    .admin-tabs { overflow-x: auto; }
}

/* Responsive workspace primitives */
button,
input,
select,
textarea { font: inherit; }

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--green-bright);
    outline-offset: 3px;
}

.mobile-dashboard-header,
.sidebar-backdrop { display: none; }

.table-wrap {
    position: relative;
    max-width: 100%;
    overscroll-behavior-x: contain;
    scrollbar-color: rgba(36,185,129,.5) rgba(255,255,255,.04);
    scrollbar-width: thin;
}

.table-wrap table { min-width: 720px; }
#members-table-wrap table { min-width: 980px; }
#audit-table-wrap table { min-width: 760px; }

@media (min-width: 721px) and (max-width: 1100px) {
    .quick-menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quick-menu-card:last-child { grid-column: 1 / -1; }
    .toolbar-filters { width: min(100%, 460px); }
    .toolbar-filters .search-box { flex: 1; width: auto; }
}

@media (max-width: 960px) {
    .admin-shell:not(.dashboard-mode) {
        display: block;
        overflow-y: auto;
    }

    .admin-shell:not(.dashboard-mode) .brand-stage { display: none; }
    .admin-shell:not(.dashboard-mode) .access-stage {
        width: 100%;
        min-height: 100dvh;
        padding: 42px 24px 70px;
    }
}

.nav-pending,
.pending-badge {
    margin-left: auto;
    border: 1px solid rgba(141, 245, 76, .32);
    border-radius: 999px;
    padding: 3px 7px;
    color: var(--green);
    background: rgba(141, 245, 76, .08);
    font-size: 10px;
    font-style: normal;
    white-space: nowrap;
}

.content-ops-tabs {
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

#content-ops-view .data-panel { padding: 20px; min-width: 0; }
#content-ops-view [hidden] { display: none !important; }
#content-ops-view input, #content-ops-view select, #content-ops-view textarea {
    max-width: 100%; min-width: 0; padding: 9px 11px; border: 1px solid var(--line, #333);
    border-radius: 8px; background: #161616; color: #eee; font: inherit;
}
#content-ops-view label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #aaa; }
#content-ops-view button { cursor: pointer; }
#content-ops-view button:disabled { opacity: .45; cursor: default; }
#content-ops-view table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
#content-ops-view th, #content-ops-view td { padding: 12px; border-bottom: 1px solid #303030; overflow-wrap: anywhere; }
#content-ops-view th { color: #aaa; white-space: nowrap; }
#content-ops-view pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow: auto; }
#content-ops-view .content-filters, #content-ops-view .review-controls, #content-ops-view .content-toolbar {
    display: flex; flex-direction: row; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 18px;
}
.content-table-wrap, .content-ops-review-list { overflow-x: auto; max-width: 100%; }
#content-ops-view .content-table-wrap table, #content-ops-view .content-ops-review-list table { min-width: 700px; }
.content-pagination, .content-ops-review-pager, .content-ops-review-actions { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.content-feedback { min-height: 24px; color: #aaa; overflow-wrap: anywhere; }
.content-detail, .content-ops-review-detail { margin-top: 24px; padding: 20px; background: #191919; border: 1px solid #383838; border-radius: 12px; }
.content-facts, .content-ops-review-fields { display: grid; grid-template-columns: minmax(80px, 140px) minmax(0, 1fr); gap: 10px; font-size: 13px; }
.content-facts dt, .content-ops-review-fields dt { color: #999; }
.content-facts dd, .content-ops-review-fields dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.content-plot-card { padding: 16px; margin-block: 12px; border-left: 3px solid #33dba0; background: #202020; }
#content-ops-view details { margin-top: 18px; }
#content-ops-view summary { cursor: pointer; }
@media (max-width: 720px) {
    #content-ops-view .data-panel { padding: 12px; }
    #content-ops-view .content-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #content-ops-view .content-filters > label { min-width: 0; }
    .content-detail, .content-ops-review-detail { padding: 12px; }
}
@media (max-width: 520px) {
    #content-ops-view .content-filters { grid-template-columns: minmax(0, 1fr); }
}

.content-ops-tabs .admin-tab {
    flex: 0 0 auto;
}

.content-ops-state {
    min-height: 220px;
    display: grid;
    place-content: center;
    gap: 8px;
    text-align: center;
    color: var(--muted);
}

.content-ops-state strong {
    color: var(--white);
    font-size: 20px;
}

.content-ops-state[data-state="error"] strong,
.content-ops-state[data-state="error"] small {
    color: #ff7c87;
}

@media (max-width: 720px) {
    .dashboard-mode .access-stage,
    .dashboard-panel { min-height: 100dvh; }

    .dashboard-panel {
        display: block;
        padding-top: calc(64px + env(safe-area-inset-top));
    }

    .mobile-dashboard-header {
        position: fixed;
        z-index: 45;
        top: 0;
        right: 0;
        left: 0;
        display: grid;
        height: calc(64px + env(safe-area-inset-top));
        grid-template-columns: 48px minmax(0, 1fr) 48px;
        align-items: end;
        padding: env(safe-area-inset-top) 14px 8px;
        border-bottom: 1px solid var(--line);
        background: rgba(11,13,12,.94);
        backdrop-filter: blur(18px);
    }

    .mobile-menu-button,
    .mobile-logout-button,
    .mobile-home-button {
        display: grid;
        width: 48px;
        height: 48px;
        place-items: center;
        border: 0;
        border-radius: 11px;
        background: transparent;
        color: #b9c2bd;
        cursor: pointer;
    }

    .mobile-home-button { width: min(172px, 100%); justify-self: center; }
    .mobile-home-button img { display: block; width: min(148px, 100%); height: auto; }
    .mobile-menu-button svg,
    .mobile-logout-button svg { width: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.7; }

    .sidebar-backdrop {
        position: fixed;
        z-index: 46;
        inset: 0;
        display: block;
        width: 100%;
        border: 0;
        background: rgba(0,0,0,.66);
        backdrop-filter: blur(3px);
    }

    .sidebar-backdrop[hidden] { display: none; }

    .dashboard-sidebar {
        position: fixed;
        z-index: 47;
        top: 0;
        right: auto;
        bottom: 0;
        left: 0;
        display: flex;
        width: min(320px, calc(100vw - 42px));
        height: 100dvh;
        padding: calc(28px + env(safe-area-inset-top)) 18px calc(20px + env(safe-area-inset-bottom));
        border-top: 0;
        border-right: 1px solid rgba(36,185,129,.22);
        background: #0e110f;
        box-shadow: 28px 0 80px rgba(0,0,0,.55);
        transform: translateX(-105%);
        transition: transform .24s ease;
    }

    .dashboard-sidebar.mobile-open { transform: translateX(0); }
    .dashboard-sidebar .sidebar-logo-button { margin: 0 0 26px; }
    .dashboard-sidebar .sidebar-logo { width: 166px; margin: 0 8px; }
    .dashboard-sidebar nav { display: grid; overflow: visible; width: 100%; gap: 3px; }
    .dashboard-sidebar .nav-label { display: block; }
    .dashboard-sidebar .nav-item { width: 100%; min-height: 48px; padding: 12px 14px; }
    .dashboard-sidebar .nav-item span { display: block; }
    .dashboard-sidebar .sidebar-profile { display: grid; }
    .mobile-navigation-open { overflow: hidden; }

    .dashboard-content { padding: 28px 16px calc(44px + env(safe-area-inset-bottom)); }
    .dashboard-topbar { align-items: flex-start; }
    .dashboard-topbar h1 { font-size: clamp(29px, 10vw, 38px); }
    .dashboard-topbar p { max-width: 34rem; line-height: 1.65; }

    .home-view { gap: 24px; }
    .home-hero { min-height: 210px; align-items: flex-start; padding: 26px 22px; }
    .home-hero > div { max-width: calc(100% - 72px); }
    .home-hero h1 { font-size: clamp(27px, 8.5vw, 36px); line-height: 1.12; }
    .home-hero p { font-size: 12px; line-height: 1.65; }
    .home-hero > img { right: -24px; bottom: -46px; width: 150px; height: 150px; opacity: .88; }
    .section-heading h2 { font-size: 22px; }
    .quick-menu-grid { grid-template-columns: 1fr; gap: 11px; }
    .quick-menu-card { min-height: 0; grid-template-columns: 44px minmax(0, 1fr) 18px; gap: 14px; padding: 20px 18px; }
    .quick-menu-icon { width: 44px; height: 44px; }
    .quick-menu-card strong { margin-top: 6px; font-size: 17px; }
    .quick-menu-card em { margin-top: 7px; font-size: 11px; }
    .home-guide { padding: 18px 86px 18px 18px; }
    .home-guide > img { right: -4px; width: 100px; height: 100px; }

    .summary-grid {
        grid-template-columns: repeat(3, minmax(112px, 1fr));
        overflow-x: auto;
        margin: 24px -16px 16px;
        padding: 0 16px 8px;
        scroll-snap-type: x proximity;
        overscroll-behavior-x: contain;
    }
    .summary-grid article { min-height: 98px; scroll-snap-align: start; }

    .data-panel { overflow: visible; border-radius: 12px; }
    .data-toolbar { padding: 18px; }
    .toolbar-filters { display: grid; width: 100%; grid-template-columns: 1fr; }
    .context-filter,
    .context-filter select,
    .search-box,
    .member-toolbar .search-box { width: 100%; min-width: 0; }
    .filter-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; }
    .filter-row label,
    .filter-row .grow { width: auto; min-width: 0; }
    .filter-row .grow,
    .filter-row .primary-action,
    .filter-row .secondary-action { grid-column: 1 / -1; }
    .filter-row select,
    .filter-row input { width: 100%; min-width: 0; max-width: 100%; }
    .data-panel > .table-wrap { border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; background: #0d0f0e; }
    th, td { padding-inline: 14px; }
    .table-action { min-width: 44px; min-height: 44px; }
    .pagination { margin: 18px 0; }
    .pagination button { min-height: 44px; }
    .admin-tabs { margin-top: 22px; padding-bottom: 2px; white-space: nowrap; }
    .admin-tab { min-height: 44px; }

    .version-drawer {
        width: 100%;
        height: 100dvh;
        padding: calc(22px + env(safe-area-inset-top)) 18px calc(22px + env(safe-area-inset-bottom));
    }

    .modal {
        top: auto;
        right: 8px;
        bottom: max(8px, env(safe-area-inset-bottom));
        left: 8px;
        width: auto;
        max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom)));
        padding: 22px 18px;
        border-radius: 18px;
        transform: translateY(24px);
    }
    .modal.visible { transform: translateY(0); }
    .modal > header { position: sticky; z-index: 2; top: -22px; margin: -22px -18px 22px; padding: 22px 18px 14px; background: #111412; }
    .modal form > footer,
    .confirm-modal footer,
    .member-detail-actions { flex-wrap: wrap; }
    .modal form > footer button,
    .confirm-modal footer button,
    .member-detail-actions button { min-height: 44px; flex: 1 1 120px; }
    .icon-button { width: 44px; height: 44px; }

    .member-detail-modal,
    .error-modal { overflow-y: auto; }
    .error-modal { display: block; }
    .error-character-stage { min-height: 142px; border-right: 0; border-bottom: 1px solid var(--line); }
    .error-modal-copy { padding: 24px 20px 16px; }
    .error-modal > footer { margin: 0; padding: 0 20px 22px; }
    .member-detail-modal > header { top: 0; margin: 0; }
    .member-detail-hero { min-height: 220px; align-items: flex-end; padding: 100px 20px 24px; }
    .member-detail-hero .member-inspector-character { top: -36px; bottom: auto; left: -28px; width: 178px; height: 178px; opacity: .56; }
    .member-profile-summary { position: relative; z-index: 1; max-width: 100%; }
    .member-profile-name-row { max-width: 100%; flex-wrap: wrap; }
    .member-detail-hero strong,
    .member-detail-hero code { overflow-wrap: anywhere; }
    .member-detail-content { grid-template-columns: 1fr; margin: 16px; }
    .member-detail-actions { padding: 0 16px 18px; }
    .error-character-stage img { width: 150px; height: 150px; }

    .toast-region {
        top: calc(72px + env(safe-area-inset-top));
        right: 12px;
        left: 12px;
        width: auto;
    }
}

@media (max-width: 420px) {
    .filter-row { grid-template-columns: 1fr; }
    .filter-row > * { grid-column: 1 !important; }
    .home-hero > div { max-width: calc(100% - 42px); }
    .home-hero > img { right: -46px; opacity: .68; }
    .member-profile-name-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); }
    .member-detail-hero .status-badge { grid-column: 1 / -1; }
}

@media (max-height: 700px) and (min-width: 721px) {
    .admin-shell:not(.dashboard-mode) { overflow-y: auto; }
    .access-stage { padding-block: 34px 64px; }
    .copyright { position: static; margin-top: 22px; }
}

/* Keep the management page headings consistent at every viewport. */
.dashboard-content .dashboard-topbar { margin-bottom: 20px; align-items: center; }
.dashboard-content .dashboard-topbar h1,
.dashboard-content .home-hero h1 { font-size: 25px; line-height: 1.35; letter-spacing: -.04em; }
.dashboard-content .dashboard-topbar p { display: none; }
#logout-button, #mobile-logout-button {
    display: inline-grid; place-items: center; flex: 0 0 40px;
    width: 40px; height: 40px; padding: 8px; border-radius: 11px;
    border: 1px solid #ff4545; background: #e52232; color: #fff;
    box-shadow: 0 3px 12px #e5223226; cursor: pointer;
}
#logout-button:hover, #mobile-logout-button:hover { background: #ff3344; color: #fff; }
#logout-button:focus-visible, #mobile-logout-button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
#logout-button svg, #mobile-logout-button svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
