:root {
    color-scheme: light dark;
    --font-sans: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    --transition-base: 180ms ease;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-lg: 0 24px 50px rgba(15, 23, 42, 0.22);
    --shadow-md: 0 16px 38px rgba(15, 23, 42, 0.18);
    --shadow-sm: 0 10px 25px rgba(15, 23, 42, 0.12);
}

body[data-theme="dark"] {
    --bg-gradient: #000000;
    --bg-surface: rgba(3, 7, 12, 0.96);
    --bg-elevated: rgba(10, 15, 22, 0.96);
    --bg-muted: rgba(56, 189, 248, 0.12);
    --border-color: rgba(71, 85, 105, 0.6);
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --accent-strong: #0ea5e9;
    --accent-faint: rgba(56, 189, 248, 0.28);
    --table-header: rgba(15, 23, 42, 0.75);
    --skeleton-highlight: rgba(148, 163, 184, 0.28);
}

body[data-theme="light"] {
    --bg-gradient: linear-gradient(120deg, #f4f8ff 0%, #f1f5f9 55%, #e2e8f0 100%);
    --bg-surface: rgba(255, 255, 255, 0.9);
    --bg-elevated: rgba(249, 251, 255, 0.95);
    --bg-muted: rgba(148, 163, 184, 0.12);
    --border-color: rgba(148, 163, 184, 0.18);
    --text-color: #1e293b;
    --text-muted: #475569;
    --accent: #2563eb;
    --accent-strong: #1d4ed8;
    --accent-faint: rgba(37, 99, 235, 0.18);
    --table-header: rgba(226, 232, 240, 0.9);
    --skeleton-highlight: rgba(148, 163, 184, 0.24);
}

* {
    box-sizing: border-box;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    background: var(--bg-gradient);
    background-color: #000;
    color: var(--text-color);
    transition: background 340ms ease, color 200ms ease;
}

.page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 32px clamp(16px, 4vw, 36px) 72px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.app-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    animation: fade-in-up 420ms ease;
}

.branding {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.branding-link {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
}

.branding-title {
    margin: 0;
    font-size: clamp(2.4rem, 5vw, 3.1rem);
    letter-spacing: -0.05em;
}

.branding-subtitle {
    margin: 0;
    color: var(--accent);
    font-size: 0.9rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.branding-note {
    margin: 0;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.badge-admin {
    margin-right: 8px;
    background: var(--accent-faint);
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.12em;
}

.actions-stack {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.menu-links {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.menu-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--bg-elevated);
    text-decoration: none;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.menu-link:hover,
.menu-link:focus {
    color: var(--accent);
    border-color: rgba(148, 163, 184, 0.4);
}

.menu-link--active {
    color: var(--accent);
    border-color: rgba(94, 234, 212, 0.35);
    background: rgba(94, 234, 212, 0.08);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 24px;
}

.faq-item h3 {
    font-size: 1.08rem;
    margin-bottom: 8px;
}

.faq-item p {
    margin: 0 0 12px;
    line-height: 1.65;
}

.faq-item ul {
    margin: 0 0 12px 1.4rem;
    padding: 0;
    list-style: disc;
}

.faq-item li {
    margin-bottom: 6px;
}

/* language selector */
.language-select {
    position: relative;
    display: inline-block;
}

.language-selected {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 40px 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-elevated);
    color: var(--text-color);
    font-weight: 600;
    letter-spacing: 0.02em;
    pointer-events: none;
    cursor: pointer;
    position: relative;
    min-width: 130px;
    white-space: nowrap;
}

.language-selected::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%2394a3b8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpolyline points="6 9 12 15 18 9"/%3E%3C/svg%3E');
    background-repeat: no-repeat;
}

.language-selected.is-focus {
    border-color: var(--accent);
}

.language-selected-flag {
    font-size: 1rem;
    line-height: 1;
}

.language-selected-iso {
    display: none;
    font-size: 0.76rem;
    letter-spacing: 0.08em;
}

.language-selected-name {
    font-size: 0.78rem;
}

.language-select-control {
    appearance: none;
    -webkit-appearance: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: none;
    background: transparent;
}

.language-select-control option {
    color: #0f172a;
}

@media (max-width: 640px) {
    .language-selected-iso {
        display: inline;
    }

    .language-selected-name {
        display: none;
    }
}

.button-secondary {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-elevated);
    color: var(--text-color);
    font-weight: 600;
    cursor: pointer;
    transition: border var(--transition-base), color var(--transition-base);
}

.button-secondary:hover {
    border-color: var(--accent);
    color: var(--accent-strong);
}

.button-secondary:disabled {
    opacity: 0.5;
    pointer-events: none;
}

.button-danger {
    color: #f87171;
}

.button-danger:hover {
    color: #fca5a5;
}

.theme-toggle {
    position: relative;
    width: 64px;
    height: 32px;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
}

.theme-toggle-track {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    transition: background var(--transition-base), border var(--transition-base);
}

.theme-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.35);
    transition: transform 200ms ease, background 200ms ease;
}


.theme-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    opacity: 0.45;
    transition: color var(--transition-base), opacity var(--transition-base);
}

.theme-toggle-icon svg {
    width: 16px;
    height: 16px;
}

.theme-toggle.is-dark .theme-toggle-icon-sun,
.theme-toggle.is-light .theme-toggle-icon-moon {
    opacity: 0.35;
}

.theme-toggle.is-dark .theme-toggle-icon-moon,
.theme-toggle.is-light .theme-toggle-icon-sun {
    color: var(--accent);
    opacity: 1;
}

.theme-toggle.is-light .theme-toggle-thumb {
    transform: translateX(0);
}

.theme-toggle.is-dark .theme-toggle-thumb {
    transform: translateX(28px);
}

.pill-select {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    outline: none;
    appearance: none;
    transition: border var(--transition-base), box-shadow var(--transition-base);
}

.pill-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-faint);
}

.icon-button {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 999px;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform var(--transition-base), box-shadow var(--transition-base), border var(--transition-base);
}

.icon-button svg {
    width: 18px;
    height: 18px;
}

.icon-button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    border-color: var(--accent);
}

.icon-button[aria-pressed="true"] {
    background: var(--accent);
    color: #0f172a;
}

.app-main {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.lookup-card,
.results-card,
.card,
.snapshot-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: clamp(22px, 3vw, 30px);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
    transition: transform 320ms ease, box-shadow 320ms ease, border-color 220ms ease;
}

.lookup-card:hover,
.results-card:hover,
.card:hover,
.snapshot-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.lookup-card h2,
.results-card h2,
.card h2 {
    margin: 0 0 12px;
    font-size: 1.65rem;
}

.lookup-card .lead {
    margin: 0 0 22px;
    color: var(--text-muted);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.form-group label {
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 1rem;
    outline: none;
    transition: border var(--transition-base), box-shadow var(--transition-base);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-faint);
}

.form-group-inline label {
    margin-bottom: 8px;
}

.lookup-input-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.lookup-input-row input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 48px;
}

.lookup-submit {
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #020617;
    font-weight: 600;
    padding: 0 26px;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 200ms ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    flex: 0 0 auto;
}

.lookup-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 34px var(--accent-faint);
}

.record-type-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.record-type-button {
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-elevated);
    color: var(--text-color);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    transition: background var(--transition-base), color var(--transition-base), border var(--transition-base), transform var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.record-type-button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.record-type-button.is-active,
.record-type-button[aria-pressed="true"] {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #0f172a;
    border-color: transparent;
}

.record-type-button:focus-visible {
    box-shadow: 0 0 0 3px var(--accent-faint);
}

.form-actions {
    margin-top: 12px;
    display: flex;
    gap: 12px;
}

.button,
button.primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    border: none;
    color: #0f172a;
    font-weight: 600;
    padding: 12px 26px;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 200ms ease;
}

button.primary:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 15px 30px var(--accent-faint);
}

button.primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

button.secondary {
    background: var(--bg-elevated);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 10px 22px;
    border-radius: 999px;
    cursor: pointer;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

button.secondary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

button.link {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    padding: 0;
    font-weight: 600;
}

.results-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.results-meta,
.muted {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.results-meta {
    font-weight: 500;
}

.results-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.results-footer .results-last-run {
    color: var(--text-muted);
}

.table-wrapper {
    overflow: visible;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

table caption {
    text-align: left;
    color: var(--text-muted);
    margin-bottom: 8px;
}

thead {
    background: var(--table-header);
}

thead th {
    text-align: left;
    font-size: 0.8rem;
    padding: 12px 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    white-space: nowrap;
}

tbody td {
    padding: 12px 14px;
    border-top: 1px solid var(--border-color);
    vertical-align: middle;
    font-size: 0.98rem;
    word-break: break-word;
}

tbody tr:first-child td {
    border-top: none;
}

tbody td[colspan]::before {
    content: none !important;
}

tbody tr:hover {
    background: var(--bg-muted);
}

.results-card thead th:nth-child(1),
.results-card tbody td:nth-child(1) {
    width: 88px;
    white-space: nowrap;
}

.results-card thead th:nth-child(2),
.results-card tbody td:nth-child(2) {
    width: 26%;
}

.results-card thead th:nth-child(3),
.results-card tbody td:nth-child(3) {
    width: 90px;
    text-align: center;
    white-space: nowrap;
}

.results-card thead th:nth-child(4),
.results-card tbody td:nth-child(4) {
    width: auto;
}

.results-card thead th:nth-child(5),
.results-card tbody td:nth-child(5) {
    width: 60px;
    padding-right: 12px;
    text-align: right;
}

.copy-button {
    width: 36px;
    height: 36px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--accent);
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-base), border var(--transition-base), transform var(--transition-base), background var(--transition-base);
}

.copy-button svg {
    width: 18px;
    height: 18px;
}

.copy-button:hover {
    color: var(--accent-strong);
    border-color: var(--accent-strong);
    background: var(--bg-muted);
    transform: translateY(-1px);
}

@media (max-width: 720px) {
    .results-card thead th:nth-child(1),
    .results-card tbody td:nth-child(1),
    .results-card thead th:nth-child(2),
    .results-card tbody td:nth-child(2),
    .results-card thead th:nth-child(3),
    .results-card tbody td:nth-child(3),
    .results-card thead th:nth-child(4),
    .results-card tbody td:nth-child(4),
    .results-card thead th:nth-child(5),
    .results-card tbody td:nth-child(5) {
        width: auto;
        text-align: left;
        padding-right: 14px;
    }

    .copy-button {
        width: 32px;
        height: 32px;
    }
}

.admin-table thead th:nth-child(1),
.admin-table tbody td:nth-child(1) {
    width: 40%;
}

.admin-table thead th:nth-child(2),
.admin-table tbody td:nth-child(2) {
    width: 24%;
    white-space: nowrap;
}

.admin-table thead th:nth-child(3),
.admin-table tbody td:nth-child(3) {
    width: 22%;
}

.admin-table thead th:nth-child(4),
.admin-table tbody td:nth-child(4) {
    width: 110px;
    text-align: right;
    white-space: nowrap;
}

.admin-action-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.admin-action-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-elevated);
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    transition: border var(--transition-base), color var(--transition-base), transform var(--transition-base), background var(--transition-base);
}

.admin-action-button svg {
    width: 18px;
    height: 18px;
}

.admin-action-button:hover {
    border-color: var(--accent-strong);
    color: var(--accent-strong);
    background: var(--bg-muted);
    transform: translateY(-1px);
}

.admin-action-button--danger {
    border-color: rgba(248, 113, 113, 0.4);
    color: #f87171;
}

.admin-action-button--danger:hover {
    border-color: #fca5a5;
    color: #fca5a5;
    background: rgba(248, 113, 113, 0.12);
}

@media (max-width: 720px) {
    .admin-table thead th:nth-child(1),
    .admin-table tbody td:nth-child(1),
    .admin-table thead th:nth-child(2),
    .admin-table tbody td:nth-child(2),
    .admin-table thead th:nth-child(3),
    .admin-table tbody td:nth-child(3),
    .admin-table thead th:nth-child(4),
    .admin-table tbody td:nth-child(4) {
        width: auto;
        text-align: left;
    }

    .admin-action-group {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 6px;
    }

    .admin-action-button {
        padding: 8px 14px;
    }
}

.admin-history-table thead th:nth-child(1),
.admin-history-table tbody td:nth-child(1) {
    width: 88px;
    white-space: nowrap;
}

.admin-history-table thead th:nth-child(2),
.admin-history-table tbody td:nth-child(2) {
    width: 26%;
    white-space: nowrap;
}

.admin-history-table thead th:nth-child(3),
.admin-history-table tbody td:nth-child(3) {
    width: 90px;
    text-align: center;
    white-space: nowrap;
}

.admin-history-table thead th:nth-child(4),
.admin-history-table tbody td:nth-child(4) {
    width: auto;
}

.admin-history-table thead th:nth-child(5),
.admin-history-table tbody td:nth-child(5) {
    width: 60px;
    text-align: right;
}

.snapshot-card .table-wrapper {
    overflow-x: auto;
}

.admin-history-value {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

@media (max-width: 720px) {
    .admin-history-table thead th:nth-child(1),
    .admin-history-table tbody td:nth-child(1),
    .admin-history-table thead th:nth-child(2),
    .admin-history-table tbody td:nth-child(2),
    .admin-history-table thead th:nth-child(3),
    .admin-history-table tbody td:nth-child(3),
    .admin-history-table thead th:nth-child(4),
    .admin-history-table tbody td:nth-child(4),
    .admin-history-table thead th:nth-child(5),
    .admin-history-table tbody td:nth-child(5) {
        width: auto;
        text-align: left;
    }
}

.results-cache-note {
    color: inherit;
}

.admin-config-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.admin-config-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-config-form .form-actions {
    display: flex;
    justify-content: flex-end;
}

.admin-config-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0 0 8px;
    word-break: break-all;
}

#admin-config-root.is-disabled {
    opacity: 0.6;
    pointer-events: none;
}

.app-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.92rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 24px;
}

.app-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.app-footer a:hover {
    text-decoration: underline;
}

#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.toast {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    min-width: 240px;
    box-shadow: var(--shadow-sm);
    animation: fade-in-up 220ms ease;
}

.toast--error {
    border-color: rgba(248, 113, 113, 0.4);
    color: #fca5a5;
}

.fade-in {
    animation: fade-in-up 360ms ease;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.skeleton {
    position: relative;
    overflow: hidden;
    background: var(--bg-muted);
    border-radius: var(--radius-sm);
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, var(--skeleton-highlight) 50%, transparent 100%);
    animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(100%);
    }
}

.skeleton-row {
    height: 44px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--bg-muted);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.snapshot-card {
    margin-top: 18px;
    padding: 22px;
}

.snapshot-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--bg-muted);
    color: var(--text-muted);
    font-size: 0.82rem;
}

.admin-grid {
    display: grid;
    gap: 26px;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

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

.admin-action-group {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.admin-action-group .copy-button {
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: border var(--transition-base), color var(--transition-base), background var(--transition-base);
}

.admin-action-group .copy-button:hover {
    transform: none;
    color: var(--accent-strong);
    border-color: var(--border-color);
    background: var(--bg-muted);
}

.admin-action-group .button-danger {
    color: #f87171;
}

.admin-action-group .button-danger:hover {
    color: #fca5a5;
}

button.disabled {
    opacity: 0.4;
    pointer-events: none;
}

@media (max-width: 760px) {
    .page {
        padding: 24px 16px 56px;
        gap: 24px;
    }

    .lookup-card,
    .results-card,
    .card,
    .snapshot-card {
        padding: 22px;
    }

    .lookup-input-row {
        flex-direction: column;
    }

    .lookup-submit {
        width: 100%;
    }

    .language-picker {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

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

    thead {
        display: none;
    }

    tbody tr {
        display: grid;
        gap: 8px;
        padding: 14px 16px;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        margin-bottom: 12px;
        background: var(--bg-elevated);
    }

    tbody td {
        padding: 0;
        border: none;
        display: flex;
        justify-content: space-between;
        gap: 12px;
        font-size: 0.95rem;
    }

    tbody td::before {
        content: attr(data-label);
        font-size: 0.72rem;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--text-muted);
    }

    tbody td:last-child {
        justify-content: flex-end;
    }

    tbody td[colspan] {
        display: block;
        text-align: center;
        font-weight: 600;
    }

    .results-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}
