:root {
    --qt-primary: #5e17eb;
    --qt-primary-hover: #4a12c2;
    --qt-success: #10b981;
    --qt-success-light: #d1fae5;
    --qt-warning: #f59e0b;
    --qt-light: #f8fafc;
    --qt-light-bg: #f1f5f9;
    --qt-border: #e2e8f0;
    --qt-text: #334155;
}

body.wp-admin {
    background: #f5f3ff !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.qt-wrapper {
    max-width: 1200px;
    background: #fff;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    margin-top: 1rem;
}

.qt-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--qt-border);
}

.qt-header h1 {
    margin: 0;
    font-size: 1.75rem;
    color: var(--qt-primary);
    flex: 1;
}

.qt-header-badge {
    background: #f0f2ff;
    color: var(--qt-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.qt-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.qt-badge-tracked {
    background: #f0fdf4;
    color: var(--qt-success);
    border: 1px solid #bbf7d0;
}

.qt-badge-not-tracked {
    background: #fffbeb;
    color: var(--qt-warning);
    border: 1px solid #fde68a;
}

.qt-badge-published {
    background: #f0fdf4;
    color: var(--qt-success);
}

.qt-badge-draft {
    background: #fffbeb;
    color: var(--qt-warning);
}

.qt-badge-private {
    background: #eff6ff;
    color: var(--qt-primary);
}

.qt-badge-pending {
    background: #f8fafc;
    color: var(--qt-text);
}

.qt-card {
    background: var(--qt-light);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid var(--qt-primary);
}

.qt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.qt-card-content {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--qt-border);
}

.qt-card.collapsed .qt-card-content {
    display: none;
}

.qt-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5rem 0;
}

.qt-special-pages-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5rem 0;
}

.qt-table th,
.qt-special-pages-table th {
    background: var(--qt-light);
    text-align: left;
    padding: 12px 8px;
    font-weight: 600;
    color: var(--qt-text);
}

.qt-table td,
.qt-special-pages-table td {
    padding: 12px 8px;
    vertical-align: middle;
    position: relative;
}

.qt-table tr:nth-child(even),
.qt-special-pages-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.qt-table tr.tracked,
.qt-special-pages-table tr.tracked {
    background-color: #f0fdf4;
}

.qt-table tr:hover,
.qt-special-pages-table tr:hover {
    background-color: var(--qt-light-bg);
}

.qt-table textarea,
.qt-special-pages-table textarea {
    width: 100%;
    min-height: 40px;
    height: 40px;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.4;
    padding: 8px;
    border: 1px solid var(--qt-border);
    border-radius: 0.25rem;
    transition: border-color 0.2s;
    resize: vertical;
    box-sizing: border-box;
}

.qt-table textarea:focus,
.qt-special-pages-table textarea:focus {
    outline: none;
    border-color: var(--qt-primary);
    box-shadow: 0 0 0 3px rgba(94, 23, 235, 0.1);
}

.qt-table .page-title {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
}

.qt-special-page-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.qt-special-page-icon {
    width: 20px;
    height: 20px;
    color: var(--qt-primary);
}

.qt-table .page-title a {
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
}

.qt-table .page-title a:hover {
    color: var(--qt-primary);
}

.qt-table .page-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #64748b;
}

.qt-table .page-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.qt-badge svg {
    vertical-align: text-bottom;
    display: inline-block;
    height: 12px;
    width: 12px;
    margin-right: 4px;
}

.qt-example {
    background: #1e293b;
    color: #cbd5e1;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin: 0.5rem 0;
    font-family: monospace;
    font-size: 13px;
    overflow-x: auto;
}

.qt-button {
    background: var(--qt-primary);
    color: white;
    border: none;
    border-radius: 0.375rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.qt-button:hover {
    background: var(--qt-primary-hover);
}

.qt-notice {
    padding: 1rem;
    background: var(--qt-success-light);
    border-radius: 0.375rem;
    margin: 1rem 0;
    border-left: 4px solid var(--qt-success);
}

.qt-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--qt-border);
    color: #64748b;
    font-size: 0.875rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.qt-toggle-icon {
    transition: transform 0.3s ease;
}

.qt-card.collapsed .qt-toggle-icon {
    transform: rotate(-90deg);
}

.qt-save-reminder {
    display: none;
    padding: 1rem;
    background: #fffbeb;
    border-radius: 0.375rem;
    margin: 1rem 0;
    border-left: 4px solid var(--qt-warning);
}

/* Tabs */
.qt-tabs {
    display: flex;
    gap: 0.5rem;
    margin: 1.5rem 0;
    border-bottom: 1px solid var(--qt-border);
    padding-bottom: 0.5rem;
}

.qt-tab-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--qt-text);
    transition: all 0.2s;
    position: relative;
}

.qt-tab-btn.active {
    color: var(--qt-primary);
}

.qt-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--qt-primary);
}

.qt-tab-btn:hover:not(.active) {
    color: var(--qt-primary);
    background: #f0f2ff;
}

.qt-tab-btn:disabled {
    color: #9ca3af;
    cursor: not-allowed;
}

/* Pagination */
.qt-pagination {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    gap: 0.25rem;
}

.qt-pagination a, 
.qt-pagination span {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--qt-border);
    border-radius: 0.25rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
}

.qt-pagination a {
    color: var(--qt-primary);
}

.qt-pagination a:hover {
    background: #f0f2ff;
}

.qt-pagination .current {
    background: var(--qt-primary);
    color: white;
    border-color: var(--qt-primary);
}

/* Input validation */
.qt-input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.qt-error-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
}

/* Header area refinement */
.qt-header-area {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.qt-header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--qt-primary);
    margin: 0;
}

.qt-header-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0.25rem 0 0;
}

.qt-header-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 1rem;
}

.qt-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.qt-logo {
    height: 48px;
    width: auto;
    display: block;
}

.qt-logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: #5e17eb;
    margin: 0;
    font-family: "Segoe UI", "Helvetica Neue", sans-serif;
    letter-spacing: -0.5px;
}

.qt-header-subtitle {
    font-size: 0.95rem;
    color: #666;
    margin: 2px 0 0;
}

.qt-header-badge {
    background-color: #5e17eb;
    color: #fff;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 6px;
}

.qt-woocommerce-disabled {
    opacity: 0.6;
    pointer-events: none;
}