:root {
    --bg: #f5f8ff;
    --bg-grid: radial-gradient(circle at 18% -6%, #dbe8ff 0%, rgba(219, 232, 255, 0) 36%), radial-gradient(circle at 92% 10%, #ddeef6 0%, rgba(221, 238, 246, 0) 34%), linear-gradient(180deg, #f7f9ff 0%, #f3f6fc 100%);
    --surface: #ffffff;
    --surface-soft: #f8fbff;
    --text: #0f1f3a;
    --muted: #617091;
    --line: #dce4f2;
    --line-soft: #eaf0f9;

    --primary: #2f6df6;
    --primary-strong: #2255cf;
    --primary-soft: #e2ebff;
    --success: #1fa86f;
    --warning: #d08124;
    --danger: #d64c58;

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-soft: 0 14px 34px rgba(18, 43, 91, 0.08);
    --shadow-lift: 0 20px 42px rgba(17, 39, 82, 0.14);
    --focus: 0 0 0 3px rgba(47, 109, 246, 0.24);

    --sidebar-bg: linear-gradient(180deg, #0a1733 0%, #0f234c 58%, #122d59 100%);
    --sidebar-border: rgba(130, 163, 233, 0.24);
    --sidebar-text: #d8e6ff;
    --sidebar-muted: #95acd6;
    --sidebar-link-bg: rgba(136, 176, 255, 0.08);
    --sidebar-link-active: linear-gradient(105deg, rgba(93, 144, 255, 0.33), rgba(62, 103, 229, 0.6));
    --sidebar-link-border: rgba(128, 163, 238, 0.38);
    --sidebar-dot: #9ec0ff;

    --auth-page-bg: radial-gradient(980px 540px at -12% -10%, #dce8ff 0%, transparent 57%), radial-gradient(920px 520px at 114% -12%, #f4e5cb 0%, transparent 56%), linear-gradient(144deg, #f8fbff 0%, #eef3ff 46%, #f2f7ff 100%);
    --auth-showcase-bg: linear-gradient(150deg, rgba(255, 255, 255, 0.94), rgba(244, 248, 255, 0.78));
    --auth-showcase-shadow: 0 26px 54px rgba(16, 45, 99, 0.18);
    --auth-showcase-glow-1: radial-gradient(circle at 20% 24%, rgba(108, 153, 255, 0.32), rgba(108, 153, 255, 0));
    --auth-showcase-glow-2: radial-gradient(circle at 74% 72%, rgba(255, 198, 106, 0.31), rgba(255, 198, 106, 0));
    --auth-kicker: #315385;
    --auth-title: #0f234d;
    --auth-copy: #3f5a84;

    --auth-panel-bg: linear-gradient(180deg, #0b1f41 0%, #123266 100%);
    --auth-panel-border: rgba(123, 168, 252, 0.42);
    --auth-panel-text: #edf4ff;
    --auth-panel-muted: #a4bee7;
    --auth-label: #c9dcfe;
    --auth-input-bg: rgba(8, 23, 49, 0.52);
    --auth-input-border: rgba(132, 172, 245, 0.4);
    --auth-input-placeholder: #9fb4d8;
    --auth-btn-bg: linear-gradient(105deg, #5e97ff 0%, #3670ff 54%, #2a5be5 100%);
}

body.auth-theme-neutral-green {
    --primary: #1b9f73;
    --primary-strong: #14845f;
    --primary-soft: #d8f5ea;
    --focus: 0 0 0 3px rgba(25, 159, 115, 0.2);

    --auth-page-bg: radial-gradient(980px 540px at -12% -10%, #dbf6ea 0%, transparent 57%), radial-gradient(920px 520px at 114% -12%, #f4efd8 0%, transparent 56%), linear-gradient(144deg, #f5fff9 0%, #edfbf4 46%, #eef8ff 100%);
    --auth-showcase-shadow: 0 26px 54px rgba(10, 72, 55, 0.16);
    --auth-showcase-glow-1: radial-gradient(circle at 20% 24%, rgba(46, 177, 129, 0.3), rgba(46, 177, 129, 0));
    --auth-showcase-glow-2: radial-gradient(circle at 74% 72%, rgba(255, 190, 122, 0.28), rgba(255, 190, 122, 0));
    --auth-kicker: #1f624f;
    --auth-title: #123f31;
    --auth-copy: #2e5f4f;

    --auth-panel-bg: linear-gradient(180deg, #18392f 0%, #235847 100%);
    --auth-panel-border: rgba(119, 211, 177, 0.42);
    --auth-panel-muted: #afdccc;
    --auth-label: #cbf0e3;
    --auth-input-bg: rgba(8, 45, 34, 0.5);
    --auth-input-border: rgba(113, 209, 176, 0.36);
    --auth-input-placeholder: #93baa9;
    --auth-btn-bg: linear-gradient(105deg, #34be90 0%, #239f82 54%, #198469 100%);
}

body.auth-theme-indigo-night {
    --primary: #5b89ff;
    --primary-strong: #3c63d3;
    --primary-soft: #dfe8ff;

    --auth-page-bg: radial-gradient(980px 540px at -12% -10%, #314f88 0%, transparent 57%), radial-gradient(920px 520px at 114% -12%, #29587f 0%, transparent 56%), linear-gradient(144deg, #061428 0%, #102441 46%, #07172c 100%);
    --auth-showcase-bg: linear-gradient(150deg, rgba(255, 255, 255, 0.15), rgba(30, 67, 126, 0.26));
    --auth-showcase-shadow: 0 26px 54px rgba(8, 16, 36, 0.46);
    --auth-showcase-glow-1: radial-gradient(circle at 20% 24%, rgba(129, 174, 255, 0.32), rgba(129, 174, 255, 0));
    --auth-showcase-glow-2: radial-gradient(circle at 74% 72%, rgba(122, 219, 255, 0.28), rgba(122, 219, 255, 0));
    --auth-kicker: #c6dcff;
    --auth-title: #eef5ff;
    --auth-copy: #c6d7f4;

    --auth-panel-bg: linear-gradient(180deg, #0b1d3a 0%, #0f3164 100%);
    --auth-panel-border: rgba(126, 170, 255, 0.44);
    --auth-panel-muted: #a9c4eb;
    --auth-label: #d3e4ff;
    --auth-input-bg: rgba(8, 24, 52, 0.56);
    --auth-input-border: rgba(136, 174, 245, 0.46);
    --auth-input-placeholder: #98afd4;
    --auth-btn-bg: linear-gradient(105deg, #709cff 0%, #4a78f4 54%, #335ed2 100%);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Plus Jakarta Sans", "Pretendard", "Noto Sans KR", "Segoe UI", sans-serif;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg-grid);
}

body.guest-mode {
    background: var(--auth-page-bg);
}

h1,
h2,
h3,
h4 {
    margin: 0;
    color: var(--text);
    letter-spacing: -0.02em;
}

p {
    margin: 0;
}

a {
    color: inherit;
}

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

.auth-shell {
    grid-template-columns: minmax(0, 1fr);
}

body.has-sidebar .app-shell {
    transition: grid-template-columns 0.22s ease;
}

body.has-sidebar.sidebar-collapsed .app-shell {
    grid-template-columns: 0 minmax(0, 1fr);
}

.sidebar {
    padding: 18px 14px;
    background: radial-gradient(620px 320px at -12% -8%, rgba(126, 169, 255, 0.14), rgba(126, 169, 255, 0)), linear-gradient(180deg, #0d1728 0%, #0b1523 55%, #0a121f 100%);
    color: #dbe6fa;
    border-right: 1px solid rgba(124, 156, 218, 0.22);
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 179, 236, 0.36) transparent;
    transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease, padding 0.2s ease;
}

body.has-sidebar.sidebar-collapsed .sidebar {
    opacity: 0;
    transform: translateX(-14px);
    pointer-events: none;
    visibility: hidden;
    border-right-color: transparent;
    padding-left: 0;
    padding-right: 0;
}

body.sidebar-scroll-lock {
    overflow: hidden;
}

.sidebar-backdrop {
    display: none;
}

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

.sidebar::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(146, 178, 236, 0.35);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 6px;
    padding: 6px 6px 13px;
    border-bottom: 1px solid rgba(136, 165, 224, 0.2);
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    color: #0d254f;
    background: linear-gradient(145deg, #eef5ff, #aac7ff 65%, #8eb2f7 100%);
    box-shadow: 0 10px 20px rgba(16, 37, 78, 0.34);
}

.sidebar-brand strong {
    display: block;
    font-size: 0.92rem;
    color: #eef4ff;
    letter-spacing: 0.01em;
}

.sidebar-brand span {
    display: block;
    font-size: 0.71rem;
    color: #8fa6cd;
    margin-top: 1px;
}

.sidebar-profile {
    border: 1px solid rgba(138, 170, 228, 0.26);
    background: linear-gradient(145deg, rgba(24, 41, 70, 0.58), rgba(20, 35, 61, 0.38));
    border-radius: 13px;
    padding: 10px 11px;
}

.sidebar-profile p {
    font-size: 0.82rem;
    font-weight: 700;
    color: #edf3ff;
    line-height: 1.28;
}

.sidebar-profile span {
    display: block;
    margin-top: 4px;
    font-size: 0.69rem;
    color: #8ca4cc;
    line-height: 1.3;
}

.sidebar-group {
    margin: 8px 3px 4px;
    font-size: 0.62rem;
    font-weight: 700;
    color: #7e95ba;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

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

.sidebar-link {
    text-decoration: none;
    color: #d4e0f5;
    border: 1px solid rgba(129, 161, 222, 0.08);
    border-radius: 12px;
    min-height: 40px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(122, 159, 236, 0.03);
    font-size: 0.81rem;
    font-weight: 650;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.sidebar-link:hover {
    background: rgba(138, 173, 240, 0.13);
    border-color: rgba(150, 182, 241, 0.22);
    color: #edf4ff;
    transform: translateX(2px);
}

.sidebar-link.is-active {
    background: linear-gradient(112deg, rgba(116, 165, 255, 0.32), rgba(77, 116, 218, 0.4));
    border-color: rgba(162, 194, 249, 0.36);
    color: #f4f8ff;
    box-shadow: inset 2px 0 0 #95b9ff, 0 10px 20px rgba(11, 25, 52, 0.3);
}

.sidebar-link-icon {
    min-width: 23px;
    height: 23px;
    border-radius: 7px;
    border: 1px solid rgba(139, 172, 235, 0.24);
    background: rgba(126, 162, 238, 0.09);
    color: #c7d8f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-link-icon svg {
    width: 14.5px;
    height: 14.5px;
    stroke: currentColor;
}

.sidebar-link.is-active .sidebar-link-icon {
    border-color: rgba(188, 214, 255, 0.58);
    background: rgba(185, 212, 255, 0.26);
    color: #f3f8ff;
}

.sidebar-mode-card {
    margin-top: auto;
    border: 1px solid rgba(152, 190, 255, 0.28);
    border-radius: 13px;
    background: linear-gradient(155deg, rgba(104, 151, 244, 0.2), rgba(42, 73, 141, 0.3));
    padding: 11px;
    display: grid;
    gap: 8px;
}

.sidebar-mode-label {
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #a8c1ea;
    font-weight: 700;
}

.sidebar-mode-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sidebar-mode-head strong {
    font-size: 0.8rem;
    color: #ecf4ff;
}

.sidebar-mode-badge {
    border: 1px solid rgba(186, 212, 255, 0.42);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #edf5ff;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 4px 8px;
    line-height: 1;
}

.sidebar-mode-switch {
    border: 1px solid rgba(146, 181, 244, 0.38);
    border-radius: 10px;
    background: rgba(10, 26, 58, 0.45);
    padding: 4px;
    display: flex;
    gap: 4px;
}

.sidebar-mode-switch form {
    flex: 1;
}

.sidebar-mode-btn {
    width: 100%;
    min-height: 28px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: #b9cdef;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 6px 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sidebar-mode-btn:hover {
    border-color: rgba(166, 195, 243, 0.34);
    color: #eaf3ff;
}

.sidebar-mode-btn.is-active {
    border-color: rgba(195, 218, 255, 0.44);
    background: linear-gradient(135deg, rgba(124, 171, 255, 0.62), rgba(89, 118, 217, 0.52));
    color: #ffffff;
}

.sidebar-mode-note {
    margin: 0;
    font-size: 0.7rem;
    color: #9fb8df;
    line-height: 1.45;
}

.sidebar-mode-card.is-live {
    border-color: rgba(120, 220, 177, 0.35);
    background: linear-gradient(155deg, rgba(83, 194, 151, 0.18), rgba(35, 115, 89, 0.3));
}

.sidebar-mode-card.is-live .sidebar-mode-switch {
    border-color: rgba(117, 204, 168, 0.35);
    background: rgba(9, 35, 28, 0.46);
}

.sidebar-mode-card.is-live .sidebar-mode-btn.is-active {
    border-color: rgba(180, 244, 217, 0.45);
    background: linear-gradient(135deg, rgba(66, 199, 147, 0.62), rgba(28, 150, 106, 0.54));
}

.sidebar-mode-card.is-live .sidebar-mode-label,
.sidebar-mode-card.is-live .sidebar-mode-note {
    color: #9fd8bf;
}

.sidebar-guide {
    margin-top: auto;
    border: 1px solid rgba(151, 188, 255, 0.24);
    background: rgba(123, 163, 236, 0.08);
    color: #d9e8ff;
    text-decoration: none;
    border-radius: 12px;
    padding: 9px 11px;
    font-size: 0.78rem;
    font-weight: 700;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.sidebar-mode-card + .sidebar-guide {
    margin-top: 10px;
}

.sidebar-guide:hover {
    background: rgba(141, 182, 255, 0.16);
    border-color: rgba(162, 198, 255, 0.34);
    color: #eff5ff;
}

.content {
    min-width: 0;
    padding: 18px 22px 34px;
}

.topbar {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(222, 231, 245, 0.9);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.topbar-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.topbar-title-wrap {
    min-width: 0;
}

.topbar-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
    font-weight: 700;
}

.topbar h1 {
    margin-top: 4px;
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-toggle {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 10px;
    border: 1px solid #cad6ea;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0;
}

.sidebar-toggle span {
    display: block;
    width: 14px;
    height: 2px;
    border-radius: 999px;
    background: #254476;
    transform-origin: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.lang-switch {
    display: inline-flex;
    gap: 6px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f9fbff;
}

.btn-link {
    appearance: none;
    border: 1px solid #cad6ea;
    background: #ffffff;
    color: #16325f;
    border-radius: 999px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    min-height: 34px;
    padding: 8px 12px;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.btn-link:hover {
    border-color: #9eb9ea;
    background: #edf4ff;
    color: #12306a;
}

.btn-link:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

.btn-link.btn-muted {
    border-color: #bdd0f1;
    background: #f1f6ff;
}

.btn-mini {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 0.72rem;
}

button,
.btn-primary {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 14px;
    background: linear-gradient(110deg, var(--primary), var(--primary-strong));
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform 0.16s ease, filter 0.16s ease;
}

button:hover,
.btn-primary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    padding: 18px;
    margin-bottom: 14px;
}

.page-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: linear-gradient(160deg, #ffffff 0%, #f7faff 56%, #edf4ff 100%);
}

.hero-title {
    font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
    font-size: clamp(1.3rem, 2vw, 1.9rem);
    margin-top: 5px;
}

.hero-subtitle {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.9rem;
    max-width: 720px;
}

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

.key-note {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #5b729c;
    font-weight: 700;
}

.metric-grid,
.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.metric-card,
.card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: linear-gradient(162deg, #ffffff 0%, #f7faff 100%);
    padding: 14px;
    box-shadow: 0 12px 26px rgba(17, 43, 89, 0.08);
}

.metric-kicker,
.card h3 {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #63759a;
    margin-bottom: 7px;
}

.metric-value,
.card p {
    font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
    font-size: 1.35rem;
    line-height: 1;
    letter-spacing: -0.03em;
    color: #112750;
    font-weight: 700;
}

.metric-note {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.78rem;
}

.trend-chart-wrap {
    min-height: 152px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
    padding: 10px 10px 6px;
    display: flex;
    align-items: flex-end;
    gap: 6px;
    overflow-x: auto;
}

.trend-bar-item {
    min-width: 18px;
    display: grid;
    gap: 6px;
    align-items: end;
}

.trend-bar {
    width: 100%;
    border-radius: 6px 6px 3px 3px;
    background: linear-gradient(180deg, #6d98ff 0%, #3f6fe3 100%);
}

.trend-bar-item span {
    color: #617091;
    font-size: 0.65rem;
    text-align: center;
    white-space: nowrap;
}

.split-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 12px;
}

.section-title {
    font-size: 1rem;
    margin-bottom: 10px;
}

.subtle {
    color: var(--muted);
    font-size: 0.86rem;
}

.quick-list {
    display: grid;
    gap: 8px;
}

.quick-item {
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: var(--surface-soft);
    padding: 10px 11px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.84rem;
}

.quick-item:hover {
    border-color: #b7caec;
    background: #f0f6ff;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #cad7ef;
    background: #f1f5ff;
    color: #355586;
    padding: 3px 9px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-pill.is-succeeded,
.status-pill.is-active,
.status-pill.is-paid {
    border-color: #a7e3c8;
    background: #e9f9f2;
    color: #1d7d55;
}

.status-pill.is-approved,
.status-pill.is-recovered {
    border-color: #a8ddf3;
    background: #eaf7ff;
    color: #1e6689;
}

.status-pill.is-pending {
    border-color: #f3d39e;
    background: #fff6e6;
    color: #9a6119;
}

.status-pill.is-past_due {
    border-color: #f3d39e;
    background: #fff6e6;
    color: #9a6119;
}

.status-pill.is-paused,
.status-pill.is-requested {
    border-color: #e7d0f7;
    background: #f8f0ff;
    color: #6a3f9e;
}

.status-pill.is-failed,
.status-pill.is-canceled,
.status-pill.is-refunded,
.status-pill.is-inactive {
    border-color: #f1b6be;
    background: #fff0f2;
    color: #a53843;
}

.status-pill.is-closed,
.status-pill.is-rejected {
    border-color: #d5dae4;
    background: #f4f6f9;
    color: #525d72;
}

.table-wrap {
    overflow: auto;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    background: #ffffff;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 720px;
}

th,
td {
    text-align: left;
    padding: 12px 10px;
    font-size: 0.84rem;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: top;
}

th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f9fbff;
    color: #425e89;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

tbody tr:hover {
    background: #f8fbff;
}

tbody tr:last-child td {
    border-bottom: 0;
}

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

.filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.filter-grid .inline,
.filter-grid .small-note {
    grid-column: 1 / -1;
}

.filter-grid select[multiple] {
    min-height: 112px;
}

label {
    display: grid;
    gap: 6px;
    font-size: 0.83rem;
    font-weight: 600;
    color: #4f6286;
}

input,
select,
textarea {
    width: 100%;
    font-family: inherit;
    font-size: 0.88rem;
    border: 1px solid #cad4e8;
    border-radius: 11px;
    background: #ffffff;
    color: var(--text);
    padding: 10px 11px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input::placeholder,
textarea::placeholder {
    color: #8ca0c4;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #96b6ef;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.checkbox input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.alert {
    border-radius: 12px;
    border: 1px solid;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 0.84rem;
}

.alert.success {
    border-color: #b7e7d2;
    background: #ecfaf3;
    color: #1b774f;
}

.alert.error {
    border-color: #f2bcc2;
    background: #fff0f2;
    color: #9d3540;
}

.alert.warning {
    border-color: #f1d39f;
    background: #fff8eb;
    color: #95601d;
}

.small-note {
    color: var(--muted);
    font-size: 0.78rem;
}

.code-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid #cfd9ec;
    background: #f3f7ff;
    color: #173868;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    border-radius: 8px;
    padding: 5px 8px;
    font-size: 0.76rem;
    text-decoration: none;
}

.code-list {
    display: grid;
    gap: 8px;
}

.code-list-item {
    border: 1px solid var(--line-soft);
    border-radius: 11px;
    background: var(--surface-soft);
    padding: 9px;
    display: grid;
    gap: 6px;
}

.code-list-meta {
    color: var(--muted);
    font-size: 0.77rem;
}

.code-list-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

pre {
    margin: 0;
    border-radius: 12px;
    border: 1px solid #1e335e;
    background: #091934;
    color: #e8f1ff;
    padding: 12px;
    overflow: auto;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.76rem;
    line-height: 1.52;
}

.api-guide-card-wrap,
.api-guide-sample-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.api-guide-card,
.api-guide-sample {
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: var(--surface-soft);
    padding: 12px;
}

.api-guide-card h4,
.api-guide-sample h4 {
    margin-bottom: 6px;
    font-size: 0.88rem;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 12px;
}

.content nav[role="navigation"] {
    margin-top: 12px;
}

.content nav[role="navigation"] > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.content nav[role="navigation"] a,
.content nav[role="navigation"] span {
    font-size: 0.8rem;
}

.content nav[role="navigation"] span[aria-current="page"] span,
.content nav[role="navigation"] span[aria-current="page"] {
    border-radius: 999px;
    background: #eaf1ff;
    color: #284f97;
    padding: 6px 10px;
}

.guest-mode .content {
    padding: 0;
    display: grid;
    place-items: center;
    min-height: 100vh;
}

.guest-mode .topbar {
    display: none;
}

.auth-shell {
    width: min(1480px, 100%);
    margin: 0 auto;
    padding: 0 14px;
}

.auth-experience {
    width: min(1420px, 100%);
    min-height: calc(100vh - 42px);
    display: grid;
    grid-template-columns: minmax(0, 1.28fr) minmax(430px, 520px);
    align-items: stretch;
    gap: 18px;
}

.auth-showcase {
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-xl);
    background: var(--auth-showcase-bg);
    box-shadow: var(--auth-showcase-shadow);
    padding: 34px;
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 15px;
}

.auth-showcase::before {
    content: "";
    position: absolute;
    inset: auto -80px -80px auto;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: var(--auth-showcase-glow-1);
}

.auth-showcase::after {
    content: "";
    position: absolute;
    inset: -120px auto auto -120px;
    width: 310px;
    height: 310px;
    border-radius: 50%;
    background: var(--auth-showcase-glow-2);
}

.auth-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--auth-kicker);
}

.auth-showcase h1 {
    font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.03;
    color: var(--auth-title);
}

.auth-copy {
    color: var(--auth-copy);
    max-width: 600px;
}

.auth-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.auth-pills span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(83, 120, 183, 0.26);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    color: #2f5589;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    min-height: 34px;
    padding: 8px 12px;
    white-space: nowrap;
}

.auth-pills span::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.5;
    margin-right: 8px;
    flex-shrink: 0;
}

.auth-metrics {
    margin-top: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.auth-metrics div {
    border: 1px solid rgba(83, 120, 183, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
    padding: 12px;
}

.auth-metrics strong {
    display: block;
    font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
    font-size: 1.28rem;
    color: var(--auth-title);
    margin-bottom: 4px;
}

.auth-metrics span {
    color: var(--auth-copy);
    font-size: 0.79rem;
}

.auth-panel {
    margin: 0;
    border: 1px solid var(--auth-panel-border);
    border-radius: var(--radius-xl);
    background: var(--auth-panel-bg);
    color: var(--auth-panel-text);
    padding: 30px 24px;
    box-shadow: 0 24px 44px rgba(10, 24, 52, 0.38);
}

.auth-brand {
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #dbe9ff;
    font-weight: 700;
}

.auth-slogan {
    margin-top: 4px;
    color: var(--auth-panel-muted);
    font-size: 0.83rem;
}

.auth-panel h2 {
    margin-top: 14px;
    font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
    font-size: 1.9rem;
    color: #edf4ff;
}

.auth-panel-subtitle {
    margin: 8px 0 18px;
    font-size: 0.88rem;
    color: var(--auth-panel-muted);
}

.auth-panel label {
    color: var(--auth-label);
}

.auth-panel input {
    border-color: var(--auth-input-border);
    background: var(--auth-input-bg);
    color: #f4f8ff;
}

.auth-panel input::placeholder {
    color: var(--auth-input-placeholder);
}

.auth-panel .checkbox {
    margin-top: 2px;
}

.auth-panel .checkbox span {
    color: var(--auth-label);
    font-size: 0.83rem;
}

.auth-panel .btn-primary {
    width: 100%;
    border-radius: 12px;
    margin-top: 4px;
    background: var(--auth-btn-bg);
}

.auth-theme-selector {
    margin-top: 14px;
}

.auth-theme-label {
    display: inline-block;
    color: var(--auth-panel-muted);
    font-size: 0.76rem;
    margin-bottom: 7px;
}

.auth-theme-select {
    width: 100%;
    border: 1px solid rgba(154, 184, 238, 0.35);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: #deebff;
    padding: 9px 10px;
    font-size: 0.84rem;
}

body.merchant-ui {
    background: #edf3fb;
}

body.merchant-ui .app-shell {
    grid-template-columns: 252px minmax(0, 1fr);
}

body.merchant-store-entry-screen .app-shell.auth-shell,
body.merchant-stores-menu-screen .app-shell.auth-shell {
    grid-template-columns: minmax(0, 1fr);
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.merchant-ui .sidebar {
    padding: 14px 11px;
    gap: 7px;
    background: radial-gradient(580px 300px at -16% -10%, rgba(132, 168, 248, 0.22), rgba(132, 168, 248, 0)), linear-gradient(180deg, #0d1a30 0%, #0b1628 54%, #0a1321 100%);
    border-right-color: #203250;
}

body.merchant-ui .sidebar-brand {
    margin-bottom: 4px;
    padding: 4px 5px 10px;
    border-bottom-color: rgba(126, 157, 210, 0.2);
}

body.merchant-ui .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 0.86rem;
    box-shadow: 0 8px 16px rgba(8, 26, 58, 0.38);
}

body.merchant-ui .sidebar-brand strong {
    font-size: 0.85rem;
    color: #eff5ff;
}

body.merchant-ui .sidebar-brand span {
    font-size: 0.67rem;
    color: #8aa1c8;
}

body.merchant-ui .sidebar-profile {
    border-color: rgba(128, 160, 218, 0.26);
    border-radius: 11px;
    padding: 8px 9px;
    background: linear-gradient(146deg, rgba(22, 38, 65, 0.76), rgba(18, 31, 55, 0.56));
}

body.merchant-ui .sidebar-profile p {
    font-size: 0.76rem;
}

body.merchant-ui .sidebar-profile span {
    margin-top: 2px;
    font-size: 0.65rem;
}

body.merchant-ui .sidebar-group {
    margin: 7px 2px 3px;
    font-size: 0.57rem;
    letter-spacing: 0.14em;
    color: #6f87ad;
}

body.merchant-ui .sidebar-nav {
    gap: 4px;
}

body.merchant-ui .sidebar-link {
    min-height: 36px;
    border-radius: 10px;
    padding: 7px 9px;
    gap: 8px;
    font-size: 0.76rem;
    border-color: rgba(132, 166, 226, 0.1);
    background: rgba(132, 166, 226, 0.04);
}

body.merchant-ui .sidebar-link:hover {
    background: rgba(136, 170, 234, 0.16);
    border-color: rgba(158, 191, 250, 0.28);
    transform: translateX(1px);
}

body.merchant-ui .sidebar-link.is-active {
    border-color: rgba(176, 205, 255, 0.42);
    background: linear-gradient(115deg, rgba(129, 172, 255, 0.35), rgba(80, 120, 220, 0.42));
    box-shadow: inset 2px 0 0 rgba(198, 220, 255, 0.88), 0 8px 20px rgba(8, 22, 47, 0.34);
}

body.merchant-ui .sidebar-link-icon {
    min-width: 20px;
    height: 20px;
    border-radius: 6px;
}

body.merchant-ui .sidebar-link-icon svg {
    width: 13px;
    height: 13px;
}

body.merchant-ui .sidebar-mode-card {
    border-radius: 11px;
    padding: 9px;
    gap: 6px;
}

body.merchant-ui .sidebar-mode-badge {
    font-size: 0.61rem;
    padding: 3px 7px;
}

body.merchant-ui .sidebar-mode-btn {
    min-height: 26px;
    font-size: 0.66rem;
}

body.merchant-ui .sidebar-mode-note {
    font-size: 0.66rem;
}

body.merchant-ui .sidebar-guide {
    margin-top: 8px;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.73rem;
}

body.merchant-ui .content {
    background: linear-gradient(180deg, #f4f8ff 0%, #edf3fb 100%);
}

body.merchant-ui .merchant-sidebar-search input {
    border-color: rgba(133, 169, 230, 0.24);
    background: rgba(16, 29, 54, 0.54);
    color: #d8e6ff;
    border-radius: 11px;
    padding: 8px 9px;
}

body.merchant-ui .merchant-sidebar-search input::placeholder {
    color: #8ba2c9;
}

body.merchant-setup-screen .content {
    background: radial-gradient(960px 540px at -12% -10%, #1b2438 0%, rgba(27, 36, 56, 0) 50%), radial-gradient(900px 520px at 114% -12%, #202a3f 0%, rgba(32, 42, 63, 0) 50%), linear-gradient(180deg, #111722 0%, #0d131d 100%);
    padding: clamp(14px, 2vw, 28px);
    display: grid;
    align-content: start;
    gap: 12px;
}

body.merchant-setup-screen .content > .setup-center-wrap,
body.merchant-setup-screen .content > .setup-panel,
body.merchant-setup-screen .content > .alert {
    width: min(100%, 1080px);
    margin-inline: auto;
}

body.merchant-setup-screen .topbar {
    border-color: #242e43;
    background: rgba(16, 23, 36, 0.78);
    box-shadow: none;
}

body.merchant-setup-screen .topbar-label {
    color: #8f9ebb;
}

body.merchant-setup-screen .topbar h1 {
    color: #f1f4fb;
}

body.merchant-setup-screen .topbar .btn-link,
body.merchant-setup-screen .lang-switch {
    border-color: #2f3a51;
    background: #141d2b;
    color: #d6deef;
}

body.merchant-setup-screen .panel {
    border-color: #262f43;
    background: #151d2a;
    box-shadow: none;
}

body.merchant-store-entry-screen .content {
    min-height: 100vh;
    padding: clamp(14px, 2.5vw, 26px) clamp(12px, 2vw, 24px);
    display: grid;
    place-items: center;
}

body.merchant-store-entry-screen .content > .setup-center-wrap {
    width: 100%;
    max-width: none;
    margin-inline: 0;
}

body.merchant-store-entry-screen .setup-entry-shell {
    width: 100%;
    max-width: none;
}

body.merchant-stores-menu-screen .content {
    min-height: 100vh;
    padding: clamp(14px, 2.5vw, 26px) clamp(12px, 2vw, 24px);
    display: grid;
    place-items: center;
    background: radial-gradient(920px 440px at 12% -8%, rgba(86, 129, 216, 0.34), rgba(86, 129, 216, 0)),
        radial-gradient(860px 420px at 88% 108%, rgba(54, 92, 165, 0.26), rgba(54, 92, 165, 0)),
        linear-gradient(180deg, #111a2a 0%, #0e1623 52%, #0b121d 100%);
}

body.merchant-stores-menu-screen .content > .store-menu-page {
    width: 100%;
    max-width: none;
    margin-inline: 0;
}

body.merchant-stores-menu-screen .content > .setup-center-wrap {
    width: 100%;
    max-width: none;
    margin-inline: 0;
}

body.merchant-stores-menu-screen .store-menu-page {
    min-height: calc(100vh - clamp(28px, 5vw, 52px));
    padding: 0;
    place-items: center;
}

body.merchant-stores-menu-screen .store-menu-page.setup-entry-shell {
    width: 100%;
    max-width: none;
}

body.merchant-stores-menu-screen .store-menu-card {
    width: min(100%, 1240px);
    max-width: 1240px;
    min-height: auto;
    margin-inline: auto;
    padding: clamp(26px, 3vw, 38px);
}

body.merchant-stores-menu-screen .store-menu-card h2 {
    font-size: clamp(1.65rem, 2.2vw, 2.15rem);
}

body.merchant-stores-menu-screen .store-menu-card .setup-subtitle {
    font-size: 0.98rem;
}

body.merchant-stores-menu-screen .store-menu-card .setup-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

body.merchant-stores-menu-screen .store-menu-card .setup-help-note {
    text-align: left;
}

@media (max-width: 980px) {
    body.merchant-stores-menu-screen .store-menu-card .setup-list {
        grid-template-columns: 1fr;
    }
}

.setup-center-wrap {
    width: 100%;
    min-height: calc(100vh - 120px);
    display: grid;
    place-items: center;
    padding: 20px 12px;
}

.setup-entry-shell {
    width: min(100%, 1100px);
    margin-inline: auto;
}

.setup-entry-shell .setup-card,
.setup-entry-shell .setup-panel {
    margin-inline: auto;
}

.setup-center-wrap-flow {
    min-height: 0;
    padding: 0;
    place-items: stretch;
}

.setup-card {
    width: min(100%, 760px);
    border: 1px solid #2d3850;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(24, 32, 47, 0.96) 0%, rgba(20, 28, 41, 0.96) 100%);
    padding: 26px;
    color: #dbe5f8;
    position: relative;
    overflow: hidden;
    box-shadow: 0 24px 52px rgba(4, 8, 16, 0.44);
}

.setup-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, rgba(245, 179, 130, 0), rgba(245, 179, 130, 0.9), rgba(172, 133, 255, 0.75), rgba(245, 179, 130, 0));
    pointer-events: none;
}

.setup-card-narrow {
    width: min(100%, 680px);
}

@media (min-width: 981px) {
    .setup-entry-shell {
        width: min(100%, 1240px);
    }

    .setup-card {
        width: min(100%, 860px);
        padding: 32px;
    }

    .setup-card-narrow {
        width: min(100%, 820px);
    }

    body.merchant-store-entry-screen .content {
        padding: clamp(20px, 2.6vw, 34px) 20px;
    }
}

.setup-logo {
    font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
    font-size: 1.4rem;
    letter-spacing: 0.04em;
    color: #f4f7ff;
    font-weight: 800;
    margin-bottom: 8px;
}

.setup-card h2 {
    color: #f3f6fd;
    font-size: clamp(1.48rem, 2.6vw, 1.92rem);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.setup-subtitle {
    color: #98a6c2;
    font-size: 0.94rem;
    margin-bottom: 16px;
}

.setup-list {
    display: grid;
    gap: 10px;
}

.setup-list-item {
    border: 1px solid #2c3750;
    border-radius: 14px;
    background: linear-gradient(160deg, #151d2b 0%, #131a27 100%);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.setup-list-item:hover {
    border-color: #425170;
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(4, 8, 16, 0.32);
}

.setup-list-item.is-active {
    border-color: #f2b087;
    box-shadow: inset 0 0 0 1px rgba(242, 176, 135, 0.3);
}

.setup-list-button {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    padding: 14px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.setup-list-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f2b087;
    color: #1c2230;
    font-weight: 800;
    font-size: 0.95rem;
}

.setup-list-content {
    display: grid;
    gap: 2px;
    flex: 1;
}

.setup-list-content strong {
    color: #eef3fd;
    font-size: 0.95rem;
}

.setup-list-content span {
    color: #96a4be;
    font-size: 0.76rem;
}

.setup-list-status {
    color: #88dba4;
    font-size: 0.72rem;
    font-weight: 700;
    border: 1px solid rgba(132, 214, 164, 0.3);
    border-radius: 999px;
    padding: 3px 8px;
    background: rgba(35, 85, 61, 0.35);
}

.setup-list-empty {
    border: 1px dashed #33415b;
    border-radius: 12px;
    color: #95a4bf;
    text-align: center;
    padding: 18px 10px;
    font-size: 0.86rem;
}

.setup-link-row {
    margin-top: 12px;
    border: 1px solid #2e3a55;
    border-radius: 14px;
    background: #121a28;
    padding: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    color: #dce6f8;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.setup-link-row:hover {
    border-color: #45567a;
    transform: translateY(-1px);
}

.setup-link-row strong {
    display: block;
    font-size: 1.07rem;
    color: #eef3fc;
}

.setup-link-row small {
    display: block;
    margin-top: 2px;
    color: #8f9cb6;
    font-size: 0.83rem;
}

.setup-help-note {
    margin-top: 18px;
    text-align: center;
    color: #8595b1;
    font-size: 0.84rem;
}

.setup-help-note a {
    color: #b59bff;
    text-decoration: none;
}

.setup-url-input {
    border: 1px solid #343f57;
    background: #111722;
    border-radius: 12px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.setup-url-input span {
    color: #8f9db8;
    font-size: 0.82rem;
}

.setup-url-input input {
    border: 0;
    background: transparent;
    min-height: 0;
    padding: 0;
}

.setup-url-input input:focus {
    border: 0;
}

.setup-panel {
    width: min(100%, 980px);
    margin-inline: auto;
    border: 1px solid #2a354a;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(23, 31, 45, 0.98) 0%, rgba(18, 26, 39, 0.98) 100%);
    padding: 20px;
    color: #dae4f8;
    position: relative;
    overflow: hidden;
    box-shadow: 0 22px 44px rgba(4, 8, 16, 0.42);
}

.setup-panel-wide {
    width: min(100%, 1040px);
}

.setup-panel::before {
    content: "";
    position: absolute;
    inset: -120px auto auto -80px;
    width: 340px;
    height: 240px;
    background: radial-gradient(circle, rgba(127, 97, 208, 0.26), rgba(127, 97, 208, 0));
    pointer-events: none;
}

.setup-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.setup-panel-head h2 {
    color: #f2f6fd;
    margin-top: 4px;
}

.setup-panel-head p {
    color: #94a3bf;
    font-size: 0.88rem;
    margin-top: 5px;
}

.setup-kicker {
    color: #b9c8e6;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
}

.setup-steps {
    display: inline-flex;
    gap: 5px;
}

.setup-steps span {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid #3a4864;
    background: #111926;
    color: #8ea2c6;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.setup-steps span.is-active {
    border-color: #b18dff;
    background: #4d3d73;
    color: #eee6ff;
}

.setup-store-note {
    margin-top: 12px;
    margin-bottom: 12px;
    border: 1px solid #2f3950;
    background: #111925;
    border-radius: 12px;
    padding: 10px 11px;
    display: grid;
    gap: 2px;
}

.setup-store-note strong {
    font-size: 0.73rem;
    color: #b8c7e3;
}

.setup-store-note span {
    font-size: 0.78rem;
    color: #90a2c3;
}

.setup-form-grid h3 {
    margin-bottom: 8px;
    color: #edf2fb;
    font-size: 1.14rem;
}

.setup-form-grid label {
    color: #b7c7e5;
}

.setup-form-grid input,
.setup-form-grid select,
.setup-form-grid textarea {
    border-color: #33405a;
    background: #101824;
    color: #ecf2ff;
}

.setup-form-grid input::placeholder,
.setup-form-grid textarea::placeholder {
    color: #6f83a8;
}

.setup-actions {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}

.setup-success-check {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #7e6ee5;
    color: #131927;
    font-size: 0.72rem;
    font-weight: 800;
}

.setup-summary-card {
    margin-top: 14px;
    border: 1px solid #2a3449;
    border-radius: 14px;
    background: #111927;
    padding: 12px;
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
}

.setup-summary-card img {
    width: 72px;
    height: 72px;
    border-radius: 11px;
    object-fit: cover;
    border: 1px solid #394763;
}

.setup-summary-card h3 {
    color: #f4f7fc;
}

.setup-summary-card p {
    margin-top: 3px;
    color: #c9d5ec;
    font-weight: 700;
}

.setup-summary-card span {
    margin-top: 5px;
    display: block;
    color: #8d9dbc;
    font-size: 0.82rem;
}

.setup-feature-list {
    margin-top: 8px;
    padding-left: 16px;
    color: #afc0df;
    font-size: 0.8rem;
    display: grid;
    gap: 4px;
}

.setup-integration-panel {
    margin-top: 12px;
}

.setup-integration-panel pre {
    margin-top: 10px;
    border: 1px solid #2f3b55;
    border-radius: 12px;
    background: #0e1521;
    padding: 12px;
    overflow: auto;
}

body.merchant-dashboard-compact .content {
    padding: 14px 18px 22px;
}

body.merchant-dashboard-compact .topbar {
    border-radius: 14px;
    margin-bottom: 10px;
    padding: 10px 12px;
}

body.merchant-dashboard-compact .topbar h1 {
    font-size: 0.98rem;
}

body.merchant-dashboard-compact .panel {
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 10px;
}

body.merchant-dashboard-compact .page-hero {
    border: 1px solid #d5e1f3;
    background: linear-gradient(155deg, #ffffff 0%, #f5f9ff 50%, #edf4ff 100%);
}

body.merchant-dashboard-compact .hero-title {
    font-size: clamp(1.15rem, 1.65vw, 1.55rem);
}

body.merchant-dashboard-compact .hero-subtitle {
    margin-top: 6px;
    font-size: 0.82rem;
}

body.merchant-dashboard-compact .metric-grid {
    gap: 10px;
}

body.merchant-dashboard-compact .metric-card {
    padding: 12px;
    border-radius: 12px;
}

body.merchant-dashboard-compact .metric-kicker {
    margin-bottom: 6px;
    font-size: 0.66rem;
}

body.merchant-dashboard-compact .metric-value {
    font-size: 1.18rem;
}

body.merchant-dashboard-compact .metric-note {
    margin-top: 6px;
    font-size: 0.72rem;
}

body.merchant-dashboard-compact .split-grid {
    gap: 10px;
}

body.merchant-dashboard-compact .section-title {
    font-size: 0.92rem;
    margin-bottom: 8px;
}

body.merchant-dashboard-compact .inline {
    gap: 6px;
}

body.merchant-dashboard-compact .trend-chart-wrap {
    min-height: 128px;
    padding: 8px 8px 5px;
    gap: 5px;
}

body.merchant-dashboard-compact .trend-bar-item {
    min-width: 16px;
    gap: 4px;
}

body.merchant-dashboard-compact .trend-bar-item span {
    font-size: 0.61rem;
}

body.merchant-dashboard-compact .quick-item,
body.merchant-dashboard-compact .code-list-item {
    border-radius: 10px;
    padding: 9px 10px;
}

body.merchant-dashboard-compact th,
body.merchant-dashboard-compact td {
    padding: 10px 8px;
    font-size: 0.78rem;
}

body.admin-dark {
    background: #0b0d12;
}

body.admin-dark .sidebar {
    background: radial-gradient(560px 290px at -16% -8%, rgba(119, 153, 230, 0.09), rgba(119, 153, 230, 0)), linear-gradient(180deg, #0f141d 0%, #0d121a 52%, #0b1017 100%);
    border-right-color: #1f2736;
}

body.admin-dark .sidebar-brand {
    margin-bottom: 8px;
    border-bottom-color: #222c3d;
}

body.admin-dark .brand-mark {
    background: linear-gradient(145deg, #f5f8ff, #dce5f7 68%, #c7d5ef);
    color: #111827;
}

body.admin-dark .sidebar-brand strong {
    color: #eef2fa;
    letter-spacing: 0.015em;
}

body.admin-dark .sidebar-brand span {
    color: #7f8ca5;
}

body.admin-dark .admin-sidebar-search {
    margin-bottom: 2px;
}

body.admin-dark .admin-sidebar-search input {
    border-color: #2a3446;
    background: #101722;
    color: #dce4f1;
    border-radius: 12px;
    padding: 9px 10px;
}

body.admin-dark .admin-sidebar-search input::placeholder {
    color: #70809d;
}

body.admin-dark .sidebar-profile {
    border-color: #2a3446;
    background: linear-gradient(145deg, rgba(25, 34, 49, 0.78), rgba(18, 27, 40, 0.64));
}

body.admin-dark .sidebar-profile p {
    color: #ebf0f9;
}

body.admin-dark .sidebar-profile span {
    color: #8fa0bc;
}

body.admin-dark .sidebar-group {
    color: #74839e;
}

body.admin-dark .sidebar-link {
    color: #d4deed;
    border-color: rgba(70, 85, 110, 0.22);
    background: rgba(81, 108, 162, 0.04);
}

body.admin-dark .sidebar-link-icon {
    min-width: 23px;
    height: 23px;
    border-radius: 7px;
    border: 1px solid #2f3a50;
    background: rgba(82, 108, 162, 0.1);
    color: #a7b8d4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.admin-dark .sidebar-link-icon svg {
    width: 15px;
    height: 15px;
}

body.admin-dark .sidebar-link:hover {
    background: rgba(95, 123, 183, 0.14);
    border-color: #38465f;
}

body.admin-dark .sidebar-link.is-active {
    background: linear-gradient(118deg, rgba(74, 106, 168, 0.55), rgba(55, 81, 134, 0.58));
    border-color: #4a6088;
    box-shadow: inset 2px 0 0 #9dbaf0, 0 8px 18px rgba(0, 0, 0, 0.28);
}

body.admin-dark .sidebar-link.is-active .sidebar-link-icon {
    border-color: #6280b4;
    background: #29426a;
    color: #dce7fb;
}

body.admin-dark .admin-mode-card {
    margin-top: auto;
    border: 1px solid #2f394d;
    border-radius: 12px;
    background: #111927;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

body.admin-dark .admin-mode-card strong {
    display: block;
    font-size: 0.76rem;
    color: #dce5f4;
}

body.admin-dark .admin-mode-card span {
    display: block;
    font-size: 0.7rem;
    color: #7f8ca8;
}

body.admin-dark .admin-mode-toggle {
    width: 34px;
    height: 20px;
    border-radius: 999px;
    background: #263149;
    border: 1px solid #3a4762;
    position: relative;
    flex-shrink: 0;
}

body.admin-dark .admin-mode-toggle::after {
    content: "";
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #d8e0ee;
    position: absolute;
    top: 2px;
    left: 2px;
}

body.admin-dark .admin-mode-toggle.is-on {
    background: #2f4b85;
}

body.admin-dark .admin-mode-toggle.is-on::after {
    left: 16px;
}

body.admin-dark .sidebar-guide {
    border-color: #354662;
    background: rgba(57, 77, 115, 0.34);
}

body.admin-dark .sidebar-guide:hover {
    background: rgba(73, 97, 142, 0.44);
    border-color: #49618d;
}

body.admin-dark .content {
    background: linear-gradient(180deg, #0d1016 0%, #0a0d13 100%);
    padding: 16px 20px 28px;
}

body.admin-dark .topbar {
    background: #10141d;
    border-color: #1f2633;
    box-shadow: none;
}

body.admin-dark .topbar-label {
    color: #79839a;
}

body.admin-dark .topbar h1 {
    color: #f0f3fa;
}

body.admin-dark .topbar .btn-link,
body.admin-dark .lang-switch {
    border-color: #2a3242;
    background: #151b27;
    color: #d8deea;
}

body.admin-dark .topbar .btn-link:hover {
    background: #20293a;
    border-color: #36435b;
}

body.admin-dark .sidebar-toggle {
    border-color: #2a3242;
    background: #151b27;
}

body.admin-dark .sidebar-toggle span {
    background: #dce4f1;
}

body.admin-dark .lang-switch .btn-link {
    background: transparent;
}

body.admin-dark .panel {
    border-color: #252d3b;
    background: #11161f;
    box-shadow: none;
}

body.admin-dark .page-hero {
    background: linear-gradient(145deg, #131a25 0%, #101721 100%);
}

body.admin-dark .hero-title {
    color: #f1f5fb;
}

body.admin-dark .hero-subtitle,
body.admin-dark .subtle,
body.admin-dark .small-note,
body.admin-dark .metric-note,
body.admin-dark .code-list-meta {
    color: #8a96ae;
}

body.admin-dark .key-note,
body.admin-dark label {
    color: #a2afc6;
}

body.admin-dark .metric-card,
body.admin-dark .card {
    border-color: #273040;
    background: #131a25;
    box-shadow: none;
}

body.admin-dark .metric-kicker,
body.admin-dark .card h3 {
    color: #8d9ab2;
}

body.admin-dark .metric-value,
body.admin-dark .card p {
    color: #f2f6fc;
}

body.admin-dark .btn-link {
    border-color: #2d3648;
    background: #151c29;
    color: #dde3ef;
}

body.admin-dark .btn-link:hover {
    background: #1d2635;
    border-color: #3a475f;
}

body.admin-dark button,
body.admin-dark .btn-primary {
    background: linear-gradient(110deg, #4e75d8, #3e63c3);
}

body.admin-dark input,
body.admin-dark select,
body.admin-dark textarea {
    border-color: #303a4d;
    background: #0f151f;
    color: #e0e7f2;
}

body.admin-dark input::placeholder,
body.admin-dark textarea::placeholder {
    color: #73839f;
}

body.admin-dark .table-wrap {
    border-color: #263041;
    background: #101621;
}

body.admin-dark th {
    background: #131a26;
    color: #8e9db8;
    border-bottom-color: #2a3447;
}

body.admin-dark td {
    border-bottom-color: #232d3f;
    color: #d8dfeb;
}

body.admin-dark tbody tr:hover {
    background: #151f2d;
}

body.admin-dark .quick-item,
body.admin-dark .code-list-item {
    border-color: #2a3446;
    background: #0f1622;
}

body.admin-dark .quick-item:hover {
    background: #172234;
}

body.admin-dark .code-chip {
    border-color: #3a475f;
    background: #182234;
    color: #dce6f9;
}

body.admin-dark .status-pill {
    border-color: #3b475d;
    background: #1a2538;
    color: #b8c4db;
}

body.admin-dark .alert.success {
    border-color: #2f7457;
    background: #10261c;
    color: #9ed2b8;
}

body.admin-dark .alert.error {
    border-color: #874252;
    background: #2a151b;
    color: #efb2bf;
}

body.admin-dark .alert.warning {
    border-color: #8f6b31;
    background: #2b2315;
    color: #efd9a9;
}

body.admin-dark pre {
    border-color: #2f3e58;
    background: #0a111d;
}

body.admin-dark .content nav[role="navigation"] span[aria-current="page"] span,
body.admin-dark .content nav[role="navigation"] span[aria-current="page"] {
    background: #1f2d44;
    color: #dbe6fa;
}

body.admin-dark .filter-grid {
    border: 1px solid #273040;
    background: #0f141d;
    border-radius: 14px;
    padding: 12px;
    gap: 10px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

body.admin-dark .filter-grid label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #92a1be;
}

body.admin-dark .filter-grid input,
body.admin-dark .filter-grid select {
    min-height: 38px;
}

body.admin-dark .filter-grid select[multiple] {
    min-height: 120px;
}

body.admin-dark .filter-grid .inline {
    padding-top: 6px;
    border-top: 1px solid #232d3f;
    margin-top: 4px;
}

body.admin-dark .filter-grid .small-note {
    color: #6f7d97;
}

body.admin-dark .table-wrap {
    border-radius: 14px;
}

.admin-detail-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.95fr;
    gap: 12px;
}

.admin-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.admin-form-grid .full {
    grid-column: 1 / -1;
}

.admin-side-stack {
    display: grid;
    gap: 10px;
}

.admin-info-list {
    display: grid;
    gap: 8px;
}

.admin-info-item {
    border: 1px solid #2a3346;
    background: #0f1622;
    border-radius: 11px;
    padding: 10px;
}

.admin-info-item strong {
    display: block;
    color: #e8eef9;
    font-size: 0.82rem;
}

.admin-info-item span {
    margin-top: 4px;
    display: block;
    color: #8b98b0;
    font-size: 0.76rem;
}

body.dashboard-dark {
    background: #0b0d12;
}

body.dashboard-dark .content {
    background: linear-gradient(180deg, #0d1016 0%, #0a0d13 100%);
    padding: 16px 20px 28px;
}

body.dashboard-dark .topbar {
    background: #10141d;
    border-color: #1f2633;
    box-shadow: none;
}

body.dashboard-dark .topbar-label {
    color: #79839a;
}

body.dashboard-dark .topbar h1 {
    color: #f0f3fa;
}

body.dashboard-dark .topbar .btn-link,
body.dashboard-dark .lang-switch {
    border-color: #2a3242;
    background: #151b27;
    color: #d8deea;
}

body.dashboard-dark .topbar .btn-link:hover {
    background: #20293a;
    border-color: #36435b;
}

body.dashboard-dark .sidebar-toggle {
    border-color: #2a3242;
    background: #151b27;
}

body.dashboard-dark .sidebar-toggle span {
    background: #dce4f1;
}

body.dashboard-dark .lang-switch .btn-link {
    background: transparent;
}

.admin-creem {
    display: grid;
    gap: 12px;
    color: #d7deea;
}

.admin-creem .panel {
    border: 1px solid #252d3b;
    background: #11161f;
    box-shadow: none;
    border-radius: 16px;
}

.admin-creem .btn-link {
    border-color: #2d3648;
    background: #151c29;
    color: #dde3ef;
}

.admin-creem .btn-link:hover {
    background: #1d2635;
    border-color: #3a475f;
    color: #eef2fa;
}

.creem-live-banner {
    border: 1px solid #2b3445;
    border-radius: 16px;
    background: linear-gradient(120deg, #121923 0%, #151f2d 100%);
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.creem-live-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #f5f7fd;
}

.creem-live-note {
    margin: 5px 0 0;
    color: #8f9ab0;
    font-size: 0.84rem;
}

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

.admin-creem .btn-link.creem-btn-peach {
    background: linear-gradient(130deg, #ffc59a, #f9a96d);
    border-color: #f5b184;
    color: #352015;
}

.admin-creem .btn-link.creem-btn-dark {
    background: #10161f;
}

.creem-toolbar {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
}

.creem-range-tabs {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.creem-tab {
    border: 1px solid #2a3242;
    background: #121925;
    border-radius: 10px;
    padding: 8px 11px;
    font-size: 0.78rem;
    text-decoration: none;
    color: #97a3bb;
    font-weight: 700;
}

.creem-tab.is-active,
.creem-tab:hover {
    border-color: #3c4a63;
    background: #1c2739;
    color: #f0f4fa;
}

.creem-toolbar-form {
    display: inline-flex;
    gap: 8px;
}

.creem-toolbar-form select {
    min-width: 110px;
    border-color: #313a4d;
    background: #121927;
    color: #dae1ed;
}

.creem-toolbar-form button {
    padding: 8px 12px;
}

.creem-metric-toggle {
    display: inline-flex;
    gap: 6px;
}

.creem-metric-toggle span {
    border: 1px solid #30384a;
    border-radius: 999px;
    background: #131927;
    color: #9ba8c0;
    padding: 6px 10px;
    font-size: 0.74rem;
    font-weight: 700;
}

.creem-metric-toggle .is-active {
    color: #e8edf8;
    border-color: #435273;
    background: #1b263a;
}

.creem-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.creem-kpi-card {
    border: 1px solid #252d3b;
    border-radius: 15px;
    background: #11161f;
    padding: 14px;
}

.creem-kpi-label {
    margin: 0;
    color: #8f9cb4;
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.creem-kpi-value {
    margin: 10px 0 0;
    color: #f6f8fd;
    font-size: 2rem;
    font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
    letter-spacing: -0.03em;
}

.creem-kpi-note {
    margin-top: 7px;
    color: #73819b;
    font-size: 0.76rem;
}

.creem-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
}

.creem-panel {
    border: 1px solid #252d3b;
    border-radius: 16px;
    background: #11161f;
    padding: 14px;
}

.creem-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.creem-panel-head h3 {
    margin: 0;
    color: #eef2fb;
    font-size: 0.95rem;
}

.creem-panel-head p {
    margin-top: 4px;
    color: #7f8da8;
    font-size: 0.78rem;
}

.creem-chip {
    border: 1px solid #333d4f;
    background: #161e2b;
    border-radius: 999px;
    padding: 6px 10px;
    color: #a8b4c9;
    font-size: 0.71rem;
}

.creem-chart-wrap {
    min-height: 240px;
    border: 1px solid #242d3a;
    border-radius: 12px;
    background: linear-gradient(180deg, #0f141d 0%, #0c121b 100%);
    padding: 12px 10px 8px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    overflow-x: auto;
}

.creem-bar-item {
    min-width: 24px;
    display: grid;
    gap: 7px;
    align-items: end;
}

.creem-bar {
    width: 100%;
    border-radius: 8px 8px 4px 4px;
    background: linear-gradient(180deg, #73a3ff 0%, #4f7ed8 100%);
}

.creem-bar-item span {
    color: #8a97b1;
    font-size: 0.68rem;
    text-align: center;
}

.creem-list {
    display: grid;
    gap: 7px;
}

.creem-list-item {
    border: 1px solid #252f40;
    border-radius: 11px;
    background: #0f151f;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.creem-list-item strong {
    color: #edf2fa;
    font-size: 0.8rem;
}

.creem-list-item p {
    margin-top: 3px;
    color: #7f8ca6;
    font-size: 0.73rem;
}

.creem-list-item > span {
    color: #a7b3c8;
    font-size: 0.76rem;
}

.creem-action-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.creem-action-card {
    border: 1px solid #2a3344;
    border-radius: 12px;
    background: #121a27;
    padding: 12px;
    text-decoration: none;
    color: #dbe3f1;
    font-weight: 700;
}

.creem-action-card:hover {
    background: #1a2434;
}

.creem-bottom-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.creem-assistant {
    min-height: 290px;
}

.creem-empty {
    min-height: 180px;
    border: 1px dashed #2d374a;
    border-radius: 12px;
    background: #0f151f;
    display: grid;
    place-content: center;
    text-align: center;
    gap: 6px;
    color: #7f8ca7;
    padding: 10px;
}

.creem-empty strong {
    color: #d9e1ef;
    font-size: 0.86rem;
}

.creem-empty.compact {
    min-height: 120px;
}

.workflow-context-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
}

.workflow-context-actions {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.workflow-context-actions .inline {
    align-items: flex-end;
}

body.admin-dark .workflow-context-bar {
    border-color: #2a3446;
    background: #0f1622;
}

@media (max-width: 1240px) {
    .metric-grid,
    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .split-grid,
    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .api-guide-card-wrap,
    .api-guide-sample-grid {
        grid-template-columns: 1fr;
    }

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

    .creem-main-grid,
    .creem-bottom-grid,
    .creem-action-row {
        grid-template-columns: 1fr;
    }

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

    .admin-detail-grid {
        grid-template-columns: 1fr;
    }

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

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

    .setup-panel-wide {
        width: min(100%, 940px);
    }
}

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

    body.merchant-ui .app-shell {
        grid-template-columns: 1fr;
    }

    body.has-sidebar .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(82vw, 320px);
        min-height: 100vh;
        max-height: 100vh;
        overflow-y: auto;
        transform: translateX(-104%);
        z-index: 70;
        border-right: 1px solid rgba(124, 156, 218, 0.22);
        border-bottom: 0;
        box-shadow: 0 24px 42px rgba(8, 18, 36, 0.35);
        visibility: hidden;
    }

    body.merchant-ui.has-sidebar .sidebar {
        border-right: 1px solid rgba(124, 156, 218, 0.22);
        border-bottom: 0;
    }

    body.has-sidebar.sidebar-open .sidebar {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
        padding-left: 11px;
        padding-right: 11px;
    }

    body.has-sidebar .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(8, 16, 32, 0.48);
        backdrop-filter: blur(1px);
        z-index: 60;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    body.has-sidebar.sidebar-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .content {
        padding: 14px 12px 24px;
    }

    body.merchant-dashboard-compact .content {
        padding: 12px 10px 20px;
    }

    .topbar {
        border-radius: 14px;
        padding: 10px;
    }

    .topbar-main {
        gap: 8px;
    }

    body.has-sidebar.sidebar-open .sidebar-toggle span:nth-child(1) {
        transform: translateY(5px) rotate(45deg);
    }

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

    body.has-sidebar.sidebar-open .sidebar-toggle span:nth-child(3) {
        transform: translateY(-5px) rotate(-45deg);
    }

    .auth-experience {
        min-height: auto;
        grid-template-columns: 1fr;
        padding: 14px 0;
        gap: 12px;
    }

    .auth-showcase {
        order: 2;
        padding: 24px 20px;
    }

    .auth-panel {
        order: 1;
        padding: 24px 20px;
    }

    .creem-live-banner {
        flex-direction: column;
        align-items: flex-start;
    }

}

@media (max-width: 840px) {
    body.merchant-setup-screen .content {
        padding: 12px 10px 20px;
    }

    .setup-center-wrap {
        min-height: auto;
        padding: 8px 0;
    }

    .setup-center-wrap-flow {
        padding: 0;
    }

    .setup-card {
        border-radius: 18px;
        padding: 20px;
    }

    .setup-panel {
        border-radius: 18px;
        padding: 16px;
    }

    .setup-panel-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .setup-steps {
        align-self: flex-end;
    }

    .setup-actions {
        flex-wrap: wrap;
    }

    .setup-actions .btn-link,
    .setup-actions button {
        flex: 1 1 210px;
    }
}

@media (max-width: 640px) {
    .hero-actions,
    .topbar-actions {
        width: 100%;
    }

    .metric-grid,
    .cards,
    .auth-metrics {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 14px;
    }

    th,
    td {
        padding: 10px 8px;
    }

    .auth-shell {
        padding: 0 10px;
    }

    .creem-kpi-grid {
        grid-template-columns: 1fr;
    }

    .creem-live-actions,
    .creem-toolbar-form {
        width: 100%;
    }

    .workflow-context-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .workflow-context-actions {
        width: 100%;
    }

    .setup-card {
        padding: 18px;
        border-radius: 16px;
    }

    .setup-panel {
        padding: 14px;
        border-radius: 16px;
    }

    .setup-panel-head {
        flex-direction: column;
    }

    .setup-summary-card {
        grid-template-columns: 1fr;
    }

    .setup-summary-card img {
        width: 100%;
        height: 170px;
    }

    .setup-actions {
        flex-direction: column;
    }

    .setup-actions .btn-link,
    .setup-actions button {
        width: 100%;
        flex: initial;
    }

    .setup-list-button {
        padding: 12px;
    }

    .setup-list-badge {
        width: 34px;
        height: 34px;
        font-size: 0.82rem;
    }

    .setup-list-status {
        display: none;
    }

    body.merchant-store-entry-screen .content {
        padding: 10px 8px;
    }

    .setup-integration-panel pre {
        font-size: 0.73rem;
        padding: 10px;
    }

    body.admin-dark .filter-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.has-sidebar .app-shell,
    .sidebar,
    .sidebar-backdrop,
    .sidebar-toggle span {
        transition: none !important;
    }
}

/* Keep /merchant/stores layout wide on desktop even with shared setup-card defaults. */
body.merchant-stores-menu-screen .content > .setup-center-wrap.store-menu-page,
body.merchant-stores-menu-screen .setup-entry-shell.store-menu-page {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
}

body.merchant-stores-menu-screen .setup-card.store-menu-card {
    width: min(100%, 1240px) !important;
    max-width: 1240px !important;
    margin-inline: auto !important;
}

/* Hard override for /merchant/stores regardless of body-state classes. */
.store-menu-page {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
}

.store-menu-page .store-menu-card {
    width: min(100%, 1240px) !important;
    max-width: 1240px !important;
    margin-inline: auto !important;
}

.store-menu-page .setup-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

@media (max-width: 980px) {
    .store-menu-page .setup-list {
        grid-template-columns: 1fr !important;
    }
}

/* Dedicated /merchant/stores layout (device-responsive, independent from setup-card defaults). */
body.merchant-stores-menu-screen .content {
    min-height: 100vh !important;
    padding: clamp(14px, 2.4vw, 28px) clamp(12px, 2vw, 26px) !important;
    display: grid !important;
    place-items: center !important;
    background: radial-gradient(980px 520px at 10% -12%, rgba(95, 141, 236, 0.34), rgba(95, 141, 236, 0)),
        radial-gradient(940px 520px at 92% 108%, rgba(61, 102, 182, 0.28), rgba(61, 102, 182, 0)),
        linear-gradient(180deg, #111a2a 0%, #0e1623 52%, #0b121d 100%) !important;
}

.stores-hub-page {
    width: 100%;
    max-width: 1180px;
    min-height: calc(100vh - clamp(28px, 5vw, 56px));
    display: grid;
    place-items: center;
    margin-inline: auto;
}

.stores-hub-card {
    width: min(100%, 980px);
    max-width: 980px;
    border: 1px solid #2d3850;
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(24, 32, 47, 0.96) 0%, rgba(20, 28, 41, 0.96) 100%);
    color: #dbe5f8;
    box-shadow: 0 30px 60px rgba(4, 8, 16, 0.5);
    padding: clamp(26px, 3.2vw, 42px);
}

.stores-hub-card .setup-logo {
    text-align: center;
}

.stores-hub-title {
    margin: 4px 0 0;
    color: #f2f6ff;
    font-size: clamp(1.8rem, 2.4vw, 2.45rem);
    letter-spacing: -0.02em;
    font-weight: 800;
    text-align: center;
}

.stores-hub-subtitle {
    margin-top: 10px;
    color: #9db4d9;
    font-size: 1.02rem;
    text-align: center;
}

.stores-hub-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.stores-hub-item {
    margin: 0;
}

.stores-hub-button {
    width: 100%;
    border: 1px solid #344a70;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(22, 33, 53, 0.84), rgba(17, 26, 42, 0.84));
    color: #dbe6ff;
    padding: 16px 18px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    text-align: left;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.stores-hub-item:hover .stores-hub-button {
    border-color: #5f7fb6;
    background: linear-gradient(145deg, rgba(27, 40, 64, 0.88), rgba(20, 30, 49, 0.88));
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(8, 18, 35, 0.36);
}

.stores-hub-item.is-active .stores-hub-button {
    border-color: #6d8fd1;
    box-shadow: inset 0 0 0 1px rgba(145, 176, 236, 0.35);
    background: linear-gradient(145deg, rgba(31, 46, 74, 0.9), rgba(22, 35, 56, 0.9));
}

.stores-hub-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 800;
    color: #0f274f;
    background: linear-gradient(145deg, #eef5ff, #aac7ff 65%, #8eb2f7 100%);
}

.stores-hub-copy {
    display: grid;
    gap: 2px;
}

.stores-hub-copy strong {
    color: #eaf2ff;
    font-size: 1.02rem;
    font-weight: 800;
}

.stores-hub-copy span {
    color: #8ea6cb;
    font-size: 0.82rem;
}

.stores-hub-state {
    border: 1px solid #334766;
    border-radius: 999px;
    color: #b2c8ea;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 7px 11px;
    white-space: nowrap;
}

.stores-hub-empty {
    grid-column: 1 / -1;
    border: 1px dashed #354664;
    border-radius: 14px;
    padding: 18px;
    color: #a8bbdc;
    text-align: center;
}

.stores-hub-create {
    margin-top: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #334968;
    border-radius: 14px;
    background: rgba(26, 40, 62, 0.6);
    color: #d6e4ff;
    padding: 14px 16px;
}

.stores-hub-create:hover {
    border-color: #4d6794;
    background: rgba(33, 50, 76, 0.72);
}

.stores-hub-create > span:first-child {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    border: 1px solid #496188;
    background: #263a5a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.06rem;
    font-weight: 700;
}

.stores-hub-create small {
    display: block;
    margin-top: 2px;
    color: #96add2;
    font-size: 0.73rem;
}

.stores-hub-help {
    margin-top: 12px;
    color: #8fa7cd;
    font-size: 0.86rem;
    text-align: center;
}

.stores-hub-help a {
    color: #bad3ff;
}

@media (max-width: 980px) {
    .stores-hub-card {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .stores-hub-card {
        border-radius: 18px;
        padding: 18px;
    }

    .stores-hub-button {
        grid-template-columns: auto 1fr;
    }

    .stores-hub-state {
        grid-column: 1 / -1;
        justify-self: start;
    }
}
