/* PKR Nova - Authentic WordPress WP-Admin Style Dashboard CSS */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap');

:root {
    /* WordPress Classic & Modern Admin Theme Variables */
    --wp-admin-bar: #1d2327;
    --wp-sidebar-bg: #1d2327;
    --wp-sidebar-active: #2271b1;
    --wp-sidebar-hover: #135e96;
    --wp-bg-main: #f0f0f1;
    --wp-card-bg: #ffffff;
    --wp-text: #2c3338;
    --wp-text-light: #646970;
    --wp-border: #c3c4c7;
    --wp-blue: #2271b1;
    --wp-blue-hover: #135e96;
    --wp-green: #008a20;
    --wp-red: #d63638;
    --wp-font: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Reset & WP Admin Base */
.wp-admin-wrapper {
    font-family: var(--wp-font);
    background-color: var(--wp-bg-main);
    color: var(--wp-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* WordPress Top Admin Bar (32px) */
.wp-admin-bar {
    height: 32px;
    background: var(--wp-admin-bar);
    color: #f0f0f1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    font-size: 13px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
}

.wp-admin-bar-left, .wp-admin-bar-right {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.wp-admin-bar-item {
    color: #f0f0f1;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s ease;
}

.wp-admin-bar-item:hover {
    color: #72aee6;
}

/* WordPress Sidebar Layout */
.wp-body-container {
    display: flex;
    margin-top: 32px;
    min-height: calc(100vh - 32px);
}

.wp-sidebar {
    width: 190px;
    background: var(--wp-sidebar-bg);
    position: fixed;
    top: 32px;
    bottom: 0;
    left: 0;
    z-index: 1000;
    overflow-y: auto;
}

.wp-menu {
    list-style: none;
    padding: 0.75rem 0;
    margin: 0;
}

.wp-menu-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 1rem;
    color: #f0f0f1;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    border-left: 4px solid transparent;
    transition: background 0.15s ease;
}

.wp-menu-item:hover {
    background: var(--wp-sidebar-hover);
    color: #72aee6;
}

.wp-menu-item.active {
    background: var(--wp-sidebar-active);
    color: #ffffff;
    font-weight: 600;
    border-left-color: #72aee6;
}

.wp-menu-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}

/* WordPress Content Area */
.wp-content {
    flex: 1;
    margin-left: 190px;
    padding: 1.5rem 2rem 4rem;
}

.wp-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.wp-page-title {
    font-size: 23px;
    font-weight: 400;
    color: #1d2327;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* WP Admin Notice Banner */
.wp-notice {
    background: #fff;
    border-left: 4px solid var(--wp-blue);
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.25rem;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wp-notice-success {
    border-left-color: var(--wp-green);
}

.wp-notice-warning {
    border-left-color: #dba617;
}

/* WordPress Dashboard Widgets Grid */
.wp-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.wp-postbox {
    background: var(--wp-card-bg);
    border: 1px solid var(--wp-border);
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    margin-bottom: 1.25rem;
}

.wp-postbox-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f1;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wp-postbox-content {
    padding: 1.25rem;
    font-size: 13px;
    line-height: 1.6;
}

/* WP Welcome Panel */
.wp-welcome-panel {
    background: #fff;
    border: 1px solid var(--wp-border);
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    position: relative;
}

.wp-welcome-panel h2 {
    font-size: 21px;
    font-weight: 400;
    color: #1d2327;
    margin-bottom: 0.5rem;
}

/* WP Classic Buttons */
.button, .button-primary, .button-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 13px;
    padding: 0.35rem 0.85rem;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.1s ease;
    border: 1px solid var(--wp-blue);
    line-height: 1.5;
}

.button-primary {
    background: var(--wp-blue);
    color: #fff;
    border-color: var(--wp-blue);
}

.button-primary:hover {
    background: var(--wp-blue-hover);
    border-color: var(--wp-blue-hover);
    color: #fff;
}

.button-secondary {
    background: #f6f7f7;
    color: var(--wp-blue);
    border-color: var(--wp-blue);
}

.button-secondary:hover {
    background: #f0f0f1;
    color: var(--wp-blue-hover);
}

.button-link-delete {
    color: var(--wp-red);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 12px;
}

.button-link-delete:hover {
    text-decoration: underline;
}

/* WP Tables */
.wp-list-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--wp-border);
    font-size: 13px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.wp-list-table th {
    text-align: left;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--wp-border);
    background: #fff;
    color: #2c3338;
    font-weight: 600;
}

.wp-list-table td {
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid #f0f0f1;
    vertical-align: middle;
    color: #2c3338;
}

.wp-list-table tr:nth-child(odd) {
    background-color: #f6f7f7;
}

.wp-list-table tr:hover {
    background-color: #f0f6fc;
}

/* WP Gutenberg / Editor Layout */
.wp-editor-wrapper {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.5rem;
}

.wp-title-box {
    width: 100%;
    font-size: 20px;
    padding: 0.65rem 1rem;
    border: 1px solid var(--wp-border);
    border-radius: 3px;
    margin-bottom: 1rem;
}

.wp-field {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--wp-border);
    border-radius: 3px;
    font-size: 13px;
    font-family: inherit;
}

.wp-field:focus {
    border-color: var(--wp-blue);
    outline: 2px solid #2271b1;
}

/* Utility Hidden Class */
.hidden {
    display: none !important;
}

/* Mobile Sidebar Drawer & Overlay */
.wp-menu-toggle-btn {
    display: none;
    background: transparent;
    border: none;
    color: #f0f0f1;
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
}

.wp-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 998;
    display: none;
}

.wp-sidebar-backdrop.active {
    display: block;
}

/* Table Scroll Wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Responsive Media Queries */
@media (max-width: 960px) {
    .wp-editor-wrapper {
        grid-template-columns: 1fr !important;
    }
    .wp-dashboard-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .wp-menu-toggle-btn {
        display: inline-flex;
        align-items: center;
    }

    .wp-admin-bar {
        padding: 0 0.5rem;
    }

    .wp-admin-bar-left, .wp-admin-bar-right {
        gap: 0.5rem;
    }

    .wp-admin-bar-item-site-text {
        display: none;
    }

    /* Mobile Drawer Sidebar */
    .wp-sidebar {
        width: 220px !important;
        transform: translateX(-100%);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 15px rgba(0,0,0,0.4);
    }

    .wp-sidebar.mobile-open {
        transform: translateX(0);
    }

    .wp-sidebar .wp-menu-item span.menu-text {
        display: inline !important;
    }

    .wp-content {
        margin-left: 0 !important;
        padding: 1rem 0.75rem 3rem !important;
        width: 100% !important;
    }

    .wp-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    /* Force All Grids to Stack Vertically on Mobile */
    .wp-welcome-panel div[style*="grid-template-columns"],
    .wp-postbox-content div[style*="grid-template-columns"],
    #tab-categories div[style*="grid-template-columns"],
    #adminConfigForm div[style*="grid-template-columns"],
    #tab-backup div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    .wp-field, .wp-title-box {
        font-size: 14px;
    }
}
