:root {
    --bg: #090909;
    --bg-soft: #121212;
    --panel: rgba(17, 17, 17, 0.92);
    --panel-strong: rgba(9, 9, 9, 0.96);
    --line: rgba(201, 160, 74, 0.22);
    --line-strong: rgba(201, 160, 74, 0.5);
    --text: #f7f1df;
    --muted: #b8ab8a;
    --gold: #c9a04a;
    --gold-strong: #f2cf79;
    --gold-dim: #866325;
    --danger: #ff8e7c;
    --success: #84d6ad;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }

html {
    background: var(--bg);
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Microsoft JhengHei", "PingFang TC", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(201, 160, 74, 0.18), transparent 26%),
        radial-gradient(circle at top right, rgba(201, 160, 74, 0.08), transparent 20%),
        linear-gradient(180deg, #060606 0%, #0b0b0b 36%, #111111 100%);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

code {
    font-family: Consolas, monospace;
    font-size: 0.94rem;
    color: var(--gold-strong);
}

.page-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.page-glow {
    position: absolute;
    width: 38rem;
    height: 38rem;
    border-radius: 999px;
    filter: blur(90px);
    opacity: 0.22;
}

.page-glow-left {
    top: -10rem;
    left: -14rem;
    background: rgba(201, 160, 74, 0.34);
}

.page-glow-right {
    right: -12rem;
    top: 20rem;
    background: rgba(242, 207, 121, 0.16);
}

.wrap {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
}

.app-layout {
    display: grid;
    grid-template-columns: 288px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 18px;
    border-right: 1px solid rgba(201, 160, 74, 0.14);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
        rgba(6, 6, 6, 0.9);
    backdrop-filter: blur(18px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    padding: 8px 8px 0;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(201, 160, 74, 0.35);
}

.brand-group {
    display: grid;
    gap: 4px;
}

.mobile-sidebar-bar {
    display: block;
}

.mobile-menu-toggle {
    display: none;
}

.mobile-menu-scrim {
    display: none;
}

.brand {
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.brand-tag {
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.sidebar-nav {
    display: grid;
    gap: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid transparent;
    color: var(--muted);
    transition: 180ms ease;
    background: rgba(255, 255, 255, 0.015);
}

.sidebar-link:hover,
.sidebar-link.active {
    color: var(--text);
    border-color: var(--line-strong);
    background: rgba(201, 160, 74, 0.08);
}

.sidebar-link-mark {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(201, 160, 74, 0.36);
    box-shadow: 0 0 14px rgba(201, 160, 74, 0.24);
}

.sidebar-link.active .sidebar-link-mark {
    background: var(--gold-strong);
}

.sidebar-card {
    padding: 18px;
    border: 1px solid rgba(201, 160, 74, 0.16);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.02);
}

.sidebar-subnav {
    display: grid;
    gap: 8px;
}

.sidebar-card .sidebar-subnav:first-child {
    margin-top: 0;
}

.sidebar-sublink {
    display: block;
    padding: 10px 12px;
    border-radius: 14px;
    color: var(--muted);
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.015);
    transition: 180ms ease;
}

.sidebar-sublink:hover {
    color: var(--text);
    border-color: rgba(201, 160, 74, 0.3);
    background: rgba(201, 160, 74, 0.07);
}

.sidebar-sublink.active {
    color: var(--text);
    border-color: rgba(201, 160, 74, 0.38);
    background: rgba(201, 160, 74, 0.1);
}

.sidebar-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(201, 160, 74, 0.1);
}

.sidebar-meta:last-child {
    border-bottom: 0;
}

.sidebar-meta span {
    color: var(--muted);
}

.sidebar-meta strong {
    color: var(--gold-strong);
    text-transform: capitalize;
}

.sidebar-note {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.sidebar-logout {
    margin-top: auto;
}

.sidebar-button {
    width: 100%;
}

.sidebar-menu-body {
    display: contents;
}

.content-area {
    min-width: 0;
}

.content-topbar {
    position: sticky;
    top: 0;
    z-index: 8;
    padding: 22px 28px 0;
    backdrop-filter: blur(14px);
    background: linear-gradient(180deg, rgba(9, 9, 9, 0.92), rgba(9, 9, 9, 0.45), transparent);
}

.topbar-label {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 0.74rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.topbar-title {
    display: block;
    font-size: 1.2rem;
    color: var(--text);
}

.content-shell {
    padding: 24px 28px 72px;
}

.inline-form {
    margin: 0;
}

.alert {
    padding: 14px 18px;
    border: 1px solid;
    border-radius: 18px;
    margin-bottom: 20px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.26);
}

.alert.success {
    color: var(--success);
    border-color: rgba(132, 214, 173, 0.28);
}

.alert.error {
    color: var(--danger);
    border-color: rgba(255, 142, 124, 0.28);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
    gap: 28px;
    align-items: stretch;
}

.hero-lux {
    min-height: 0;
}

.hero-copy,
.hero-side {
    position: relative;
    z-index: 1;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--gold-strong);
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

h1 {
    margin: 0 0 16px;
    font-size: clamp(2.6rem, 5vw, 4.8rem);
    line-height: 0.98;
    letter-spacing: -0.03em;
}

h2 {
    margin: 0;
    font-size: 1.18rem;
    letter-spacing: 0.01em;
}

.lead,
.page-subtitle {
    color: var(--muted);
    line-height: 1.8;
    font-size: 1.04rem;
    max-width: 62ch;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 26px;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.hero-badges span,
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(201, 160, 74, 0.24);
    background: rgba(201, 160, 74, 0.06);
    color: var(--gold-strong);
    font-size: 0.86rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    letter-spacing: 0.04em;
    transition: 180ms ease;
}

.primary {
    color: #120e06;
    background: linear-gradient(135deg, var(--gold-strong), var(--gold));
    box-shadow: 0 12px 30px rgba(201, 160, 74, 0.26);
}

.primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.secondary {
    color: var(--text);
    border-color: rgba(201, 160, 74, 0.34);
    background: rgba(201, 160, 74, 0.05);
}

.secondary:hover {
    background: rgba(201, 160, 74, 0.12);
}

.card,
.panel,
.stat-card,
.feature-panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
        var(--panel);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.card,
.panel,
.feature-panel {
    padding: 24px;
}

.luxe-card {
    background:
        linear-gradient(180deg, rgba(242, 207, 121, 0.035), rgba(255, 255, 255, 0)),
        var(--panel);
}

.feature-panel-main {
    padding: 30px;
    min-height: 0;
    background:
        radial-gradient(circle at top right, rgba(201, 160, 74, 0.14), transparent 40%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
        var(--panel-strong);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.bulletin-board,
.bulletin-card {
    overflow: hidden;
}

.bulletin-copy {
    color: var(--text);
    line-height: 1.9;
    font-size: 1rem;
    white-space: normal;
    word-break: break-word;
}

.bulletin-board .bulletin-copy {
    margin-top: 12px;
    font-size: 1.02rem;
}

.home-bulletins .bulletin-card {
    min-height: 0;
    padding: 18px 20px;
    box-shadow: none;
}

.home-bulletins .bulletin-card .section-head {
    margin-bottom: 8px;
}

.home-bulletins .bulletin-card .section-head span,
.bulletin-board .section-head span {
    display: none;
}

.home-bulletins .bulletin-copy {
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.7;
}

/* Internal implementation notes are not part of the public-facing experience. */
.sidebar-context-card,
.auth-switch-copy {
    display: none;
}

.feature-label {
    color: var(--gold-strong);
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin: 0 0 10px;
}

.overview-grid,
.grid.two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.section-gap {
    margin-top: 20px;
}

.section-gap-sm {
    margin-bottom: 18px;
}

.section-gap-lg {
    margin-top: 30px;
}

.page-header {
    margin-bottom: 22px;
}

.page-header-lux {
    padding: 10px 0 6px;
}

.page-header-lux .eyebrow {
    display: none;
}

.member-page-title,
.page-header-lux h1 {
    margin: 0;
    font-size: clamp(2rem, 3.2vw, 3.1rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    font-weight: 800;
}

.member-marquee {
    margin-bottom: 18px;
    border: 1px solid rgba(201, 160, 74, 0.18);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(201, 160, 74, 0.08);
}

.member-marquee-track {
    display: flex;
    gap: 48px;
    width: max-content;
    min-width: 100%;
    padding: 12px 0;
    color: var(--gold-strong);
    white-space: nowrap;
    animation: marquee-scroll 22s linear infinite;
}

.member-marquee-track span {
    display: inline-flex;
    align-items: center;
    padding-left: 24px;
    font-weight: 700;
}

.single-panel {
    max-width: 1080px;
}

.favorite-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.favorite-services > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    list-style: none;
}

.favorite-services > summary::-webkit-details-marker {
    display: none;
}

.favorite-services-summary strong,
.favorite-services-summary small {
    display: block;
}

.favorite-services-summary strong {
    font-size: 1.06rem;
}

.favorite-services-summary small {
    margin-top: 4px;
    color: var(--muted);
}

.favorite-services-toggle {
    color: var(--gold-strong);
    font-size: 0.88rem;
    white-space: nowrap;
}

.favorite-services[open] .favorite-services-toggle {
    font-size: 0;
}

.favorite-services[open] .favorite-services-toggle::after {
    content: '收起';
    font-size: 0.88rem;
}

.favorite-services .favorite-grid {
    margin-top: 16px;
}

.service-directory-panel .service-directory {
    margin-top: 16px;
}

.favorite-card {
    display: block;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(201, 160, 74, 0.18);
    background: rgba(255, 255, 255, 0.02);
    transition: 180ms ease;
}

.favorite-card:hover {
    border-color: rgba(201, 160, 74, 0.38);
    background: rgba(201, 160, 74, 0.06);
}

.favorite-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.favorite-card h3 {
    margin: 0;
    font-size: 1rem;
}

.favorite-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    color: var(--gold-strong);
    font-size: 0.88rem;
}

.favorite-card-link {
    display: inline-flex;
    margin-top: 14px;
    color: var(--gold-strong);
    font-weight: 700;
}

.service-favorite-list {
    display: grid;
    gap: 12px;
}

.service-favorite-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid rgba(201, 160, 74, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.015);
}

.service-favorite-copy {
    display: grid;
    gap: 6px;
}

.service-favorite-copy strong {
    color: var(--text);
}

.service-favorite-copy span {
    color: var(--muted);
    font-size: 0.92rem;
}

.service-favorite-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.favorite-form {
    margin: 0;
}

.member-admin-actions {
    display: grid;
    gap: 10px;
    min-width: 280px;
}

.member-admin-form {
    display: grid;
    grid-template-columns: minmax(0, 110px) minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.member-admin-form:last-child {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.member-admin-form input {
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.88rem;
}

.mini-link {
    color: var(--gold-strong);
    font-size: 0.92rem;
}

.favorite-toggle {
    min-width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(201, 160, 74, 0.22);
    background: rgba(255, 255, 255, 0.03);
    color: var(--gold-strong);
    font-size: 1.2rem;
    cursor: pointer;
}

.favorite-toggle:disabled {
    opacity: 0.66;
    cursor: wait;
}

.favorite-toggle.active {
    background: rgba(201, 160, 74, 0.12);
    border-color: rgba(201, 160, 74, 0.42);
    box-shadow: 0 0 0 4px rgba(201, 160, 74, 0.08);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    padding: 24px;
}

.stat-card span {
    display: block;
    color: var(--muted);
    margin-bottom: 14px;
    letter-spacing: 0.04em;
}

.stat-card strong {
    font-size: 2.4rem;
    color: var(--gold-strong);
}

.auth-card {
    max-width: 540px;
    margin: 0 auto;
}

.line-register-card {
    width: min(100%, 560px);
}

.line-register-card h1 {
    margin-bottom: 10px;
}

.line-register-terms {
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    color: var(--muted);
    font-weight: 500;
    line-height: 1.5;
}

.line-register-terms input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--gold);
}

.line-register-security {
    margin: 16px 0 0;
    color: var(--success);
    font-size: 0.86rem;
    line-height: 1.5;
}

.login-announcement-open {
    overflow: hidden;
}

.login-announcement-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-announcement-modal[hidden] {
    display: none;
}

.login-announcement-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
}

.login-announcement-panel {
    position: relative;
    width: min(520px, 100%);
    max-height: min(78vh, 620px);
    overflow: auto;
    padding: 30px;
    border: 1px solid var(--line-strong);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(242, 207, 121, 0.08), rgba(255, 255, 255, 0)),
        var(--panel-strong);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.62);
}

.login-announcement-panel h2 {
    margin: 6px 42px 14px 0;
    font-size: clamp(1.55rem, 4vw, 2.2rem);
}

.login-announcement-content {
    color: var(--muted);
    line-height: 1.85;
    font-size: 1rem;
}

.login-announcement-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--gold-strong);
    background: rgba(255, 255, 255, 0.04);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.login-announcement-action {
    width: 100%;
    margin-top: 22px;
}

.form-grid {
    display: grid;
    gap: 16px;
}

.stack-form {
    display: grid;
    gap: 16px;
}

.form-grid label {
    display: grid;
    gap: 8px;
    font-weight: 700;
    color: var(--text);
}

.member-console {
    gap: 12px;
    color: #061629;
}

.member-toolbar,
.member-add-panel {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    width: max-content;
    max-width: 100%;
}

.member-add-panel {
    position: relative;
}

.member-add-panel > summary {
    list-style: none;
}

.member-add-panel > summary::-webkit-details-marker {
    display: none;
}

.member-toolbar-btn {
    min-height: 33px;
    padding: 8px 14px;
    border: 0;
    border-radius: 3px;
    background: #f8f8f8;
    color: #09233b;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 11px 16px rgba(0, 0, 0, 0.24);
    cursor: pointer;
    white-space: nowrap;
}

.member-toolbar-btn:hover,
.member-toolbar-btn.is-primary {
    background: #ffffff;
    color: #005a9e;
}

.member-add-form {
    position: absolute;
    z-index: 10;
    top: calc(100% + 10px);
    left: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 10px;
    min-width: min(720px, calc(100vw - 48px));
    padding: 14px;
    border: 1px solid #d3d6da;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.24);
}

.member-add-form input,
.member-add-form select {
    min-height: 36px;
    padding: 8px 11px;
    border: 1px solid #cdd2d8;
    border-radius: 3px;
    background: #fff;
    color: #0a1726;
}

.member-searchbar {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 110px 42px;
    width: min(335px, 100%);
    margin-top: 2px;
    border: 1px solid #cfd3d8;
    border-radius: 2px;
    background: #fff;
    box-shadow: 0 12px 18px rgba(0, 0, 0, 0.18);
}

.member-searchbar input,
.member-searchbar select,
.member-search-btn {
    min-height: 33px;
    border: 0;
    border-right: 1px solid #d3d7dc;
    background: #fff;
    color: #0b1727;
    font-size: 0.86rem;
}

.member-searchbar input {
    padding: 0 12px;
}

.member-searchbar select {
    padding: 0 10px;
}

.member-search-btn {
    border-right: 0;
    color: #0b1c2e;
    font-size: 1.25rem;
    font-weight: 900;
    cursor: pointer;
}

.member-table-frame {
    overflow-x: auto;
    border: 1px solid #d8dce0;
    background: #fff;
}

.member-flat-table {
    width: 100%;
    min-width: 1180px;
    border-collapse: collapse;
    background: #fff;
    color: #061629;
    font-size: 0.86rem;
}

.member-flat-table th,
.member-flat-table td {
    height: 39px;
    padding: 8px 10px;
    border-bottom: 1px solid #d8dce0;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.member-flat-table th {
    color: #071827;
    font-size: 0.84rem;
    font-weight: 800;
}

.member-flat-table tbody tr:hover:not(.member-action-row) {
    background: #f6f8fa;
}

.member-username {
    display: inline-flex;
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.member-login-form {
    display: inline-flex;
    margin: 0 0 0 6px;
    vertical-align: middle;
}

.member-login-icon {
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
    color: #267dca;
    font-weight: 900;
    line-height: 1;
}

.member-login-icon:hover {
    color: #075da8;
}

.member-verified {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    margin-left: 5px;
    border-radius: 999px;
    color: #00932d;
    font-size: 0.65rem;
    line-height: 1;
}

.member-discount,
.member-special {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 2px 8px;
    border-radius: 3px;
    background: #eeeeee;
    color: #787878;
    font-size: 0.74rem;
    line-height: 1;
}

.member-special {
    gap: 7px;
    background: #fff;
    color: #0071c7;
    box-shadow: 0 10px 14px rgba(0, 0, 0, 0.16);
}

.member-special b {
    min-width: 18px;
    padding: 2px 5px;
    border-radius: 3px;
    background: #13bde8;
    color: #fff;
    font-size: 0.68rem;
}

.member-action-btn {
    min-height: 21px;
    padding: 3px 8px;
    border: 0;
    border-radius: 3px;
    background: linear-gradient(180deg, #2e91d7, #0868ae);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 900;
    box-shadow: 0 9px 13px rgba(0, 74, 140, 0.32);
    cursor: pointer;
}

.member-action-row td {
    height: auto;
    padding: 0;
    background: #f3f6f9;
}

.member-action-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
}

.member-inline-form {
    display: grid;
    grid-template-columns: minmax(120px, 0.8fr) minmax(150px, 1fr) auto;
    gap: 8px;
}

.member-inline-form input {
    min-height: 36px;
    padding: 8px 11px;
    border: 1px solid #cdd2d8;
    border-radius: 3px;
    background: #fff;
    color: #0a1726;
}

.member-inline-form button {
    min-height: 36px;
    padding: 0 16px;
    border: 0;
    border-radius: 3px;
    background: #0b6fb8;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

input,
select,
textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid rgba(201, 160, 74, 0.22);
    border-radius: 16px;
    font: inherit;
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
    outline: none;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input::placeholder {
    color: #8e8063;
}

textarea::placeholder {
    color: #8e8063;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--line-strong);
    box-shadow: 0 0 0 4px rgba(201, 160, 74, 0.08);
}

.password-field {
    position: relative;
    display: block;
}

.password-field input {
    padding-right: 68px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    min-height: 32px;
    padding: 4px 8px;
    border: 0;
    transform: translateY(-50%);
    color: var(--gold-strong);
    background: transparent;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
}

select option {
    color: #111111;
    background: #f6ecd5;
}

.input-block {
    resize: vertical;
    min-height: 120px;
}

.form-hint {
    color: var(--gold-strong);
    font-size: 0.88rem;
}

.quantity-summary-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.quantity-charge-emphasis {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    color: #fff1c7;
    font-size: 1.08rem;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.quantity-charge-emphasis span {
    color: var(--gold-strong);
    font-size: 1.55rem;
    line-height: 1;
}

.field-hint {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.6;
}

.helper-copy {
    padding: 14px 16px;
    border: 1px solid rgba(201, 160, 74, 0.16);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
}

.helper-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.member-order-grid .section-head span,
#member-order-form .helper-copy,
.recharge-channel-grid,
.recharge-form-layout .helper-copy,
.narrow-card .section-head span,
.narrow-card .helper-copy {
    display: none;
}

.summary-block {
    display: grid;
    gap: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(201, 160, 74, 0.12);
}

.summary-row:last-child {
    border-bottom: 0;
}

.summary-row span {
    color: var(--muted);
}

.summary-row strong {
    text-align: right;
}

.empty-copy {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.status-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(201, 160, 74, 0.18);
}

.muted-copy {
    color: var(--muted);
    line-height: 1.75;
}

.api-key-panel {
    display: grid;
    gap: 18px;
}

.api-key-box {
    display: block;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(201, 160, 74, 0.16);
    background: rgba(255, 255, 255, 0.02);
    word-break: break-all;
}

.provider-tool-stack {
    display: grid;
    gap: 14px;
}

.provider-tool-meta {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(201, 160, 74, 0.16);
    background: rgba(255, 255, 255, 0.02);
}

.provider-tool-meta span {
    color: var(--muted);
}

.member-order-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    min-width: 0;
}

.member-order-grid > .card,
.member-order-form-layout,
.member-order-form-layout > * {
    min-width: 0;
    max-width: 100%;
}

.member-order-form-layout {
    position: relative;
}

.mobile-service-preview {
    display: none;
}

#service-description {
    box-sizing: border-box;
    height: auto;
    min-height: 0 !important;
    overflow: hidden;
    resize: none;
}

.recharge-form-layout.section-gap {
    margin-top: 0;
}

.card:has(> .recharge-form-layout) > .section-head {
    display: none;
}

.recharge-announcement-copy {
    margin: 0;
    color: var(--text);
    line-height: 1.85;
    white-space: pre-line;
}

.recharge-total-hint {
    margin: -4px 0 0;
    padding: 12px 14px;
    border: 1px solid rgba(201, 160, 74, 0.2);
    border-radius: 8px;
    background: rgba(201, 160, 74, 0.08);
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.6;
}

.alipay-inline-preview {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid rgba(201, 160, 74, 0.3);
    border-radius: 8px;
    background: rgba(232, 196, 95, 0.06);
}

.alipay-inline-preview img {
    display: block;
    width: 104px;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
}

.alipay-inline-preview p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.alipay-checkout {
    width: min(620px, 100%);
    margin-inline: auto;
}

.payment-focus-layout {
    display: block;
    min-height: 100dvh;
}

.payment-focus-layout .content-area {
    min-height: 100dvh;
}

.payment-focus-layout .content-shell {
    width: min(100%, 520px);
    margin-inline: auto;
    padding: 32px 20px 48px;
}

.alipay-qr-card {
    width: min(360px, 100%);
    margin: 26px auto;
    text-align: center;
}

.alipay-qr-card img {
    display: block;
    width: 100%;
    aspect-ratio: 0.81;
    object-fit: cover;
    object-position: center 65%;
    border: 1px solid rgba(201, 160, 74, 0.35);
    border-radius: 8px;
    background: #fff;
}

.alipay-qr-card figcaption {
    margin-top: 12px;
    color: var(--muted);
    line-height: 1.65;
}

@media (max-width: 720px) {
    .payment-focus-layout .content-shell {
        padding: 18px 14px 32px;
    }

    .alipay-checkout {
        margin: 0;
    }

    .alipay-checkout .section-head {
        gap: 8px;
    }

    .alipay-qr-card {
        width: min(320px, calc(100vw - 60px));
        margin: 18px auto;
    }
}

.order-tip-stack {
    display: grid;
    gap: 12px;
}

.directory-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 14px;
}

.directory-head h3 {
    margin: 0;
    font-size: 1rem;
}

.directory-head span {
    color: var(--muted);
    font-size: 0.9rem;
}

.directory-group + .directory-group {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid rgba(201, 160, 74, 0.12);
}

.directory-service-list {
    display: grid;
    gap: 12px;
}

.directory-service-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(201, 160, 74, 0.14);
    background: rgba(255, 255, 255, 0.02);
}

.directory-service-copy {
    display: grid;
    gap: 8px;
}

.directory-service-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.directory-service-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--gold-strong);
    font-size: 0.88rem;
}

.directory-service-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.compact-card {
    min-height: 100%;
}

.catalog-stack {
    display: grid;
    gap: 20px;
}

.service-catalog-list {
    display: grid;
    gap: 12px;
}

.service-catalog-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border-top: 1px solid rgba(201, 160, 74, 0.12);
}

.service-catalog-row:first-child {
    border-top: 0;
    padding-top: 4px;
}

.service-catalog-main {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.service-catalog-main strong {
    font-size: 1rem;
}

.service-catalog-side {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.service-catalog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--gold-strong);
    font-size: 0.88rem;
}

.order-table-wrap {
    overflow-x: auto;
}

.order-table th,
.order-table td {
    min-width: 110px;
}

.order-table td:nth-child(3) {
    min-width: 260px;
}

.order-table-link {
    color: #f29d68;
}

.recharge-form-layout {
    position: relative;
}

.recharge-channel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.channel-card {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(201, 160, 74, 0.14);
    background: rgba(255, 255, 255, 0.02);
}

.channel-card span {
    color: var(--muted);
}

.quick-amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-amount-btn {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(201, 160, 74, 0.24);
    background: rgba(255, 255, 255, 0.03);
    color: var(--gold-strong);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.quick-amount-btn:hover {
    background: rgba(201, 160, 74, 0.08);
}

.transaction-list {
    display: grid;
    gap: 12px;
}

.transaction-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(201, 160, 74, 0.14);
    background: rgba(255, 255, 255, 0.02);
}

.transaction-row-main {
    display: grid;
    gap: 8px;
}

.transaction-row-main p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.transaction-row-meta {
    display: grid;
    gap: 10px;
    min-width: 260px;
}

.transaction-row-meta div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.transaction-row-meta dt {
    color: var(--muted);
}

.transaction-row-meta dd {
    margin: 0;
    text-align: right;
}

.narrow-card {
    max-width: 760px;
}

.api-key-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn:disabled,
.btn.is-submitting {
    cursor: not-allowed;
    opacity: 0.72;
    box-shadow: none;
    filter: grayscale(0.15);
}

.order-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
}

.order-modal {
    width: min(560px, 100%);
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 24px;
    border-radius: 28px;
    border: 1px solid rgba(201, 160, 74, 0.24);
    background:
        linear-gradient(180deg, rgba(242, 207, 121, 0.035), rgba(255, 255, 255, 0)),
        var(--panel-strong);
    box-shadow: var(--shadow);
}

.order-modal-close {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(201, 160, 74, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--gold-strong);
    font: inherit;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.order-modal-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

@media (max-width: 640px) {
    .order-modal-backdrop {
        align-items: flex-start;
        justify-content: center;
        padding: calc(14px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));
    }

    .order-modal {
        width: 100%;
        max-width: calc(100vw - 28px);
        max-height: calc(100vh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        padding: 18px;
        border-radius: 22px;
    }

    .order-modal .section-head {
        align-items: flex-start;
        gap: 12px;
    }

    .order-modal .meta-list div {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .order-modal-actions {
        justify-content: stretch;
    }

    .order-modal-actions .btn {
        width: 100%;
    }
}

.toolbar-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 16px;
    align-items: end;
}

.toolbar-grid-orders {
    grid-template-columns: 2fr 1fr auto;
}

.admin-orders-page {
    width: 100%;
    max-width: 1600px;
}

.admin-order-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.admin-order-filter-form {
    display: grid;
    grid-template-columns: minmax(280px, 2fr) minmax(180px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.admin-order-filter-actions,
.admin-order-sync-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.admin-order-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-gutter: stable;
}

.admin-order-table {
    min-width: 1240px;
    font-size: 0.9rem;
}

.admin-order-table th,
.admin-order-table td {
    min-width: 0;
    white-space: nowrap;
}

.admin-order-table th:nth-child(2),
.admin-order-table td:nth-child(2) {
    min-width: 190px;
}

.admin-order-table th:nth-child(3),
.admin-order-table td:nth-child(3) {
    min-width: 150px;
    white-space: normal;
}

.admin-order-table th:nth-child(4),
.admin-order-table td:nth-child(4) {
    min-width: 100px;
}

.admin-order-table th:nth-child(5),
.admin-order-table td:nth-child(5) {
    min-width: 130px;
}

.admin-order-table th:nth-child(9),
.admin-order-table td:nth-child(9) {
    min-width: 150px;
}

.admin-order-table th:last-child,
.admin-order-table td:last-child {
    min-width: 210px;
}

.row-actions.admin-order-row-actions {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 8px;
}

.admin-order-row-actions form,
.admin-order-row-actions .btn {
    width: 100%;
}

.alert.admin-action-toast {
    position: fixed;
    z-index: 80;
    top: 20px;
    right: 24px;
    width: min(420px, calc(100vw - 32px));
    margin: 0;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(18px);
}

.toolbar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.bulk-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.bulk-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}

.checkbox-row input,
.service-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--gold);
}

.provider-alert-settings {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) auto;
    gap: 8px 12px;
    align-items: center;
    min-width: 190px;
}

.provider-alert-settings .checkbox-row {
    margin: 0;
}

.provider-alert-settings .btn {
    justify-self: start;
}

.sortable-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.sortable-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(201, 160, 74, 0.14);
    background: rgba(255, 255, 255, 0.02);
    cursor: move;
}

.sortable-item.dragging {
    opacity: 0.55;
}

.drag-handle {
    color: var(--gold-strong);
    font-size: 1.2rem;
    line-height: 1;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.row-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-small {
    min-height: 36px;
    padding: 8px 14px;
    font-size: 0.88rem;
}

.quota-input {
    max-width: 90px;
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 12px;
}

.plain-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.plain-list li {
    color: var(--text);
    padding-left: 18px;
    position: relative;
}

.plain-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gold-strong), var(--gold-dim));
    box-shadow: 0 0 14px rgba(201, 160, 74, 0.3);
}

.meta-list {
    margin: 0;
}

.meta-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(201, 160, 74, 0.12);
}

.meta-list dt {
    color: var(--muted);
}

.meta-list dd {
    margin: 0;
    font-weight: 800;
    text-align: right;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.section-head span {
    color: var(--muted);
    font-size: 0.9rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.94rem;
}

.table th,
.table td {
    padding: 12px 8px;
    border-bottom: 1px solid rgba(201, 160, 74, 0.12);
    text-align: left;
    vertical-align: top;
}

.table th {
    color: var(--gold-strong);
    font-weight: 800;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.table td {
    color: var(--text);
}

.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;
}

.link-cell {
    max-width: 280px;
    word-break: break-all;
    color: var(--muted);
}

.pill-success {
    color: #b5f1cf;
    border-color: rgba(89, 201, 133, 0.34);
    background: rgba(40, 111, 67, 0.22);
}

.pill-warning {
    color: #ffd77a;
    border-color: rgba(255, 206, 87, 0.36);
    background: rgba(118, 86, 11, 0.28);
}

.pill-info {
    color: #8dc8ff;
    border-color: rgba(94, 160, 255, 0.34);
    background: rgba(24, 66, 122, 0.26);
}

.pill-danger {
    color: #ffb29d;
    border-color: rgba(255, 120, 95, 0.34);
    background: rgba(115, 38, 24, 0.24);
}

.pill-muted {
    color: #d7cba8;
    border-color: rgba(201, 160, 74, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

.category-admin-shell {
    display: grid;
    gap: 20px;
}

.category-admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.category-sort-panel,
.category-table-panel {
    padding: 20px;
    border-radius: 22px;
    border: 1px solid rgba(201, 160, 74, 0.12);
    background: rgba(255, 255, 255, 0.015);
}

.category-table-panel {
    overflow-x: auto;
}

.category-table-panel .table {
    min-width: 820px;
}

.category-inline-form {
    display: grid;
    grid-template-columns: 1em minmax(0, 1fr);
    min-width: 0;
    gap: 10px;
    align-items: start;
}

.category-edit-fields {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.category-edit-fields input,
.category-edit-actions select {
    width: 100%;
}

.category-edit-fields input {
    min-height: 40px;
    border-radius: 12px;
}

.category-edit-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.category-edit-actions select {
    flex: 1 1 150px;
    min-width: 0;
}

.category-platform-icon {
    display: inline-flex;
    width: 1em;
    height: 1em;
    flex: 0 0 1em;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.category-platform-icon svg {
    display: block;
    width: 1em;
    height: 1em;
}

.category-title-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.category-label-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.admin-category-picker {
    position: relative;
}

.admin-category-picker-trigger,
.admin-category-picker-option {
    font: inherit;
}

.admin-category-picker-trigger {
    display: flex;
    width: 100%;
    min-height: 50px;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.025);
    text-align: left;
    cursor: pointer;
}

.admin-category-picker-trigger:hover,
.admin-category-picker-trigger[aria-expanded="true"] {
    border-color: var(--line-strong);
}

.admin-category-picker-trigger #admin-order-category-label {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-category-picker-chevron {
    color: var(--gold-strong);
    font-size: 1.25rem;
}

.admin-category-picker-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: #1b1a17;
    box-shadow: var(--shadow);
}

.admin-category-picker-menu[hidden] {
    display: none;
}

.admin-category-picker-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px solid rgba(201, 160, 74, 0.12);
    color: var(--text);
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.admin-category-picker-option:hover {
    background: rgba(201, 160, 74, 0.12);
}

.member-category-picker {
    position: relative;
}

.member-category-picker-trigger,
.member-category-picker-option {
    font: inherit;
}

.member-category-picker-trigger {
    display: flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
    text-align: left;
    cursor: pointer;
}

.member-category-picker-trigger:hover,
.member-category-picker-trigger[aria-expanded="true"] {
    border-color: var(--line-strong);
}

.member-category-picker-trigger #member-category-picker-label {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-category-picker-chevron {
    color: var(--gold-strong);
    font-size: 1.25rem;
}

.member-category-picker-menu {
    position: absolute;
    z-index: 25;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: #1b1a17;
    box-shadow: var(--shadow);
}

.member-category-picker-menu[hidden] {
    display: none;
}

.member-category-picker-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px solid rgba(201, 160, 74, 0.12);
    color: var(--text);
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.member-category-picker-option:last-child {
    border-bottom: 0;
}

.member-category-picker-option:hover {
    background: rgba(201, 160, 74, 0.12);
}

.service-admin-shell {
    display: grid;
    gap: 18px;
}

.service-admin-board,
.service-list-board,
.service-maintenance {
    border-radius: 22px;
}

.service-console-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.service-console-actions,
.service-console-filters {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.service-inline-field,
.service-search-field {
    display: grid;
    gap: 6px;
}

.service-inline-field span,
.service-search-field span {
    color: var(--muted);
    font-size: 0.76rem;
    letter-spacing: 0.06em;
}

.service-inline-field select,
.service-search-field input {
    min-width: 140px;
    min-height: 40px;
    padding: 10px 12px;
    border-radius: 12px;
}

.service-search-field input {
    min-width: 260px;
}

.service-console-summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(201, 160, 74, 0.1);
    color: var(--muted);
}

.service-console-summary strong {
    color: var(--gold-strong);
}

.service-maintenance {
    padding: 18px 22px;
}

.service-maintenance[open] {
    background:
        linear-gradient(180deg, rgba(242, 207, 121, 0.045), rgba(255, 255, 255, 0)),
        var(--panel);
}

.service-maintenance-toggle {
    cursor: pointer;
    font-weight: 800;
    color: var(--text);
    list-style: none;
}

.service-maintenance-toggle::-webkit-details-marker {
    display: none;
}

.service-maintenance-card {
    padding: 18px;
    border: 1px solid rgba(201, 160, 74, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.015);
}

.service-bulk-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(201, 160, 74, 0.12);
}

.service-table-head,
.service-row {
    display: grid;
    grid-template-columns: 28px 70px minmax(260px, 2fr) minmax(180px, 1.2fr) 100px 80px 80px 100px 80px;
    gap: 12px;
    align-items: center;
}

.service-table-head {
    padding: 0 8px 12px;
    color: var(--gold-strong);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.service-group {
    border-top: 1px solid rgba(201, 160, 74, 0.08);
    padding-top: 14px;
    margin-top: 14px;
    transition: border-color 140ms ease, background 140ms ease, opacity 140ms ease;
}

.service-group:first-of-type {
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
}

.service-group-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    list-style: none;
    padding: 6px 8px 14px;
}

.service-group-head::-webkit-details-marker {
    display: none;
}

.service-group-title,
.service-group-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.service-group-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
}

.service-group-dot.is-active {
    background: #49d26f;
}

.service-group-dot.is-inactive {
    background: #9b8a62;
}

.service-group-meta {
    color: var(--muted);
    font-size: 0.86rem;
}

.service-chip {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(201, 160, 74, 0.16);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    font-size: 0.82rem;
}

.service-group-body {
    display: grid;
    gap: 8px;
}

.service-category-edit {
    padding: 0 8px 12px;
}

.service-category-edit-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.service-category-edit-form input {
    max-width: 280px;
}

.service-group.dragging,
.service-row.dragging {
    opacity: 0.62;
}

.service-group-drop-active {
    border-color: rgba(201, 160, 74, 0.42);
    background: rgba(201, 160, 74, 0.08);
}

.service-row {
    padding: 12px 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(201, 160, 74, 0.08);
    transition: border-color 140ms ease, background 140ms ease, opacity 140ms ease;
}

.service-row:hover {
    border-color: rgba(201, 160, 74, 0.24);
    background: rgba(201, 160, 74, 0.05);
}

.service-cell {
    min-width: 0;
    color: var(--text);
    font-size: 0.92rem;
}

.service-cell strong,
.service-cell span {
    display: block;
}

.service-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.service-cell span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.checkbox-cell {
    display: flex;
    align-items: center;
    justify-content: center;
}

.id-cell,
.price-cell {
    color: var(--gold-strong);
    font-weight: 800;
}

.service-actions {
    display: flex;
    justify-content: flex-end;
}

.service-inline-textarea,
.service-inline-number,
.service-inline-name,
.service-inline-provider {
    width: 100%;
    border: 1px solid rgba(201, 160, 74, 0.14);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
}

.service-inline-textarea {
    min-height: 94px;
    resize: vertical;
    margin-top: 8px;
    line-height: 1.6;
}

.service-inline-name,
.service-inline-provider {
    margin-top: 8px;
}

.service-inline-provider-id {
    margin-top: 8px;
}

.service-downflow-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 84px;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.service-downflow-field span {
    margin: 0;
}

.service-downflow-field .service-inline-number {
    padding: 8px 10px;
}

.service-inline-number {
    text-align: left;
    font-weight: 700;
    color: var(--gold-strong);
}

.service-inline-number:focus,
.service-inline-textarea:focus,
.service-inline-name:focus,
.service-inline-provider:focus {
    border-color: rgba(201, 160, 74, 0.48);
    box-shadow: 0 0 0 4px rgba(201, 160, 74, 0.08);
}

.is-hidden {
    display: none;
}

.table-action-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--gold-strong);
    font: inherit;
    cursor: pointer;
}

.table-action-link:hover {
    color: #fff3cf;
}

.inline-note {
    display: block;
    margin-top: 8px;
    color: var(--gold-strong);
    font-size: 0.82rem;
    line-height: 1.6;
}

.runtime-card {
    border-color: rgba(201, 160, 74, 0.2);
}

.runtime-card-running {
    border-color: rgba(201, 160, 74, 0.42);
    background:
        radial-gradient(circle at top right, rgba(201, 160, 74, 0.12), transparent 38%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
        var(--panel);
}

.runtime-card-success {
    border-color: rgba(132, 214, 173, 0.28);
}

.runtime-card-error {
    border-color: rgba(255, 142, 124, 0.32);
}

.runtime-card-idle {
    border-color: rgba(201, 160, 74, 0.18);
}

.runtime-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}

.runtime-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(201, 160, 74, 0.18);
    background: rgba(255, 255, 255, 0.03);
    color: var(--gold-strong);
    font-size: 0.84rem;
}

.live-monitor-admin {
    width: 100%;
    min-width: 0;
    border-top: 1px solid rgba(201, 160, 74, 0.22);
}

.live-monitor-section {
    min-width: 0;
    padding: 24px 0;
    border-bottom: 1px solid rgba(201, 160, 74, 0.18);
}

.live-monitor-section-inner {
    min-width: 0;
}

.live-monitor-section .section-head {
    margin-bottom: 18px;
}

.live-monitor-section .section-head h2 {
    margin: 0;
    font-size: 1.08rem;
}

.live-monitor-runtime {
    padding-top: 20px;
    border-left: 3px solid rgba(201, 160, 74, 0.38);
    background: transparent;
}

.live-monitor-runtime.runtime-card-success {
    border-left-color: var(--success);
}

.live-monitor-runtime.runtime-card-error {
    border-left-color: var(--danger);
}

.live-monitor-runtime .live-monitor-section-inner {
    padding-left: 18px;
}

.live-monitor-agent-mode {
    padding-top: 20px;
    border-left: 3px solid var(--gold);
}

.live-monitor-agent-mode.agent-mode-real {
    border-left-color: var(--danger);
}

.live-monitor-agent-mode .live-monitor-section-inner {
    padding-left: 18px;
}

.live-monitor-agent-mode .agent-mode-label {
    color: var(--gold-strong);
}

.live-monitor-agent-mode.agent-mode-real .agent-mode-label {
    color: var(--danger);
}

.live-monitor-create-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 16px;
    align-items: start;
}

.live-monitor-create-form label,
.live-monitor-settings-form label {
    display: grid;
    min-width: 0;
    gap: 8px;
    color: var(--text);
    font-weight: 700;
}

.live-monitor-create-form input,
.live-monitor-create-form select,
.live-monitor-settings-form input,
.live-monitor-settings-form textarea {
    width: 100%;
    min-width: 0;
}

.live-monitor-create-form .btn {
    align-self: end;
    justify-self: start;
}

.live-monitor-settings-form {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
    gap: 16px;
    align-items: start;
}

.live-monitor-settings-form .field:first-of-type {
    grid-row: span 2;
}

.live-monitor-settings-form textarea {
    min-height: 176px;
    resize: vertical;
    overflow-wrap: anywhere;
}

.live-monitor-settings-form .helper-copy {
    margin: 0;
}

.live-monitor-settings-form .btn {
    justify-self: start;
}

.live-monitor-tool-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.live-monitor-tool-row > div {
    min-width: 0;
}

.live-monitor-tool-row .section-head {
    justify-content: flex-start;
    margin-bottom: 8px;
}

.live-monitor-tool-row .muted-copy {
    margin: 0;
}

.live-monitor-tool-row form,
.live-monitor-tool-row .btn {
    flex: 0 0 auto;
}

.live-monitor-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-gutter: stable;
}

.live-monitor-table {
    min-width: 1320px;
    white-space: normal;
}

.live-monitor-table th {
    white-space: nowrap;
}

.live-monitor-table td {
    min-width: 92px;
    overflow-wrap: anywhere;
}

.live-monitor-table .link-cell {
    min-width: 220px;
}

.live-monitor-table .row-actions {
    flex-wrap: nowrap;
}

.live-monitor-table input[type="number"] {
    min-width: 84px;
}

.live-monitor-table input[type="datetime-local"] {
    min-width: 190px;
}

.live-monitor-service-form {
    min-width: 320px;
}

.live-monitor-service-select {
    min-width: 230px;
    max-width: 360px;
}

@media (max-width: 980px) {
    .app-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        height: auto;
        padding: 14px 14px 10px;
        border-right: 0;
        border-bottom: 1px solid rgba(201, 160, 74, 0.14);
    }

    .sidebar-inner {
        gap: 14px;
        padding: 0;
    }

    .brand {
        font-size: 1.06rem;
    }

    .brand-tag {
        font-size: 0.68rem;
        letter-spacing: 0.12em;
    }

    .sidebar-logout {
        margin-top: 0;
    }

    .content-topbar {
        position: relative;
        top: auto;
        padding-top: 18px;
    }

    .hero,
    .overview-grid,
    .grid.two,
    .category-admin-grid {
        grid-template-columns: 1fr;
    }

    .category-inline-form {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .member-order-grid,
    .recharge-channel-grid {
        grid-template-columns: 1fr;
    }

    .toolbar-grid {
        grid-template-columns: 1fr;
    }

    .admin-order-toolbar,
    .admin-order-filter-form {
        grid-template-columns: 1fr;
    }

    .admin-order-filter-actions,
    .admin-order-sync-form,
    .admin-order-sync-form .btn {
        width: 100%;
    }

    .admin-order-filter-actions .btn {
        flex: 1 1 0;
    }

    .bulk-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .service-console-toolbar,
    .service-bulk-toolbar,
    .service-group-head,
    .service-console-summary,
    .directory-service-card,
    .transaction-row,
    .service-catalog-row {
        flex-direction: column;
        align-items: stretch;
    }

    .service-catalog-side {
        justify-content: flex-start;
    }

    .service-table-head {
        display: none;
    }

    .service-row {
        grid-template-columns: 1fr;
    }

    .service-actions {
        justify-content: flex-start;
    }

    .transaction-row-meta {
        min-width: 0;
    }

    .member-toolbar,
    .member-add-panel {
        width: 100%;
        flex-wrap: wrap;
    }

    .member-action-panel,
    .member-inline-form {
        grid-template-columns: 1fr;
    }

    .section-head {
        align-items: flex-start;
    }

    .section-head span {
        font-size: 0.84rem;
    }

    .live-monitor-create-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .live-monitor-settings-form {
        grid-template-columns: 1fr;
    }

    .live-monitor-settings-form .field:first-of-type {
        grid-row: auto;
    }
}

@media (max-width: 720px) {
    body.mobile-nav-open {
        overflow: hidden;
    }

    h1 {
        font-size: 1.9rem;
    }

    .table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .admin-orders-page .card {
        padding: 16px;
        border-radius: 18px;
    }

    .admin-order-filter-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-order-filter-actions .btn,
    .admin-order-sync-form .btn {
        min-height: 44px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .admin-order-table-wrap {
        overflow: visible;
    }

    .admin-order-table {
        display: grid;
        min-width: 0;
        gap: 12px;
        white-space: normal;
    }

    .admin-order-table thead {
        display: none;
    }

    .admin-order-table tbody {
        display: grid;
        gap: 12px;
    }

    .admin-order-table tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 16px;
        padding: 16px;
        border: 1px solid rgba(201, 160, 74, 0.16);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.02);
    }

    .admin-order-table td,
    .admin-order-table td:nth-child(2),
    .admin-order-table td:nth-child(3),
    .admin-order-table td:nth-child(4),
    .admin-order-table td:nth-child(5),
    .admin-order-table td:nth-child(9),
    .admin-order-table td:last-child {
        display: grid;
        min-width: 0;
        gap: 5px;
        padding: 0;
        border: 0;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .admin-order-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.75rem;
        font-weight: 700;
    }

    .admin-order-table td:nth-child(2),
    .admin-order-table td:nth-child(3),
    .admin-order-table td:nth-child(4),
    .admin-order-table td:last-child {
        grid-column: 1 / -1;
    }

    .row-actions.admin-order-row-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-order-row-actions .btn {
        min-height: 42px;
        padding: 8px 10px;
    }

    .alert.admin-action-toast {
        top: 84px;
        right: 12px;
        width: calc(100vw - 24px);
    }

    .member-add-form {
        grid-template-columns: 1fr;
    }

    .member-searchbar {
        width: 100%;
        grid-template-columns: minmax(0, 1fr) 96px 42px;
    }

    .member-marquee-track {
        animation-duration: 16s;
    }

    .sidebar,
    .content-shell,
    .content-topbar {
        padding-left: 12px;
        padding-right: 12px;
    }

    .sidebar {
        position: sticky;
        top: 0;
        z-index: 20;
        height: auto;
        padding-top: 12px;
        padding-bottom: 12px;
        border-right: 0;
        background:
            linear-gradient(180deg, rgba(6, 6, 6, 0.98), rgba(6, 6, 6, 0.92)),
            rgba(6, 6, 6, 0.96);
        backdrop-filter: blur(22px);
    }

    .brand-group {
        gap: 2px;
    }

    .brand-tag {
        display: none;
    }

    .mobile-sidebar-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 6px;
        width: 64px;
        height: 64px;
        border-radius: 18px;
        border: 1px solid rgba(201, 160, 74, 0.24);
        background: rgba(255, 255, 255, 0.03);
    }

    .mobile-menu-toggle span {
        width: 28px;
        height: 3px;
        border-radius: 999px;
        background: rgba(247, 241, 223, 0.9);
        transition: transform 180ms ease, opacity 180ms ease;
    }

    .sidebar.mobile-open .mobile-menu-toggle span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .sidebar.mobile-open .mobile-menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .sidebar.mobile-open .mobile-menu-toggle span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .sidebar-menu-body {
        display: none;
        margin-top: 14px;
    }

    .sidebar.mobile-open .sidebar-menu-body {
        display: grid;
        gap: 14px;
    }

    /* Keep the navigation above the page instead of pushing the form downward. */
    .sidebar.mobile-open {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 50;
        width: min(82vw, 340px);
        min-height: 100dvh;
        overflow-y: auto;
        overscroll-behavior: contain;
        background:
            linear-gradient(180deg, rgba(6, 6, 6, 0.99), rgba(6, 6, 6, 0.97)),
            rgba(6, 6, 6, 0.98);
    }

    .sidebar.mobile-open + .mobile-menu-scrim {
        position: fixed;
        inset: 0;
        z-index: 45;
        display: block;
        border: 0;
        background: rgba(0, 0, 0, 0.56);
        backdrop-filter: blur(2px);
    }

    .sidebar-nav,
    .sidebar-subnav {
        display: grid;
        gap: 8px;
        overflow: visible;
        padding-bottom: 0;
    }

    .sidebar-nav::-webkit-scrollbar,
    .sidebar-subnav::-webkit-scrollbar {
        display: none;
    }

    .sidebar-link,
    .sidebar-sublink {
        width: 100%;
        white-space: normal;
        padding: 12px 14px;
        border-radius: 14px;
    }

    .sidebar-link {
        min-height: 42px;
    }

    .sidebar-section-card {
        padding: 12px;
        border-radius: 18px;
    }

    .sidebar-context-card {
        display: none;
    }

    .sidebar-button {
        min-height: 42px;
        font-size: 0.92rem;
    }

    .content-shell {
        padding-top: 18px;
        padding-bottom: 40px;
    }

    .page-header {
        margin-bottom: 14px;
    }

    .member-page-title,
    .page-header-lux h1 {
        font-size: clamp(1.7rem, 8vw, 2.2rem);
        line-height: 1.12;
    }

    .card,
    .panel,
    .feature-panel,
    .stat-card {
        border-radius: 20px;
    }

    .card,
    .panel,
    .feature-panel {
        padding: 16px;
    }

    .home-bulletins .bulletin-card {
        min-height: 0;
    }

    .bulletin-copy {
        font-size: 0.94rem;
        line-height: 1.75;
    }

    .stat-card {
        padding: 18px 16px;
    }

    .stat-card span {
        margin-bottom: 10px;
        font-size: 0.84rem;
    }

    .stat-card strong {
        font-size: 1.85rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 16px;
    }

    .single-panel {
        max-width: 100%;
    }

    .live-monitor-section {
        padding: 20px 0;
    }

    .live-monitor-create-form {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .live-monitor-create-form .btn,
    .live-monitor-settings-form .btn {
        width: 100%;
    }

    .live-monitor-tool-row {
        align-items: stretch;
        flex-direction: column;
        gap: 16px;
    }

    .live-monitor-tool-row .section-head {
        align-items: flex-start;
    }

    .live-monitor-tool-row .btn {
        width: 100%;
    }

    .live-monitor-table-wrap {
        padding-bottom: 6px;
    }

    .live-monitor-table {
        display: table;
        overflow: visible;
    }

    .section-gap,
    .section-gap-lg {
        margin-top: 16px;
    }

    .favorite-grid,
    .directory-service-list,
    .transaction-list,
    .catalog-stack {
        gap: 10px;
    }

    .member-order-form-layout {
        gap: 12px;
        padding-bottom: 20px;
    }

    .member-order-grid .section-head span {
        display: none;
    }

    .member-order-form-layout .mobile-service-preview {
        display: none;
        gap: 10px;
        padding: 14px 16px;
        border: 1px solid rgba(201, 160, 74, 0.16);
        border-radius: 18px;
        background:
            radial-gradient(circle at top right, rgba(201, 160, 74, 0.12), transparent 40%),
            rgba(255, 255, 255, 0.02);
    }

    .member-order-form-layout .mobile-service-preview-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .member-order-form-layout .mobile-service-preview-label {
        color: var(--muted);
        font-size: 0.76rem;
        letter-spacing: 0.08em;
    }

    .member-order-form-layout .mobile-service-preview-head strong {
        color: var(--gold-strong);
        font-size: 0.84rem;
    }

    .member-order-form-layout .mobile-service-preview-name {
        font-size: 1rem;
        line-height: 1.45;
    }

    .member-order-form-layout .mobile-service-preview-meta {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        color: var(--muted);
        font-size: 0.82rem;
    }

    .member-order-form-layout .mobile-service-preview-meta strong {
        display: block;
        margin-top: 3px;
        color: var(--text);
        font-size: 0.94rem;
    }

    .member-order-form-layout select,
    .member-order-form-layout input[type="url"],
    .member-order-form-layout input[type="text"] {
        min-height: 52px;
        font-size: 0.96rem;
    }

    .member-order-form-layout #service-select {
        font-size: 0.88rem;
    }

    .member-order-form-layout label {
        gap: 7px;
    }

    .member-order-form-layout .input-block {
        min-height: 88px;
    }

    .member-order-form-layout #service-description {
        min-height: 0;
        font-size: 0.92rem;
        line-height: 1.65;
    }

    .member-order-form-layout .field-hint {
        font-size: 0.78rem;
        line-height: 1.5;
    }

    .member-order-form-layout .helper-copy {
        font-size: 0.88rem;
        padding-bottom: 4px;
    }

    .member-order-form-layout .quantity-summary-bar {
        align-items: flex-start;
        gap: 8px;
        padding: 12px 14px;
        border: 1px solid rgba(201, 160, 74, 0.14);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.02);
    }

    .member-order-form-layout .quantity-charge-emphasis {
        width: 100%;
        justify-content: space-between;
        font-size: 0.96rem;
    }

    .member-order-form-layout .quantity-charge-emphasis span {
        font-size: 1.28rem;
    }

    .member-order-form-layout #member-order-submit {
        position: sticky;
        bottom: calc(12px + env(safe-area-inset-bottom));
        z-index: 10;
        width: 100%;
        min-height: 48px;
        margin-top: 4px;
        padding: 11px 16px;
        border-radius: 14px;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.38);
    }

    .member-order-grid > .card:first-child {
        overflow: visible;
    }

    .order-table-wrap {
        overflow: visible;
    }

    .order-table {
        display: grid;
        gap: 12px;
        white-space: normal;
    }

    .order-table thead {
        display: none;
    }

    .order-table tbody {
        display: grid;
        gap: 12px;
    }

    .order-table tr {
        display: grid;
        gap: 10px;
        padding: 14px;
        border: 1px solid rgba(201, 160, 74, 0.14);
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.02);
    }

    .order-table td {
        display: grid;
        gap: 4px;
        min-width: 0;
        padding: 0;
        border-bottom: 0;
        white-space: normal;
    }

    .order-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.76rem;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .order-table td:nth-child(3) {
        min-width: 0;
    }

    .order-table-link,
    .link-cell {
        word-break: break-word;
    }

    .order-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .order-table td:last-child .pill {
        justify-self: start;
    }

    .recharge-form-layout {
        gap: 12px;
        padding-bottom: 108px;
    }

    .recharge-form-layout .quick-amounts {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .recharge-form-layout .helper-copy {
        font-size: 0.88rem;
    }

    .recharge-channel-grid {
        grid-template-columns: 1fr;
    }

    .channel-card {
        padding: 14px;
        border-radius: 16px;
    }

    .quick-amount-btn {
        width: 100%;
        min-height: 44px;
        border-radius: 14px;
    }

    .recharge-form-layout select,
    .recharge-form-layout input[type="number"] {
        min-height: 52px;
        font-size: 0.96rem;
    }

    .recharge-form-layout textarea {
        min-height: 104px;
    }

    .recharge-form-layout .btn.primary {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        z-index: 30;
        width: auto;
        min-height: 50px;
        border-radius: 16px;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.38);
    }

    .favorite-card,
    .directory-service-card,
    .transaction-row,
    .service-catalog-row {
        padding: 14px;
        border-radius: 16px;
    }

    .transaction-row {
        display: grid;
        gap: 12px;
    }

    .transaction-row-main {
        gap: 6px;
    }

    .transaction-row-meta {
        min-width: 0;
        gap: 8px;
    }

    .transaction-row-meta div {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .transaction-row-meta dd {
        margin: 0;
    }

    .favorite-card-top,
    .directory-head,
    .service-catalog-side {
        gap: 8px;
    }

    .directory-head {
        margin-bottom: 10px;
    }

    .directory-service-actions {
        width: 100%;
        justify-content: space-between;
    }

    .directory-service-actions .btn,
    .api-key-actions .btn,
    .row-actions .btn {
        width: 100%;
    }

    .favorite-toggle {
        min-width: 42px;
        height: 42px;
    }

    .service-catalog-row {
        gap: 12px;
    }

    .service-catalog-main strong,
    .favorite-card h3 {
        font-size: 0.96rem;
        line-height: 1.45;
    }

    .service-catalog-meta,
    .directory-service-meta,
    .favorite-card-meta {
        gap: 8px;
        font-size: 0.82rem;
    }

    .section-head {
        flex-direction: column;
        gap: 6px;
        margin-bottom: 12px;
    }

    .section-head span {
        line-height: 1.5;
    }

    .meta-list div,
    .summary-row,
    .transaction-row-meta div {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .meta-list dd,
    .summary-row strong,
    .transaction-row-meta dd {
        text-align: left;
    }

    .quantity-summary-bar,
    .quick-amounts,
    .api-key-actions,
    .row-actions {
        align-items: stretch;
        gap: 8px;
    }

    .quick-amount-btn {
        flex: 1 1 calc(50% - 8px);
        min-height: 42px;
    }

    .btn {
        min-height: 44px;
        padding: 11px 16px;
    }

    .form-grid,
    .stack-form {
        gap: 14px;
    }

    input,
    select,
    textarea {
        padding: 12px 13px;
        border-radius: 14px;
    }

    .helper-copy {
        padding: 12px 14px;
        border-radius: 14px;
    }
}

.admin-line-binding-manager {
    display: grid;
    gap: 12px;
    width: 100%;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.admin-line-binding-head,
.admin-line-binding-title,
.admin-line-permission-form,
.admin-line-binding-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-line-binding-head {
    justify-content: space-between;
}

.admin-line-binding-head span,
.admin-line-binding-manager > p {
    color: var(--muted);
}

.admin-line-binding-list {
    display: grid;
    border-top: 1px solid var(--line);
}

.admin-line-binding-row {
    display: grid;
    grid-template-columns: minmax(180px, 0.7fr) minmax(360px, 1.5fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.admin-line-permission-form {
    flex-wrap: wrap;
}

.admin-line-permission-form label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.admin-line-permission-form input[type="checkbox"] {
    width: 17px;
    height: 17px;
}

.admin-line-binding-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.admin-line-binding-actions form {
    margin: 0;
}

.admin-line-binding-actions .btn-danger {
    border-color: rgba(220, 86, 86, 0.58);
    color: #ffb2b2;
    background: rgba(120, 31, 31, 0.2);
}

@media (max-width: 980px) {
    .admin-line-binding-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .admin-line-binding-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .admin-line-permission-form,
    .admin-line-binding-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-line-permission-form .btn,
    .admin-line-binding-actions form,
    .admin-line-binding-actions .btn {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .app-layout {
        min-height: auto;
    }

    .sidebar {
        padding-top: 10px;
    }

    .sidebar-link,
    .sidebar-sublink {
        padding: 11px 13px;
        font-size: 0.92rem;
    }

    .page-header-lux {
        padding: 2px 0 2px;
    }

    .stat-card strong {
        font-size: 1.7rem;
    }

    .quick-amount-btn {
        flex-basis: 100%;
    }
}

@keyframes marquee-scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

.pwa-install-prompt {
    position: fixed;
    right: 18px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    z-index: 80;
    display: flex;
    align-items: center;
    gap: 16px;
    width: min(520px, calc(100vw - 36px));
    padding: 16px;
    border: 1px solid rgba(242, 207, 121, 0.34);
    border-radius: 20px;
    background: rgba(8, 8, 8, 0.94);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(18px);
}

.pwa-install-prompt[hidden] {
    display: none;
}

.pwa-install-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.pwa-install-copy strong {
    color: var(--text);
    font-size: 1rem;
}

.pwa-install-copy span {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.pwa-install-actions {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
}

.pwa-install-actions .btn {
    min-height: 40px;
    padding: 9px 14px;
    white-space: nowrap;
}

@media (max-width: 560px) {
    .pwa-install-prompt {
        left: 12px;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        width: auto;
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        padding: 14px;
        border-radius: 18px;
    }

    .pwa-install-actions {
        width: 100%;
    }

    .pwa-install-actions .btn {
        flex: 1 1 0;
    }
}

/* Upstream failover plans */
.failover-admin {
    display: grid;
    gap: 18px;
    width: min(100%, 1440px);
    min-width: 0;
    max-width: 100%;
}

.failover-admin > * {
    min-width: 0;
}

.failover-page-head,
.failover-workspace-head,
.failover-command-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.failover-page-head h1,
.failover-workspace-head h2,
.failover-history h2 {
    margin: 0;
}

.failover-page-head h1 {
    font-size: 38px;
    line-height: 1.15;
}

.failover-plan-list,
.failover-workspace,
.failover-history {
    border: 1px solid var(--line);
    background: var(--panel);
    min-width: 0;
    max-width: 100%;
}

.failover-plan-list-head,
.failover-plan-row {
    display: grid;
    grid-template-columns: minmax(190px, 1.8fr) 70px 110px 145px 100px 78px;
    align-items: center;
    gap: 14px;
    min-width: 760px;
    padding: 13px 16px;
    box-sizing: border-box;
}

.failover-plan-list {
    overflow-x: auto;
}

.failover-plan-list-head {
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.failover-plan-row {
    border-bottom: 1px solid var(--line);
}

.failover-plan-row:last-child {
    border-bottom: 0;
}

.failover-plan-row.is-selected {
    box-shadow: inset 3px 0 0 var(--gold);
    background: rgba(213, 169, 72, 0.05);
}

.failover-plan-name {
    display: grid;
    gap: 3px;
    color: var(--text);
    text-decoration: none;
}

.failover-plan-name small,
.failover-table small,
.failover-workspace-head span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.failover-state,
.failover-check {
    display: inline-flex;
    width: fit-content;
    padding: 4px 7px;
    border: 1px solid var(--line);
    font-size: 12px;
}

.failover-state.is-ready,
.failover-check.is-passed {
    color: var(--success);
    border-color: color-mix(in srgb, var(--success) 45%, transparent);
}

.failover-state.is-live,
.failover-state.is-warning,
.failover-check.is-warning {
    color: var(--gold-strong);
    border-color: var(--gold);
}

.failover-state.is-danger,
.failover-check.is-failed,
.failover-drift {
    color: var(--danger);
}

.failover-check.is-unchecked {
    color: var(--muted);
}

.failover-workspace-head,
.failover-history {
    padding: 18px;
}

.failover-workspace {
    overflow: hidden;
}

.failover-workspace-head > div:first-child {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.failover-table-wrap {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.failover-table {
    min-width: 1060px;
    margin: 0;
}

.failover-table td,
.failover-table th {
    vertical-align: top;
}

.failover-table td:first-child,
.failover-table th:first-child {
    width: 58px;
    text-align: center;
}

.failover-table td:nth-child(2) {
    min-width: 240px;
}

.failover-table td:nth-child(3),
.failover-table td:nth-child(4) {
    min-width: 160px;
}

.compact-actions {
    flex-wrap: nowrap;
}

.danger-link {
    color: var(--danger);
}

.failover-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid var(--line);
}

.failover-summary span {
    padding: 11px 16px;
    text-align: center;
    border-right: 1px solid var(--line);
}

.failover-summary span:last-child {
    border-right: 0;
}

.failover-warning {
    margin: 16px 18px 0;
    padding: 12px 14px;
    border-left: 3px solid var(--gold);
    background: rgba(213, 169, 72, 0.06);
    color: var(--gold-strong);
}

.failover-command-bar {
    padding: 18px;
}

.failover-switch-form {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 12px;
    flex: 1;
}

.failover-switch-form label {
    width: min(100%, 520px);
}

.failover-history-list {
    display: grid;
    margin-top: 12px;
    border-top: 1px solid var(--line);
}

.failover-history-list > div {
    display: grid;
    grid-template-columns: 150px 1fr 170px;
    gap: 14px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.failover-history-list time {
    color: var(--muted);
    text-align: right;
}

.failover-dialog {
    width: min(92vw, 620px);
    padding: 0;
    border: 1px solid var(--gold);
    border-radius: 6px;
    background: var(--panel);
    color: var(--text);
}

.failover-dialog::backdrop {
    background: rgba(0, 0, 0, 0.72);
}

.failover-dialog > form {
    padding: 20px;
}

@media (max-width: 720px) {
    .failover-admin {
        gap: 12px;
    }

    .failover-page-head h1 {
        font-size: 30px;
    }

    .failover-plan-list {
        overflow: hidden;
    }

    .failover-plan-list-head {
        display: none;
    }

    .failover-plan-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 12px;
        min-width: 0;
        padding: 14px;
    }

    .failover-plan-name {
        grid-column: 1 / -1;
    }

    .failover-plan-row > span:nth-child(4) {
        display: none;
    }

    .failover-plan-row > .btn {
        grid-column: 2;
        grid-row: 2 / span 2;
        align-self: center;
    }

    .failover-page-head,
    .failover-workspace-head,
    .failover-command-bar,
    .failover-switch-form {
        align-items: stretch;
        flex-direction: column;
    }

    .failover-page-head .btn,
    .failover-command-bar .btn,
    .failover-command-bar form,
    .failover-switch-form label {
        width: 100%;
    }

    .failover-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .failover-summary span:nth-child(2) {
        border-right: 0;
    }

    .failover-summary span:nth-child(-n+2) {
        border-bottom: 1px solid var(--line);
    }

    .failover-history-list > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .failover-history-list time {
        text-align: left;
    }
}

.line-binding-management {
    display: grid;
    gap: 18px;
}

.line-binding-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.line-binding-head h2,
.line-binding-head p {
    margin: 0;
}

.line-binding-head p {
    margin-top: 6px;
    color: var(--muted);
}

.line-binding-list {
    display: grid;
    border-top: 1px solid var(--line);
}

.line-binding-code-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--gold);
    background: rgba(213, 170, 61, 0.05);
}

.line-binding-code-panel p,
.line-binding-code-result span,
.line-binding-code-result small {
    margin: 5px 0 0;
    color: var(--muted);
}

.line-binding-code-panel form {
    margin: 0;
}

.line-binding-code-result {
    display: grid;
    gap: 6px;
    grid-column: 1 / -1;
}

.line-binding-code-result code {
    width: fit-content;
    padding: 10px 12px;
    border: 1px solid rgba(213, 170, 61, 0.55);
    background: #0d0d0c;
    color: var(--gold-strong);
    font: 700 20px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
    letter-spacing: 0;
}

.line-binding-row {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(220px, auto) auto;
    align-items: center;
    gap: 18px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.line-binding-row.is-primary {
    border-left: 3px solid #06c755;
    padding-left: 14px;
}

.line-binding-identity,
.line-binding-title,
.line-binding-permissions,
.line-binding-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.line-binding-identity > div {
    display: grid;
    gap: 4px;
}

.line-binding-identity small {
    color: var(--muted);
}

.line-binding-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: #06c755;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.line-binding-permissions,
.line-binding-actions {
    flex-wrap: wrap;
}

.line-binding-permissions span {
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--muted);
    font-size: 13px;
}

.line-binding-actions {
    justify-content: flex-end;
}

.line-binding-actions form {
    margin: 0;
}

.line-binding-actions .btn-danger {
    border-color: rgba(220, 86, 86, 0.58);
    color: #ffb2b2;
    background: rgba(120, 31, 31, 0.2);
}

.line-binding-empty {
    padding: 30px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
}

@media (max-width: 720px) {
    .line-binding-code-panel {
        grid-template-columns: 1fr;
    }

    .line-binding-code-panel form,
    .line-binding-code-panel .btn {
        width: 100%;
    }

    .line-binding-row {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 14px;
    }

    .line-binding-actions,
    .line-binding-actions form,
    .line-binding-actions .btn {
        width: 100%;
    }
}
