@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg: #f7f6ff;
    --bg-strong: #efefff;
    --panel: #ffffff;
    --panel-soft: #f2f2ff;
    --panel-muted: #e9eaf9;
    --border: #d7d9ee;
    --border-soft: rgba(115, 118, 136, 0.16);
    --text: #171923;
    --text-soft: #5c6074;
    --text-faint: #80869c;
    --primary: #1254db;
    --primary-2: #2f74ff;
    --primary-soft: #dfe7ff;
    --green: #0d7d63;
    --green-soft: #dff7ef;
    --red: #cc2a2a;
    --red-soft: #ffe8e7;
    --shadow: 0 24px 60px rgba(26, 38, 77, 0.08);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(210, 223, 255, 0.9) 0, rgba(247, 246, 255, 0) 28%),
        linear-gradient(180deg, #fbfaff 0%, #f6f6ff 100%);
    color: var(--text);
    font-family: "Inter", "Noto Sans JP", sans-serif;
}
h1, h2, h3, h4, h5, h6, .brand-title, .hero-title { font-family: "Manrope", "Noto Sans JP", sans-serif; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }
img { max-width: 100%; display: block; }

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

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 24px 18px 20px;
    background: rgba(247, 246, 255, 0.72);
    border-right: 1px solid var(--border-soft);
    backdrop-filter: blur(10px);
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 10px 24px;
}
.brand-mark {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary) 0%, #0d4aca 100%);
    box-shadow: 0 18px 36px rgba(18, 84, 219, 0.24);
    position: relative;
}
.brand-mark::before,
.brand-mark::after {
    content: "";
    position: absolute;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 3px;
}
.brand-mark::before {
    inset: 13px 17px 13px 17px;
    clip-path: polygon(0 0, 72% 0, 100% 26%, 100% 100%, 0 100%);
}
.brand-mark::after {
    width: 14px;
    height: 2px;
    left: 21px;
    top: 22px;
    box-shadow: 0 6px 0 rgba(255,255,255,.94), 0 12px 0 rgba(255,255,255,.94);
}
.brand-title {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.15;
}
.brand-subtitle {
    margin-top: 4px;
    color: var(--text-faint);
    font-size: 12px;
    font-weight: 600;
}

.nav {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}
.nav-section-title {
    padding: 12px 14px 6px;
    color: var(--text-faint);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    color: #33405a;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 700;
    transition: background-color .18s ease, transform .18s ease, color .18s ease, box-shadow .18s ease;
}
.nav a::before {
    content: "";
    width: 13px;
    height: 13px;
    border-radius: 4px;
    background: linear-gradient(180deg, #7a879e 0%, #5f6b80 100%);
    opacity: .92;
    flex: 0 0 auto;
}
.nav a.active {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 12px 28px rgba(34, 56, 117, 0.08);
    transform: translateX(4px);
}
.nav a.active::before {
    background: linear-gradient(180deg, var(--primary-2) 0%, var(--primary) 100%);
}
.nav a:hover { background: rgba(255, 255, 255, 0.56); }
.sidebar-footer {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--border-soft);
    display: grid;
    gap: 8px;
}
.sidebar-cta {
    margin-top: auto;
    margin-bottom: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 24px 50px rgba(18, 84, 219, 0.28);
}
.sidebar-cta::before {
    content: "+";
    font-size: 28px;
    line-height: 1;
}

.main {
    padding: 16px 22px 32px;
    min-width: 0;
}
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}
.page-search {
    position: relative;
    min-width: min(280px, 38vw);
    width: min(100%, 560px);
}
.page-search::before {
    content: "⌕";
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    color: #9aa1b3;
    line-height: 1;
}
.page-search input {
    width: 100%;
    border: 0;
    border-radius: 18px;
    background: rgba(234, 235, 252, 0.9);
    padding: 14px 16px 14px 48px;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    outline: none;
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.icon-button,
.avatar-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #415069;
    border: 0;
    font-weight: 700;
}
.icon-button { font-size: 20px; }
.avatar-button {
    background: #f0e7d2;
    color: #8b7650;
    font-size: 18px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 26px;
}
.page-header h1,
.hero-title {
    margin: 0;
    font-size: clamp(34px, 5vw, 52px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}
.page-header p,
.hero-copy {
    margin: 10px 0 0;
    max-width: 820px;
    color: #363c4b;
    font-size: clamp(15px, 1.8vw, 18px);
    line-height: 1.5;
}
.page-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.button,
button {
    appearance: none;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
    color: #fff;
    padding: 12px 18px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
    box-shadow: 0 18px 34px rgba(18, 84, 219, 0.2);
}
.button:hover,
button:hover { transform: translateY(-1px); }
.button.secondary,
button.secondary {
    background: rgba(232, 234, 250, 0.95);
    color: #33405a;
    box-shadow: none;
}
.button.ghost,
button.ghost {
    background: transparent;
    color: var(--primary);
    box-shadow: none;
}
.button-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.flash {
    border-radius: 18px;
    padding: 14px 18px;
    margin-bottom: 18px;
    font-weight: 600;
}
.flash.success { background: #e6faf0; color: #145440; }
.flash.error { background: #fff0ef; color: #922d2d; }

.section-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr);
    gap: 22px;
}
.section-main,
.section-side {
    min-width: 0;
    display: grid;
    gap: 20px;
}

.panel,
.card {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(215, 217, 238, 0.72);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}
.panel { padding: 22px; }
.card { padding: 20px 22px; }
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.panel-title,
.card h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
}
.muted { color: var(--text-soft); }
.small { font-size: 13px; }

.metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.metric-card {
    position: relative;
    padding: 22px;
    border-radius: 22px;
    background: rgba(240, 241, 255, 0.9);
    border: 1px solid rgba(214, 217, 238, 0.7);
    overflow: hidden;
}
.metric-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 22px;
    bottom: 22px;
    width: 4px;
    border-radius: 999px;
    background: #c6ccda;
}
.metric-card.is-green::before { background: var(--green); }
.metric-card.is-blue::before { background: var(--primary); }
.metric-card.is-red::before { background: var(--red); }
.metric-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 10px;
    background: rgba(212, 220, 255, 0.8);
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}
.metric-card.is-green .metric-chip { background: #dff7ef; color: var(--green); }
.metric-card.is-red .metric-chip { background: #ffe8e7; color: var(--red); }
.metric-label {
    margin-top: 18px;
    color: #1f2532;
    font-size: 16px;
    font-weight: 800;
}
.metric-value {
    margin-top: 8px;
    font-family: "Manrope", sans-serif;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
}
.metric-foot {
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
}

.activity-list,
.list { display: grid; gap: 0; }
.activity-item,
.item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid rgba(215, 217, 238, 0.65);
}
.item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid rgba(215, 217, 238, 0.7);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.58);
}
.activity-item:last-child { border-bottom: 0; }
.activity-icon,
.avatar-badge {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--panel-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    flex: 0 0 auto;
}
.avatar-badge {
    width: 34px;
    height: 34px;
    font-size: 13px;
    background: #d8ebff;
    color: #4f617e;
}
.activity-title,
.item strong {
    font-size: 16px;
    font-weight: 800;
}
.activity-meta { color: var(--text-soft); font-size: 14px; margin-top: 6px; }
.activity-side {
    text-align: right;
    display: grid;
    gap: 10px;
    justify-items: end;
}
.status-pill,
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .03em;
}
.status-pill.green { background: #e6f5ed; color: var(--green); }
.status-pill.blue { background: #e3ecff; color: var(--primary); }
.status-pill.red { background: #ffe8e7; color: var(--red); }
.status-pill.gray { background: #edf0f5; color: #5d6475; }

.stack { display: grid; gap: 24px; }
.mini-stat {
    display: grid;
    gap: 16px;
    padding: 22px;
    border-radius: 22px;
    background: rgba(240, 241, 255, 0.88);
    border: 1px solid rgba(215, 217, 238, 0.7);
}
.progress-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    overflow: hidden;
}
.progress-bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-2) 100%);
}

.client-list { display: grid; gap: 18px; }
.client-row {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 15px;
    font-weight: 700;
}

.promo-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    color: #fff;
    background: linear-gradient(145deg, var(--primary) 0%, #1449ba 100%);
}
.promo-card::after {
    content: "";
    position: absolute;
    inset: auto -40px -60px auto;
    width: 180px;
    height: 180px;
    border-radius: 36px;
    background: rgba(255,255,255,.08);
    transform: rotate(18deg);
}
.promo-card h3 { margin: 0 0 12px; font-size: 19px; }
.promo-card p { margin: 0 0 18px; color: rgba(255,255,255,.86); line-height: 1.7; }
.promo-card .button.secondary { background: #fff; color: var(--primary); }

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}
.segmented {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 18px;
    max-width: 100%;
    overflow-x: auto;
    background: rgba(234, 235, 252, 0.9);
}
.segmented a,
.segmented button {
    padding: 10px 18px;
    border-radius: 14px;
    background: transparent;
    color: #3e4659;
    box-shadow: none;
    white-space: nowrap;
}
.segmented .active {
    background: rgba(255, 255, 255, 0.98);
    color: var(--primary);
    box-shadow: 0 10px 24px rgba(35, 54, 110, 0.08);
}

.table-wrap {
    overflow: hidden;
    border-radius: 24px;
    background: rgba(240, 241, 255, 0.88);
    border: 1px solid rgba(215, 217, 238, 0.7);
    box-shadow: var(--shadow);
}
.table {
    width: 100%;
    border-collapse: collapse;
}
.table thead th {
    padding: 20px 22px;
    color: #2f3650;
    font-size: 13px;
    font-weight: 800;
    text-align: left;
}
.table tbody td {
    padding: 18px 22px;
    border-top: 1px solid rgba(215, 217, 238, 0.7);
    vertical-align: middle;
    font-size: 14px;
}
.contract-title { font-size: 16px; font-weight: 800; color: var(--text); }
.status-inline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}
.status-inline::before {
    content: "";
    width: 4px;
    height: 24px;
    border-radius: 999px;
    background: #a6adbd;
}
.status-inline.green { color: var(--green); }
.status-inline.green::before { background: var(--green); }
.status-inline.red { color: var(--red); }
.status-inline.red::before { background: var(--red); }
.status-inline.blue { color: var(--primary); }
.status-inline.blue::before { background: var(--primary); }
.status-inline.gray { color: #5a6273; }
.status-inline.gray::before { background: #8c93a7; }
.money {
    font-family: "Manrope", sans-serif;
    font-size: 16px;
    font-weight: 800;
    white-space: nowrap;
}
.table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    color: #8e95a8;
    font-size: 18px;
}
.table-actions a,
.table-actions button {
    padding: 0;
    background: transparent;
    color: inherit;
    box-shadow: none;
}
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-top: 1px solid rgba(215, 217, 238, 0.7);
}
.pager {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pager a,
.pager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-weight: 800;
    color: #30364a;
    background: transparent;
}
.pager .current { background: var(--primary); color: #fff; }

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.stat-card {
    padding: 22px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(215, 217, 238, 0.7);
    box-shadow: var(--shadow);
}

.wizard {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) 380px;
    gap: 24px;
}
.wizard-main,
.wizard-side {
    min-width: 0;
}
.steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}
.steps::before,
.steps::after {
    content: "";
    position: absolute;
    top: 18px;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 999px;
}
.steps::before { background: rgba(214, 218, 238, 0.88); }
.steps::after {
    width: 33%;
    right: auto;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-2) 100%);
}
.step {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 10px;
    z-index: 1;
}
.step-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #dfe1f2;
    color: #30364a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    box-shadow: 0 0 0 6px var(--bg);
}
.step.active .step-badge { background: var(--primary); color: #fff; }
.step-label { font-size: 12px; font-weight: 800; color: #30364a; }
.step.active .step-label { color: var(--primary); }

.wizard-panel {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}
.wizard-title {
    margin: 0 0 8px;
    font-size: clamp(28px, 3.5vw, 40px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}
.wizard-copy {
    margin: 0 0 24px;
    color: #43495b;
    font-size: 15px;
    line-height: 1.6;
}
.form-grid { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label {
    color: #2a3142;
    font-size: 14px;
    font-weight: 800;
}
.field input,
.field select,
.field textarea {
    width: 100%;
    border: 0;
    border-radius: 16px;
    background: rgba(234, 235, 252, 0.9);
    padding: 14px 16px;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    outline: none;
}
.field textarea {
    min-height: 110px;
    resize: vertical;
}
.row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.choice-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 16px;
    border-radius: 16px;
    background: rgba(234, 235, 252, 0.72);
    border: 2px solid transparent;
}
.choice-card.active {
    background: rgba(255, 255, 255, 0.88);
    border-color: var(--primary);
    box-shadow: 0 18px 36px rgba(18, 84, 219, 0.08);
}
.choice-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.wizard-actions {
    display: grid;
    grid-template-columns: 1fr 1.7fr;
    gap: 12px;
    margin-top: 12px;
}

.preview-card {
    overflow: hidden;
    padding: 0;
}
.preview-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    background: rgba(228, 229, 244, 0.85);
    color: #40475a;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.preview-body {
    padding: 18px;
}
.paper {
    aspect-ratio: 1 / 1.42;
    border-radius: 22px;
    background: #fff;
    padding: 24px 20px;
    box-shadow: inset 0 0 0 1px rgba(215, 217, 238, 0.45);
}
.paper-line {
    height: 10px;
    border-radius: 999px;
    background: #eef0fb;
    margin-top: 12px;
}
.tip-card {
    padding: 20px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(232, 238, 255, 0.94) 0%, rgba(245, 247, 255, 0.94) 100%);
    border: 1px solid rgba(196, 208, 255, 0.5);
}

.auth-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    background:
        radial-gradient(circle at top left, rgba(210, 223, 255, 0.9) 0, rgba(247, 246, 255, 0) 28%),
        linear-gradient(180deg, #fbfaff 0%, #f6f6ff 100%);
}
.auth-card {
    width: min(520px, 100%);
    padding: 28px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(215, 217, 238, 0.75);
    box-shadow: var(--shadow);
}

.split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.kanban {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.kanban-column {
    border-radius: 22px;
    background: rgba(234, 235, 252, 0.76);
    border: 1px solid rgba(215, 217, 238, 0.7);
    padding: 14px;
}

.hero {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
}
.hero-card {
    width: min(1160px, 100%);
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 28px;
    border-radius: 34px;
    background: rgba(255,255,255,.78);
    border: 1px solid rgba(215, 217, 238, 0.7);
    box-shadow: var(--shadow);
    padding: 28px;
}
.hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5.8vw, 56px);
    line-height: 1.02;
    letter-spacing: -.05em;
}
.hero p { font-size: 16px; line-height: 1.7; color: #42495c; }

@media (max-width: 1180px) {
    .section-grid,
    .wizard,
    .hero-card {
        grid-template-columns: 1fr;
    }
    .metrics,
    .stats-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar {
        position: static;
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--border-soft);
        padding: 18px 14px;
    }
    .sidebar-cta { display: none; }
    .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nav-section-title { grid-column: 1 / -1; }
    .page-header,
    .topbar,
    .filter-bar,
    .panel-header,
    .topbar-left {
        flex-direction: column;
        align-items: flex-start;
    }
    .topbar-right {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .page-search { min-width: 100%; width: 100%; }
    .main { padding: 14px 14px 24px; }
    .row,
    .choice-grid,
    .wizard-actions {
        grid-template-columns: 1fr;
    }
    .table thead { display: none; }
    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100%;
    }
    .table tbody td {
        padding: 10px 16px;
        border-top: 0;
    }
    .table tbody tr {
        padding: 12px 0 18px;
        border-top: 1px solid rgba(215, 217, 238, 0.7);
    }
    .pagination-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .brand-mark {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }
    .brand-mark::before {
        inset: 10px 14px 10px 14px;
    }
    .brand-mark::after {
        width: 11px;
        left: 17px;
        top: 18px;
        box-shadow: 0 5px 0 rgba(255,255,255,.94), 0 10px 0 rgba(255,255,255,.94);
    }
    .nav { grid-template-columns: 1fr; }
    .page-header h1,
    .hero-title,
    .hero h1 {
        font-size: clamp(30px, 10vw, 36px);
        line-height: 1.06;
    }
    .page-header p,
    .hero-copy,
    .hero p,
    .wizard-copy {
        font-size: 14px;
    }
    .metric-value { font-size: 26px; }
    .contract-title,
    .activity-title,
    .item strong {
        font-size: 15px;
    }
    .money { font-size: 15px; }
    .panel,
    .card,
    .stat-card,
    .metric-card,
    .mini-stat,
    .auth-card {
        padding: 18px;
        border-radius: 18px;
    }
    .table-wrap,
    .hero-card,
    .promo-card,
    .tip-card {
        border-radius: 18px;
    }
    .hero-card { padding: 20px; }
    .wizard { gap: 18px; }
    .steps { margin-bottom: 18px; }
    .step-badge {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    .step-label { font-size: 11px; }
    .segmented a,
    .segmented button,
    .button,
    button {
        font-size: 13px;
    }
    .topbar-right .button,
    .topbar-right button {
        width: 100%;
        justify-content: center;
    }
}
