:root {
    --sapio-page-bg: #0f1114;
    --sapio-page-bg-end: #171a1f;
    --sapio-surface: #ffffff;
    --sapio-surface-soft: #f4f5f2;
    --sapio-table-header: #f3f1ec;
    --sapio-text: #3f3f3f;
    --sapio-heading: #2f3437;
    --sapio-muted: #747474;
    --sapio-primary: #e95420;
    --sapio-primary-hover: #c94418;
    --sapio-primary-soft: #fbe8df;
    --sapio-border: #e2e1dc;
    --sapio-border-strong: #d2d0ca;
    --sapio-success-bg: #e6efeb;
    --sapio-success-text: #24564a;
    --sapio-success-border: #c9ddd6;
    --sapio-danger-bg: #f1e4e2;
    --sapio-danger-text: #8a2f2a;
    --sapio-danger-border: #dfc7c4;
    --sapio-danger-hover: #722621;
    --sapio-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
    --sapio-shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.08);
    --sapio-shadow-card: 0 10px 24px rgba(0, 0, 0, 0.06);
    --sapio-overlay-soft: rgba(255, 255, 255, 0.05);
    --sapio-overlay-strong: rgba(255, 255, 255, 0.96);
    --sapio-primary-glow: rgba(233, 84, 32, 0.18);
    --sapio-primary-focus: rgba(233, 84, 32, 0.35);
    --sapio-bg: var(--sapio-page-bg);
    --sapio-surface-strong: var(--sapio-surface);
    --sapio-text-soft: var(--sapio-muted);
    --sapio-accent: var(--sapio-primary);
    --sapio-accent-strong: var(--sapio-primary-hover);
    --sapio-radius-sm: 6px;
    --sapio-radius-md: 8px;
    --sapio-radius-lg: 14px;
    --sapio-shadow-lg: var(--sapio-shadow);
    --sapio-font-size-body: 16px;
    --sapio-font-size-title: 28px;
    --sapio-font-size-eyebrow: 13px;
    --sapio-shell-width: 1120px;
}

html,
body {
    min-height: 100%;
}

body.sapio-front-login,
body.sapio-portal-page,
body.login,
body.wp-admin,
.customer-area,
.cuar,
.cuar-page,
.cuar-wrapper,
.cuar-content,
.cuar-dashboard {
    margin: 0;
    background: var(--sapio-bg);
    color: var(--sapio-text);
}

body.sapio-front-login header,
body.sapio-front-login footer,
body.sapio-front-login nav,
body.sapio-front-login .wp-block-navigation,
body.sapio-front-login .site-header,
body.sapio-front-login .site-footer,
body.sapio-front-login .entry-header,
body.sapio-front-login .page-header {
    display: none !important;
}

body.sapio-front-login .wp-site-blocks,
body.sapio-front-login main.wp-block-group,
body.sapio-front-login .entry-content {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
}

.sapio-login-page,
.sapio-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at 82% 12%, var(--sapio-primary-glow), transparent 24%),
        radial-gradient(circle at 10% 20%, var(--sapio-overlay-soft), transparent 28%),
        linear-gradient(180deg, var(--sapio-page-bg) 0%, var(--sapio-page-bg-end) 100%);
}

.sapio-login-page {
    display: grid;
    place-items: center;
    padding: 32px 18px;
    box-sizing: border-box;
}

.sapio-login-card,
.sapio-panel {
    background: var(--sapio-surface);
    border: 1px solid var(--sapio-border);
    box-shadow: var(--sapio-shadow-lg);
}

.sapio-login-card {
    width: min(100%, 430px);
    border-radius: var(--sapio-radius-md);
    padding: 38px 34px 32px;
    text-align: right;
}

.sapio-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.sapio-logo {
    display: block;
    max-width: 180px;
    max-height: 78px;
    object-fit: contain;
}

.sapio-logo-text {
    font-size: 42px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--sapio-heading);
}

.sapio-login-card h1,
.sapio-panel h1 {
    margin: 0 0 8px;
    font-size: var(--sapio-font-size-title);
    line-height: 1.25;
    color: var(--sapio-heading);
}

.sapio-login-card h1 {
    text-align: center;
}

.sapio-login-card .sapio-login-copy {
    text-align: center;
}

.sapio-login-copy,
.sapio-panel-copy {
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--sapio-text-soft);
}

#sapio-client-login p {
    margin: 0 0 16px;
}

#sapio-client-login label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    color: var(--sapio-heading);
}

#sapio-client-login input[type="text"],
#sapio-client-login input[type="password"] {
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    border: 1px solid var(--sapio-border);
    border-radius: var(--sapio-radius-sm);
    background: var(--sapio-surface);
    color: var(--sapio-text);
    padding: 10px 12px;
    font-size: var(--sapio-font-size-body);
}

#sapio-client-login input:focus {
    outline: 2px solid var(--sapio-primary-glow);
    border-color: var(--sapio-primary);
}

#sapio-client-login .login-remember label {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 2px 0 18px;
    color: var(--sapio-muted);
}

#sapio_wp_submit,
.sapio-primary-button,
.sapio-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: var(--sapio-radius-sm);
    font-size: var(--sapio-font-size-body);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

#sapio_wp_submit,
.sapio-primary-button,
.sapio-button-primary {
    width: 100%;
    border: 0;
    background: var(--sapio-accent);
    color: #fff !important;
}

#sapio_wp_submit:hover,
.sapio-primary-button:hover,
.sapio-button-primary:hover {
    background: var(--sapio-accent-strong);
}

.sapio-button-secondary {
    border: 1px solid var(--sapio-border);
    background: var(--sapio-surface-strong);
    color: var(--sapio-heading);
    padding: 0 16px;
}

.sapio-button-outline-accent {
    border: 1px solid var(--sapio-primary);
    background: #ffffff;
    color: var(--sapio-primary);
    padding: 0 16px;
}

.sapio-button-outline-accent:hover {
    border-color: var(--sapio-primary-hover);
    color: var(--sapio-primary-hover);
}

.sapio-button-inline {
    width: auto;
    padding: 0 16px;
}

.sapio-secondary-link,
.sapio-shell-link {
    color: var(--sapio-primary);
    text-decoration: none;
}

.sapio-secondary-link {
    display: block;
    margin-top: 18px;
    text-align: center;
    font-size: 14px;
}

.sapio-secondary-link:hover,
.sapio-shell-link:hover {
    text-decoration: underline;
}

.sapio-login-actions,
.sapio-action-row {
    display: grid;
    gap: 10px;
}

.sapio-shell {
    padding: 32px 18px 48px;
    box-sizing: border-box;
}

.sapio-app-header,
.sapio-shell-header,
.sapio-shell-main,
.sapio-shell-footer {
    width: min(100%, var(--sapio-shell-width));
    margin: 0 auto;
}

.sapio-app-header,
.sapio-shell-header {
    display: grid;
    grid-template-columns: minmax(150px, auto) 1fr minmax(150px, auto);
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
}

.sapio-app-header {
    min-height: 74px;
    box-sizing: border-box;
    padding: 12px 18px;
    border: 1px solid var(--sapio-border);
    border-radius: var(--sapio-radius-md);
    background: var(--sapio-overlay-strong);
    box-shadow: var(--sapio-shadow-soft);
}

.sapio-app-header > * {
    min-width: 0;
}

.sapio-shell-brand {
    color: var(--sapio-heading);
    text-decoration: none;
    font-size: 28px;
    font-weight: 700;
}

.sapio-header-logo-link {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    min-width: 0;
    text-decoration: none;
    max-width: 156px;
    overflow: hidden;
}

.sapio-header-logo {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 156px !important;
    max-height: 44px !important;
    object-fit: contain;
    flex: 0 0 auto;
}

.sapio-header-logo-text {
    font-size: 30px;
}

.sapio-shell-nav {
    display: flex !important;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    min-width: 0;
}

.sapio-shell-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 13px;
    border-radius: var(--sapio-radius-sm);
    color: var(--sapio-heading);
    text-decoration: none;
    background: var(--sapio-surface);
    border: 1px solid var(--sapio-border);
    font-weight: 700;
}

.sapio-shell-nav a:hover {
    border-color: var(--sapio-border-strong);
    color: var(--sapio-primary);
}

.sapio-shell-nav-passive {
    justify-content: center;
}

.sapio-shell-user {
    display: flex !important;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    color: var(--sapio-text-soft);
    min-width: 0;
}

.sapio-user-name {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--sapio-heading);
    font-weight: 700;
}

.sapio-user-menu {
    position: relative;
}

.sapio-user-menu summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--sapio-border);
    border-radius: var(--sapio-radius-sm);
    background: var(--sapio-surface);
    cursor: pointer;
    list-style: none;
}

.sapio-user-menu summary::-webkit-details-marker {
    display: none;
}

.sapio-user-menu-caret {
    color: var(--sapio-primary);
    font-size: 13px;
    line-height: 1;
}

.sapio-user-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 10;
    min-width: 190px;
    padding: 8px;
    border: 1px solid var(--sapio-border);
    border-radius: var(--sapio-radius-md);
    background: var(--sapio-surface);
    box-shadow: var(--sapio-shadow);
}

.sapio-user-menu-panel a {
    display: block;
    padding: 10px 12px;
    border-radius: var(--sapio-radius-sm);
    color: var(--sapio-heading);
    font-weight: 700;
    text-decoration: none;
}

.sapio-user-menu-panel a:hover {
    background: var(--sapio-primary-soft);
    color: var(--sapio-primary);
}

.sapio-panel {
    border-radius: var(--sapio-radius-lg);
    padding: 32px;
}

.sapio-shell-footer {
    margin-top: 18px;
    padding: 20px 10px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.8;
}

.sapio-shell-footer p {
    margin: 0;
}

.sapio-shell-footer-credit {
    font-size: 12px;
    opacity: 0.78;
}

.sapio-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.sapio-toolbar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sapio-search-form {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.sapio-search-field {
    flex: 1 1 320px;
}

.sapio-search-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sapio-table-wrap {
    margin-top: 24px;
    overflow-x: auto;
    border: 1px solid var(--sapio-border);
    border-radius: var(--sapio-radius-md);
    background: var(--sapio-surface);
}

.sapio-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.sapio-table th,
.sapio-table td {
    padding: 16px 18px;
    text-align: right;
    border-bottom: 1px solid var(--sapio-border);
    font-size: 15px;
}

.sapio-table th {
    color: var(--sapio-heading);
    font-weight: 600;
    background: var(--sapio-table-header);
}

.sapio-table tbody tr:hover {
    background: var(--sapio-surface-soft);
}

.sapio-table tbody tr.sapio-table-row-link {
    cursor: pointer;
}

.sapio-table tbody tr.sapio-table-row-link:focus-visible {
    outline: 2px solid var(--sapio-primary-focus);
    outline-offset: -2px;
}

.sapio-table-link {
    color: var(--sapio-heading);
    font-weight: 700;
    text-decoration: none;
}

.sapio-table-link:hover {
    text-decoration: underline;
}

.sapio-document-cell {
    display: grid;
    gap: 8px;
}

.sapio-table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sapio-mobile-file-cards {
    display: none;
    margin-top: 24px;
    gap: 14px;
}

.sapio-mobile-file-card {
    display: grid;
    gap: 6px;
    padding: 18px 18px 16px;
    border: 1px solid var(--sapio-border);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfaf7 100%);
    box-shadow: var(--sapio-shadow-card);
    text-decoration: none;
    color: inherit;
}

.sapio-mobile-file-card:hover {
    border-color: var(--sapio-border-strong);
    transform: translateY(-1px);
}

.sapio-mobile-file-card:focus-visible {
    outline: 2px solid var(--sapio-primary-focus);
    outline-offset: 3px;
}

.sapio-mobile-file-badge {
    justify-self: start;
    margin-bottom: 2px;
}

.sapio-mobile-file-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
    line-height: 1.4;
    color: var(--sapio-text-soft);
}

.sapio-mobile-file-time {
    font-size: inherit;
    line-height: inherit;
    font-weight: 500;
    color: inherit;
}

.sapio-mobile-file-date {
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

.sapio-mobile-file-title {
    font-size: 18px;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--sapio-heading);
}

.sapio-mobile-file-note {
    font-size: 13px;
    line-height: 1.5;
    color: var(--sapio-text-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sapio-mobile-file-action {
    justify-self: start;
    margin-top: 8px;
    min-width: 110px;
}

.sapio-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.sapio-badge.is-active {
    background: var(--sapio-success-bg);
    color: var(--sapio-success-text);
}

.sapio-badge.is-disabled {
    background: var(--sapio-danger-bg);
    color: var(--sapio-danger-text);
}

.sapio-badge-new {
    justify-self: start;
    background: var(--sapio-primary-soft);
    color: var(--sapio-primary-hover);
}

.sapio-empty-state {
    margin-top: 24px;
    border: 1px dashed var(--sapio-border-strong);
    border-radius: var(--sapio-radius-md);
    background: var(--sapio-surface-soft);
    padding: 28px;
}

.sapio-empty-state-tight {
    margin-top: 18px;
}

.sapio-empty-state h2 {
    margin: 0 0 10px;
    font-size: 22px;
    color: var(--sapio-heading);
}

.sapio-empty-state p,
.sapio-inline-note {
    margin: 0;
    color: var(--sapio-text-soft);
    line-height: 1.7;
}

.sapio-inline-note {
    margin-top: 22px;
}

.sapio-pagination {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.sapio-pagination-meta {
    color: var(--sapio-text-soft);
    font-size: 14px;
}

.sapio-pagination-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sapio-pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--sapio-border);
    background: var(--sapio-surface);
    color: var(--sapio-heading);
    text-decoration: none;
    font-weight: 600;
}

.sapio-pagination-link:hover {
    border-color: var(--sapio-border-strong);
    background: var(--sapio-table-header);
}

.sapio-pagination-link.is-current {
    background: var(--sapio-primary);
    border-color: var(--sapio-primary);
    color: #ffffff;
}

.sapio-pagination-link.is-disabled {
    opacity: 0.5;
    cursor: default;
}

.sapio-form {
    margin-top: 24px;
}

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

.sapio-form-grid-single {
    grid-template-columns: 1fr;
}

.sapio-file-form-grid {
    grid-template-columns: 1fr;
}

.sapio-file-title-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sapio-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--sapio-heading);
    font-size: 14px;
}

.sapio-field-full {
    grid-column: 1 / -1;
}

.sapio-field input[type="text"],
.sapio-field input[type="password"],
.sapio-field input[type="search"],
.sapio-field input[type="file"],
.sapio-field select,
.sapio-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--sapio-border);
    border-radius: var(--sapio-radius-sm);
    background: var(--sapio-surface);
    color: var(--sapio-text);
    padding: 10px 12px;
    font-size: var(--sapio-font-size-body);
    font-family: inherit;
}

.sapio-field textarea {
    resize: vertical;
}

.sapio-password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.sapio-password-field input {
    padding-inline-end: 50px;
}

.sapio-password-toggle {
    position: absolute;
    inset-inline-end: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: var(--sapio-text-soft);
    padding: 0;
    cursor: pointer;
}

.sapio-password-toggle:hover,
.sapio-password-toggle[aria-pressed="true"] {
    color: var(--sapio-primary);
}

.sapio-password-toggle svg {
    display: block;
    width: 100%;
    height: 100%;
}

.sapio-field input:focus,
.sapio-field select:focus,
.sapio-field textarea:focus {
    outline: 2px solid var(--sapio-primary-glow);
    border-color: var(--sapio-primary);
}

.sapio-message {
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: var(--sapio-radius-sm);
    font-size: 14px;
}

.sapio-message.is-error {
    background: var(--sapio-danger-bg);
    color: var(--sapio-danger-text);
    border: 1px solid var(--sapio-danger-border);
}

.sapio-message.is-success {
    background: var(--sapio-success-bg);
    color: var(--sapio-success-text);
    border: 1px solid var(--sapio-success-border);
}

.sapio-current-file {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border: 1px solid var(--sapio-border);
    border-radius: var(--sapio-radius-sm);
    background: var(--sapio-surface-soft);
}

.sapio-current-file span {
    color: var(--sapio-text-soft);
    font-size: 13px;
}

.sapio-file-replacement-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
    gap: 14px;
    align-items: stretch;
}

.sapio-replacement-field {
    justify-content: center;
    padding: 12px 14px;
    border: 1px dashed var(--sapio-border-strong);
    border-radius: var(--sapio-radius-sm);
    background: var(--sapio-surface);
}

.sapio-note {
    display: grid;
    gap: 8px;
    max-width: 100%;
}

.sapio-note-preview {
    color: var(--sapio-text);
    line-height: 1.6;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sapio-note.is-expanded .sapio-note-preview,
.sapio-note.is-static .sapio-note-preview {
    display: block;
    -webkit-line-clamp: initial;
    overflow: visible;
}

.sapio-note-toggle {
    justify-self: start;
    border: 0;
    background: transparent;
    color: var(--sapio-primary);
    font: inherit;
    font-weight: 700;
    padding: 0;
    cursor: pointer;
}

.sapio-note-empty {
    color: var(--sapio-text-soft);
}

.sapio-delete-form {
    margin-top: 12px;
}

.sapio-button-danger {
    background: var(--sapio-danger-text);
    border-color: var(--sapio-danger-text);
    color: #ffffff;
}

.sapio-button-danger:hover {
    background: var(--sapio-danger-hover);
    border-color: var(--sapio-danger-hover);
    color: #ffffff;
}

.sapio-action-row-inline {
    margin-top: 20px;
    grid-template-columns: repeat(auto-fit, minmax(180px, max-content));
    justify-content: flex-start;
}

.sapio-profile-grid {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.sapio-detail-card {
    border: 1px solid var(--sapio-border);
    border-radius: var(--sapio-radius-md);
    padding: 18px;
    background: var(--sapio-surface-soft);
}

.sapio-detail-card strong {
    display: block;
    font-size: 18px;
    color: var(--sapio-heading);
}

.sapio-detail-label {
    display: block;
    margin-bottom: 6px;
    color: var(--sapio-text-soft);
    font-size: 13px;
}

.sapio-eyebrow {
    margin: 0 0 10px;
    font-size: var(--sapio-font-size-eyebrow);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sapio-primary);
}

body.login {
    background:
        radial-gradient(circle at 82% 12%, var(--sapio-primary-glow), transparent 24%),
        linear-gradient(180deg, var(--sapio-page-bg) 0%, var(--sapio-page-bg-end) 100%) !important;
}

body.login #login,
body.login #loginform,
body.login #lostpasswordform,
body.login #registerform,
body.login .message,
body.login .notice {
    background: var(--sapio-surface);
    border: 1px solid var(--sapio-border);
    box-shadow: var(--sapio-shadow);
    color: var(--sapio-text);
}

body.login #login h1 a,
body.login h1 a {
    filter: none;
}

body.login #login label {
    color: var(--sapio-heading) !important;
}

body.login #nav a,
body.login #backtoblog a {
    color: var(--sapio-primary) !important;
}

body.login .button.button-primary {
    background: var(--sapio-primary) !important;
    border-color: var(--sapio-primary) !important;
    color: #ffffff !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

body.login .button.button-primary:hover,
body.login .button.button-primary:focus {
    background: var(--sapio-primary-hover) !important;
    border-color: var(--sapio-primary-hover) !important;
}

body.login input[type="text"],
body.login input[type="password"] {
    border-color: var(--sapio-border) !important;
    color: var(--sapio-text) !important;
}

body.login input[type="text"]:focus,
body.login input[type="password"]:focus {
    border-color: var(--sapio-primary) !important;
    box-shadow: 0 0 0 1px var(--sapio-primary) !important;
}

body.wp-admin #wpwrap,
body.wp-admin #wpcontent,
body.wp-admin #wpbody-content,
body.wp-admin .wrap,
body.wp-admin .card,
body.wp-admin .postbox,
body.wp-admin .stuffbox,
body.wp-admin .notice,
body.wp-admin .plugin-card,
.customer-area,
.cuar,
.cuar-page,
.cuar-wrapper,
.cuar-content,
.cuar-dashboard {
    color: var(--sapio-text);
}

body.wp-admin .card,
body.wp-admin .postbox,
body.wp-admin .stuffbox,
body.wp-admin .notice,
body.wp-admin .plugin-card,
body.wp-admin .widefat,
body.wp-admin .wp-list-table,
.customer-area .cuar-content,
.cuar .cuar-content,
.cuar-content,
.cuar-dashboard {
    background: var(--sapio-surface);
    border-color: var(--sapio-border);
    box-shadow: var(--sapio-shadow-card);
}

body.wp-admin .wrap h1,
body.wp-admin .wrap h2,
body.wp-admin .wrap h3,
body.wp-admin .wp-heading-inline,
.customer-area h1,
.customer-area h2,
.customer-area h3,
.cuar h1,
.cuar h2,
.cuar h3,
.cuar-content h1,
.cuar-content h2,
.cuar-content h3 {
    color: var(--sapio-heading);
}

body.wp-admin .button-primary,
body.wp-admin .page-title-action,
body.wp-admin .components-button.is-primary,
.customer-area .button-primary,
.cuar .button-primary,
.cuar-content .button-primary,
.customer-area .button[type="submit"],
.cuar .button[type="submit"],
.cuar-content .button[type="submit"] {
    background: var(--sapio-primary) !important;
    border-color: var(--sapio-primary) !important;
    color: #ffffff !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

body.wp-admin .button-primary:hover,
body.wp-admin .page-title-action:hover,
body.wp-admin .components-button.is-primary:hover,
.customer-area .button-primary:hover,
.cuar .button-primary:hover,
.cuar-content .button-primary:hover,
.customer-area .button[type="submit"]:hover,
.cuar .button[type="submit"]:hover,
.cuar-content .button[type="submit"]:hover {
    background: var(--sapio-primary-hover) !important;
    border-color: var(--sapio-primary-hover) !important;
}

body.wp-admin .button-secondary,
body.wp-admin .button,
body.wp-admin .components-button,
.customer-area .button,
.cuar .button,
.cuar-content .button {
    border-color: var(--sapio-border);
    color: var(--sapio-heading);
}

body.wp-admin input[type="text"],
body.wp-admin input[type="search"],
body.wp-admin input[type="password"],
body.wp-admin input[type="email"],
body.wp-admin input[type="number"],
body.wp-admin select,
body.wp-admin textarea,
.customer-area input[type="text"],
.customer-area input[type="search"],
.customer-area input[type="password"],
.customer-area input[type="email"],
.customer-area select,
.customer-area textarea,
.cuar input[type="text"],
.cuar input[type="search"],
.cuar input[type="password"],
.cuar input[type="email"],
.cuar select,
.cuar textarea,
.cuar-content input[type="text"],
.cuar-content input[type="search"],
.cuar-content input[type="password"],
.cuar-content input[type="email"],
.cuar-content select,
.cuar-content textarea {
    border-color: var(--sapio-border);
    color: var(--sapio-text);
    background: var(--sapio-surface);
}

body.wp-admin input[type="text"]:focus,
body.wp-admin input[type="search"]:focus,
body.wp-admin input[type="password"]:focus,
body.wp-admin input[type="email"]:focus,
body.wp-admin input[type="number"]:focus,
body.wp-admin select:focus,
body.wp-admin textarea:focus,
.customer-area input[type="text"]:focus,
.customer-area input[type="search"]:focus,
.customer-area input[type="password"]:focus,
.customer-area input[type="email"]:focus,
.customer-area select:focus,
.customer-area textarea:focus,
.cuar input[type="text"]:focus,
.cuar input[type="search"]:focus,
.cuar input[type="password"]:focus,
.cuar input[type="email"]:focus,
.cuar select:focus,
.cuar textarea:focus,
.cuar-content input[type="text"]:focus,
.cuar-content input[type="search"]:focus,
.cuar-content input[type="password"]:focus,
.cuar-content input[type="email"]:focus,
.cuar-content select:focus,
.cuar-content textarea:focus {
    border-color: var(--sapio-primary);
    box-shadow: 0 0 0 1px var(--sapio-primary);
}

body.wp-admin .widefat th,
body.wp-admin .wp-list-table th,
body.wp-admin .form-table th,
.customer-area table th,
.cuar table th,
.cuar-content table th {
    background: var(--sapio-table-header);
    color: var(--sapio-heading);
}

body.wp-admin .widefat td,
body.wp-admin .widefat th,
body.wp-admin .wp-list-table td,
body.wp-admin .wp-list-table th,
body.wp-admin .form-table td,
body.wp-admin .form-table th,
.customer-area table td,
.customer-area table th,
.cuar table td,
.cuar table th,
.cuar-content table td,
.cuar-content table th {
    border-color: var(--sapio-border);
}

@media (max-width: 820px) {
    .sapio-app-header,
    .sapio-shell-header {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .sapio-header-logo-link {
        justify-self: center;
    }

    .sapio-shell-user {
        justify-content: center;
    }

    .sapio-user-menu-panel {
        right: 50%;
        left: auto;
        transform: translateX(50%);
    }
}

@media (max-width: 680px) {
    .sapio-login-page,
    .sapio-shell {
        padding: 18px 12px 24px;
    }

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

    .sapio-login-card h1,
    .sapio-panel h1 {
        font-size: 24px;
    }

    .sapio-panel {
        padding: 22px;
    }

    .sapio-profile-grid {
        grid-template-columns: 1fr;
    }

    .sapio-form-grid {
        grid-template-columns: 1fr;
    }

    .sapio-file-replacement-row {
        grid-template-columns: 1fr;
    }

    .sapio-client-files-table {
        display: none;
    }

    .sapio-mobile-file-cards {
        display: grid;
    }

    .sapio-mobile-file-time {
        font-size: inherit;
    }
}
