:root {
    --primary: #1769d2;
    --primary-dark: #0f56b3;
    --primary-soft: #eaf3ff;
    --text: #172033;
    --muted: #667085;
    --border: #e2e8f0;
    --surface: #ffffff;
    --background: #f5f7fa;
    --success: #16803c;
    --success-soft: #e8f7ed;
    --danger: #c93434;
    --danger-soft: #fcebec;
    --shadow: 0 8px 28px rgba(23, 32, 51, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--surface); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif; font-size: 15px; line-height: 1.6; overflow-x: hidden; }
a { color: var(--primary); text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, .button { touch-action: manipulation; }
.container-wide { width: min(1200px, calc(100% - 40px)); margin: 0 auto; }
.eyebrow { display: inline-block; color: var(--primary); font-size: 12px; font-weight: 700; letter-spacing: .14em; }
.mono-text, .code-text { font-family: Consolas, "SFMono-Regular", Menlo, monospace; }

/* Shared controls */
.field { margin-bottom: 20px; }
.field label, form > label { display: block; margin-bottom: 7px; color: #344054; font-size: 14px; font-weight: 600; }
.field label b { color: var(--danger); }
input, textarea, select { width: 100%; min-height: 44px; padding: 10px 13px; color: var(--text); background: #fff; border: 1px solid #cfd7e3; border-radius: 7px; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(23, 105, 210, .12); }
button:disabled { cursor: not-allowed; opacity: .55; }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 6px; padding: 9px 18px; color: #fff; background: var(--primary); border: 1px solid var(--primary); border-radius: 7px; font-weight: 600; cursor: pointer; transition: background-color .15s, border-color .15s; }
.button:hover { color: #fff; background: var(--primary-dark); border-color: var(--primary-dark); }
.button-block { width: 100%; }
.button-secondary { color: #475467; background: #fff; border-color: #cfd7e3; }
.button-secondary:hover { color: #344054; background: #f3f5f8; border-color: #b9c3d0; }
.button-danger { background: #fff; color: var(--danger); border-color: #efb7bc; }
.button-danger:hover { color: #fff; background: var(--danger); border-color: var(--danger); }
.button-warning { color: #8a5a0a; background: #fff7e3; border-color: #e8c979; }
.button-warning:hover { color: #6f4706; background: #ffedbd; border-color: #d8b454; }
.button-small { min-height: 34px; padding: 5px 11px; font-size: 13px; }
.alert { margin: 0 0 20px; padding: 11px 14px; border: 1px solid transparent; border-radius: 7px; }
.alert.error { color: #9d252b; background: var(--danger-soft); border-color: #f5c7ca; }
.alert.success { color: #146b34; background: var(--success-soft); border-color: #bde4ca; }
.alert.warning { color: #8a5a0a; background: #fff7e3; border-color: #efd79c; }

/* Public pages */
.site-body { background: #fff; }
.site-header { position: relative; z-index: 10; height: 72px; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--border); }
.site-nav { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.site-brand { display: flex; align-items: center; gap: 14px; color: var(--text); }
.site-brand strong { font-size: 21px; letter-spacing: -.02em; }
.site-brand span { padding-left: 14px; color: var(--muted); border-left: 1px solid var(--border); font-size: 13px; }
.site-links { display: flex; align-items: center; gap: 32px; }
.site-links a { position: relative; padding: 24px 0; color: #475467; font-weight: 500; }
.site-links a:hover, .site-links a.active { color: var(--primary); }
.site-links a.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--primary); content: ""; }
.hero { min-height: 590px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, .75fr); gap: 80px; align-items: center; padding-top: 70px; padding-bottom: 70px; }
.hero.hero-single { align-items: stretch; }
.resource-entry-card { align-self: center; }

.shop-page { padding: 40px 0 46px; }
.shop-content { max-width: 860px; }
.shop-heading { margin: 0 0 20px; }
.shop-heading h1 { margin: 0; color: var(--text); font-size: 32px; line-height: 1.3; letter-spacing: -.025em; }
.shop-heading p { margin: 8px 0 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.shop-list { overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.shop-list-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 16px; align-items: center; min-width: 0; min-height: 82px; padding: 12px 16px; }
.shop-list-item + .shop-list-item { border-top: 1px solid var(--border); }
.shop-platform-mark { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: var(--primary); border-radius: 8px; font-size: 13px; font-weight: 800; }
.shop-platform-mark.platform-taobao { background: #ff5a1f; }
.shop-platform-mark.has-logo { overflow: hidden; background: #fff; border: 1px solid #e1e7ef; }
.shop-platform-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.shop-list-info { min-width: 0; }
.shop-list-info h2 { margin: 0 0 3px; color: var(--text); font-size: 17px; line-height: 1.4; overflow-wrap: anywhere; }
.shop-list-info p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.shop-list-action { flex: 0 0 auto; }
.shop-list-action .button { min-width: 112px; padding: 10px 16px; }
.shop-empty { margin: 0; }
.shop-hint { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.shop-logo-thumb { width: 38px; height: 38px; display: block; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: 7px; }
.shop-logo-fallback { min-width: 38px; min-height: 38px; display: inline-grid; place-items: center; padding: 3px; color: #526175; background: #f3f6fa; border-radius: 7px; font-size: 10px; }
.shop-logo-current { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.shop-logo-current img { width: 56px; height: 56px; display: block; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.shop-logo-current label { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.shop-logo-current input[type="checkbox"] { width: 16px; min-height: 16px; margin: 0; }
.table-url { display: inline-block; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }

@media (max-width: 700px) {
    .shop-page { padding: 14px 0 24px; }
    .shop-page .container-wide { width: calc(100% - 28px); padding: 0; }
    .shop-heading { margin-bottom: 10px; }
    .shop-heading h1 { font-size: 24px; }
    .shop-heading p { display: none; }
    .shop-list-item { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; min-height: 60px; padding: 9px 10px; }
    .shop-platform-mark { width: 38px; height: 38px; border-radius: 7px; font-size: 11px; }
    .shop-list-info h2 { margin-bottom: 1px; overflow: hidden; font-size: 14.5px; text-overflow: ellipsis; white-space: nowrap; }
    .shop-list-info p { overflow: hidden; font-size: 11.5px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
    .shop-list-action { grid-column: 3; }
    .shop-list-action .button { width: auto; min-width: 0; min-height: 0; padding: 5px 0 5px 7px; color: var(--primary); background: transparent; border: 0; font-size: 12px; }
    .shop-list-action .button::after { margin-left: 2px; content: '›'; }
    .shop-list-action .button:hover { color: var(--primary-dark); background: transparent; }
    .shop-hint { margin-top: 9px; font-size: 11.5px; line-height: 1.5; }
}
.hero-copy h1 { margin: 14px 0 24px; font-size: clamp(42px, 5vw, 66px); line-height: 1.13; letter-spacing: -.045em; }
.hero-copy h1 em { color: var(--primary); font-style: normal; }
.hero-copy p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.9; }
.feature-tags { display: flex; gap: 10px; margin-top: 30px; }
.feature-tags span { padding: 7px 13px; color: #315a8c; background: var(--primary-soft); border: 1px solid #d7e8ff; border-radius: 999px; font-size: 13px; font-weight: 600; }
.verify-card { padding: 34px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); }
.card-heading { display: flex; gap: 15px; align-items: center; margin-bottom: 26px; }
.card-mark { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: var(--primary); border-radius: 8px; font-size: 15px; font-weight: 800; letter-spacing: .04em; }
.card-heading h2 { margin: 0; font-size: 22px; }
.card-heading p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.verify-copy-mobile { display: none; }
.code-input { height: 50px; font-family: Consolas, monospace; letter-spacing: .04em; text-transform: uppercase; }
.verify-card .button { height: 48px; margin-top: 16px; }
.form-note { margin: 14px 0 0; color: #98a2b3; text-align: center; font-size: 12px; }
.delivery-note { margin: 15px 0 0; color: #7b8798; text-align: center; font-size: 12px; line-height: 1.7; }
.usage-section { padding: 72px 0 82px; background: var(--background); border-top: 1px solid #eef1f5; }
.section-heading { margin-bottom: 28px; text-align: center; }
.section-heading h2 { margin: 6px 0 0; font-size: 30px; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step-card { min-height: 135px; display: flex; gap: 18px; align-items: flex-start; padding: 25px; background: #fff; border: 1px solid var(--border); border-radius: 9px; }
.step-card > span { color: #9dbfe9; font-size: 26px; font-weight: 800; line-height: 1; }
.step-card h3 { margin: 0 0 6px; font-size: 17px; }
.step-card p { margin: 0; color: var(--muted); font-size: 14px; }
.site-footer { padding: 24px 0; color: #7c8799; background: #fff; border-top: 1px solid var(--border); text-align: center; font-size: 13px; }
.download-main { min-height: calc(100vh - 145px); padding-top: 55px; padding-bottom: 65px; }
.resource-card { max-width: 900px; margin: 0 auto; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); }
.resource-header { padding: 32px 36px 28px; border-bottom: 1px solid var(--border); }
.resource-kicker { color: var(--primary); font-size: 13px; font-weight: 700; }
.resource-header h1 { margin: 5px 0 5px; font-size: 28px; }
.resource-header p { margin: 0; color: var(--muted); }
.resource-grid { display: grid; grid-template-columns: 1fr 1fr; padding: 10px 36px 22px; }
.resource-item { min-width: 0; padding: 19px 0; border-bottom: 1px solid #edf0f4; }
.resource-item:nth-child(odd):not(.full) { padding-right: 28px; }
.resource-item:nth-child(even):not(.full) { padding-left: 28px; border-left: 1px solid #edf0f4; }
.resource-item.full { grid-column: 1 / -1; }
.resource-item > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 13px; }
.resource-item > strong { display: block; overflow-wrap: anywhere; font-size: 16px; }
.resource-description { color: #475467; line-height: 1.8; }
.resource-actions { display: flex; gap: 12px; padding: 24px 36px 32px; }

/* Admin layout */
.admin-body { min-height: 100vh; background: var(--background); }
.admin-layout { min-height: 100vh; }
.admin-sidebar { position: fixed; z-index: 20; top: 0; bottom: 0; left: 0; width: 220px; color: #dce6f5; background: #162238; }
.admin-brand { height: 76px; display: flex; flex-direction: column; justify-content: center; padding: 0 25px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-brand strong { font-size: 20px; line-height: 1.3; }
.admin-brand span { color: #94a8c4; font-size: 12px; }
.admin-menu { padding: 20px 12px; }
.admin-menu a { display: flex; align-items: center; gap: 12px; margin-bottom: 5px; padding: 10px 13px; color: #b9c8dc; border-radius: 7px; font-size: 14px; }
.admin-menu a span { width: 22px; color: #7890ae; font-size: 11px; text-align: center; }
.admin-menu a:hover, .admin-menu a.active { color: #fff; background: rgba(255,255,255,.1); }
.admin-menu a.active span { color: #79b5ff; }
.admin-main { min-height: 100vh; margin-left: 220px; display: flex; flex-direction: column; }
.admin-topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; background: #fff; border-bottom: 1px solid var(--border); }
.admin-topbar strong { font-size: 17px; }
.admin-topbar span { color: var(--muted); font-size: 13px; }
.admin-content { width: 100%; max-width: 1420px; flex: 1; padding: 30px; }
.admin-footer { padding: 18px 30px; color: #98a2b3; text-align: center; font-size: 12px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-heading h1 { margin: 0; font-size: 25px; }
.page-heading p { margin: 4px 0 0; color: var(--muted); }
.heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.heading-actions form { display: inline-flex; margin: 0; }
.content-card, .welcome-panel, .stat-card { background: #fff; border: 1px solid var(--border); border-radius: 9px; box-shadow: 0 3px 14px rgba(23,32,51,.035); }
.welcome-panel { padding: 27px 30px; margin-bottom: 20px; }
.welcome-panel h1 { margin: 4px 0 3px; font-size: 26px; }
.welcome-panel p { margin: 0; color: var(--muted); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }
.stat-card { padding: 23px 25px; }
.stat-card > span { display: block; color: #475467; font-weight: 600; }
.stat-card strong { display: block; margin: 8px 0 1px; font-size: 32px; line-height: 1.2; }
.stat-card small { color: #98a2b3; }
.text-success { color: var(--success); }
.text-muted { color: #667085; }
.text-danger { color: var(--danger); }
.text-warning { color: #a56b0a; }
.quick-card { padding: 25px 28px; }
.section-title h2 { margin: 0; font-size: 18px; }
.section-title p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.quick-actions { display: flex; gap: 10px; margin-top: 18px; }
.table-card { overflow: hidden; }
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th, td { padding: 14px 16px; border-bottom: 1px solid #edf0f4; text-align: left; vertical-align: middle; }
th { color: #475467; background: #f8fafc; font-size: 12px; font-weight: 700; white-space: nowrap; }
td { color: #344054; font-size: 14px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfe; }
.table-subtext { display: block; max-width: 250px; margin-top: 2px; overflow: hidden; color: #98a2b3; text-overflow: ellipsis; white-space: nowrap; }
.status-badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.status-badge.enabled { color: var(--success); background: var(--success-soft); }
.status-badge.disabled { color: #667085; background: #eef1f5; }
.status-badge.code-unused { color: #1769d2; background: #e8f2ff; }
.status-badge.code-used { color: var(--success); background: var(--success-soft); }
.status-badge.code-active { color: var(--success); background: var(--success-soft); }
.status-badge.code-disabled { color: #667085; background: #eef1f5; }
.status-badge.code-expired { color: #a33a43; background: #ffebee; }
.status-badge.source-check-unchecked { color: #526175; background: #edf1f6; }
.status-badge.source-check-normal, .status-badge.source-state-deliverable { color: var(--success); background: var(--success-soft); }
.status-badge.source-check-suspected, .status-badge.source-state-suspected { color: #94600b; background: #fff3d6; }
.status-badge.source-check-invalid, .status-badge.source-state-unavailable { color: #a33a43; background: #ffebee; }
.status-badge.source-state-none { color: #667085; background: #eef1f5; }
.code-text { padding: 4px 8px; color: #164d8f; background: #edf5ff; border-radius: 5px; font-size: 13px; white-space: nowrap; }
.operation-cell { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.operation-cell form { display: inline-flex; margin: 0; }
.empty-state { padding: 52px 20px; color: var(--muted); text-align: center; }
.empty-state strong, .empty-state span { display: block; }
.empty-state strong { margin-bottom: 4px; color: #475467; }
.form-card { max-width: 760px; padding: 28px 30px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; padding-top: 6px; }
.input-action { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.input-action .button { white-space: nowrap; }
.field-help { display: block; margin-top: 6px; color: #8a94a6; font-size: 12px; line-height: 1.5; }
.form-hint { margin: 0 0 18px; padding: 11px 13px; color: #667085; background: #f7f9fc; border-radius: 7px; font-size: 13px; }
.resource-probe-section { border-color: #bfd7ff; background: #fbfdff; }
.resource-probe-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.resource-probe-row .field { margin: 0; }
.resource-probe-row .button { min-width: 118px; }
.probe-ai-option { display: inline-flex; align-items: center; gap: 7px; margin-top: 11px; color: #526175; font-size: 13px; }
.probe-ai-option input { width: 16px; height: 16px; }
.resource-probe-status { min-height: 20px; margin-top: 9px; font-size: 13px; }
.resource-probe-status.loading { color: #526175; }
.resource-probe-status.success { color: #16723a; }
.resource-probe-status.warning { color: #8a5a0a; }
.resource-probe-status.error { color: #b4232c; }
.resource-edit-page { max-width: 1180px !important; }
.resource-edit-form .form-section { margin-bottom: 10px; padding: 13px 16px; }
.resource-edit-form .form-section h2 { margin-bottom: 10px; font-size: 16px; }
.resource-edit-form .form-grid { gap: 0 14px; }
.resource-edit-form .field { margin-bottom: 9px; }
.resource-edit-form .field label { margin-bottom: 4px; }
.resource-edit-form textarea { min-height: 72px; }
.resource-edit-form .textarea-compact { min-height: 58px; }
.resource-edit-form .field-help { margin-top: 4px; line-height: 1.35; }
.resource-edit-form .form-hint { margin: 0; padding: 8px 10px; }
.sku-suggest-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 12px;
    margin: -1px 0 8px !important;
    padding: 9px 11px;
    border: 1px solid #d7e4f7;
    border-radius: 7px;
    background: #f7faff;
}
.sku-suggest-row strong { display: block; color: #344054; font-size: 13px; }
.sku-suggest-row .field-help { margin: 2px 0 0; }
.sku-suggest-status { grid-column: 1 / -1; min-height: 0; color: #667085; font-size: 12px; }
.sku-suggest-status:empty { display: none; }
.sku-suggest-status.loading { color: #526175; }
.sku-suggest-status.success { color: #16723a; }
.sku-suggest-status.error { color: #b4232c; }
.field-label-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.field-label-actions label { margin: 0 !important; }
.button-link {
    appearance: none;
    padding: 0;
    color: var(--primary);
    background: transparent;
    border: 0;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.button-link:hover { text-decoration: underline; }
.button-link:disabled { color: #98a2b3; cursor: not-allowed; text-decoration: none; }
.ai-description-status { display: block; margin-top: 4px; color: #667085; font-size: 12px; line-height: 1.35; }
.ai-description-status.loading { color: #526175; }
.ai-description-status.success { color: #16723a; }
.ai-description-status.error { color: #b4232c; }
@media (min-width: 1100px) {
    .resource-edit-form .resource-compact-section:nth-of-type(2) .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
    .resource-edit-form {
        display: grid;
        grid-template-columns: minmax(0, 1.35fr) minmax(390px, .65fr);
        align-items: start;
        gap: 10px;
    }
    .resource-edit-form .resource-basic-section,
    .resource-edit-form .resource-file-section { margin-bottom: 0; }
    .resource-edit-form .resource-basic-section { grid-column: 1; grid-row: 1 / span 2; }
    .resource-edit-form .resource-file-section { grid-column: 2; grid-row: 1; }
    .resource-edit-form .resource-file-section.resource-compact-section .form-grid { grid-template-columns: 1fr 1fr; }
    .resource-edit-form .resource-file-section .field:first-child,
    .resource-edit-form .resource-file-section .field:nth-child(2),
    .resource-edit-form .resource-file-section .field:nth-child(3),
    .resource-edit-form .resource-file-section .field:nth-child(6) { grid-column: 1 / -1; }
    .resource-edit-form .resource-preview-section { grid-column: 2; grid-row: 2; margin-bottom: 0; }
    .resource-edit-form .sticky-form-actions { grid-column: 1 / -1; grid-row: 3; }
}
@media (max-width: 576px) {
    .resource-edit-form .form-section { padding: 12px; }
    .sku-suggest-row { grid-template-columns: 1fr; }
    .sku-suggest-row .button { width: 100%; }
}
.resource-selector { margin: 5px 0 24px; padding: 16px; border: 1px solid var(--border); border-radius: 8px; }
.resource-selector legend { padding: 0 7px; color: #344054; font-weight: 700; }
.resource-selector legend b { color: var(--danger); }
.resource-selector > label { display: flex; align-items: flex-start; gap: 11px; padding: 11px; border-bottom: 1px solid #edf0f4; cursor: pointer; }
.resource-selector > label:last-child { border-bottom: 0; }
.resource-selector input[type="checkbox"] { width: 18px; min-height: 18px; margin: 2px 0 0; flex: 0 0 auto; }
.resource-selector span { min-width: 0; }
.resource-selector strong, .resource-selector small { display: block; }
.resource-selector small { margin-top: 2px; color: #8a94a6; }
.export-card { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 20px; padding: 20px 24px; }
.export-card h2 { margin: 0; font-size: 17px; }
.export-card p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.export-card form { display: flex; align-items: center; gap: 8px; }
.export-card select { width: 190px; }
.wide-admin-table { min-width: 1180px; }
.table-card td small { display: block; margin-top: 3px; color: #98a2b3; }
.product-summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin-bottom: 20px; padding: 20px 24px; }
.product-summary-grid > div { min-width: 0; padding: 5px 18px; border-left: 1px solid #edf0f4; }
.product-summary-grid > div:first-child { padding-left: 0; border-left: 0; }
.product-summary-grid span, .product-summary-grid strong { display: block; }
.product-summary-grid span { color: #98a2b3; font-size: 12px; }
.product-summary-grid strong { margin-top: 3px; overflow-wrap: anywhere; color: #344054; }
.stats-grid-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.masked-url { color: #526175; font-size: 12px; white-space: nowrap; }
.source-summary-grid { margin-bottom: 22px; }
.management-section { margin-bottom: 20px; padding: 24px; }
.management-section .section-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.management-actions { display: flex; gap: 10px; margin-top: 18px; }
.sort-input { width: 90px; min-height: 36px; padding: 5px 8px; }
.bind-resource-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bind-resource-list label { min-width: 0; display: flex; align-items: flex-start; gap: 11px; padding: 14px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.bind-resource-list input { width: 18px; min-height: 18px; margin: 2px 0 0; flex: 0 0 auto; }
.bind-resource-list span, .bind-resource-list strong, .bind-resource-list small { min-width: 0; display: block; }
.bind-resource-list small { margin-top: 2px; color: #8a94a6; }
.hidden-form { display: none; }
.preview-delivery-grid { margin-top: 18px; }
.filter-card { margin-bottom: 20px; padding: 18px 22px; }
.filter-row { display: flex; align-items: flex-end; gap: 10px; }
.filter-row .field { width: 190px; margin: 0; }
.filter-row .filter-search { width: min(360px, 100%); }
.standalone-action { margin-top: 20px; }
.detail-list-card { max-width: 900px; padding: 8px 28px; }
.admin-detail-list { margin: 0; }
.admin-detail-list > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; padding: 16px 0; border-bottom: 1px solid #edf0f4; }
.admin-detail-list > div:last-child { border-bottom: 0; }
.admin-detail-list dt { color: #98a2b3; }
.admin-detail-list dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #344054; font-weight: 600; }
.source-empty-warning { margin: 18px 22px 22px; padding: 13px 15px; color: #9d252b; background: var(--danger-soft); border: 1px solid #f5c7ca; border-radius: 7px; }
.source-hidden-note { margin: 0 22px 22px; padding: 12px 14px; color: #667085; background: #f5f7fa; border-radius: 7px; text-align: center; }
.admin-preview-sources { display: grid; gap: 10px; padding: 0 22px 22px; }
.admin-preview-sources > div { min-width: 0; padding: 13px 14px; background: #f7f9fc; border: 1px solid #e5eaf1; border-radius: 7px; }
.admin-preview-sources strong, .admin-preview-sources code, .admin-preview-sources span { display: block; }
.admin-preview-sources code { margin: 4px 0; overflow-wrap: anywhere; color: #315a8c; white-space: normal; }
.admin-source-alert { margin-right: 22px; margin-left: 22px; }

/* Redeemed resource delivery */
.delivery-main { min-height: calc(100vh - 145px); padding-top: 48px; padding-bottom: 68px; }
.delivery-header { margin-bottom: 16px; padding: 21px 24px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); }
.delivery-header h1 { margin: 0 0 4px; font-size: 27px; }
.delivery-header p { margin: 0; color: #526175; }
.delivery-header > div { margin-top: 12px; color: var(--muted); }
.delivery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.delivery-card { min-width: 0; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 4px 18px rgba(23,32,51,.045); }
.delivery-card-head { padding: 25px 26px 20px; border-bottom: 1px solid var(--border); }
.delivery-card-head h2 { margin: 10px 0 5px; font-size: 20px; }
.delivery-card-head p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.delivery-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; margin: 0; padding: 8px 26px 24px; }
.delivery-meta > div { min-width: 0; padding: 13px 0; border-bottom: 1px solid #edf0f4; }
.delivery-meta > div.full { grid-column: 1 / -1; }
.delivery-meta dt { color: #98a2b3; font-size: 12px; }
.delivery-meta dd { margin: 3px 0 0; overflow-wrap: anywhere; color: #344054; font-weight: 600; }
.delivery-meta dd a { word-break: break-all; }

/* My resources and protected delivery sources */
.delivery-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.access-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 16px 0 0; border-top: 1px solid #edf0f4; }
.access-summary > div { min-width: 0; padding: 12px 12px 0 0; }
.access-summary dt { color: #98a2b3; font-size: 12px; }
.access-summary dd { margin: 3px 0 0; overflow-wrap: anywhere; color: #344054; font-weight: 600; }
.my-resource-list { display: grid; gap: 14px; }
.my-resource-card { min-width: 0; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 4px 18px rgba(23,32,51,.045); }
.my-resource-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 20px 22px 15px; border-bottom: 1px solid var(--border); }
.my-resource-head > div { min-width: 0; }
.my-resource-head h2 { margin: 8px 0 0; font-size: 20px; }
.my-resource-head p { margin: 0; color: var(--muted); line-height: 1.7; }
.my-resource-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 22px; margin: 0; padding: 4px 22px 12px; }
.my-resource-meta > div { min-width: 0; padding: 10px 0; border-bottom: 1px solid #edf0f4; }
.my-resource-meta dt { color: #98a2b3; font-size: 12px; }
.my-resource-meta dd { margin: 3px 0 0; overflow-wrap: anywhere; color: #344054; font-weight: 600; }
.source-list { display: grid; gap: 8px; padding: 2px 22px 20px; }
.source-card { min-width: 0; padding: 14px; background: #f8fafc; border: 1px solid #e1e7ef; border-radius: 8px; }
.source-card-main { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.source-card-main strong, .source-card-main span { display: block; }
.source-card-main strong { color: #27364b; }
.source-card-main > div > span { color: #8a94a6; font-size: 12px; }
.source-code { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.source-code > span { color: #8a94a6; font-size: 12px; }
.source-code code { padding: 4px 9px; color: #164d8f; background: #e7f1ff; border-radius: 5px; font-weight: 700; }
.source-alert { margin: 12px 0 0; padding: 9px 11px; border-radius: 6px; font-size: 13px; }
.source-alert.suspected { color: #8a5a0a; background: #fff3d6; }
.source-alert.unchecked { color: #526175; background: #edf1f6; }
.source-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.copy-toast { position: fixed; z-index: 50; left: 50%; bottom: 28px; padding: 10px 17px; color: #fff; background: #172033; border-radius: 7px; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: opacity .15s, transform .15s; }
.copy-toast.show { opacity: 1; transform: translate(-50%, 0); }
.copy-fallback { position: fixed; z-index: 49; right: 20px; bottom: 20px; width: min(480px, calc(100% - 40px)); padding: 18px; background: #fff; border: 1px solid var(--border); border-radius: 9px; box-shadow: var(--shadow); }
.copy-fallback label { display: block; margin-bottom: 8px; color: #475467; font-size: 13px; }
.copy-fallback textarea { min-height: 150px; margin-bottom: 10px; font-family: Consolas, monospace; font-size: 12px; }

/* Public resource library */
.resource-list-section { padding: 76px 0 86px; background: var(--background); border-top: 1px solid #eef1f5; }
.resource-list-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.resource-list-heading h2 { margin: 5px 0 2px; font-size: 31px; }
.resource-list-heading p { margin: 0; color: var(--muted); }
.type-filters { display: flex; gap: 9px; flex-wrap: wrap; margin: 27px 0 30px; }
.type-filters a { padding: 7px 14px; color: #526175; background: #fff; border: 1px solid #dce2ea; border-radius: 999px; font-size: 13px; font-weight: 600; }
.type-filters a:hover, .type-filters a.active { color: #fff; background: var(--primary); border-color: var(--primary); }
.public-resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.public-resource-card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 4px 18px rgba(23,32,51,.045); }
.resource-cover { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; background: #eaf1f9; }
.resource-cover img, .detail-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.cover-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 5px; color: #6380a3; background: #eaf1f9; }
.cover-placeholder b { font-size: 29px; letter-spacing: .06em; }
.cover-placeholder small { font-size: 12px; font-weight: 600; }
.placeholder-mobile, .resource-mobile-meta { display: none; }
.public-resource-body { flex: 1; display: flex; align-items: flex-start; flex-direction: column; padding: 22px; }
.resource-type-badge { display: inline-flex; padding: 3px 9px; color: #295f9f; background: #e8f2ff; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.resource-type-badge.type-software { color: #5c3ca2; background: #f0ebff; }
.resource-type-badge.type-document { color: #996018; background: #fff4df; }
.resource-type-badge.type-video { color: #ad3c4c; background: #ffebee; }
.resource-type-badge.type-image { color: #137765; background: #e5f7f3; }
.resource-type-badge.type-other { color: #5e6776; background: #eef1f5; }
.public-resource-body h3 { width: 100%; margin: 12px 0 7px; overflow: hidden; font-size: 19px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.public-resource-body h3 a { color: var(--text); }
.public-resource-body h3 a:hover { color: var(--primary); }
.public-resource-body > p { min-height: 44px; margin: 0 0 17px; display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 14px; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.resource-card-meta { width: 100%; margin: auto 0 18px; padding-top: 15px; border-top: 1px solid #edf0f4; }
.resource-card-meta > div { min-width: 0; display: grid; grid-template-columns: 64px 1fr; gap: 8px; margin-top: 6px; }
.resource-card-meta dt { color: #98a2b3; font-size: 12px; }
.resource-card-meta dd { margin: 0; overflow: hidden; color: #475467; font-size: 12px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.public-empty { padding: 65px 20px; color: var(--muted); background: #fff; border: 1px dashed #cfd7e3; border-radius: 9px; text-align: center; }
.public-empty strong, .public-empty span { display: block; }
.public-empty strong { margin-bottom: 5px; color: #475467; }
.resource-page { min-height: calc(100vh - 145px); padding: 58px 0 74px; background: var(--background); }
.resource-list-heading h1 { margin: 5px 0 2px; font-size: 31px; }
.resource-count { flex: 0 0 auto; padding: 6px 12px; color: #667085; background: #fff; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; }
.resource-library-page .pagination-bar { margin-top: 24px; }
.public-table-card { overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 4px 18px rgba(23,32,51,.045); }
.public-resource-table { min-width: 980px; table-layout: fixed; }
.public-resource-table th:nth-child(1) { width: 120px; }
.public-resource-table th:nth-child(2) { width: 29%; }
.public-resource-table th:nth-child(3) { width: 120px; }
.public-resource-table th:nth-child(4) { width: 16%; }
.public-resource-table th:nth-child(5) { width: 20%; }
.public-resource-table th:nth-child(6) { width: 105px; }
.public-resource-table td { padding-top: 16px; padding-bottom: 16px; }
.table-cover { width: 88px; height: 54px; display: block; overflow: hidden; background: #eaf1f9; border: 1px solid #dce5f0; border-radius: 6px; }
.table-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.table-cover span { width: 100%; height: 100%; display: grid; place-items: center; color: #6380a3; }
.table-cover b { font-size: 17px; letter-spacing: .05em; }
.resource-summary { min-width: 0; }
.resource-name { display: block; overflow: hidden; color: var(--text); font-size: 15px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.resource-name:hover { color: var(--primary); }
.resource-summary p { margin: 4px 0 0; display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.table-primary-text, .table-filename { display: block; overflow: hidden; color: #344054; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.public-resource-table td small { display: block; margin-top: 4px; color: #98a2b3; font-size: 12px; }

/* Public resource detail */
.detail-main { min-height: calc(100vh - 145px); padding-top: 48px; padding-bottom: 65px; }
.detail-back { display: inline-flex; align-items: center; margin-bottom: 16px; color: #526175; font-size: 14px; font-weight: 600; }
.detail-back:hover { color: var(--primary); }
.detail-card { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr); overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); }
.detail-cover { min-height: 360px; background: #eaf1f9; }
.detail-content { min-width: 0; padding: 38px; }
.detail-content h1 { margin: 12px 0 13px; font-size: 31px; line-height: 1.35; }
.detail-description { color: #566276; line-height: 1.8; }
.detail-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin: 25px 0 0; border-top: 1px solid #edf0f4; }
.detail-meta > div { min-width: 0; padding: 14px 0; border-bottom: 1px solid #edf0f4; }
.detail-meta dt { color: #98a2b3; font-size: 12px; }
.detail-meta dd { margin: 3px 0 0; overflow-wrap: anywhere; color: #344054; font-weight: 600; }
.preview-panel { grid-column: 1 / -1; padding: 31px 38px; border-top: 1px solid var(--border); }
.preview-panel h2 { margin: 0 0 12px; font-size: 20px; }
.preview-panel > div { color: #566276; line-height: 1.85; }
.locked-panel { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 25px; margin: 0 38px 36px; padding: 22px 24px; background: #f5f8fc; border: 1px solid #dce5f0; border-radius: 9px; }
.locked-panel > div { display: flex; align-items: center; gap: 14px; }
.lock-mark { width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: var(--primary); border-radius: 8px; font-size: 13px; font-weight: 800; }
.locked-panel h2 { margin: 0; font-size: 18px; }
.locked-panel p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.locked-panel .button { flex: 0 0 auto; }
.not-found-card { max-width: 620px; margin: 50px auto; padding: 50px 35px; background: #fff; border: 1px solid var(--border); border-radius: 10px; text-align: center; box-shadow: var(--shadow); }
.not-found-card h1 { margin: 0 0 8px; }
.not-found-card p { margin: 0 0 22px; color: var(--muted); }

/* Login */
.login-body { min-height: 100vh; background: var(--background); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(400px, 100%); padding: 34px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); }
.login-brand { display: flex; align-items: baseline; gap: 10px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.login-brand strong { color: var(--primary); font-size: 22px; }
.login-brand span { color: var(--muted); font-size: 13px; }
.login-heading { margin: 24px 0; }
.login-heading h1 { margin: 0; font-size: 24px; }
.login-heading p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.login-button { margin-top: 4px; }
.back-link { display: block; margin-top: 20px; color: var(--muted); text-align: center; font-size: 13px; }
.back-link:hover { color: var(--primary); }

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; gap: 45px; min-height: auto; padding-top: 60px; padding-bottom: 60px; }
    .hero-copy { text-align: center; }
    .hero-copy p br { display: none; }
    .feature-tags { justify-content: center; }
    .verify-card { width: min(520px, 100%); margin: 0 auto; }
    .steps-grid { grid-template-columns: 1fr; }
    .admin-sidebar { position: static; width: 100%; }
    .admin-brand { height: 64px; align-items: center; flex-direction: row; gap: 10px; }
    .admin-menu { display: flex; padding: 8px 12px; overflow-x: auto; }
    .admin-menu a { flex: 0 0 auto; margin: 0 3px; }
    .admin-main { margin-left: 0; }
    .stats-grid { grid-template-columns: 1fr; }
    .public-resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-card { grid-template-columns: 1fr; }
    .detail-cover { min-height: auto; aspect-ratio: 16 / 8; }
    .delivery-grid { grid-template-columns: 1fr; }
    .export-card { align-items: stretch; flex-direction: column; }
    .export-card form { flex-wrap: wrap; }
    .product-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .product-summary-grid > div, .product-summary-grid > div:first-child { padding: 10px 12px; border-left: 0; border-bottom: 1px solid #edf0f4; }
    .bind-resource-list { grid-template-columns: 1fr; }
    .access-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .container-wide { width: min(100% - 28px, 1200px); }
    .site-header { height: auto; }
    .site-nav { min-height: 70px; align-items: flex-start; flex-direction: column; gap: 8px; padding-top: 13px; padding-bottom: 10px; }
    .site-brand span { display: none; }
    .site-links { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
    .site-links a { min-width: 0; min-height: 40px; display: flex; align-items: center; justify-content: center; padding: 6px 3px; font-size: 13px; text-align: center; white-space: nowrap; }
    .site-links a.active::after { display: none; }
    .hero { gap: 35px; padding-top: 45px; padding-bottom: 48px; }
    .hero-copy h1 { overflow-wrap: anywhere; font-size: clamp(32px, 10vw, 38px); }
    .hero-copy p { font-size: 15px; }
    .verify-card { padding: 24px 20px; }
    .verify-card input, .verify-card .button { min-height: 48px; }
    .usage-section { padding: 55px 0; }
    .step-card { min-height: auto; padding: 21px; }
    .download-main { padding-top: 28px; padding-bottom: 38px; }
    .resource-header { padding: 25px 22px; }
    .resource-header h1 { font-size: 23px; }
    .resource-grid { grid-template-columns: 1fr; padding: 5px 22px 15px; }
    .resource-item, .resource-item:nth-child(odd):not(.full), .resource-item:nth-child(even):not(.full) { grid-column: 1; padding: 16px 0; border-left: 0; }
    .resource-actions { flex-direction: column; padding: 20px 22px 25px; }
    .admin-menu a span { display: none; }
    .admin-topbar { height: 58px; padding: 0 16px; }
    .admin-content { padding: 20px 14px; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .page-heading .button { width: 100%; }
    .heading-actions { width: 100%; align-items: stretch; flex-direction: column; }
    .heading-actions form, .heading-actions form .button { width: 100%; }
    .welcome-panel, .stat-card, .quick-card, .form-card { padding: 21px; }
    .quick-actions, .form-actions { flex-direction: column; }
    .quick-actions .button, .form-actions .button { width: 100%; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .full { grid-column: 1; }
    .input-action { grid-template-columns: 1fr; }
    .login-card { padding: 28px 22px; }
    .resource-list-section { padding: 55px 0 62px; }
    .resource-page { padding: 38px 0 52px; }
    .resource-list-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
    .resource-list-heading h1 { font-size: 27px; }
    .public-table-card { overflow: visible; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
    .public-table-card .table-wrap { overflow: visible; }
    .public-resource-table { min-width: 0; display: block; }
    .public-resource-table thead { display: none; }
    .public-resource-table tbody { display: grid; gap: 14px; }
    .public-resource-table tr { min-width: 0; display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 0 14px; padding: 15px; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: 9px; box-shadow: 0 3px 14px rgba(23,32,51,.035); }
    .public-resource-table td { min-width: 0; display: block; padding: 0; border: 0; }
    .public-resource-table .mobile-cover-cell { grid-column: 1; grid-row: 1; }
    .public-resource-table .resource-summary { grid-column: 2; grid-row: 1; align-self: center; }
    .public-resource-table .mobile-meta-cell { grid-column: 1 / -1; display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #edf0f4; }
    .public-resource-table .mobile-meta-cell::before { content: attr(data-label); color: #98a2b3; font-size: 12px; }
    .public-resource-table .mobile-action-cell { grid-column: 1 / -1; margin-top: 14px; }
    .public-resource-table .mobile-action-cell .button { width: 100%; min-height: 44px; }
    .public-resource-table .table-cover { width: 80px; height: 60px; }
    .public-resource-table .resource-name, .public-resource-table .table-primary-text, .public-resource-table .table-filename { white-space: normal; overflow-wrap: anywhere; }
    .public-resource-table .resource-summary p { -webkit-line-clamp: 2; }
    .public-resource-grid { grid-template-columns: 1fr; }
    .type-filters { max-width: 100%; flex-wrap: nowrap; margin-right: 0; padding-right: 0; overflow-x: auto; }
    .type-filters a { flex: 0 0 auto; }
    .detail-main { padding-top: 25px; padding-bottom: 38px; }
    .detail-card { border-radius: 9px; }
    .detail-cover { aspect-ratio: 16 / 10; }
    .detail-content { padding: 25px 22px; }
    .detail-content h1 { font-size: 25px; }
    .detail-meta { grid-template-columns: 1fr; }
    .preview-panel { padding: 25px 22px; }
    .locked-panel { align-items: stretch; flex-direction: column; margin: 0 22px 25px; padding: 19px; }
    .locked-panel > div { align-items: flex-start; }
    .locked-panel .button { width: 100%; }
    .export-card { padding: 19px; }
    .export-card form { align-items: stretch; flex-direction: column; }
    .export-card select, .export-card .button { width: 100%; }
    .delivery-main { padding-top: 25px; padding-bottom: 42px; }
    .delivery-header { padding: 23px 21px; }
    .delivery-card-head { padding: 23px 21px 19px; }
    .delivery-meta { grid-template-columns: 1fr; padding-right: 21px; padding-left: 21px; }
    .delivery-meta > div.full { grid-column: 1; }
    .product-summary-grid { grid-template-columns: 1fr; padding: 13px 18px; }
    .management-section { padding: 20px 16px; }
    .filter-row { align-items: stretch; flex-direction: column; }
    .filter-row .field, .filter-row .filter-search, .filter-row .button { width: 100%; }
    .management-actions { flex-direction: column; }
    .management-actions .button { width: 100%; }
    .admin-detail-list > div { grid-template-columns: 1fr; gap: 4px; }
    .stats-grid-secondary { grid-template-columns: 1fr; }
    .delivery-title-row, .my-resource-head { align-items: stretch; flex-direction: column; }
    .delivery-title-row .button, .my-resource-head .button { width: 100%; }
    .access-summary, .my-resource-meta { grid-template-columns: 1fr; }
    .my-resource-head { padding: 22px 19px; }
    .my-resource-meta { padding-right: 19px; padding-left: 19px; }
    .source-list { padding: 4px 19px 22px; }
    .source-card-main { align-items: flex-start; }
    .source-actions { flex-direction: column; }
    .source-actions .button { width: 100%; min-height: 44px; }
}

@media (max-width: 420px) {
    .container-wide { width: min(100% - 22px, 1200px); }
    .site-links a { font-size: 12px; }
    .hero { padding-top: 38px; }
    .verify-card { padding-right: 17px; padding-left: 17px; }
    .resource-list-heading h1 { font-size: 25px; }
    .public-resource-table tr { grid-template-columns: 72px minmax(0, 1fr); gap: 0 12px; padding: 13px; }
    .public-resource-table .table-cover { width: 72px; height: 56px; }
    .detail-content, .preview-panel { padding-right: 18px; padding-left: 18px; }
    .locked-panel { margin-right: 18px; margin-left: 18px; }
}

.status-badge.code-stock { background:#eef2f6; color:#475467; }
.status-badge.code-delivered { background:#fff3d6; color:#9a6700; }
.api-result { max-height:420px; overflow:auto; padding:16px; color:#d7e4ff; background:#14213a; border-radius:8px; white-space:pre-wrap; word-break:break-all; }
.pagination{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;padding:18px}.pagination .page-number{min-width:34px;padding:5px 9px;text-align:center;border:1px solid var(--border);border-radius:6px}.pagination .page-number.active{color:#fff;background:var(--primary);border-color:var(--primary)}.pagination select{width:auto;min-height:36px}.ua-cell{max-width:280px;overflow-wrap:anywhere}

/* Compact admin components */
.admin-body { overflow-x: hidden; }
.admin-body .admin-sidebar { display: flex; flex-direction: column; }
.admin-body .admin-brand { height: 68px; padding: 0 20px; }
.admin-body .admin-menu { flex: 1; padding: 12px 10px; overflow-y: auto; }
.admin-body .admin-menu-group { margin: 0 0 10px; }
.admin-body .admin-menu-label,
.admin-body .admin-menu-group > summary { padding: 7px 12px; color: #7187a5; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.admin-body .admin-menu-group > summary { position: relative; cursor: pointer; list-style: none; }
.admin-body .admin-menu-group > summary::-webkit-details-marker { display: none; }
.admin-body .admin-menu-group > summary::after { content: '›'; position: absolute; right: 12px; font-size: 15px; transform: rotate(0); transition: transform .15s ease; }
.admin-body .admin-menu-group[open] > summary::after { transform: rotate(90deg); }
.admin-body .admin-menu a,
.admin-body .admin-sidebar-footer a { min-height: 38px; margin-bottom: 3px; padding: 8px 11px; }
.admin-body .admin-sidebar-footer { flex: 0 0 auto; padding: 10px; border-top: 1px solid rgba(255,255,255,.1); }
.admin-body .admin-sidebar-footer a { display: flex; align-items: center; gap: 12px; color: #b9c8dc; border-radius: 7px; font-size: 14px; }
.admin-body .admin-sidebar-footer a:hover { color: #fff; background: rgba(255,255,255,.1); }
.admin-body .admin-sidebar-footer span { width: 22px; color: #7890ae; text-align: center; }
.admin-body .admin-topbar { height: 60px; padding: 0 24px; }
.admin-topbar-title { display: flex; align-items: center; gap: 10px; }
.admin-menu-toggle { display: none; width: 38px; height: 38px; padding: 0; color: #344054; background: transparent; border: 1px solid var(--border); border-radius: 7px; font-size: 20px; cursor: pointer; }
.admin-username { display: inline-block; max-width: 160px; vertical-align: bottom; }
.admin-body .admin-content { max-width: 1480px; padding: 24px; }
.admin-body .admin-footer { padding: 14px 24px; }

.admin-page-header,
.admin-body .page-heading { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.admin-page-title,
.admin-body .page-heading h1 { margin: 0; font-size: 25px; line-height: 1.25; }
.admin-body .page-heading p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.admin-page-actions,
.admin-body .heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.compact-card,
.admin-body .content-card,
.admin-body .stat-card { border-radius: 8px; box-shadow: 0 2px 10px rgba(23,32,51,.035); }
.admin-body .content-card { margin-bottom: 16px; }
.compact-section-title { padding: 16px 18px 8px; }

.admin-body .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.admin-body .stat-card { min-height: 112px; padding: 16px 18px; }
.admin-body .stat-card > span { font-size: 13px; }
.admin-body .stat-card strong { margin: 6px 0 2px; font-size: 28px; }
.admin-body .stat-card small { font-size: 12px; }
.alert-list { margin: 0; padding: 4px 18px; list-style: none; }
.alert-list li { min-height: 43px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 8px 0; border-bottom: 1px solid #edf0f4; }
.alert-list li:last-child { border-bottom: 0; }
.alert-list a { font-size: 13px; }
.alert-count { min-width: 26px; color: var(--success); font-weight: 700; text-align: right; }
.alert-count.has-issue { color: #b54708; }
.system-status-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 14px 18px; }
.system-status-strip > div { min-width: 0; padding: 2px 18px; border-left: 1px solid #edf0f4; }
.system-status-strip > div:first-child { padding-left: 0; border-left: 0; }
.system-status-strip span,
.system-status-strip strong { display: block; }
.system-status-strip span { color: var(--muted); font-size: 12px; }
.system-status-strip strong { margin-top: 4px; font-size: 15px; }

.filter-card { padding: 14px 16px; }
.filter-grid,
.admin-body .filter-form,
.admin-body .filter-row { display: grid; grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(145px, 1fr)) auto; align-items: end; gap: 10px; }
.filter-grid .field,
.admin-body .filter-row .field { width: auto; min-width: 0; margin: 0; }
.filter-grid input,
.filter-grid select,
.admin-body .filter-form > input,
.admin-body .filter-form > select { min-width: 0; width: 100%; }
.filter-actions { display: flex; align-items: center; gap: 8px; }
.filter-actions .button,
.filter-grid > .button,
.admin-body .filter-form > .button,
.admin-body .filter-row > .button { height: 40px; min-height: 40px; white-space: nowrap; }
.filter-checkbox { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 0 10px; border: 1px solid var(--border); border-radius: 7px; white-space: nowrap; }
.filter-checkbox input { width: 16px !important; min-height: 16px; margin: 0; }
.advanced-filter { grid-column: 1 / -1; }
.advanced-filter > summary { width: max-content; padding: 4px 0; color: var(--primary); font-size: 13px; cursor: pointer; }
.advanced-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding-top: 10px; border-top: 1px solid #edf0f4; }

.table-card { overflow: visible; }
.table-responsive,
.admin-body .table-wrap { width: 100%; overflow-x: auto; overflow-y: visible; -webkit-overflow-scrolling: touch; }
.admin-body th,
.admin-body td { height: 50px; padding: 10px 14px; }
.admin-body table { min-width: 780px; }
.admin-body .wide-admin-table { min-width: 1040px; }
.table-stack { display: grid; gap: 2px; }
.table-stack small { margin: 0 !important; }
.table-stat { display: grid; grid-template-columns: auto auto; justify-content: start; column-gap: 8px; font-size: 13px; line-height: 1.55; }
.table-stat span { color: var(--muted); }
.text-truncate { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-primary { max-width: 280px; }
.operation-cell { overflow: visible; }
.action-menu { position: relative; display: inline-block; }
.action-menu > summary { min-height: 34px; display: inline-flex; align-items: center; padding: 5px 11px; color: #344054; background: #fff; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; cursor: pointer; list-style: none; }
.action-menu > summary::-webkit-details-marker { display: none; }
.action-menu > summary::after { content: '⌄'; margin-left: 6px; color: #98a2b3; }
.action-menu-dropdown { position: fixed; z-index: 1000; min-width: 168px; padding: 6px; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 12px 28px rgba(16,24,40,.16); }
.action-menu-dropdown a,
.action-menu-dropdown button { width: 100%; min-height: 34px; display: flex; align-items: center; padding: 7px 9px; color: #344054; background: transparent; border: 0; border-radius: 5px; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.action-menu-dropdown a:hover,
.action-menu-dropdown button:hover { background: #f5f7fa; }
.action-menu-dropdown form { display: block; width: 100%; }
.action-menu-dropdown .danger-action { color: var(--danger); }

.form-page { max-width: 1000px; }
.form-section { margin-bottom: 16px; padding: 18px 20px; }
.form-section h2 { margin: 0 0 14px; font-size: 17px; }
.form-section .form-grid { gap: 0 18px; }
.form-section .field { margin-bottom: 14px; }
.form-field-full { grid-column: 1 / -1; }
.sticky-form-actions { position: sticky; z-index: 10; bottom: 0; display: flex; justify-content: flex-end; gap: 9px; margin-top: 4px; padding: 12px 16px; background: rgba(255,255,255,.96); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 -4px 16px rgba(16,24,40,.06); backdrop-filter: blur(5px); }
.bulk-import-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bulk-import-rules > div { display: grid; gap: 4px; padding: 12px 14px; background: #f8fafc; border: 1px solid #edf0f4; border-radius: 7px; }
.bulk-import-rules strong { color: #344054; font-size: 13px; }
.bulk-import-rules span { color: var(--muted); font-size: 12px; line-height: 1.55; }
.bulk-import-tip { margin: 12px 0 0; padding: 10px 12px; color: #475467; background: #f8fafc; border-left: 3px solid var(--primary); border-radius: 4px; font-size: 12px; line-height: 1.65; }
.bulk-import-upload { max-width: 720px; }
.bulk-import-preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 18px; }
.bulk-import-preview-head h2 { margin: 0; font-size: 17px; }
.bulk-import-preview-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.bulk-import-result-counts { display: flex; gap: 8px; flex-wrap: wrap; }
.bulk-import-result-counts span { padding: 5px 9px; color: #475467; background: #f2f4f7; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.bulk-import-result-counts .is-ok { color: var(--success); background: var(--success-soft); }
.bulk-import-result-counts .has-error { color: var(--danger); background: var(--danger-soft); }
.bulk-import-preview > .alert { margin-right: 16px; margin-left: 16px; }
.bulk-import-preview > .alert ul { margin: 7px 0 0; padding-left: 20px; }
.bulk-import-preview .admin-list-table { min-width: 980px; }
.bulk-import-preview td small { display: block; max-width: 300px; margin-top: 3px; overflow-wrap: anywhere; }
.bulk-import-preview .sticky-form-actions { margin: 0 16px 16px; }
.bulk-import-preview .sticky-form-actions form { margin: 0; }
.audit-detail { padding: 12px 16px !important; background: #f8fafc; }
.audit-detail dl { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 14px; margin: 0; }
.audit-detail dt { color: var(--muted); }
.audit-detail dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.audit-detail-toggle { padding: 0; color: var(--primary); background: none; border: 0; cursor: pointer; }

.pagination-bar,
.admin-body .pagination { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 10px 14px; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.pagination-summary { margin-right: auto; color: var(--muted); font-size: 13px; }
.pagination-controls { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }

@media (max-width: 1200px) {
    .filter-grid,
    .admin-body .filter-form,
    .admin-body .filter-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .filter-actions { grid-column: auto; }
}
@media (max-width: 992px) {
    .admin-body .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-grid,
    .admin-body .filter-form,
    .admin-body .filter-row,
    .advanced-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-body .admin-sidebar { position: fixed; width: 220px; transform: translateX(-100%); transition: transform .18s ease; }
    .admin-body .admin-sidebar.is-open { transform: translateX(0); box-shadow: 12px 0 30px rgba(16,24,40,.2); }
    .admin-body .admin-main { margin-left: 0; }
    .admin-body .admin-menu { display: block; overflow-x: hidden; overflow-y: auto; }
    .admin-body .admin-menu a { flex: none; margin: 0 0 3px; }
    .admin-menu-toggle { display: inline-grid; place-items: center; }
}
@media (max-width: 768px) {
    .admin-body .admin-content { padding: 18px 14px; }
    .admin-page-header,
    .admin-body .page-heading { align-items: flex-start; flex-direction: column; }
    .admin-page-actions,
    .admin-body .heading-actions { width: 100%; justify-content: flex-start; }
    .filter-grid,
    .admin-body .filter-form,
    .admin-body .filter-row,
    .advanced-filter-grid,
    .form-grid { grid-template-columns: 1fr; }
    .filter-actions { width: 100%; }
    .filter-actions .button { flex: 1; }
    .system-status-strip { grid-template-columns: 1fr; }
    .system-status-strip > div,
    .system-status-strip > div:first-child { padding: 9px 0; border-left: 0; border-bottom: 1px solid #edf0f4; }
    .system-status-strip > div:last-child { border-bottom: 0; }
    .sticky-form-actions { flex-wrap: wrap; }
    .bulk-import-rules { grid-template-columns: 1fr; }
    .bulk-import-preview-head { flex-direction: column; }
}
@media (max-width: 576px) {
    .resource-probe-row { grid-template-columns: 1fr; }
    .resource-probe-row .button { width: 100%; }
    body.home-page { display: block; height: auto; min-height: 0; background: #f7f9fc; }
    .home-page .site-header { height: auto; min-height: 0; }
    .home-page .site-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .home-page main { height: auto; min-height: 0; flex: none; background: #fff; }
    .home-page .hero { display: block; height: auto; min-height: 0; padding-top: 18px; padding-bottom: 24px; }
    .home-page .hero-copy { height: auto; min-height: 0; text-align: left; }
    .home-page .hero-copy > .eyebrow { display: none; }
    .home-page .hero-copy h1 { margin: 0 0 20px; font-size: 32px; line-height: 1.12; }
    .home-page .verify-card { width: 100%; height: auto; min-height: 0; margin: 0; padding: 20px 17px; text-align: left; }
    .home-page .card-mark { display: none; }
    .home-page .card-heading { display: block; margin-bottom: 14px; }
    .home-page .card-heading h2 { font-size: 20px; }
    .home-page .verify-copy-desktop { display: none; }
    .home-page .verify-copy-mobile { display: block; margin-top: 2px; }
    .home-page .code-input { height: 46px; min-height: 46px; }
    .home-page .verify-card .button { height: 46px; min-height: 46px; margin-top: 12px; }
    .home-page .site-footer { position: static; height: auto; min-height: 0; margin: 0; padding: 17px 0; background: #f7f9fc; }
    .resource-library-page .container-wide { width: calc(100% - 28px); }
    .resource-library-page .resource-page { min-height: 0; padding: 14px 0 26px; }
    .resource-library-page .resource-list-heading { align-items: flex-start; flex-direction: row; gap: 10px; }
    .resource-library-page .resource-list-heading > div { min-width: 0; flex: 1; }
    .resource-library-page .resource-list-heading .eyebrow { display: none; }
    .resource-library-page .resource-list-heading h1 { margin: 0; font-size: 24px; line-height: 1.3; }
    .resource-library-page .resource-list-heading p { display: none; }
    .resource-library-page .resource-count { margin-top: 1px; padding: 3px 7px; font-size: 11px; }
    .resource-library-page .type-filters { gap: 5px; margin: 10px 0 11px; padding-bottom: 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .resource-library-page .type-filters::-webkit-scrollbar { display: none; }
    .resource-library-page .type-filters a { padding: 4px 9px; font-size: 11.5px; }
    .resource-library-page .public-resource-grid { gap: 0; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
    .resource-library-page .public-resource-card { min-height: 58px; display: block; padding: 9px 10px; border: 0; border-bottom: 1px solid #e8edf3; border-radius: 0; box-shadow: none; }
    .resource-library-page .public-resource-card:last-child { border-bottom: 0; }
    .resource-library-page .resource-cover { display: none; }
    .resource-library-page .placeholder-desktop { display: none; }
    .resource-library-page .placeholder-mobile { display: block; font-size: 17px; }
    .resource-library-page .cover-placeholder { gap: 1px; }
    .resource-library-page .cover-placeholder small { font-size: 9px; }
    .resource-library-page .public-resource-body { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1px 9px; padding: 0; }
    .resource-library-page .resource-type-badge { display: none; }
    .resource-library-page .public-resource-body h3 { grid-column: 1; grid-row: 1; margin: 0; overflow: hidden; font-size: 14.5px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
    .resource-library-page .public-resource-body > p { display: none; }
    .resource-library-page .resource-card-meta { display: none; }
    .resource-library-page .resource-mobile-meta { grid-column: 1; grid-row: 2; width: 100%; display: flex; align-items: center; gap: 5px; overflow: hidden; color: #8491a3; font-size: 10.5px; line-height: 1.45; white-space: nowrap; }
    .resource-library-page .resource-mobile-meta span:not(:first-child)::before,
    .resource-library-page .resource-mobile-meta time::before { margin-right: 5px; content: '·'; }
    .resource-library-page .resource-detail-button { grid-column: 2; grid-row: 1 / 3; width: auto; min-height: 0; align-self: center; margin: 0; padding: 4px 0 4px 7px; color: var(--primary); background: transparent; border: 0; font-size: 12px; }
    .resource-library-page .resource-detail-button::after { margin-left: 2px; content: '›'; }
    .resource-library-page .resource-detail-button:hover { color: var(--primary-dark); background: transparent; }
    .resource-library-page .pagination-bar { margin-top: 10px; padding: 9px; }
    .resource-detail-page .container-wide { width: calc(100% - 28px); }
    .resource-detail-page .detail-main { min-height: 0; padding-top: 16px; padding-bottom: 28px; }
    .resource-detail-page .detail-back { margin-bottom: 10px; font-size: 13px; }
    .resource-detail-page .detail-card { display: block; border-radius: 8px; box-shadow: none; }
    .resource-detail-page .detail-cover { display: none; }
    .resource-detail-page .detail-content { padding: 18px 16px 14px; }
    .resource-detail-page .resource-type-badge { padding: 2px 7px; font-size: 11px; }
    .resource-detail-page .detail-content h1 { margin: 8px 0 7px; font-size: 22px; line-height: 1.35; }
    .resource-detail-page .detail-description { font-size: 13.5px; line-height: 1.65; }
    .resource-detail-page .detail-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; margin-top: 15px; }
    .resource-detail-page .detail-meta > div { padding: 9px 0; }
    .resource-detail-page .detail-meta > div:first-child,
    .resource-detail-page .detail-meta > div:last-child { grid-column: 1 / -1; }
    .resource-detail-page .detail-meta dt { font-size: 11px; }
    .resource-detail-page .detail-meta dd { margin-top: 2px; font-size: 13px; }
    .resource-detail-page .preview-panel { padding: 16px; }
    .resource-detail-page .preview-panel h2 { margin-bottom: 7px; font-size: 17px; }
    .resource-detail-page .preview-panel > div { font-size: 13.5px; line-height: 1.7; }
    .resource-detail-page .locked-panel { gap: 12px; margin: 0 16px 16px; padding: 14px; }
    .resource-detail-page .locked-panel > div { display: block; }
    .resource-detail-page .lock-mark { display: none; }
    .resource-detail-page .locked-panel h2 { font-size: 16px; }
    .resource-detail-page .locked-panel p { margin-top: 4px; font-size: 12.5px; line-height: 1.55; }
    .resource-detail-page .locked-panel .button { min-height: 42px; }
    .my-resources-page { min-height: 0; padding-top: 14px; padding-bottom: 28px; }
    .my-resources-page .delivery-header { margin-bottom: 11px; padding: 14px 16px; border-radius: 8px; box-shadow: none; }
    .my-resources-page .delivery-title-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 9px; }
    .my-resources-page .delivery-header h1 { margin: 0 0 2px; font-size: 23px; }
    .my-resources-page .delivery-header p { overflow: hidden; font-size: 12.5px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
    .my-resources-page .delivery-title-row .button { width: auto; min-height: 32px; padding: 5px 9px; font-size: 12px; }
    .my-resources-page .access-summary { grid-template-columns: 1.3fr .7fr 1fr; margin-top: 11px; }
    .my-resources-page .access-summary > div { padding: 9px 5px 0 0; }
    .my-resources-page .access-summary dt { font-size: 10.5px; }
    .my-resources-page .access-summary dd { margin-top: 2px; font-size: 11.5px; }
    .my-resources-page .access-summary .status-badge { padding: 2px 6px; font-size: 10.5px; }
    .my-resources-page .my-resource-list { gap: 10px; }
    .my-resources-page .my-resource-card { border-radius: 8px; box-shadow: none; }
    .my-resources-page .my-resource-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 9px; padding: 13px 14px 9px; }
    .my-resources-page .my-resource-head .resource-type-badge { padding: 2px 6px; font-size: 10.5px; }
    .my-resources-page .my-resource-head h2 { margin-top: 6px; font-size: 17px; line-height: 1.35; }
    .my-resources-page .my-resource-head .button { width: auto; min-height: 30px; padding: 4px 8px; font-size: 11.5px; }
    .my-resources-page .my-resource-meta { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 0 14px 8px; }
    .my-resources-page .my-resource-meta > div { padding: 8px 0; }
    .my-resources-page .my-resource-meta dt { font-size: 10.5px; }
    .my-resources-page .my-resource-meta dd { margin-top: 2px; font-size: 12px; }
    .my-resources-page .source-list { gap: 7px; padding: 0 14px 13px; }
    .my-resources-page .source-card { padding: 11px 12px; }
    .my-resources-page .source-card-main { gap: 8px; }
    .my-resources-page .source-card-main strong { font-size: 13px; }
    .my-resources-page .source-code { margin-top: 7px; }
    .my-resources-page .source-alert { margin-top: 7px; padding: 6px 8px; font-size: 11.5px; }
    .my-resources-page .source-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 6px; margin-top: 8px; }
    .my-resources-page .source-actions .button { width: 100%; min-height: 34px; padding: 5px 7px; font-size: 11.5px; }
    .admin-body .stats-grid { grid-template-columns: 1fr; }
    .admin-topbar > span { max-width: 52%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .alert-list li { grid-template-columns: minmax(0, 1fr) auto; }
    .alert-list li a { grid-column: 1 / -1; }
    .pagination-bar,
    .admin-body .pagination { align-items: flex-start; flex-direction: column; }
    .pagination-controls { width: 100%; justify-content: flex-start; }
    .sticky-form-actions .button { flex: 1; }
}

/* Taobao e-ticket redemption */
.delivery-method-links { display: flex; gap: 10px; margin-top: 24px; }
.eticket-entry { display: block; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 13px; text-align: center; }
.eticket-main { min-height: calc(100vh - 145px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 480px); align-items: center; gap: 70px; padding-top: 54px; padding-bottom: 64px; }
.eticket-intro h1 { margin: 8px 0 14px; font-size: clamp(34px, 5vw, 52px); }
.eticket-intro > p { max-width: 620px; color: #526175; font-size: 17px; line-height: 1.8; }
.eticket-card { width: 100%; }
.eticket-code-form,
.eticket-upload-form { display: grid; gap: 10px; }
.eticket-upload-form input[type="file"] { min-height: 46px; padding: 9px 11px; background: #f8fafc; border: 1px solid var(--border); border-radius: 7px; }
.eticket-upload-form small { color: var(--muted); line-height: 1.5; }
.eticket-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: #98a2b3; font-size: 12px; }
.eticket-divider::before,
.eticket-divider::after { content: ''; height: 1px; flex: 1; background: var(--border); }
@media (max-width: 900px) {
    .eticket-main { grid-template-columns: 1fr; gap: 34px; padding-top: 42px; }
    .eticket-intro { text-align: center; }
    .eticket-intro > p { margin-right: auto; margin-left: auto; }
    .eticket-intro .feature-tags { justify-content: center; }
    .eticket-card { max-width: 540px; margin: 0 auto; }
}
@media (max-width: 640px) {
    .site-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .delivery-method-links { flex-direction: column; }
    .delivery-method-links .button { width: 100%; }
    .eticket-main { width: min(100% - 28px, 1200px); padding-top: 32px; padding-bottom: 42px; }
    .eticket-intro h1 { font-size: 32px; }
    .eticket-card { padding: 24px 20px; }
}
/* Refined admin navigation */
.admin-body .admin-sidebar {
    width: 232px;
    background: #142238;
    border-right: 1px solid rgba(255,255,255,.06);
    box-shadow: 8px 0 24px rgba(8,18,34,.08);
}
.admin-body .admin-main { margin-left: 232px; }
.admin-body .admin-brand {
    display: flex;
    height: 76px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    min-height: 76px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.admin-body .admin-brand .admin-brand-mark {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #fff;
    background: #2371d8;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .03em;
    box-shadow: 0 6px 14px rgba(35,113,216,.24);
}
.admin-brand-copy { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.admin-body .admin-brand-copy strong { color: #fff; font-size: 16px; line-height: 1.25; }
.admin-body .admin-brand-copy small { color: #8296b3; font-size: 11px; }
.admin-body .admin-menu { padding: 14px 12px 18px; scrollbar-width: thin; }
.admin-body .admin-menu-group { margin-bottom: 12px; }
.admin-body .admin-menu-label,
.admin-body .admin-menu-group > summary {
    padding: 7px 10px;
    color: #7187a5;
    font-size: 11px;
    letter-spacing: .1em;
}
.admin-body .admin-menu-group > summary { border-radius: 6px; }
.admin-body .admin-menu-group > summary:hover { color: #aebdd1; background: rgba(255,255,255,.035); }
.admin-body .admin-menu-group > summary::after { right: 11px; color: #6d83a1; }
.admin-body .admin-menu a,
.admin-body .admin-sidebar-footer a {
    position: relative;
    gap: 11px;
    min-height: 42px;
    margin-bottom: 4px;
    padding: 8px 11px;
    color: #b9c8dc;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}
.admin-body .admin-menu a:hover,
.admin-body .admin-sidebar-footer a:hover {
    color: #fff;
    background: rgba(255,255,255,.065);
}
.admin-body .admin-menu a.active {
    color: #fff;
    background: #263955;
    border-color: rgba(125,178,248,.12);
    box-shadow: inset 3px 0 #4b9bff;
}
.admin-nav-icon {
    display: grid;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    place-items: center;
    color: #7890ae;
    background: rgba(255,255,255,.035);
    border-radius: 6px;
}
.admin-nav-icon svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.admin-nav-icon svg ellipse { fill: none; }
.admin-menu a.active .admin-nav-icon,
.admin-menu a:hover .admin-nav-icon,
.admin-sidebar-footer a:hover .admin-nav-icon { color: #8fc2ff; background: rgba(75,155,255,.12); }
.admin-body .admin-menu a .admin-nav-text,
.admin-body .admin-sidebar-footer a .admin-nav-text {
    display: block;
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    color: inherit;
    font-size: 14px;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-body .admin-menu .admin-menu-label {
    padding: 7px 11px 5px;
    cursor: default;
}
.admin-body .admin-sidebar-footer { padding: 12px; background: rgba(7,18,34,.14); }
.admin-body .admin-sidebar-footer span { width: auto; }

@media (max-width: 900px) {
    .admin-body .admin-sidebar { width: 232px; }
    .admin-body .admin-main { margin-left: 0; }
}
/* Desktop resource preview: compact list layout */
@media (min-width: 577px) {
    .resource-library-page .resource-page {
        min-height: 0;
        padding: 38px 0 50px;
    }
    .resource-library-page .resource-list-heading {
        align-items: center;
    }
    .resource-library-page .resource-list-heading h1 {
        margin-top: 3px;
        font-size: 29px;
    }
    .resource-library-page .type-filters {
        margin: 19px 0 18px;
    }
    .resource-library-page .public-resource-grid {
        display: block;
        overflow: hidden;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 9px;
        box-shadow: 0 3px 14px rgba(23,32,51,.035);
    }
    .resource-library-page .public-resource-card {
        min-height: 76px;
        display: block;
        padding: 13px 16px;
        overflow: visible;
        background: transparent;
        border: 0;
        border-bottom: 1px solid #e8edf3;
        border-radius: 0;
        box-shadow: none;
    }
    .resource-library-page .public-resource-card:last-child {
        border-bottom: 0;
    }
    .resource-library-page .public-resource-card:hover {
        background: #f8fbff;
    }
    .resource-library-page .resource-cover,
    .resource-library-page .resource-type-badge,
    .resource-library-page .resource-card-meta {
        display: none;
    }
    .resource-library-page .public-resource-body {
        min-width: 0;
        display: grid;
        grid-template-columns: minmax(300px, 1.35fr) minmax(250px, .75fr) auto;
        grid-template-rows: auto auto;
        align-items: center;
        gap: 3px 22px;
        padding: 0;
    }
    .resource-library-page .public-resource-body h3 {
        grid-column: 1;
        grid-row: 1;
        width: auto;
        margin: 0;
        overflow: hidden;
        font-size: 16px;
        line-height: 1.4;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .resource-library-page .public-resource-body > p {
        grid-column: 1;
        grid-row: 2;
        min-height: 0;
        margin: 2px 0 0;
        display: block;
        overflow: hidden;
        color: #758297;
        font-size: 12.5px;
        line-height: 1.45;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .resource-library-page .resource-mobile-meta {
        grid-column: 2;
        grid-row: 1 / 3;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 7px;
        overflow: hidden;
        color: #7c899b;
        font-size: 12px;
        white-space: nowrap;
    }
    .resource-library-page .resource-mobile-meta span,
    .resource-library-page .resource-mobile-meta time {
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .resource-library-page .resource-mobile-meta span:not(:first-child)::before,
    .resource-library-page .resource-mobile-meta time::before {
        margin-right: 7px;
        color: #c0c8d3;
        content: '·';
    }
    .resource-library-page .resource-detail-button {
        grid-column: 3;
        grid-row: 1 / 3;
        width: auto;
        min-height: 34px;
        margin: 0;
        padding: 7px 13px;
        color: var(--primary);
        background: #fff;
        border-color: #cdd9e8;
        font-size: 12.5px;
    }
    .resource-library-page .resource-detail-button:hover {
        color: #fff;
        background: var(--primary);
        border-color: var(--primary);
    }
    .resource-library-page .pagination-bar {
        margin-top: 14px;
    }
}
/* Admin UI density and readability */
.admin-body {
    color: #1d2939;
    background: #f3f6fa;
    font-size: 13px;
}
.admin-body .admin-main { min-width: 0; }
.admin-body .admin-topbar {
    height: 56px;
    padding: 0 22px;
    border-bottom-color: #e5eaf1;
}
.admin-body .admin-topbar strong { font-size: 17px; }
.admin-body .admin-topbar > span { color: #667085; font-size: 12.5px; }
.admin-body .admin-content {
    width: 100%;
    max-width: none;
    padding: 20px 22px 28px;
}
.admin-page-header,
.admin-body .page-heading {
    min-height: 42px;
    margin-bottom: 12px;
}
.admin-page-title,
.admin-body .page-heading h1 {
    font-size: 23px;
    letter-spacing: -.02em;
}
.admin-page-header p,
.admin-body .page-heading p {
    max-width: 760px;
    margin: 3px 0 0;
    color: #667085;
    font-size: 12.5px;
    line-height: 1.45;
}
.admin-body .content-card,
.admin-body .stat-card {
    margin-bottom: 12px;
    border-color: #e1e7ef;
    border-radius: 7px;
    box-shadow: 0 1px 5px rgba(16,24,40,.025);
}
.admin-body .button {
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.25;
}
.admin-body .button-small {
    min-height: 30px;
    padding: 5px 10px;
    font-size: 12.5px;
}
.admin-body .alert {
    margin-bottom: 12px;
    padding: 10px 13px;
    border-radius: 6px;
    font-size: 13px;
}

.admin-body .filter-card {
    margin-bottom: 12px;
    padding: 11px 12px;
}
.admin-body .filter-grid,
.admin-body .filter-form,
.admin-body .filter-row {
    grid-template-columns: minmax(220px, 1.7fr) repeat(3, minmax(135px, 1fr)) auto;
    gap: 8px;
}
.admin-body .filter-grid input,
.admin-body .filter-grid select,
.admin-body .filter-form input,
.admin-body .filter-form select,
.admin-body .filter-row input,
.admin-body .filter-row select {
    height: 36px;
    min-height: 36px;
    padding: 6px 10px;
    font-size: 13px;
}
.admin-body .filter-checkbox {
    min-height: 36px;
    padding: 0 10px;
    font-size: 12.5px;
}
.admin-body .filter-actions { gap: 6px; }
.admin-body .filter-actions .button,
.admin-body .filter-grid > .button,
.admin-body .filter-form > .button,
.admin-body .filter-row > .button {
    height: 36px;
    min-height: 36px;
}
.admin-body .advanced-filter > summary {
    padding: 3px 0 0;
    font-size: 12px;
}
.admin-body .advanced-filter-grid {
    gap: 8px 14px;
    padding-top: 8px;
}

.admin-body .table-card {
    overflow: hidden;
    background: #fff;
}
.admin-body .table-responsive,
.admin-body .table-wrap {
    overflow-x: auto;
    scrollbar-color: #c7d0dc transparent;
    scrollbar-width: thin;
}
.admin-body table {
    min-width: 720px;
    font-size: 12.5px;
    line-height: 1.35;
}
.admin-body .wide-admin-table { min-width: 960px; }
.admin-body th {
    height: 38px;
    padding: 8px 10px;
    color: #475467;
    background: #f7f9fc;
    border-bottom: 1px solid #e5eaf1;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}
.admin-body td {
    height: 44px;
    padding: 8px 10px;
    color: #344054;
    vertical-align: middle;
}
.admin-body tbody tr:hover { background: #fafcff; }
.admin-body .table-stack {
    min-width: 0;
    gap: 2px;
    line-height: 1.35;
}
.admin-body .table-stack strong,
.admin-body .table-stack > span,
.admin-body .table-filename,
.admin-body .admin-detail-list dd {
    overflow-wrap: anywhere;
    word-break: break-word;
}
.admin-body .table-stack small {
    color: #8793a5;
    font-size: 11.5px;
}
.admin-body .table-primary {
    width: auto;
    max-width: 420px;
}
.admin-body .table-card .text-truncate {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    text-overflow: clip;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.admin-body .table-url,
.admin-body .masked-url {
    display: inline-block;
    max-width: 260px;
    overflow: hidden;
    vertical-align: middle;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-body .status-badge {
    padding: 3px 8px;
    font-size: 11.5px;
    line-height: 1.35;
}
.admin-body .status-badge.neutral { color: #526175; background: #eef2f6; }
.admin-body .operation-cell {
    min-width: 112px;
    white-space: nowrap;
}
.admin-body .operation-cell > a,
.admin-body .operation-cell > form,
.admin-body .operation-cell > details {
    margin: 0 3px 2px 0;
    vertical-align: middle;
}
.admin-body .action-menu > summary {
    min-height: 30px;
    padding: 4px 9px;
    font-size: 12.5px;
}
.admin-body .empty-state {
    height: auto;
    padding: 30px 16px;
}
.admin-body .empty-state strong { font-size: 14px; }

.admin-body .admin-list-table {
    width: 100%;
    min-width: 840px;
    table-layout: auto;
}
.admin-body .admin-list-table th,
.admin-body .admin-list-table td { padding: 8px 12px; }
.admin-body .admin-list-table tbody tr { height: 54px; }
.admin-body .admin-list-table tbody tr:last-child td { border-bottom: 0; }
.admin-body .admin-list-table .table-date {
    color: #667085;
    white-space: nowrap;
}
.admin-body .admin-list-table .table-id {
    display: inline-block;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
}
.products-table { min-width: 1080px !important; table-layout: fixed !important; }
.products-table th:nth-child(1) { width: 24%; }
.products-table th:nth-child(2) { width: 13%; }
.products-table th:nth-child(3) { width: 10%; }
.products-table th:nth-child(4) { width: 8%; }
.products-table th:nth-child(5) { width: 16%; }
.products-table th:nth-child(6) { width: 12%; }
.products-table th:nth-child(7) { width: 8%; }
.products-table th:nth-child(8) { width: 9%; }
.products-table td { padding-top: 8px !important; padding-bottom: 8px !important; }
.products-table .table-primary { max-width: none; }
.products-table .table-primary.text-truncate,
.resources-table .table-primary.text-truncate,
.resources-table .table-filename.text-truncate {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    -webkit-line-clamp: unset;
}
.product-meta-line { display: flex !important; gap: 14px; min-width: 0; white-space: nowrap; }
.compact-delivery { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.id-stack > span {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 7px;
}
.id-stack > span > small { margin: 0 !important; }
.metric-pairs {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}
.metric-pairs > span {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    color: #8793a5;
    font-size: 10.5px;
}
.metric-pairs strong { color: #27364b; font-size: 12.5px; }
.product-sku-count { display: inline-flex; align-items: baseline; gap: 4px; width: fit-content; white-space: nowrap; }
.product-sku-count strong { color: var(--primary); font-size: 15px; }
.products-table .status-pair { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.products-table .operation-cell { white-space: nowrap; }
.resources-table { min-width: 1000px !important; table-layout: fixed !important; }
.resources-table th:nth-child(1) { width: 17%; }
.resources-table th:nth-child(2) { width: 8%; }
.resources-table th:nth-child(3) { width: 14%; }
.resources-table th:nth-child(4) { width: 8%; }
.resources-table th:nth-child(5) { width: 16%; }
.resources-table th:nth-child(6) { width: 7%; }
.resources-table th:nth-child(7) { width: 12%; }
.resources-table th:nth-child(8) { width: 18%; }
.resources-table .file-cell {
    display: flex;
    align-items: center;
    max-width: 100%;
    gap: 6px;
}
.resources-table .file-cell strong { min-width: 0; }
.resources-table .file-cell small { flex: 0 0 auto; margin: 0; white-space: nowrap; }
.resources-table .resource-sku-cell { min-width: 0; max-width: 100%; }
.resources-table .resource-sku-cell strong {
    display: block;
    max-width: 100%;
    line-height: 1.35;
}
.resources-table td.operation-cell {
    display: table-cell;
    min-width: 0;
    padding-right: 8px;
    white-space: nowrap;
}
.resources-table .operation-cell > a,
.resources-table .operation-cell > details { margin-right: 2px; }
.resources-table .operation-cell .button-small { padding-right: 8px; padding-left: 8px; }
.source-compact { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.batches-table { min-width: 1180px !important; table-layout: fixed !important; }
.batches-table th:nth-child(1) { width: 12%; }
.batches-table th:nth-child(2) { width: 18%; }
.batches-table th:nth-child(3) { width: 18%; }
.batches-table th:nth-child(4),
.batches-table th:nth-child(5),
.batches-table th:nth-child(6) { width: 7%; }
.batches-table th:nth-child(7) { width: 11%; }
.batches-table th:nth-child(8) { width: 8%; }
.batches-table th:nth-child(9) { width: 10%; }
.batches-table th:nth-child(10) { width: 9%; }
.batches-table .batch-number { white-space: nowrap; }
.batches-table .batch-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.batches-table .count-value { color: #1d2939; font-size: 13px; }
.batches-table .count-unused { color: #175cd3; }
.batches-table .count-active { color: #067647; }
.batch-status-counts { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.batch-status-counts span { color: #8793a5; font-size: 11px; }
.batch-status-counts strong { color: #344054; font-size: 12.5px; }
.codes-table,
.batch-codes-table { min-width: 980px !important; }
.sources-table { min-width: 1180px !important; }
.audit-table { min-width: 1000px !important; }

/* Compact redeemed resources page */
.my-resources-page.container-wide { max-width: 1180px; }
.my-resources-page.delivery-main { min-height: 0; padding-top: 26px; padding-bottom: 38px; }
.my-resources-page .delivery-header {
    margin-bottom: 12px;
    padding: 15px 17px;
    border-radius: 8px;
    box-shadow: 0 3px 14px rgba(23,32,51,.035);
}
.my-resources-page .delivery-title-row { align-items: center; gap: 14px; }
.my-resources-page .delivery-title-row > div { min-width: 0; }
.my-resources-page .delivery-header h1 { margin: 0 0 2px; font-size: 23px; }
.my-resources-page .delivery-header p { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.my-resources-page .delivery-title-row > .button { min-height: 34px; padding: 6px 10px; font-size: 12.5px; }
.my-resources-page .access-summary { margin-top: 10px; }
.my-resources-page .access-summary > div { padding: 8px 8px 0 0; }
.my-resources-page .access-summary dt { font-size: 10.5px; }
.my-resources-page .access-summary dd { margin-top: 1px; font-size: 12px; }
.my-resources-page .access-summary .status-badge { padding: 2px 7px; font-size: 10.5px; }
.my-resources-page .my-resource-list { gap: 10px; }
.my-resources-page .my-resource-card { border-radius: 8px; box-shadow: 0 3px 14px rgba(23,32,51,.035); }
.my-resources-page .my-resource-head { align-items: center; padding: 12px 14px 9px; }
.my-resources-page .my-resource-head > div { display: flex; align-items: center; gap: 9px; }
.my-resources-page .my-resource-head h2 { margin: 0; font-size: 17px; line-height: 1.35; }
.my-resources-page .my-resource-head .resource-type-badge { padding: 2px 7px; font-size: 10.5px; }
.my-resources-page .my-resource-head .button { min-height: 30px; padding: 4px 8px; font-size: 11.5px; }
.my-resources-page .my-resource-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 8px 14px;
    background: #fbfcfe;
}
.my-resources-page .my-resource-meta > div { min-width: 0; display: flex; align-items: baseline; gap: 7px; padding: 0; border: 0; }
.my-resources-page .my-resource-meta > div:first-child { flex: 1; }
.my-resources-page .my-resource-meta dt { flex: 0 0 auto; font-size: 10.5px; }
.my-resources-page .my-resource-meta dd { min-width: 0; margin: 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.my-resources-page .source-list { gap: 6px; padding: 8px 14px 13px; }
.my-resources-page .source-card {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto auto;
    align-items: center;
    gap: 8px 12px;
    padding: 9px 10px;
    border-radius: 7px;
}
.my-resources-page .source-card-main { gap: 9px; }
.my-resources-page .source-card-main strong { font-size: 13px; }
.my-resources-page .source-card-main > div > span { font-size: 10.5px; }
.my-resources-page .source-card-main .status-badge { padding: 2px 7px; font-size: 10.5px; }
.my-resources-page .source-code { margin: 0; gap: 6px; white-space: nowrap; }
.my-resources-page .source-code > span { font-size: 10.5px; }
.my-resources-page .source-code code { padding: 3px 7px; font-size: 12px; }
.my-resources-page .source-actions { flex-wrap: nowrap; margin: 0; }
.my-resources-page .source-actions .button { min-height: 30px; padding: 4px 8px; font-size: 11.5px; white-space: nowrap; }
.my-resources-page .source-alert { grid-column: 1 / -1; margin: 0; padding: 6px 8px; font-size: 11.5px; }
.my-resources-page .source-empty-warning { margin: 10px 14px 13px; padding: 9px 11px; font-size: 12px; }

@media (max-width: 900px) {
    .my-resources-page.container-wide { width: calc(100% - 28px); }
    .my-resources-page.delivery-main { padding-top: 16px; padding-bottom: 28px; }
    .my-resources-page .delivery-title-row,
    .my-resources-page .my-resource-head { align-items: center; flex-direction: row; }
    .my-resources-page .delivery-title-row .button,
    .my-resources-page .my-resource-head .button { width: auto; }
    .my-resources-page .source-card { grid-template-columns: minmax(0, 1fr) auto; }
    .my-resources-page .source-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 576px) {
    .my-resources-page.container-wide { width: calc(100% - 24px); }
    .my-resources-page.delivery-main { padding-top: 10px; padding-bottom: 22px; }
    .my-resources-page .delivery-header { padding: 12px; }
    .my-resources-page .delivery-title-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
    .my-resources-page .delivery-header h1 { font-size: 20px; }
    .my-resources-page .delivery-header p { font-size: 11.5px; }
    .my-resources-page .delivery-title-row > .button { width: auto; min-height: 30px; padding: 4px 7px; font-size: 11px; }
    .my-resources-page .access-summary { grid-template-columns: 1.25fr .75fr 1fr; margin-top: 8px; }
    .my-resources-page .access-summary > div { padding-top: 7px; }
    .my-resources-page .access-summary dd { font-size: 11px; }
    .my-resources-page .my-resource-head { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 10px 11px 8px; }
    .my-resources-page .my-resource-head > div { display: block; }
    .my-resources-page .my-resource-head h2 { margin-top: 5px; font-size: 15px; }
    .my-resources-page .my-resource-head .button { width: auto; min-height: 28px; padding: 3px 6px; font-size: 10.5px; }
    .my-resources-page .my-resource-meta { gap: 8px; padding: 7px 11px; }
    .my-resources-page .my-resource-meta > div { display: block; }
    .my-resources-page .my-resource-meta > div:first-child { flex: 1; }
    .my-resources-page .my-resource-meta dt { font-size: 9.5px; }
    .my-resources-page .my-resource-meta dd { margin-top: 1px; font-size: 11px; }
    .my-resources-page .source-list { padding: 7px 11px 10px; }
    .my-resources-page .source-card { display: block; padding: 9px 10px; }
    .my-resources-page .source-code { margin-top: 6px; }
    .my-resources-page .source-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 7px; }
    .my-resources-page .source-actions .button { min-height: 32px; padding: 4px 3px; font-size: 10.5px; }
}
.inline-warning {
    display: inline-block !important;
    margin-top: 4px !important;
    padding: 2px 6px;
    color: #b54708 !important;
    background: #fff3df;
    border-radius: 4px;
    font-size: 10.5px !important;
}
.status-pair { display: grid; justify-items: start; gap: 5px; }
.codes-table { min-width: 1020px !important; }
.codes-table .code-text { white-space: nowrap; }

.admin-body .form-card {
    max-width: 1100px;
    padding: 16px 18px;
}
.admin-body .form-page { max-width: 1120px; }
.admin-body .form-section {
    margin-bottom: 12px;
    padding: 15px 17px;
}
.admin-body .form-section h2 {
    margin-bottom: 11px;
    font-size: 16px;
}
.admin-body .form-grid { gap: 0 16px; }
.admin-body .field { margin-bottom: 12px; }
.admin-body .field label {
    margin-bottom: 5px;
    color: #344054;
    font-size: 12.5px;
}
.admin-body input,
.admin-body select,
.admin-body textarea {
    min-height: 38px;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 13px;
}
.admin-body textarea { min-height: 88px; }
.admin-body .field-help,
.admin-body .form-hint {
    margin-top: 4px;
    color: #8793a5;
    font-size: 11.5px;
    line-height: 1.45;
}
.admin-body .form-actions {
    gap: 7px;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid #edf0f4;
}
.admin-body .sticky-form-actions { padding: 9px 12px; }

.admin-body .product-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    margin-bottom: 12px;
    padding: 12px 14px;
}
.admin-body .product-summary-grid > div { padding: 4px 12px; }
.admin-body .product-summary-grid strong { font-size: 13px; }
.admin-body .management-section {
    margin-bottom: 12px;
    padding: 16px;
}
.admin-body .management-section .section-title { margin-bottom: 12px; }
.admin-body .management-section .section-title h2 { font-size: 17px; }
.admin-body .management-section .section-title p { margin-top: 2px; font-size: 12px; }
.admin-body .bind-resource-list { gap: 8px; }
.admin-body .bind-resource-list label { padding: 10px 11px; }

.admin-body .detail-list-card {
    width: 100%;
    max-width: 1100px;
    padding: 6px 16px;
}
.admin-body .admin-detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
}
.admin-body .admin-detail-list > div {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 12px;
    padding: 11px 0;
}
.admin-body .admin-detail-list dt { font-size: 12px; }
.admin-body .admin-detail-list dd { font-size: 13px; }

.admin-body .stats-grid {
    gap: 12px;
    margin-bottom: 12px;
}
.admin-body .stat-card {
    min-height: 94px;
    padding: 13px 15px;
}
.admin-body .stat-card strong {
    margin: 4px 0 1px;
    font-size: 24px;
}
.admin-body .compact-section-title { padding: 13px 15px 6px; }
.admin-body .alert-list { padding: 2px 15px; }
.admin-body .alert-list li { min-height: 38px; padding: 6px 0; }
.admin-body .system-status-strip { padding: 11px 15px; }

.admin-body .pagination-bar,
.admin-body .pagination {
    min-height: 46px;
    padding: 7px 10px;
    border-radius: 7px;
}
.admin-body .pagination .page-number {
    min-width: 30px;
    padding: 4px 8px;
    font-size: 12px;
}
.admin-body .pagination select {
    min-height: 32px;
    height: 32px;
    padding: 4px 28px 4px 8px;
    font-size: 12px;
}
.admin-body .admin-footer {
    padding: 10px 22px;
    font-size: 11.5px;
}

.login-body .login-card {
    width: min(390px, calc(100% - 32px));
    padding: 27px 28px 24px;
    border-radius: 9px;
    box-shadow: 0 12px 34px rgba(16,24,40,.1);
}
.login-body .login-heading { margin: 20px 0 17px; }
.login-body .login-heading h1 { font-size: 22px; }
.login-body .field { margin-bottom: 13px; }

@media (max-width: 1200px) {
    .admin-body .filter-grid,
    .admin-body .filter-form,
    .admin-body .filter-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .admin-body .admin-detail-list { grid-template-columns: 1fr; }
    .admin-body .product-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .admin-body .admin-content { padding: 14px 12px 22px; }
    .admin-body .admin-topbar { padding: 0 12px; }
    .admin-body .filter-grid,
    .admin-body .filter-form,
    .admin-body .filter-row { grid-template-columns: 1fr; }
    .admin-body .filter-actions { grid-column: auto; }
    .admin-body .form-card { padding: 14px; }
    .admin-body .admin-detail-list > div { grid-template-columns: 95px minmax(0, 1fr); }
    .admin-body .product-summary-grid { grid-template-columns: 1fr 1fr; padding: 10px; }
    .admin-body .product-summary-grid > div { padding: 7px 8px; border-left: 0; }
}

/* Admin bulk selection */
.admin-body .bulk-action-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-height: 44px;
    margin: 0 0 10px;
    padding: 7px 10px;
    color: #667085;
    background: #fff;
    border: 1px solid #e1e7ef;
    border-radius: 7px;
}
.admin-body .bulk-action-bar span { margin-right: auto; }
.admin-body .bulk-action-bar strong { color: #1d2939; }
.admin-body .bulk-action-bar button:disabled { cursor: not-allowed; opacity: .48; }
.admin-body .bulk-select-all,
.admin-body .bulk-row-select {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}
.admin-body .bulk-select-all { align-items: center; cursor: pointer; }
.admin-body .bulk-select-all input,
.admin-body .bulk-row-select > input {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 1px 0 0;
    accent-color: var(--primary);
}
.admin-body .bulk-row-select > .table-stack,
.admin-body .bulk-row-select > strong { min-width: 0; }
.products-table .bulk-row-select > strong,
.resources-table .bulk-row-select > strong { flex: 1 1 auto; width: 0; }
.admin-body .products-table .status-pair {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 5px;
}
@media (max-width: 576px) {
    .admin-body .bulk-action-bar { align-items: stretch; flex-direction: column; }
    .admin-body .bulk-action-bar span { margin-right: 0; }
    .admin-body .bulk-action-bar .button { width: 100%; }
}
