:root {
    color-scheme: light;
    --panel-bg: #f1f1f1;
    --panel-surface: #ffffff;
    --panel-surface-muted: #f6f7f7;
    --panel-text: #23282d;
    --panel-text-soft: #646970;
    --panel-text-inverse: #ffffff;
    --panel-sidebar: #23282d;
    --panel-sidebar-sub: #131619;
    --panel-border: #c3c4c7;
    --panel-link: #0073aa;
    --panel-link-hover: #0096dd;
    --panel-link-active: #006291;
    --panel-notification: #d54e21;
    --panel-notification-soft: rgba(213, 78, 33, 0.09);
    --panel-highlight-soft: rgba(0, 115, 170, 0.08);
    --panel-radius-sm: 4px;
    --panel-radius-md: 6px;
    --panel-radius-lg: 8px;
    --panel-radius-xl: 10px;
}

body {
    background: var(--panel-bg);
    color: var(--panel-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.4;
    transition: background-color 0.28s ease, color 0.28s ease;
}

a {
    color: var(--panel-link);
    text-decoration: none;
    transition: color 0.18s ease, opacity 0.18s ease;
}

a:hover,
a:focus {
    color: var(--panel-link-hover);
}

input,
select,
textarea,
button {
    font: inherit;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease,
        opacity 0.18s ease;
}

input,
select,
textarea {
    color: var(--panel-text);
    background: var(--panel-surface);
}

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

input:focus,
select:focus,
textarea:focus {
    border-color: var(--panel-link) !important;
    box-shadow: 0 0 0 1px var(--panel-link) !important;
    outline: none;
}

select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #646970 50%),
        linear-gradient(135deg, #646970 50%, transparent 50%);
    background-position:
        calc(100% - 16px) calc(1.05em + 2px),
        calc(100% - 11px) calc(1.05em + 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 2.25rem !important;
}

.wp-login-page {
    background: #f1f1f1 !important;
}

.wp-admin-main {
    min-width: 0;
    /* No transform here — transform creates a containing block for position:fixed,
       which breaks all modal overlays (media picker, link dialog, etc.) */
}

.wp-login-page main > section {
    opacity: 0;
    transition: opacity 0.28s ease;
}

body.is-ui-ready .wp-login-page main > section,
body.is-ui-ready.wp-login-page main > section {
    opacity: 1;
}

.wp-page-header {
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 14px;
    animation: wpFadeSoft 0.28s ease;
}

.wp-sidebar {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.wp-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px 16px;
    border-bottom: 1px solid rgba(241, 242, 243, 0.08);
}

.wp-sidebar__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.wp-sidebar__nav {
    padding: 8px 0;
}

.wp-sidebar__group {
    position: relative;
}

.wp-sidebar__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    color: #f1f2f3 !important;
    font-size: 14px;
    line-height: 1.3;
    transition: background-color 0.18s ease, color 0.18s ease, padding-left 0.18s ease;
}

.wp-sidebar__link:hover,
.wp-sidebar__link:focus {
    background: var(--panel-link);
    color: #fff !important;
    padding-left: 18px;
}

.wp-sidebar__group.is-active > .wp-sidebar__link {
    background: var(--panel-link);
    color: #fff !important;
}

.wp-sidebar__icon {
    width: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
}

.wp-sidebar__submenu {
    display: none;
    background: var(--panel-sidebar-sub);
    padding: 4px 0 6px;
    animation: wpFadeDown 0.18s ease;
}

.wp-sidebar__group.is-active .wp-sidebar__submenu,
.wp-sidebar__group:hover .wp-sidebar__submenu {
    display: block;
}

.wp-sidebar__sublink {
    display: block;
    padding: 6px 14px 6px 38px;
    color: #bdbfc0 !important;
    font-size: 13px;
    transition: color 0.18s ease, padding-left 0.18s ease;
}

.wp-sidebar__sublink:hover,
.wp-sidebar__sublink:focus {
    color: var(--panel-link-hover) !important;
    padding-left: 42px;
}

.wp-sidebar__account {
    margin-top: auto;
    padding: 14px;
    border-top: 1px solid rgba(241, 242, 243, 0.08);
    background: rgba(19, 22, 25, 0.55);
}

.wp-button {
    appearance: none;
    border: 1px solid var(--panel-border);
    background: var(--panel-surface);
    color: var(--panel-link);
    line-height: 2.15;
    border-radius: var(--panel-radius-sm);
    transition: all 0.18s ease;
}

.wp-button:hover,
.wp-button:focus {
    border-color: var(--panel-link-active) !important;
    color: var(--panel-link-active) !important;
    transform: translateY(-1px);
}

.wp-button-primary {
    background: var(--panel-link) !important;
    border-color: var(--panel-link) !important;
    color: #fff !important;
}

.wp-button-primary:hover,
.wp-button-primary:focus {
    background: #007db9 !important;
    border-color: #00699b !important;
    color: #fff !important;
}

.wp-button-secondary {
    background: var(--panel-surface);
    border-color: var(--panel-link);
    color: var(--panel-link);
}

.wp-danger-button {
    background: var(--panel-notification) !important;
    border: 1px solid var(--panel-notification) !important;
    color: #fff !important;
}

.wp-danger-button:hover,
.wp-danger-button:focus {
    background: #bf441d !important;
    border-color: #bf441d !important;
    color: #fff !important;
}

.wp-danger-text {
    color: var(--panel-notification) !important;
}

.wp-danger-text span {
    color: var(--panel-notification) !important;
}

.wp-status-link {
    color: var(--panel-link);
}

.wp-status-link.is-current {
    color: var(--panel-text);
    font-weight: 600;
}

.wp-status-link span {
    color: var(--panel-text-soft);
}

details > summary {
    list-style: none;
}

details > summary::-webkit-details-marker {
    display: none;
}

.wp-toolbar {
    gap: 8px;
}

.wp-select {
    min-width: 120px;
}

.wp-list-table thead th {
    font-size: 12px;
    color: var(--panel-text);
}

.wp-list-table tbody tr {
    transition: background-color 0.15s ease;
}

.wp-list-table tbody tr:hover {
    background: #f6f7f7;
}

.admin-table th,
.admin-table td {
    vertical-align: top;
}

.wp-row-actions {
    visibility: hidden;
    color: var(--panel-text-soft);
}

.wp-row-hover:hover .wp-row-actions,
.wp-media-card:hover .wp-row-actions {
    visibility: visible;
}

.wp-row-actions a,
.wp-row-action-button {
    color: var(--panel-link);
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

.wp-row-action-button:hover,
.wp-row-actions a:hover {
    color: var(--panel-link-hover);
}

.wp-row-action-button.wp-danger-text:hover {
    color: #bf441d !important;
}

.wp-upload-panel {
    display: grid;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: max-height 0.28s ease, opacity 0.22s ease, transform 0.28s ease;
}

.wp-upload-panel.is-open {
    max-height: 220px;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.wp-media-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.wp-media-grid.is-switching-view {
    opacity: 0.72;
    transform: translateY(3px);
}

.wp-media-grid.is-list {
    grid-template-columns: 1fr;
}

.wp-media-grid.is-list .wp-media-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: stretch;
}

.wp-media-card__details {
    display: none;
}

.wp-media-grid.is-list .wp-media-card__details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    background: var(--panel-surface);
}

.wp-media-card__name {
    font-size: 15px;
    font-weight: 600;
    color: var(--panel-text);
}

.wp-media-card__submeta {
    margin-top: 6px;
    color: var(--panel-text-soft);
    font-size: 12px;
}

.wp-media-card__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wp-media-inline-url {
    width: 100%;
    border: 1px solid var(--panel-border);
    border-radius: var(--panel-radius-sm);
    background: var(--panel-surface-muted);
    padding: 8px 10px;
    font-size: 12px;
}

.wp-media-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, opacity 0.22s ease;
}

.wp-media-card:hover {
    border-color: var(--panel-link) !important;
    box-shadow: inset 0 0 0 2px rgba(0, 115, 170, 0.18);
    transform: translateY(-1px);
}

.wp-media-card--thumb {
    border-radius: var(--panel-radius-md) !important;
    overflow: hidden;
}

.wp-media-thumb-button {
    display: block;
    width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.wp-media-grid.is-list .wp-media-thumb-button {
    cursor: default;
}

.wp-media-thumb {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 44%),
        linear-gradient(180deg, #eef1f3 0%, #dfe4e8 100%);
}

.wp-media-thumb img,
.wp-media-modal__imagewrap img {
    opacity: 0;
    transition: opacity 0.24s ease;
}

.wp-media-thumb.is-ready img,
.wp-media-modal__imagewrap.is-ready img {
    opacity: 1;
}

.wp-skeleton-shimmer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.88) 42%, rgba(255, 255, 255, 0) 58%) 0 0 / 220% 100%,
        linear-gradient(180deg, #e8edf0 0%, #dde3e7 100%);
    animation: wpShimmer 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite, wpPulseGlow 1.8s ease-in-out infinite;
    will-change: background-position, opacity;
}

.wp-media-thumb.is-ready .wp-skeleton-shimmer,
.wp-media-modal__imagewrap.is-ready .wp-skeleton-shimmer {
    display: none;
}

.wp-view-toggle {
    width: 34px;
    height: 34px;
    border: 1px solid var(--panel-border);
    background: var(--panel-surface);
    color: var(--panel-link);
    border-radius: var(--panel-radius-sm);
    font-size: 18px;
    line-height: 1;
    transition: border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.wp-view-toggle:hover,
.wp-view-toggle:focus {
    transform: translateY(-1px);
}

.wp-view-toggle.is-active {
    border-color: var(--panel-link);
    color: var(--panel-link-active);
    box-shadow: inset 0 0 0 1px rgba(0, 115, 170, 0.18);
}

.wp-media-modal[hidden] {
    display: none;
}

.wp-media-modal {
    position: fixed;
    inset: 0;
    z-index: 70;
}

.wp-media-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    animation: wpFadeIn 0.18s ease;
}

.wp-media-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(1360px, calc(100vw - 32px));
    height: min(820px, calc(100vh - 32px));
    margin: 16px auto;
    background: var(--panel-surface);
    border-radius: var(--panel-radius-lg);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: wpModalIn 0.24s ease;
}

.wp-media-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--panel-border);
}

.wp-media-modal__close {
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: var(--panel-text-soft);
    font-size: 20px;
    cursor: pointer;
    border-radius: 999px;
}

.wp-media-modal__close:hover {
    background: var(--panel-surface-muted);
    color: var(--panel-text);
}

.wp-media-modal__content {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 360px;
    min-height: 0;
    flex: 1;
}

.wp-media-modal__preview {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #fff;
}

.wp-media-modal__imagewrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 100%;
    min-width: 320px;
    min-height: 320px;
}

.wp-media-modal__imagewrap img {
    max-width: min(100%, 720px);
    max-height: 620px;
    object-fit: contain;
}

.wp-media-modal__details {
    border-left: 1px solid var(--panel-border);
    background: var(--panel-surface);
    padding: 20px;
    overflow: auto;
    animation: wpFadeSoft 0.24s ease;
}

.api-docs-layout {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
}

.api-docs-inline-code,
.api-docs-endpoint-path {
    display: inline-block;
    overflow-wrap: anywhere;
    font-family: Consolas, "SFMono-Regular", Monaco, monospace;
    font-size: 12px;
    line-height: 1.6;
}

.api-docs-endpoint-path {
    border: 1px solid var(--panel-border);
    border-radius: var(--panel-radius-md);
    background: var(--panel-surface-muted);
    padding: 8px 12px;
    color: var(--panel-text);
}

.api-docs-code {
    overflow: auto;
    border: 1px solid var(--panel-border);
    border-radius: var(--panel-radius-md);
    background: #101418;
    color: #e7edf3;
    padding: 16px;
    font-family: Consolas, "SFMono-Regular", Monaco, monospace;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.api-docs-method {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    border-radius: 999px;
    background: rgba(0, 115, 170, 0.12);
    color: var(--panel-link-active);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.api-docs-step {
    position: relative;
    overflow: hidden;
}

.api-docs-step::after {
    content: "";
    position: absolute;
    inset: auto -20px -36px auto;
    width: 90px;
    height: 90px;
    border-radius: 999px;
    background: rgba(0, 115, 170, 0.08);
}

.api-docs-step__index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--panel-link);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.api-docs-note {
    max-width: 420px;
}

.field-error {
    border-color: var(--panel-notification) !important;
    box-shadow: 0 0 0 1px rgba(213, 78, 33, 0.22);
}

.editor-shell .ql-toolbar.ql-snow,
.editor-shell .ql-container.ql-snow {
    border-color: var(--panel-border);
}

.editor-shell .ql-container {
    min-height: 220px;
    font-size: 0.95rem;
    background: var(--panel-surface);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.editor-shell .ql-editor {
    min-height: 220px;
}

.editor-shell .ql-editor h1,
.editor-shell .ql-editor h2,
.editor-shell .ql-editor h3 {
    font-weight: 700;
}

.editor-shell .ql-editor a:not([style*="color"]) {
    color: var(--panel-link);
}

.editor-shell .ql-editor img {
    max-width: 100%;
    border-radius: var(--panel-radius-md);
    margin: 1rem 0;
}

.editor-shell .ql-editor table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    table-layout: fixed;
    animation: wpFadeSoft 0.22s ease;
}

.editor-shell .ql-editor th,
.editor-shell .ql-editor td {
    border: 1px solid var(--panel-border);
    padding: 10px 12px;
    vertical-align: top;
}

.editor-shell .ql-editor th {
    background: var(--panel-surface-muted);
    font-weight: 700;
}

.editor-shell .ql-snow .ql-stroke {
    stroke: var(--panel-text);
}

.editor-shell .ql-snow .ql-fill {
    fill: var(--panel-text);
}

.editor-shell .ql-snow .ql-picker {
    color: var(--panel-text);
}

.editor-shell .ql-snow .ql-picker-options {
    background: var(--panel-surface);
    border-color: var(--panel-border);
}

.wp-editor-color-group {
    position: relative;
}

.wp-editor-color-button,
.wp-editor-table-button {
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    color: var(--panel-text);
    border-radius: var(--panel-radius-sm);
}

.wp-editor-color-button:hover,
.wp-editor-table-button:hover {
    background: var(--panel-surface-muted);
    color: var(--panel-link);
}

.wp-editor-color-button span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    font-size: 12px;
    font-weight: 700;
}

.wp-editor-color-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.editor-shell .ql-snow.ql-toolbar button:hover,
.editor-shell .ql-snow .ql-toolbar button:hover,
.editor-shell .ql-snow.ql-toolbar button.ql-active,
.editor-shell .ql-snow .ql-toolbar button.ql-active,
.editor-shell .ql-snow .ql-picker-label:hover,
.editor-shell .ql-snow .ql-picker-label.ql-active,
.editor-shell .ql-snow .ql-picker-item:hover,
.editor-shell .ql-snow .ql-picker-item.ql-selected {
    color: var(--panel-link);
}

.editor-shell .ql-snow.ql-toolbar button:hover .ql-stroke,
.editor-shell .ql-snow .ql-toolbar button:hover .ql-stroke,
.editor-shell .ql-snow.ql-toolbar button.ql-active .ql-stroke,
.editor-shell .ql-snow .ql-toolbar button.ql-active .ql-stroke {
    stroke: var(--panel-link);
}

.editor-shell .ql-snow.ql-toolbar button:hover .ql-fill,
.editor-shell .ql-snow .ql-toolbar button:hover .ql-fill,
.editor-shell .ql-snow.ql-toolbar button.ql-active .ql-fill,
.editor-shell .ql-snow .ql-toolbar button.ql-active .ql-fill {
    fill: var(--panel-link);
}

.bg-slate-950 {
    background-color: var(--panel-sidebar) !important;
}

.border-slate-800 {
    border-color: var(--panel-sidebar-sub) !important;
}

.bg-white {
    background-color: var(--panel-surface) !important;
}

.bg-slate-50 {
    background-color: var(--panel-bg) !important;
}

.bg-slate-100 {
    background-color: var(--panel-surface-muted) !important;
}

.bg-slate-200 {
    background-color: #dcdcde !important;
}

.bg-cyan-500,
.bg-cyan-400 {
    background-color: var(--panel-link) !important;
    color: var(--panel-text-inverse) !important;
}

.border-slate-200,
.border-slate-300 {
    border-color: var(--panel-border) !important;
}

.text-slate-900,
.text-slate-700 {
    color: var(--panel-text) !important;
}

.text-slate-600,
.text-slate-500 {
    color: var(--panel-text-soft) !important;
}

.text-slate-300,
.text-slate-100 {
    color: #f1f2f3 !important;
}

.text-cyan-300 {
    color: var(--panel-link) !important;
}

.border-white\/10 {
    border-color: rgba(241, 242, 243, 0.12) !important;
}

.bg-white\/5 {
    background-color: rgba(241, 242, 243, 0.04) !important;
}

.bg-slate-900\/70,
.bg-slate-900\/60 {
    background-color: rgba(19, 22, 25, 0.78) !important;
}

.bg-emerald-50,
.bg-emerald-500\/10 {
    background-color: var(--panel-highlight-soft) !important;
}

.border-emerald-200,
.border-emerald-400\/30 {
    border-color: rgba(0, 115, 170, 0.2) !important;
}

.text-emerald-800,
.text-emerald-200,
.text-emerald-300,
.text-emerald-700 {
    color: var(--panel-link-active) !important;
}

.bg-amber-50,
.bg-amber-500\/10 {
    background-color: rgba(0, 115, 170, 0.06) !important;
}

.border-amber-200,
.border-amber-400\/30 {
    border-color: rgba(0, 115, 170, 0.18) !important;
}

.text-amber-800,
.text-amber-200,
.text-amber-700,
.text-amber-100 {
    color: var(--panel-link-active) !important;
}

.bg-rose-50,
.bg-rose-500\/10 {
    background-color: var(--panel-notification-soft) !important;
}

.border-rose-200,
.border-rose-400\/30 {
    border-color: rgba(213, 78, 33, 0.28) !important;
}

.text-rose-800,
.text-rose-700,
.text-rose-600,
.text-rose-200 {
    color: var(--panel-notification) !important;
}

.rounded-3xl,
.rounded-2xl,
.rounded-xl,
.rounded-lg {
    border-radius: var(--panel-radius-lg) !important;
}

.shadow-sm,
.shadow-2xl {
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04) !important;
}

/* No transform-based animations on cards to avoid creating containing blocks for modals */

@keyframes wpShimmer {
    0% { background-position: 160% 0, 0 0; }
    100% { background-position: -60% 0, 0 0; }
}

@keyframes wpPulseGlow {
    0%, 100% { opacity: 0.92; }
    50% { opacity: 1; }
}

@keyframes wpFadeDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes wpFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes wpFadeSoft {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes wpModalIn {
    from { opacity: 0; transform: translateY(12px) scale(0.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes wpRiseIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
    .api-docs-layout {
        grid-template-columns: 1fr;
    }

    .wp-sidebar__submenu {
        display: block;
    }

    .wp-media-modal__content {
        grid-template-columns: 1fr;
    }

    .wp-media-modal__details {
        border-left: 0;
        border-top: 1px solid var(--panel-border);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
