:root {
    color-scheme: light;
    --ink: #1d2523;
    --muted: #6f7774;
    --line: #dedfd9;
    --paper: #f6f5f2;
    --surface: #fffefa;
    --sidebar: #21302c;
    --sidebar-2: #293a35;
    --mint: #d8f3ed;
    --mint-strong: #178b7d;
    --teal: #147f73;
    --blue: #3468b2;
    --violet: #7257a7;
    --amber: #b17719;
    --green: #34845e;
    --rose: #b15368;
    --danger: #b23b47;
    --shadow: 0 10px 30px rgba(29, 37, 35, 0.055);
    font-family: Inter, Pretendard, "Noto Sans KR", "Noto Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--paper);
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

svg {
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.admin-body {
    min-height: 100vh;
}

.admin-shell {
    min-height: 100vh;
}

.sidebar-toggle-input {
    position: fixed;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.admin-sidebar {
    position: fixed;
    z-index: 40;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    width: 278px;
    color: #ecf3f0;
    background: var(--sidebar);
    box-shadow: 8px 0 30px rgba(16, 24, 21, 0.08);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 96px;
    padding: 22px 24px;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand-mark {
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    flex: 0 0 auto;
    border: 1px solid rgba(216, 243, 237, 0.3);
    border-radius: 10px;
    color: var(--mint);
}

.sidebar-brand-mark svg {
    width: 21px;
    height: 21px;
}

.sidebar-brand strong,
.sidebar-brand small {
    display: block;
}

.sidebar-brand strong {
    font-size: 16px;
    letter-spacing: -0.01em;
}

.sidebar-brand small {
    margin-top: 3px;
    color: #b9c8c3;
    font-size: 12px;
    font-weight: 650;
}

.sidebar-nav {
    flex: 1;
    padding: 18px 13px 28px;
    overflow-y: auto;
    scrollbar-color: rgba(255, 255, 255, 0.23) transparent;
    scrollbar-width: thin;
}

.sidebar-section-label {
    display: block;
    margin: 18px 13px 8px;
    color: #81928c;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.13em;
}

.sidebar-section-label:first-child {
    margin-top: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    margin: 3px 0;
    padding: 0 15px;
    border-radius: 9px;
    color: #d5dfdc;
    text-decoration: none;
    font-size: 14px;
    font-weight: 740;
    transition: color 140ms ease, background 140ms ease, transform 140ms ease;
}

.sidebar-link svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    color: #b9c7c3;
}

.sidebar-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.07);
}

.sidebar-link.active {
    color: #17312c;
    background: var(--mint);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.sidebar-link.active svg {
    color: #1b665b;
}

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 82px;
    padding: 17px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(0, 0, 0, 0.07);
}

.sidebar-user-avatar,
.topbar-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #163a33;
    background: var(--mint);
    font-weight: 900;
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    font-size: 11px;
}

.sidebar-user-copy strong,
.sidebar-user-copy small {
    display: block;
}

.sidebar-user-copy strong {
    max-width: 166px;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
}

.sidebar-user-copy small {
    margin-top: 3px;
    color: #8fa19b;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.09em;
}

.sidebar-overlay {
    display: none;
}

.admin-workspace {
    min-width: 0;
    min-height: 100vh;
    margin-left: 278px;
}

.workspace-topbar {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    align-items: center;
    gap: 18px;
    height: 78px;
    padding: 0 clamp(24px, 3.2vw, 52px);
    border-bottom: 1px solid var(--line);
    background: rgba(255, 254, 250, 0.94);
    backdrop-filter: blur(14px);
}

.sidebar-toggle-button {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: white;
    cursor: pointer;
}

.sidebar-toggle-button svg {
    width: 21px;
    height: 21px;
}

.topbar-spacer {
    flex: 1;
}

.topbar-account {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-right: 3px;
}

.topbar-account span:last-child {
    min-width: 0;
}

.topbar-account small,
.topbar-account strong {
    display: block;
}

.topbar-account small {
    color: var(--muted);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.08em;
}

.topbar-account strong {
    max-width: 160px;
    margin-top: 2px;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
}

.topbar-avatar {
    width: 35px;
    height: 35px;
    font-size: 10px;
}

.topbar-logout {
    margin: 0;
}

.workspace-main {
    width: 100%;
    max-width: 1780px;
    margin: 0 auto;
    padding: 34px clamp(24px, 3.2vw, 52px) 72px;
}

.workspace-main.content-width-medium {
    max-width: 1450px;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.page-heading h1 {
    margin-bottom: 7px;
    font-size: clamp(26px, 2.5vw, 35px);
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.eyebrow {
    margin-bottom: 8px;
    color: var(--teal);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.14em;
}

.page-description {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.page-heading-actions,
.row-actions,
.form-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.primary-button,
.outline-button,
.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 820;
}

.primary-button,
.button-link {
    color: white;
    background: var(--teal);
    box-shadow: 0 5px 14px rgba(20, 127, 115, 0.15);
}

.primary-button:hover,
.button-link:hover {
    background: #0f6f64;
}

.outline-button,
.secondary-link {
    color: var(--ink);
    border-color: #d5d8d2;
    background: white;
    box-shadow: none;
}

.outline-button:hover,
.secondary-link:hover {
    border-color: #b9c1bc;
    background: #fafaf7;
}

.primary-button svg,
.outline-button svg {
    width: 18px;
    height: 18px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    color: #9aa19e;
    font-size: 12px;
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.metric-card {
    position: relative;
    min-width: 0;
    min-height: 166px;
    padding: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: inherit;
    background: var(--surface);
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

a.metric-card:hover {
    transform: translateY(-2px);
    border-color: #bdc7c1;
    box-shadow: 0 14px 34px rgba(29, 37, 35, 0.08);
}

.metric-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 17px;
    border-radius: 8px;
    background: #f0f2ef;
}

.metric-icon svg {
    width: 19px;
    height: 19px;
}

.metric-icon.blue { color: var(--blue); background: #edf3fb; }
.metric-icon.violet { color: var(--violet); background: #f2eef9; }
.metric-icon.amber { color: var(--amber); background: #fbf2e5; }
.metric-icon.green { color: var(--green); background: #eaf6ef; }
.metric-icon.rose { color: var(--rose); background: #faedf0; }
.metric-icon.teal { color: var(--teal); background: #e8f6f3; }

.metric-label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}

.metric-card > strong {
    display: block;
    overflow: hidden;
    font-size: 29px;
    line-height: 1.18;
    letter-spacing: -0.035em;
    text-overflow: ellipsis;
}

.metric-card > strong.metric-version {
    font-size: 24px;
}

.metric-card > small {
    display: block;
    margin-top: 7px;
    overflow: hidden;
    color: #999f9c;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 18px;
}

.dashboard-panel,
.content-panel,
.rule-section-card,
.form-card {
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.dashboard-panel,
.content-panel,
.rule-section-card {
    padding: 24px;
}

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

.panel-heading.horizontal {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.panel-heading h2,
.section-heading h2 {
    margin-bottom: 5px;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.panel-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.panel-heading > a {
    color: var(--teal);
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
}

.record-count {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.record-count strong {
    color: var(--ink);
    font-size: 15px;
}

.ranking-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.ranking-metric-card {
    min-height: 124px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.ranking-metric-card span,
.ranking-metric-card small {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.ranking-metric-card strong {
    display: block;
    margin: 8px 0 6px;
    font-size: 28px;
    letter-spacing: -0.035em;
}

.ranking-panel {
    min-width: 0;
}

.ranking-filter-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 20px;
}

.ranking-filter-list a {
    padding: 13px 14px;
    border: 1px solid #dfe3dd;
    border-radius: 9px;
    color: var(--ink);
    background: #fbfbf8;
    text-decoration: none;
}

.ranking-filter-list a:hover,
.ranking-filter-list a.active {
    border-color: #8dc8bd;
    background: #eaf7f4;
}

.ranking-filter-list strong,
.ranking-filter-list small {
    display: block;
}

.ranking-filter-list strong {
    font-size: 13px;
}

.ranking-filter-list small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

.rank-number {
    color: var(--amber);
    font-size: 15px;
    font-weight: 900;
}

.ranking-date {
    color: var(--muted);
    white-space: nowrap;
}

.ranking-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 20px;
}

.ranking-pagination a {
    min-width: 80px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: white;
    text-align: center;
    text-decoration: none;
    font-size: 11px;
    font-weight: 800;
}

.ranking-pagination a.disabled {
    color: #b7bdb9;
    pointer-events: none;
    background: #f4f4f1;
}

.ranking-pagination > span {
    min-width: 70px;
    color: var(--muted);
    text-align: center;
    font-size: 11px;
}

.quick-menu-list {
    display: grid;
}

.quick-menu-list > a {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 13px;
    min-height: 70px;
    border-top: 1px solid #ebede8;
    color: inherit;
    text-decoration: none;
}

.quick-menu-list > a:last-child {
    border-bottom: 1px solid #ebede8;
}

.quick-index {
    color: var(--teal);
    font-size: 11px;
    font-weight: 900;
}

.quick-menu-list strong,
.quick-menu-list small {
    display: block;
}

.quick-menu-list strong {
    margin-bottom: 4px;
    font-size: 13px;
}

.quick-menu-list small {
    color: var(--muted);
    font-size: 11px;
}

.quick-menu-list b {
    color: #9aa29e;
    transition: transform 140ms ease;
}

.quick-menu-list a:hover b {
    transform: translateX(3px);
    color: var(--teal);
}

.policy-summary {
    display: grid;
    gap: 1px;
    overflow: hidden;
    border: 1px solid #e4e7e1;
    border-radius: 9px;
    background: #e4e7e1;
}

.policy-summary > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 48px;
    padding: 0 14px;
    background: #fcfcf9;
    font-size: 12px;
}

.policy-summary span:first-child {
    color: var(--muted);
}

.service-health {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 19px;
    padding: 15px;
    border-radius: 9px;
    background: #edf8f5;
}

.status-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #28a982;
    box-shadow: 0 0 0 5px rgba(40, 169, 130, 0.12);
}

.service-health strong,
.service-health small {
    display: block;
}

.service-health strong {
    font-size: 12px;
}

.service-health small {
    margin-top: 3px;
    color: #66847c;
    font-size: 10px;
}

.alert {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 720;
}

.alert.success {
    color: #176e60;
    border-color: #cbe9e2;
    background: #ebf8f5;
}

.alert.error {
    color: #9b303c;
    border-color: #f0ccd1;
    background: #fff0f2;
}

.table-scroll {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.data-table th,
.data-table td {
    padding: 15px 12px;
    border-top: 1px solid #e8eae5;
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    color: #7c8480;
    background: #fbfbf8;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.data-table td {
    line-height: 1.55;
}

.strong {
    font-weight: 850;
}

.order-number {
    color: var(--amber);
    font-weight: 850;
}

.cell-content {
    max-width: 330px;
    color: #434b48;
}

.inline-code {
    display: inline-block;
    margin: 0;
    padding: 3px 7px;
    border-radius: 5px;
    color: #40514d;
    background: #f0f2ef;
    font-size: 11px;
}

.badge,
.locale-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    white-space: nowrap;
    font-size: 10px;
    font-weight: 850;
}

.badge.on,
.locale-status.complete {
    color: #147365;
    background: #e6f5f1;
}

.badge.off {
    color: #747c79;
    background: #eceeeb;
}

.badge.pending {
    color: #8b641c;
    background: #fbf1d9;
}

.badge.danger {
    color: #9b3043;
    background: #fbe8ec;
}

.badge.test {
    margin-left: 5px;
    color: #624c91;
    background: #eee9f8;
}

.purchase-filter-groups {
    margin-bottom: 20px;
}

.purchase-filter-list {
    margin-bottom: 10px;
}

.purchase-kind-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.purchase-kind-filter a {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: #fbfbf8;
    text-decoration: none;
    font-size: 11px;
    font-weight: 800;
}

.purchase-kind-filter a:hover,
.purchase-kind-filter a.active {
    color: #176f63;
    border-color: #8dc8bd;
    background: #eaf7f4;
}

.purchase-table {
    min-width: 1260px;
}

.cell-subtext,
.entitlement-links small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 9px;
    white-space: nowrap;
}

.transaction-code {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
}

.entitlement-links {
    display: grid;
    gap: 8px;
    min-width: 190px;
}

.entitlement-links > div {
    padding-bottom: 8px;
    border-bottom: 1px solid #eceee9;
}

.entitlement-links > div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.row-actions {
    justify-content: flex-end;
    white-space: nowrap;
}

.row-actions form {
    margin: 0;
}

.action-link,
.row-actions a,
.row-actions button,
.text-danger {
    min-height: auto;
    padding: 0;
    border: 0;
    color: var(--teal);
    background: transparent;
    box-shadow: none;
    text-decoration: none;
    font-size: 11px;
    font-weight: 820;
}

.row-actions button,
.text-danger {
    cursor: pointer;
}

.row-actions .text-danger,
.text-danger {
    color: var(--danger);
}

.empty-state {
    padding: 42px !important;
    color: var(--muted);
    text-align: center !important;
    font-size: 12px;
}

.empty-state.compact {
    padding: 24px !important;
    border: 1px dashed #d9ddd7;
    border-radius: 8px;
}

.form-card {
    padding: 0 28px 28px;
}

.form-section {
    padding: 28px 0;
    border-bottom: 1px solid #e6e8e3;
}

.form-section:last-of-type {
    border-bottom: 0;
}

.form-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 22px;
}

.form-section-heading > span {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    border-radius: 7px;
    color: #166f63;
    background: var(--mint);
    font-size: 11px;
    font-weight: 900;
}

.form-section-heading h2 {
    margin: 0 0 4px;
    font-size: 17px;
    letter-spacing: -0.02em;
}

.form-section-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

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

.form-columns.three-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-group.grow-two {
    grid-column: span 1;
}

label {
    display: block;
    margin: 17px 0 7px;
    color: #303835;
    font-size: 12px;
    font-weight: 820;
}

.field-group > label:first-child,
.translation-card label:first-of-type {
    margin-top: 0;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #cfd4ce;
    border-radius: 7px;
    color: var(--ink);
    background: white;
    transition: border-color 130ms ease, box-shadow 130ms ease;
}

textarea {
    line-height: 1.55;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--teal);
    outline: none;
    box-shadow: 0 0 0 3px rgba(20, 127, 115, 0.1);
}

.help,
.optional {
    color: var(--muted);
    font-size: 10px;
}

.help {
    margin: 6px 0 0;
}

.field-error {
    min-height: 14px;
    margin: 4px 0 0;
    color: var(--danger);
    font-size: 10px;
    font-weight: 730;
}

.check-row {
    display: flex !important;
    align-items: flex-start;
    gap: 11px;
    margin-top: 21px;
    cursor: pointer;
}

.check-row input {
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin-top: 1px;
    accent-color: var(--teal);
}

.check-row strong,
.check-row small {
    display: block;
}

.check-row strong {
    font-size: 12px;
}

.check-row small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
    line-height: 1.45;
}

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

.translation-grid.compact-grid {
    gap: 16px;
}

.translation-card {
    min-width: 0;
    margin: 0;
    padding: 17px;
    border: 1px solid #dfe2dc;
    border-radius: 9px;
    background: #fbfbf8;
}

.translation-card.default-locale {
    border-color: #a9d7ce;
    background: #f3fbf9;
}

.translation-card legend {
    padding: 0 7px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 820;
}

.translation-card legend span {
    color: var(--teal);
    letter-spacing: 0.05em;
}

.form-actions {
    justify-content: flex-end;
    padding-top: 26px;
}

.policy-help {
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid #d4ece6;
    border-radius: 8px;
    color: #285b52;
    background: #edf8f5;
}

.policy-help strong {
    font-size: 12px;
}

.policy-help p {
    margin: 5px 0 0;
    font-size: 10px;
    line-height: 1.5;
}

.rule-section-card {
    margin-bottom: 16px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5e8e2;
}

.section-title-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-heading h2 {
    margin: 0 0 3px;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
}

.order-chip {
    display: grid;
    place-items: center;
    min-width: 32px;
    height: 32px;
    padding: 0 7px;
    border-radius: 8px;
    color: #9a6518;
    background: #fbf1e2;
    font-size: 10px;
    font-weight: 900;
}

.rule-list {
    display: grid;
}

.rule-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 2px;
    border-bottom: 1px solid #ebede8;
}

.rule-item:last-child {
    padding-bottom: 2px;
    border-bottom: 0;
}

.rule-copy {
    min-width: 0;
}

.rule-copy h3 {
    margin: 0 0 6px;
    font-size: 14px;
}

.rule-copy p {
    max-width: 850px;
    margin: 0 0 7px;
    color: #4c5551;
    font-size: 12px;
    line-height: 1.55;
}

.rule-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 10px;
}

.rule-type {
    color: var(--teal);
    font-weight: 900;
    letter-spacing: 0.04em;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 85% 8%, rgba(20, 127, 115, 0.13), transparent 31rem),
        var(--paper);
}

.login-card {
    width: min(100%, 420px);
    padding: 38px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 25px 70px rgba(23, 35, 31, 0.12);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 23px;
    border-radius: 12px;
    color: white;
    background: var(--sidebar);
    font-size: 23px;
    font-weight: 900;
}

.login-card h1 {
    margin-bottom: 8px;
}

.login-card button {
    width: 100%;
    min-height: 44px;
    margin-top: 24px;
    border: 0;
    border-radius: 8px;
    color: white;
    background: var(--teal);
    cursor: pointer;
    font-weight: 850;
}

.muted {
    color: var(--muted);
}

@media (max-width: 1420px) {
    .metric-grid {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }
}

@media (max-width: 1080px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 960px) {
    .admin-sidebar {
        width: min(84vw, 286px);
        transform: translateX(-104%);
        transition: transform 180ms ease;
    }

    .sidebar-toggle-input:checked ~ .admin-sidebar {
        transform: translateX(0);
    }

    .sidebar-overlay {
        position: fixed;
        z-index: 35;
        inset: 0;
        display: block;
        visibility: hidden;
        background: rgba(12, 20, 17, 0.46);
        opacity: 0;
        transition: opacity 180ms ease, visibility 180ms ease;
    }

    .sidebar-toggle-input:checked ~ .sidebar-overlay {
        visibility: visible;
        opacity: 1;
    }

    .admin-workspace {
        margin-left: 0;
    }

    .sidebar-toggle-button {
        display: flex;
    }

    .workspace-topbar {
        height: 68px;
        padding-inline: 20px;
    }

    .workspace-main {
        padding: 28px 20px 60px;
    }
}

@media (max-width: 700px) {
    .topbar-account {
        display: none;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .page-heading-actions {
        width: 100%;
        flex-wrap: wrap;
    }

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

    .metric-card {
        min-height: 154px;
        padding: 17px;
    }

    .panel-heading.horizontal,
    .section-heading,
    .rule-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-card {
        padding: 0 20px 22px;
    }

    .form-columns,
    .form-columns.three-columns,
    .translation-grid {
        grid-template-columns: 1fr;
    }

    .rule-item .row-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 440px) {
    .workspace-main {
        padding-inline: 15px;
    }

    .workspace-topbar {
        padding-inline: 15px;
    }

    .topbar-logout .outline-button {
        padding-inline: 12px;
    }

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

    .metric-card {
        min-height: 145px;
    }

    .dashboard-panel,
    .content-panel,
    .rule-section-card {
        padding: 19px;
    }

    .login-card {
        padding: 30px 22px;
    }
}
