:root {
    --diogen-primary: #9626ff;
    --diogen-secondary: #667eea;
    --diogen-gray: #656565;
}

/* Page Header */
.diogen-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    background-color: white;
    border-bottom-left-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.diogen-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.diogen-logo img {
    height: 23px;
    width: auto;
    display: block;
}

.diogen-header-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.diogen-header-api-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
}

.diogen-header-api-status .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.diogen-api-status-connected {
    color: #4caf50;
}

.diogen-api-status-rate-limited,
.diogen-api-status-disconnected {
    color: #ffc107;
}

.diogen-api-status-invalid,
.diogen-api-status-error {
    color: #f44336;
}

.diogen-header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.diogen-header-action {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #646970;
    font-weight: 500;
    font-size: 13px;
    transition: color 0.2s;
}

.diogen-header-action:hover {
    color: var(--diogen-primary);
}

.diogen-header-action .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Modals & Overlays */
.diogen-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.diogen-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100001;
    /* Above normal modals */
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.diogen-modal.is-open,
.diogen-modal-overlay.is-open {
    display: flex !important;
}

.diogen-modal-content {
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 30px;
    margin: auto;
    width: 70%;
    position: relative;
    max-height: 80%;
    overflow: auto;
    border-radius: 12px;
    animation: diogen-modal-appear 0.2s ease-out;
}

.diogen-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    gap: 10px;
}

.diogen-modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.diogen-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    text-decoration: none;
}

.diogen-modal-close:hover {
    color: #333;
    background: none;
}

.diogen-modal p.submit {
    margin-top: 0;
    padding-top: 10px;
    padding-bottom: 0;
}

@keyframes diogen-modal-appear {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Loading Modal / Spinner */
#diogen-loading-modal .diogen-modal-content {
    padding: 30px 50px;
    text-align: center;
    width: auto;
}

.diogen-spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.diogen-spinner-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    animation: pulse-shadow 1.5s ease-in-out infinite;
}

@keyframes pulse-shadow {

    0%,
    100% {
        box-shadow: 0 0 8px var(--diogen-primary);
    }

    50% {
        box-shadow: 0 0 18px var(--diogen-primary);
    }
}

/* UI Components */
.diogen-badge {
    display: inline-flex;
    align-items: center;
    height: 23px;
    border: 1px solid;
    box-sizing: border-box;
    padding: 2px 12px;
    margin-left: 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.diogen-badge-basic {
    color: var(--diogen-gray);
    border-color: var(--diogen-gray);
}

.diogen-badge-pro {
    background: linear-gradient(135deg, var(--diogen-secondary) 0%, var(--diogen-primary) 100%);
    color: #fff;
    font-size: 15px;
}

.diogen-pro-badge-inline {
    background: linear-gradient(135deg, var(--diogen-secondary) 0%, var(--diogen-primary) 100%);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    margin-left: 10px;
    vertical-align: middle;
    text-transform: uppercase;
}

/* Common Layout */
.diogen-page-section {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    padding: 25px 30px;
    margin-bottom: 25px;
}

.diogen-page-section h2 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    color: #333;
}

/* Content Wrapper (for pages with header) */
.diogen-content-wrapper {
    margin: 20px 20px 20px 0;
}

.diogen-content-wrapper .diogen-page-section {
    padding-bottom: 10px;
}

.diogen-content-wrapper h1 {
    display: inline-block;
    margin-right: 20px;
}

.diogen-content-wrapper .notice {
    margin: 10px 0 20px 0;
}

.diogen-content-wrapper button.page-title-action {
    position: relative;
    top: -3px;
    vertical-align: baseline;
}

.diogen-content-wrapper .form-table th {
    padding-left: 0;
}

/* Info Box */
.diogen-info-box {
    margin-bottom: 25px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--diogen-primary);
}

.diogen-info-box p {
    margin: 0 !important;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.diogen-info-box .dashicons {
    font-size: 18px;
    margin-right: 5px;
    color: var(--diogen-primary);
    vertical-align: text-bottom;
}

.diogen-info-box a {
    color: var(--diogen-primary);
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    margin-top: 5px;
}

.diogen-info-box a:hover {
    text-decoration: underline;
}

/* Status Banner */
.diogen-status-banner {
    background: #fff;
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-left: 5px solid #ccc;
}

.diogen-status-banner.promo {
    border-left-color: var(--diogen-primary);
    background: linear-gradient(to right, #fff, #faf5fb);
}

.diogen-status-main {
    display: flex;
    align-items: center;
    gap: 15px;
}

.diogen-status-main .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #555;
}

.diogen-status-banner.promo .diogen-status-main .dashicons {
    color: var(--diogen-primary);
}

.diogen-status-text h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.3rem;
}

.diogen-status-badge {
    font-size: 11px;
    text-transform: uppercase;
    background: #eee;
    padding: 2px 8px;
    border-radius: 10px;
    color: #666;
    letter-spacing: 0.5px;
    font-weight: bold;
}

.diogen-status-banner.promo .diogen-status-badge {
    background: #f3e5f5;
    color: var(--diogen-primary);
}

.diogen-status-actions {
    display: flex;
    align-items: center;
}

/* Quick Actions Container */
.diogen-quick-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.diogen-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.diogen-action-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.diogen-action-btn-primary {
    background: linear-gradient(135deg, var(--diogen-secondary) 0%, var(--diogen-primary) 100%);
    color: #fff;
}

.diogen-action-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(150, 38, 255, 0.35);
    color: #fff;
}

.diogen-action-btn-secondary {
    background: #fff;
    border: 2px solid var(--diogen-primary);
    color: var(--diogen-primary);
}

.diogen-action-btn-secondary:hover {
    background: var(--diogen-primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(150, 38, 255, 0.25);
}

.button.diogen-get-pro {
    background-color: var(--diogen-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.button.diogen-get-pro:hover {
    background-color: var(--diogen-secondary);
}

/* Pagination */
.diogen-content-wrapper .tablenav .tablenav-pages {
    float: left;
}

.diogen-content-wrapper .tablenav-pages .page-numbers {
    padding: 6px 10px;
    border-radius: 4px;
    background: #fff;
    color: #2271b1;
    text-decoration: none;
    margin-right: 5px;
}

.diogen-content-wrapper .tablenav-pages .page-numbers:hover {
    box-shadow: 0 0 1px 0 #2271b1;
}

.diogen-content-wrapper .tablenav-pages .page-numbers.current {
    background: #2271b1;
    color: #fff;
    font-weight: 600;
}

/* Validation & Errors */
.diogen-modal-content input.error,
.diogen-modal-content select.error,
.diogen-modal-content textarea.error {
    border-color: #d63638 !important;
}

.diogen-modal-content label.error {
    color: #d63638;
    margin-top: 4px;
    display: block;
}

.diogen-modal-content .notice {
    margin: 10px 0;
}

/* Shared Mobile Adjustments */
@media (max-width: 782px) {
    .diogen-modal {
        padding: 10px;
    }

    .diogen-modal-content {
        padding: 20px;
        max-height: 90vh;
        width: 95%;
    }

    .diogen-page-section {
        padding: 15px;
        margin-bottom: 20px;
        border-radius: 6px;
    }

    .diogen-status-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px;
    }

    .diogen-status-actions {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 10px;
    }

    .diogen-status-actions span.description {
        margin-right: 0 !important;
        font-size: 13px;
    }

    .diogen-status-actions a {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .diogen-status-main .dashicons {
        font-size: 24px;
        width: 24px;
        height: 24px;
    }

    .diogen-status-text h3 {
        font-size: 16px;
    }

    .diogen-action-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }

    .diogen-content-wrapper {
        margin-right: 10px;
    }

    .diogen-dashboard-header {
        padding: 15px 15px;
    }

    .diogen-header-right {
        gap: 12px;
    }

    .diogen-logo img {
        height: 14px;
    }

    .diogen-header-api-status .api-label,
    .diogen-header-action span:not(.dashicons) {
        display: none;
    }

    .diogen-header-actions {
        gap: 12px;
    }

    .diogen-badge {
        height: 16px;
        font-size: 10px;
        padding: 0 4px;
        margin-left: 4px;
    }
}

/* Universal Notice Overlay Hide */
#wpbody-content {
    position: relative;
}

.diogen-main-page-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    background: #f0f0f1;
    min-height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
    .diogen-main-page-container {
        right: 0;
        min-height: calc(100vh - 46px);
    }
}

/* System Health Warnings */
.diogen-system-health-notice {
    background: #fff8e5;
}

.diogen-system-health-notice p {
    color: #856404;
    font-weight: 500;
}

.diogen-system-health-notice .dashicons-warning {
    color: #ed4a00;
    margin-right: 5px;
}