/**
 * Version: 1.1
 */
.forge12-plugin {
    display: flex;
    flex-flow: column nowrap;
    width: 100%;
    padding-top: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

.forge12-plugin .options {
    float: right;
    margin-top: -40px;
}

.forge12-plugin h1 {
    padding-bottom: 5px;
}

.forge12-plugin-header {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    padding: 12px 20px;
    min-height: 60px;
    border-radius: 5px 5px 0 0;
    background: linear-gradient(340deg, rgba(6, 49, 113, 1) 0%, rgb(65 65 173) 47%, rgba(0, 212, 255, 1) 100%);
}

/**
 * Sidebar Navigation
 */
.forge12-plugin-body {
    display: flex;
    flex-flow: row nowrap;
}

.forge12-plugin-menu {
    flex: 0 0 220px;
    background-color: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    padding: 16px 0;
    min-height: 400px;
}

.f12-sidebar-nav {
    display: flex;
    flex-direction: column;
}

.f12-sidebar-menu {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
}

.f12-sidebar-item {
    list-style: none;
    margin: 0;
}

.f12-sidebar-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    text-decoration: none;
    color: #1d2327;
    font-size: 13px;
    border-left: 3px solid transparent;
    transition: background-color 0.15s, border-color 0.15s;
}

.f12-sidebar-item a:hover {
    background-color: #eef3f7;
}

.f12-sidebar-item--active a {
    border-left-color: #258dc8;
    background-color: #eef3f7;
    font-weight: 600;
    color: #258dc8;
}

.f12-sidebar-item a .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: inherit;
}

.f12-sidebar-group {
    margin-top: 4px;
}

.f12-sidebar-group-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
}

.f12-sidebar-group-label .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.f12-sidebar-group-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.f12-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
}

.f12-sidebar-toggle .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.forge12-plugin-content {
    flex: 1 1 auto;
    min-width: 0;
    padding: 20px;
    display: flex;
    flex-flow: row nowrap;
}

.forge12-plugin-footer {
    margin-top: 50px;
}

.forge12-plugin-footer .forge12-plugin-footer-inner {
    text-align: center;
}

.forge12-plugin-content .box {
    background-color: #f8f9fa !important;
    border-radius: 5px;
    box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 20px
}

.forge12-plugin-content .forge12-plugin-content-main {
    flex: 1 1 65%;
    padding-right: 20px;
}

.forge12-plugin-content .forge12-plugin-content-sidebar {
    flex: 1 1 35%;
}

.forge12-plugin-header img {
    width: 200px;
}

.forge12-plugin-content .tablenav-pages {
    margin-top: 20px;
}

/**
 * Popoup
 */
.forge12-plugin-popup {
    position: fixed;
    background-color: #f8f9fa;
    box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.05);
    width: 450px;
    left: calc(50% - 225px);
    top: 150px;
}

.forge12-plugin-popup .options {
    margin-bottom: 10px;
    margin-top: -10px;
    font-size: 12px;
}

.forge12-plugin-popup-content {
    max-height: 600px;
    overflow-y: scroll;
    padding: 20px;
}

.forge12-plugin-popup h2 {
    margin-top: 0;
}

.forge12-plugin-popup table {
    width: 100%;
    border-collapse: collapse;
}

.forge12-plugin-popup table tr:first-child {
    background-color: #333 !important;
    color: #fff;
}

.forge12-plugin-popup table tr:nth-child(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

.forge12-plugin-popup table td {
    padding: 10px;
}

.forge12-plugin-popup .forge12-plugin-popup-close {
    position: absolute;
    right: -15px;
    top: -15px;
    padding: 8px 12px;
    cursor: pointer;
    color: #fff;
    border-radius: 3px;
    background: #333;
}

/**
 * Table design
 */
.forge12-plugin-content a {
    text-decoration: none;
}

.forge12-plugin-content table {
    border-collapse: collapse;
    width: 100%;
}

.forge12-plugin-content table td, .forge12-plugin-content table th {
    padding: 10px;
    text-align: left;
}

.forge12-plugin-content tr th:first-child,
.forge12-plugin-content tr td:first-child {
    text-align: center;
    cursor: pointer;
}

.forge12-plugin-content table tr:first-child th {
    background-color: #333 !important;
    color: #fff;
}

.forge12-plugin-content table tr:nth-child(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

.forge12-license {
    display: flex;
    flex-flow: row wrap;
    width: 100%;
    max-width: 1600px;
}

.forge12-license h1 {
    padding: 0;
    margin: 0;
    display: block;
    width: 100%;
    margin-bottom: 30px;
}

.forge12-license table {
    width: 100%;
}

.forge12-license table th {
    background-color: #f0f0f0;
    padding: 10px;
}

.forge12-license table tr:nth-child(odd) {
    background-color: #f9f9f9;
}

.forge12-license table td {
    padding: 10px;
}

.forge12-license form input[type=text] {
    width: 100%;
    border-radius: 0;
}

.forge12-license form table td:first-child {
    width: 150px;
    text-align: left;
}

.forge12-license form {
    width: 100%;
}

.alert {
    display: flex;
    flex-flow: row wrap;
    width: 100%;
    max-width: 1600px;
    background-color: #fff;
    border: 1px solid #edeaea;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 0 15px 3px rgba(0, 0, 0, 0.1);
}

.forge12-plugin-content .box.alert-success{
    color:#fff!important;
    background-color:#4fb05d!important;
}

.forge12-license #remove_license {
    margin-top: 15px;
}

/**
 * Option design
 */
.forge12-plugin-content .option {
    display: flex;
    flex-flow: row nowrap;
    margin-bottom:25px;
    justify-content:center;
}

.forge12-plugin-content .option .label {
    flex: 0 0 250px;
    padding-top:15px;
}

.forge12-plugin-content .option .input{
    border:1px solid #edeaea;
    padding:15px;
    flex:1 1 100%;
    border-radius:5px;
    background-color:rgba(255,255,255,0.5);
}

.forge12-plugin-content .option .input input[type=text],
.forge12-plugin-content .option .input textarea{
    width:100%;
}

/**
 * Add for categories
 .addtag
 */
#edittag .box h2,
#addtag .box h2{
    margin-top:0;
}

#edittag .box,
#addtag .box {
    background-color: #f8f9fa !important;
    border-radius: 5px;
    box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 20px
}

/**
 * Premium upsell styles
 */
.f12-premium-upsell {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px 25px;
    border-radius: 8px;
    margin: 15px 0;
    line-height: 1.6;
}

.f12-premium-upsell a {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
}

.f12-premium-upsell a:hover {
    color: #e0e0e0;
}

.f12-premium-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 3px;
    vertical-align: middle;
    line-height: 1.6;
}

.f12-premium-upsell .f12-premium-badge {
    background: rgba(255, 255, 255, 0.2);
}

/**
 * Drag & Drop sortable styles
 */
.f12-sortable-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.f12-sortable-list .f12-sortable-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin-bottom: 4px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: grab;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.f12-sortable-list .f12-sortable-item:hover {
    border-color: #258dc8;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.f12-sortable-list .f12-sortable-item.sortable-ghost {
    opacity: 0.4;
    background: #f0f7ff;
}

.f12-sortable-list .f12-sortable-item .f12-drag-handle {
    color: #999;
    cursor: grab;
    font-size: 16px;
}

.f12-sortable-list .f12-sortable-item .f12-item-thumb {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}

.f12-sortable-list .f12-sortable-item .f12-item-title {
    flex: 1;
    font-size: 13px;
}

/**
 * Admin product thumbnail in select
 */
.f12-product-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.f12-product-option img {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

/**
 * Toggle switch
 */
.f12-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
    vertical-align: middle;
}

.f12-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.f12-toggle-slider {
    position: absolute;
    inset: 0;
    background-color: #ccc;
    border-radius: 24px;
    transition: background-color 0.25s, box-shadow 0.25s;
}

.f12-toggle-slider::before {
    content: "";
    position: absolute;
    left: 3px;
    bottom: 3px;
    width: 18px;
    height: 18px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.25s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.f12-toggle input:checked + .f12-toggle-slider {
    background-color: #258dc8;
}

.f12-toggle input:checked + .f12-toggle-slider::before {
    transform: translateX(20px);
}

.f12-toggle input:focus-visible + .f12-toggle-slider {
    box-shadow: 0 0 0 3px rgba(37, 141, 200, 0.3);
}

/**
 * Premium locked fields
 */
.f12-premium-locked .input {
    opacity: 0.5;
    pointer-events: none;
}

/**
 * Recommended star toggle in sortable list
 */
.f12-star-toggle {
    cursor: pointer;
    font-size: 18px;
    color: #ccc;
    transition: color 0.2s;
    flex-shrink: 0;
}

.f12-star-toggle:hover,
.f12-star-toggle.active {
    color: #f5af19;
}

/**
 * Bulk Assignment / Inventory / Import-Export
 */
.f12-bulk-form .option {
    margin-bottom: 20px;
}

.f12-bulk-result .alert-success {
    padding: 15px 20px;
}

/**
 * Accessory Overview
 */
.f12-overview-table {
    border-collapse: collapse;
}

.f12-overview-table th {
    background: #f0f0f1;
    font-weight: 600;
    padding: 10px 12px;
    text-align: left;
}

.f12-overview-table td {
    padding: 10px 12px;
    vertical-align: top;
    border-bottom: 1px solid #e0e0e0;
}

.f12-overview-table tbody tr:nth-child(even) td {
    background: #fafafa;
}

.f12-overview-table tbody tr:hover td {
    background: #f0f5fa;
}

.f12-overview-table td img {
    border-radius: 3px;
    vertical-align: middle;
}

.f12-type-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    width: 16px;
    text-align: center;
    border-radius: 3px;
    color: #fff;
    vertical-align: middle;
}

.f12-type-badge.f12-type-optional {
    background: #258dc8;
}

.f12-type-badge.f12-type-required {
    background: #d63638;
}

.f12-overview-table .tablenav-pages .button.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.f12-overview-table .tablenav-pages .pagination-links {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.f12-overview-row-locked td {
    opacity: 0.45;
}

.f12-overview-row-locked td:nth-child(5) {
    opacity: 1;
}

.f12-overview-locked-entry {
    opacity: 0.45;
}

/**
 * Dashboard Stats & Quick Actions
 */
.f12-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.f12-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.f12-stat-card > .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #258dc8;
}

.f12-stat-info {
    display: flex;
    flex-direction: column;
}

.f12-stat-value {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    color: #1d2327;
}

.f12-stat-label {
    font-size: 12px;
    color: #666;
}

.f12-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.f12-quick-actions .button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    vertical-align: text-bottom;
    margin-right: 2px;
}

.f12-upsell-list {
    list-style: disc;
    margin-left: 20px;
}

/**
 * Sortable list price & stock
 */
.f12-sortable-list .f12-sortable-item .f12-item-price {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    flex-shrink: 0;
}

.f12-sortable-list .f12-sortable-item .f12-item-stock {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.f12-item-stock-instock { background: #00a32a; }
.f12-item-stock-low { background: #dba617; }
.f12-item-stock-outofstock { background: #d63638; }
.f12-item-stock-onbackorder { background: #999; }

/**
 * Inventory Check Tabs
 */
.f12-inv-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.f12-inv-tab {
    padding: 10px 16px;
    cursor: pointer;
    border: 1px solid transparent;
    border-bottom: none;
    margin-bottom: -1px;
    background: none;
    font-size: 13px;
    border-radius: 4px 4px 0 0;
    transition: background-color 0.15s;
}

.f12-inv-tab:hover {
    background: #f0f0f1;
}

.f12-inv-tab.active {
    background: #fff;
    border-color: #ddd;
    border-bottom-color: #fff;
    font-weight: 600;
}

.f12-inv-tab .f12-inv-tab-badge {
    display: inline-block;
    background: #ddd;
    color: #555;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 4px;
}

.f12-inv-tab .f12-inv-tab-badge.f12-inv-badge-warn {
    background: #fcf0c3;
    color: #9a6700;
}

.f12-inv-tab .f12-inv-tab-badge.f12-inv-badge-error {
    background: #f8d7da;
    color: #721c24;
}

.f12-inv-panel {
    display: none;
}

.f12-inv-panel.active {
    display: block;
}

.f12-inv-pagination {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/**
 * CSV Import Preview Table
 */
.f12-csv-preview {
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow-x: auto;
}

.f12-csv-preview table {
    border-collapse: collapse;
    width: 100%;
    font-size: 12px;
}

.f12-csv-preview table th {
    background: #f0f0f1;
    font-weight: 600;
    padding: 8px 10px;
    text-align: left;
}

.f12-csv-preview table td {
    padding: 6px 10px;
    border-top: 1px solid #eee;
}

.f12-csv-preview-info {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/**
 * #43 Drag & Drop Upload Zone
 */
.f12-dropzone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    margin-bottom: 15px;
}

.f12-dropzone:hover,
.f12-dropzone-active {
    border-color: #258dc8;
    background: #f0f7ff;
}

.f12-dropzone p {
    margin: 8px 0 0;
    color: #666;
    font-size: 13px;
}

/**
 * Bulk Confirmation Dialog
 */
.f12-bulk-confirm {
    background: #fff8e1;
    border: 1px solid #f5c518;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
}

.f12-bulk-confirm-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

/**
 * Collapsible Sections
 */
.f12-collapsible-section {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 12px;
    background: #fff;
}

.f12-collapsible-header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 14px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    transition: background-color 0.15s;
}

.f12-collapsible-header:hover {
    background: #f8f9fa;
}

.f12-collapsible-header > .dashicons {
    color: #258dc8;
}

.f12-collapsible-arrow {
    margin-left: auto;
    transition: transform 0.2s;
    color: #999;
}

.f12-collapsible-open .f12-collapsible-arrow {
    transform: rotate(180deg);
}

.f12-collapsible-body {
    display: none;
    padding: 0 16px 16px;
}

/**
 * Overview sortable columns
 */
.f12-overview-table th.f12-sortable-col {
    cursor: pointer;
    user-select: none;
}

.f12-overview-table th.f12-sortable-col:hover {
    background: #e5e5e5;
}

.f12-overview-table th .f12-sort-indicator {
    font-size: 14px;
    vertical-align: middle;
    margin-left: 2px;
    color: #999;
}

.f12-overview-table th.f12-sort-active .f12-sort-indicator {
    color: #1d2327;
}

/**
 * Section spacing (replaces inline margin-top styles)
 */
.f12-section-title {
    margin-top: 30px;
    margin-bottom: 15px;
}

.f12-section-tablenav {
    margin-top: 15px;
}

/**
 * Feature Section Cards
 */
.f12-feature-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px 24px;
    margin-top: 24px;
}

.f12-feature-section:first-of-type {
    margin-top: 0;
}

.f12-feature-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}

.f12-feature-section-header .dashicons {
    color: #258dc8;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.f12-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.f12-feature-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.f12-feature-item .dashicons {
    color: #666;
    flex-shrink: 0;
}

.f12-feature-item-info {
    flex: 1;
}

.f12-feature-item-info label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.f12-feature-item-info p {
    margin: 2px 0 0;
    font-size: 12px;
    color: #666;
}

.f12-feature-item .f12-toggle {
    flex-shrink: 0;
}

.f12-feature-sub-settings {
    margin: 0;
    padding: 12px 16px 12px 46px;
    border-top: 1px dashed #e0e0e0;
    background: #f9f9f9;
}
.f12-feature-sub-settings label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 4px;
}
.f12-feature-sub-settings input[type="text"] {
    width: 100%;
    max-width: 360px;
    padding: 6px 10px;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
}
.f12-feature-sub-settings .description {
    font-size: 12px;
    color: #999;
    margin: 4px 0 0;
}

.f12-feature-status {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    flex-shrink: 0;
}

.f12-feature-status.active {
    background: #00a32a;
}

/**
 * Save Button Loading State
 */
.f12-save-btn {
    position: relative;
    min-width: 100px;
    transition: opacity 0.2s;
}

.f12-save-btn.f12-saving {
    pointer-events: none;
    opacity: 0.7;
}

.f12-save-btn.f12-saving .f12-save-label {
    visibility: hidden;
}

.f12-save-btn .f12-save-spinner {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: f12-spin 0.6s linear infinite;
}

.f12-save-btn.f12-saving .f12-save-spinner {
    display: block;
}

.f12-save-btn.f12-saved {
    background-color: #00a32a !important;
    border-color: #00a32a !important;
}

.f12-save-btn.f12-saved .f12-save-label::after {
    content: " \2713";
}

@keyframes f12-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/**
 * Toast Notifications
 */
.f12-toast-container {
    position: fixed;
    top: 42px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.f12-toast {
    pointer-events: auto;
    background: #fff;
    border-left: 4px solid #258dc8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 12px 16px;
    font-size: 13px;
    min-width: 250px;
    max-width: 400px;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.f12-toast.f12-toast-show {
    transform: translateX(0);
    opacity: 1;
}

.f12-toast.f12-toast-hide {
    transform: translateX(120%);
    opacity: 0;
}

.f12-toast.f12-toast-success {
    border-left-color: #00a32a;
}

.f12-toast.f12-toast-error,
.f12-toast.f12-toast-danger {
    border-left-color: #d63638;
}

.f12-toast.f12-toast-warning {
    border-left-color: #dba617;
}

/**
 * Smart Rules Table
 */

/* Smart Rules Filter Tabs (matching inventory check style) */
.f12-rules-filter-bar {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.f12-rules-filter-bar .f12-filter-sep {
    width: 1px;
    height: 20px;
    background: #ddd;
    margin: 0 4px;
    align-self: center;
    margin-bottom: 5px;
}

.f12-rules-filter-bar .f12-filter-tab {
    padding: 10px 16px;
    cursor: pointer;
    border: 1px solid transparent;
    border-bottom: none;
    margin-bottom: -1px;
    background: none;
    font-size: 13px;
    border-radius: 4px 4px 0 0;
    transition: background-color 0.15s;
    white-space: nowrap;
    color: #50575e;
}

.f12-rules-filter-bar .f12-filter-tab:hover {
    background: #f0f0f1;
}

.f12-rules-filter-bar .f12-filter-tab.active {
    background: #fff;
    border-color: #ddd;
    border-bottom-color: #fff;
    font-weight: 600;
    color: #1d2327;
}

.f12-rules-filter-bar .f12-filter-tab .f12-filter-tab-badge {
    display: inline-block;
    background: #ddd;
    color: #555;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 4px;
}

.f12-rules-filter-bar .f12-filter-count {
    color: #666;
    font-size: 13px;
    margin-left: auto;
    padding: 10px 0;
    margin-bottom: -1px;
}

/* Floating Bulk Action Bar */
.f12-bulk-floating {
    display: none;
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 10px 16px;
    margin: 0 -20px -20px;
    align-items: center;
    gap: 10px;
    animation: f12-bulk-slide-in 0.25s ease;
}

.f12-bulk-floating.visible {
    display: flex;
}

@keyframes f12-bulk-slide-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.f12-bulk-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #007aff;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.f12-bulk-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.f12-bulk-pill {
    padding: 6px 16px;
    border: 1px solid #d2d2d7;
    background: #fff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #1d1d1f;
}

.f12-bulk-pill:hover {
    background: #f5f5f7;
    border-color: #c0c0c5;
}

.f12-bulk-pill.f12-bulk-delete {
    color: #ff3b30;
    border-color: rgba(255, 59, 48, 0.3);
}

.f12-bulk-pill.f12-bulk-delete:hover {
    background: #fff5f5;
    border-color: #ff3b30;
}

/* Apple-style Pagination */
.f12-rules-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 8px 0;
}

.f12-rules-pagination:empty {
    display: none;
}

.f12-page-btn {
    padding: 6px 14px;
    border: 1px solid #d2d2d7;
    background: #fff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #1d1d1f;
}

.f12-page-btn:hover:not(:disabled) {
    background: #f5f5f7;
    border-color: #c0c0c5;
}

.f12-page-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.f12-page-indicator {
    font-size: 13px;
    font-weight: 500;
    color: #86868b;
    padding: 0 8px;
    min-width: 60px;
    text-align: center;
}

/* Icon Action Buttons */
.f12-rule-actions-toolbar {
    display: inline-flex;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.f12-rule-actions-toolbar .f12-action-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 30px;
    border: none;
    border-right: 1px solid #e8e8ed;
    background: none;
    cursor: pointer;
    color: #636366;
    transition: background 0.15s, color 0.15s;
    padding: 0;
    text-decoration: none;
    position: relative;
}

.f12-rule-actions-toolbar .f12-action-icon-btn:last-child {
    border-right: none;
}

.f12-rule-actions-toolbar .f12-action-icon-btn:hover {
    background: #f5f5f7;
    color: #1d1d1f;
}

.f12-rule-actions-toolbar .f12-action-icon-btn.f12-action-icon-delete:hover {
    background: #fff5f5;
    color: #ff3b30;
}

.f12-rule-actions-toolbar .f12-action-icon-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Tooltip for icon buttons */
.f12-action-icon-btn[title] {
    position: relative;
}

.f12-action-icon-btn::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1d2327;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 20;
}

.f12-action-icon-btn:hover::after {
    opacity: 1;
}

/* Page transition for pagination rows */
#f12-rules-table tbody tr {
    transition: opacity 0.15s ease;
}

#f12-rules-table {
    border-collapse: collapse;
}

#f12-rules-table th {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

#f12-rules-table td {
    vertical-align: middle;
}

#f12-rules-table tbody tr:hover {
    background: #f0f6fc;
}

/* Condition pills */
.f12-rule-condition {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f0f0f1;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 12px;
    line-height: 1.4;
    margin: 2px 0;
    white-space: nowrap;
}

.f12-rule-condition-field {
    font-weight: 600;
    color: #1d2327;
}

.f12-rule-condition-operator {
    color: #757575;
}

.f12-rule-condition-value {
    color: #2271b1;
    font-weight: 500;
}

.f12-rule-condition-logic {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #258dc8;
    padding: 0 4px;
    text-transform: uppercase;
}

.f12-rule-condition-always {
    color: #757575;
    font-style: italic;
    font-size: 12px;
}

/* Accessory list in table */
.f12-rule-accessories {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 250px;
}

.f12-rule-accessory-tag {
    display: inline-block;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 3px;
    padding: 2px 8px;
    font-size: 12px;
    line-height: 1.5;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Status badge */
.f12-rule-status {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    line-height: 1.4;
}

.f12-rule-status-enabled {
    background: #edfaef;
    color: #00a32a;
}

.f12-rule-status-disabled {
    background: #f0f0f1;
    color: #757575;
}

/* Type badge */
.f12-rule-type {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    line-height: 1.4;
}

.f12-rule-type-optional {
    background: #e7f5fe;
    color: #2271b1;
}

.f12-rule-type-required {
    background: #fef0e7;
    color: #b95a00;
}

/* Row actions */
.f12-rule-actions {
    display: flex;
    gap: 4px;
    white-space: nowrap;
    align-items: center;
}

.f12-rule-actions .button-small {
    padding: 0 8px;
    min-height: 28px;
    line-height: 26px;
}

.f12-rule-actions .f12-action-delete {
    color: #b32d2e;
    border-color: #b32d2e;
}

.f12-rule-actions .f12-action-delete:hover {
    background: #b32d2e;
    color: #fff;
    border-color: #b32d2e;
}

/* Priority badge */
.f12-rule-priority {
    display: inline-block;
    background: #f0f0f1;
    color: #50575e;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/**
 * Query Builder (Smart Rules)
 */
.f12-query-builder {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    background: #fafafa;
}

.f12-condition-card {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    position: relative;
}

.f12-condition-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.f12-condition-value-field {
    flex: 2;
}

.f12-condition-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #999;
}

.f12-condition-select,
.f12-condition-input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
}

.f12-condition-select:focus,
.f12-condition-input:focus {
    border-color: #258dc8;
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 141, 200, 0.15);
}

.f12-condition-remove {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    border-radius: 4px;
    flex-shrink: 0;
    align-self: flex-end;
    margin-bottom: 2px;
}

.f12-condition-remove:hover {
    color: #d63638;
    background: #fef0f0;
}

.f12-condition-logic-badge {
    display: flex;
    justify-content: center;
    padding: 4px 0;
}

.f12-logic-text {
    display: inline-block;
    background: #258dc8;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

/**
 * Layout Preview Cards
 */
.f12-layout-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 8px;
}

.f12-layout-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.f12-layout-card:hover {
    border-color: #258dc8;
    box-shadow: 0 2px 8px rgba(37, 141, 200, 0.15);
}

.f12-layout-card--active {
    border-color: #258dc8;
    box-shadow: 0 0 0 1px #258dc8;
    background: #f0f7ff;
}

.f12-layout-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.f12-layout-card-header .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #258dc8;
}

.f12-layout-card-title {
    font-weight: 600;
    font-size: 13px;
}

.f12-layout-card-preview {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 10px;
    min-height: 60px;
}

.f12-layout-card-desc {
    font-size: 11px;
    color: #666;
    margin: 8px 0 0;
    line-height: 1.4;
}

/* Grid preview */
.f12-lp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.f12-lp-item {
    text-align: center;
}

.f12-lp-img {
    width: 100%;
    height: 28px;
    background: #ddd;
    border-radius: 2px;
    margin-bottom: 4px;
}

.f12-lp-line {
    height: 4px;
    background: #ccc;
    border-radius: 2px;
    margin-bottom: 3px;
}

.f12-lp-line.short {
    width: 60%;
}

/* List preview */
.f12-lp-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.f12-lp-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.f12-lp-img-sm {
    width: 24px;
    height: 24px;
    background: #ddd;
    border-radius: 2px;
    flex-shrink: 0;
}

.f12-lp-lines {
    flex: 1;
}

/* Checkbox/FBT preview */
.f12-lp-fbt {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.f12-lp-check {
    display: flex;
    align-items: center;
    gap: 6px;
}

.f12-lp-cb {
    width: 10px;
    height: 10px;
    border: 2px solid #999;
    border-radius: 2px;
    flex-shrink: 0;
}

.f12-lp-cb.checked {
    background: #258dc8;
    border-color: #258dc8;
}

.f12-lp-total {
    border-top: 1px solid #ddd;
    padding-top: 4px;
    margin-top: 2px;
}

/**
 * Admin Mobile Responsive
 */
@media (max-width: 782px) {
    .forge12-plugin {
        padding-right: 0;
    }

    .forge12-plugin-header {
        min-height: 60px;
        padding: 10px 15px;
    }

    .forge12-plugin-header img {
        width: 180px;
    }

    .f12-sidebar-toggle {
        display: block;
    }

    .forge12-plugin-body {
        flex-flow: column nowrap;
    }

    .forge12-plugin-menu {
        display: none;
        flex: none;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        min-height: auto;
    }

    .forge12-plugin-menu.f12-sidebar-open {
        display: block;
    }

    .forge12-plugin-content {
        flex-flow: column nowrap;
        padding: 15px;
    }

    .forge12-plugin-content .forge12-plugin-content-main {
        flex: 1 1 100%;
        padding-right: 0;
    }

    .forge12-plugin-content .forge12-plugin-content-sidebar {
        flex: 1 1 100%;
        margin-top: 20px;
    }

    .forge12-plugin-content .option {
        flex-flow: column nowrap;
    }

    .forge12-plugin-content .option .label {
        flex: none;
        padding-top: 0;
        padding-bottom: 5px;
        font-weight: 600;
    }

    .forge12-plugin-content .option .input {
        flex: none;
    }

    .forge12-plugin-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .forge12-plugin-popup {
        width: 90%;
        left: 5%;
    }

    .f12-feature-item {
        flex-wrap: wrap;
    }

    .f12-feature-item-info {
        flex: 1 1 calc(100% - 80px);
    }

    .f12-toast-container {
        right: 10px;
        left: 10px;
    }

    .f12-toast {
        min-width: auto;
        max-width: none;
    }

    .f12-upsell-cards {
        grid-template-columns: 1fr;
    }
}

/**
 * #38 Pro-Upsell Feature Cards
 */
.f12-upsell-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.f12-upsell-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 14px;
}

.f12-upsell-card > .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #667eea;
    flex-shrink: 0;
    margin-top: 2px;
}

.f12-upsell-card-info strong {
    display: block;
    font-size: 13px;
    margin-bottom: 2px;
}

.f12-upsell-card-info p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

/**
 * #39 Compact option descriptions as tooltips
 */
.f12-option-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
    color: #999;
    font-size: 16px;
    vertical-align: middle;
    margin-left: 4px;
}

.f12-option-tooltip .f12-tooltip-text {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1d2327;
    color: #fff;
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 4px;
    white-space: normal;
    width: 250px;
    z-index: 10;
    margin-bottom: 6px;
    font-weight: normal;
    line-height: 1.4;
}

.f12-option-tooltip:hover .f12-tooltip-text,
.f12-option-tooltip:focus .f12-tooltip-text {
    display: block;
}

/**
 * #40 Compact Header
 */
.forge12-plugin-header {
    min-height: 60px;
    padding: 12px 20px;
}

.forge12-plugin-header .forge12-plugin-header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.forge12-plugin-header-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.forge12-plugin-header-meta a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 12px;
}

.forge12-plugin-header-meta a:hover {
    color: #fff;
}

.forge12-plugin-header-version {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
}

/**
 * #41 Sidebar auto-hide when empty
 */
.forge12-plugin-content-sidebar:empty {
    display: none;
}

.forge12-plugin-content-sidebar:empty + .forge12-plugin-content-main,
.forge12-plugin-content-sidebar:empty ~ .forge12-plugin-content-main {
    flex: 1 1 100%;
    padding-right: 0;
}

/**
 * #49 Admin Accessibility: Focus rings
 */
.f12-toggle input:focus-visible + .f12-toggle-slider {
    box-shadow: 0 0 0 3px rgba(37, 141, 200, 0.3);
}

.f12-sidebar-item a:focus-visible {
    outline: 2px solid #258dc8;
    outline-offset: -2px;
    background-color: #eef3f7;
}

.f12-inv-tab:focus-visible,
.f12-layout-card:focus-visible,
.f12-collapsible-header:focus-visible {
    outline: 2px solid #258dc8;
    outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a.button:focus-visible {
    outline: 2px solid #258dc8;
    outline-offset: 1px;
}

/**
 * #49 Skip link
 */
.f12-skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 100000;
    padding: 8px 16px;
    background: #258dc8;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    border-radius: 0 0 4px 0;
}

.f12-skip-link:focus {
    position: fixed;
    left: 0;
    top: 0;
    width: auto;
    height: auto;
    overflow: visible;
}

/**
 * Pro Badge & Locked States
 */
.f12-pro-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    border-radius: 10px;
    line-height: 1.4;
    vertical-align: middle;
    text-decoration: none;
}

.f12-pro-badge:hover {
    background: linear-gradient(135deg, #6d28d9, #5b21b6);
    color: #fff;
}

.f12-pro-nav-badge {
    display: inline-block;
    padding: 1px 5px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: middle;
    line-height: 1.4;
}

.f12-pro-locked-wrapper {
    position: relative;
    opacity: 0.55;
    pointer-events: none;
    user-select: none;
}

.f12-pro-locked-wrapper input,
.f12-pro-locked-wrapper select,
.f12-pro-locked-wrapper textarea,
.f12-pro-locked-wrapper button[type="submit"] {
    pointer-events: none !important;
}

.f12-pro-locked-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(2px);
    z-index: 10;
    pointer-events: auto;
    border-radius: 8px;
}

.f12-pro-locked-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: transform 0.15s, box-shadow 0.15s;
}

.f12-pro-locked-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
    color: #fff;
}

.f12-layout-card.f12-pro-locked {
    opacity: 0.55;
    cursor: not-allowed;
    position: relative;
}

.f12-layout-card.f12-pro-locked .f12-pro-badge {
    position: absolute;
    top: 8px;
    right: 8px;
}

.f12-layout-card.f12-pro-locked:hover {
    border-color: #7c3aed;
    opacity: 0.75;
    box-shadow: none;
}

/* Disabled layout cards (e.g. when inline position is selected) */
.f12-layout-card.f12-layout-card--disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: auto;
}

.f12-layout-card.f12-layout-card--disabled:hover {
    border-color: #ddd;
    box-shadow: none;
    transform: none;
}

.f12-layout-card.f12-layout-card--disabled.f12-layout-card--active {
    border-color: #ddd;
    box-shadow: none;
}

/* Layout notice banner */
.f12-layout-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
    color: #6d4c00;
}

.f12-layout-notice .dashicons {
    flex-shrink: 0;
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    color: #f9a825;
}

.f12-feature-item.f12-pro-locked {
    opacity: 0.55;
}

.f12-feature-item.f12-pro-locked .f12-toggle {
    pointer-events: none;
}

.f12-feature-item.f12-pro-locked .f12-pro-badge {
    margin-left: auto;
    margin-right: 12px;
}

.f12-pro-placeholder-page {
    position: relative;
    min-height: 400px;
}

.f12-pro-placeholder-page .f12-pro-locked-wrapper {
    min-height: 300px;
}

.f12-stat-card.f12-pro-locked {
    opacity: 0.5;
    position: relative;
}

.f12-stat-card.f12-pro-locked .f12-pro-badge {
    position: absolute;
    top: 8px;
    right: 8px;
}

.f12-quick-actions .button.f12-pro-locked {
    opacity: 0.6;
    position: relative;
}

.f12-quick-actions .button.f12-pro-locked .f12-pro-nav-badge {
    margin-left: 2px;
}

.f12-pro-metabox-locked {
    position: relative;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
}

.f12-pro-metabox-locked .f12-pro-locked-overlay {
    border-radius: 4px;
}

/**
 * Design Settings Page
 */

/* Preset Buttons */
.f12-design-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.f12-preset-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 100px;
}

.f12-preset-btn:hover {
    border-color: #258dc8;
    box-shadow: 0 2px 8px rgba(37, 141, 200, 0.15);
}

.f12-preset-preview {
    display: flex;
    gap: 4px;
}

.f12-preset-swatch {
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.f12-preset-label {
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

/* Color Grid */
.f12-color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.f12-color-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.f12-color-field label {
    font-weight: 600;
    font-size: 13px;
    color: #555;
}

/* Range Field */
.f12-range-field {
    display: flex;
    align-items: center;
    gap: 12px;
}

.f12-range-field input[type=range] {
    flex: 1;
    max-width: 300px;
}

.f12-range-value {
    font-weight: 600;
    font-size: 14px;
    min-width: 40px;
}

/* Design Preview */
.f12-design-preview {
    --dp-primary: #258dc8;
    --dp-primary-hover: #1a6fa0;
    --dp-primary-text: #fff;
    --dp-bg: #fff;
    --dp-border: #e0e0e0;
    --dp-text: #333;
    --dp-price: #111;
    --dp-badge: #4caf50;
    --dp-radius: 8px;
    --dp-shadow: 0 2px 8px rgba(0,0,0,0.08);

    --dp-container-padding: 24px;
    --dp-container-margin: 0;
    --dp-container-border: none;

    --dp-card-padding: 0;
    --dp-card-margin: 0;
    --dp-card-border: 1px solid var(--dp-border);

    --dp-heading-font-size: 18px;
    --dp-heading-font-weight: 600;
    --dp-heading-font-family: inherit;
    --dp-heading-padding: 0 0 15px 0;
    --dp-heading-margin: 0;
    --dp-heading-border: none;

    --dp-desc-font-size: 13px;
    --dp-desc-font-weight: 400;
    --dp-desc-font-family: inherit;
    --dp-desc-padding: 0;
    --dp-desc-margin: 0 0 16px 0;
    --dp-desc-border: none;

    --dp-title-font-size: 14px;
    --dp-title-font-weight: 600;
    --dp-title-font-family: inherit;
    --dp-title-padding: 10px 12px 4px 12px;
    --dp-title-margin: 0;
    --dp-title-border: none;

    --dp-price-font-size: 15px;
    --dp-price-font-weight: 700;
    --dp-price-font-family: inherit;
    --dp-price-padding: 4px 10px;
    --dp-price-margin: 0;
    --dp-price-border: none;

    --dp-btn-font-size: 13px;
    --dp-btn-font-weight: 600;
    --dp-btn-font-family: inherit;
    --dp-btn-padding: 6px 12px;
    --dp-btn-margin: 8px 12px 0 12px;
    --dp-btn-border: none;

    display: block;
    padding: var(--dp-container-padding);
    margin: var(--dp-container-margin);
    background: var(--dp-bg);
    border: var(--dp-container-border);
    border-radius: 8px;
    outline: 1px dashed #ccc;
    outline-offset: 4px;
}

.f12-dp-heading {
    font-size: var(--dp-heading-font-size);
    font-weight: var(--dp-heading-font-weight);
    font-family: var(--dp-heading-font-family);
    color: var(--dp-heading-color, var(--dp-text));
    padding: var(--dp-heading-padding);
    margin: var(--dp-heading-margin);
    border: var(--dp-heading-border);
}

.f12-dp-desc {
    font-size: var(--dp-desc-font-size);
    font-weight: var(--dp-desc-font-weight);
    font-family: var(--dp-desc-font-family);
    color: var(--dp-desc-color, var(--dp-text));
    padding: var(--dp-desc-padding);
    margin: var(--dp-desc-margin);
    border: var(--dp-desc-border);
    opacity: 0.75;
}

.f12-dp-cards {
    display: flex;
    gap: 16px;
}

.f12-dp-card {
    position: relative;
    flex: 1;
    max-width: 200px;
    background: var(--dp-bg);
    border: var(--dp-card-border);
    border-radius: var(--dp-radius);
    box-shadow: var(--dp-shadow);
    overflow: hidden;
    padding: var(--dp-card-padding);
    padding-bottom: 12px;
    margin: var(--dp-card-margin);
}

.f12-dp-image {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

.f12-dp-title {
    padding: var(--dp-title-padding);
    margin: var(--dp-title-margin);
    border: var(--dp-title-border);
    font-size: var(--dp-title-font-size) !important;
    font-weight: var(--dp-title-font-weight) !important;
    font-family: var(--dp-title-font-family) !important;
    color: var(--dp-title-color, var(--dp-text));
}

.f12-dp-price {
    padding: var(--dp-price-padding);
    margin: var(--dp-price-margin);
    border: var(--dp-price-border);
    font-size: var(--dp-price-font-size) !important;
    font-weight: var(--dp-price-font-weight) !important;
    font-family: var(--dp-price-font-family) !important;
    color: var(--dp-price-color, var(--dp-price));
}

.f12-dp-button {
    display: block;
    margin: var(--dp-btn-margin);
    padding: var(--dp-btn-padding);
    box-sizing: border-box;
    background: var(--dp-primary);
    color: var(--dp-primary-text);
    border: var(--dp-btn-border, none);
    border-radius: var(--dp-radius);
    font-size: var(--dp-btn-font-size) !important;
    font-weight: var(--dp-btn-font-weight) !important;
    font-family: var(--dp-btn-font-family) !important;
    cursor: pointer;
    transition: background 0.2s;
}

.f12-dp-button:hover {
    background: var(--dp-primary-hover);
}

.f12-dp-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--dp-badge);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 3px;
    z-index: 1;
}

.f12-reset-design-btn {
    margin-top: 8px;
}

@media (max-width: 600px) {
    .f12-dp-cards {
        flex-direction: column;
    }

    .f12-dp-card {
        max-width: 100%;
    }

    .f12-color-grid {
        grid-template-columns: 1fr;
    }

    .f12-design-presets {
        flex-direction: column;
    }
}

/**
 * Modal Preview (Design Settings)
 */
.f12-modal-preview {
    position: relative;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    min-height: 200px;
}

.f12-mp-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    position: relative;
    padding: 30px;
}

.f12-mp-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--mp-overlay-color, #000);
    opacity: var(--mp-overlay-opacity, 0.6);
}

.f12-mp-modal {
    position: relative;
    z-index: 1;
    background: var(--mp-bg, #fff);
    border-radius: var(--mp-radius, 8px);
    max-width: var(--mp-max-width, 700px);
    width: 100%;
    padding: var(--mp-modal-padding, 30px);
    border: var(--mp-modal-border, none);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.f12-mp-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: default;
    color: var(--mp-text, #666);
    line-height: 1;
    padding: var(--mp-close-padding, 0);
    border-bottom: var(--mp-close-border, none);
}

.f12-mp-body {
    display: flex;
    gap: 20px;
}

.f12-mp-image {
    flex: 0 0 120px;
    height: 120px;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    border-radius: var(--mp-radius, 4px);
}

.f12-mp-info {
    flex: 1;
}

.f12-mp-title {
    font-size: var(--mp-title-font-size, 22px);
    font-weight: var(--mp-title-font-weight, 700);
    font-family: var(--mp-title-font-family, inherit);
    color: var(--mp-title-color, var(--mp-text, #333));
    padding: var(--mp-title-padding, 0);
    margin: var(--mp-title-margin, 0 0 10px 0);
    border: var(--mp-title-border, none);
}

.f12-mp-rating {
    color: #f0c040;
    font-size: 14px;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.f12-mp-badge {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 12px;
    font-weight: 600;
    padding: var(--mp-badge-padding, 3px 8px);
    margin: var(--mp-badge-margin, 0 0 8px 0);
    border-radius: 3px;
    border: var(--mp-badge-border, none);
}

.f12-mp-desc {
    font-size: var(--mp-desc-font-size, 14px);
    font-weight: var(--mp-desc-font-weight, 400);
    font-family: var(--mp-desc-font-family, inherit);
    color: var(--mp-desc-color, var(--mp-text, #555));
    padding: var(--mp-desc-padding, 0);
    margin: var(--mp-desc-margin, 0 0 15px 0);
    border: var(--mp-desc-border, none);
}

.f12-mp-price {
    font-size: var(--mp-price-font-size, 20px);
    font-weight: var(--mp-price-font-weight, 600);
    font-family: var(--mp-price-font-family, inherit);
    color: var(--mp-price-color, var(--mp-price, #111));
    padding: var(--mp-price-padding, 0);
    margin: var(--mp-price-margin, 0 0 20px 0);
    border: var(--mp-price-border, none);
}

.f12-mp-actions {
    display: flex;
    gap: 10px;
}

.f12-mp-button {
    display: inline-block;
    font-size: var(--mp-button-font-size, 14px);
    font-weight: var(--mp-button-font-weight, 600);
    font-family: var(--mp-button-font-family, inherit);
    padding: var(--mp-button-padding, 8px 20px);
    margin: var(--mp-button-margin, 0);
    border: var(--mp-button-border, none);
    border-radius: var(--mp-radius, 4px);
    cursor: default;
}

.f12-mp-button-primary {
    background: var(--mp-primary, #258dc8);
    color: var(--mp-button-color, var(--mp-primary-text, #fff));
}

.f12-mp-button-secondary {
    background: var(--mp-bg, #f0f0f0);
    color: var(--mp-button-color, var(--mp-text, #333));
    border: 1px solid var(--mp-border, #e0e0e0) !important;
}

/**
 * Collapsible Section
 */
.f12-collapsible-section {
    margin: 20px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.f12-collapsible-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 14px 16px;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: left;
    transition: background 0.2s;
}

.f12-collapsible-toggle:hover {
    background: #eef1f4;
}

.f12-collapsible-arrow {
    margin-left: auto;
    transition: transform 0.2s;
}

.f12-collapsible-content {
    padding: 16px;
    border-top: 1px solid #e0e0e0;
}

/**
 * Display Options
 */
.f12-display-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.f12-display-option:last-of-type {
    border-bottom: none;
}

.f12-display-label {
    font-size: 14px;
    color: #333;
}

/**
 * Element-specific Design Settings
 */
.f12-element-section {
    margin-bottom: 12px;
}

.f12-element-section .f12-collapsible-content {
    padding: 16px;
    border-top: 1px solid #e0e0e0;
}

.f12-element-field {
    margin-bottom: 16px;
}

.f12-element-field > label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
    color: #333;
}

.f12-element-field .description {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* 4-value spacing input (top, right, bottom, left) */
.f12-spacing-input {
    display: inline-grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    max-width: 400px;
}

.f12-spacing-input-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.f12-spacing-input-item input.f12-spacing-value {
    width: 70px;
    text-align: center;
    padding: 4px 6px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.f12-spacing-input-item input.f12-spacing-value:focus {
    border-color: #258dc8;
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 141, 200, 0.15);
}

.f12-spacing-label {
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Font selects */
.f12-font-select {
    min-width: 180px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.f12-font-select:focus {
    border-color: #258dc8;
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 141, 200, 0.15);
}


@media (max-width: 600px) {
    .f12-spacing-input {
        grid-template-columns: repeat(2, 1fr);
    }
}

/**
 * Accessory Picker: unified search + sortable list
 */
.f12-accessory-picker .select2-selection__choice { display: none !important; }
.f12-accessory-picker .select2-search--inline { width: 100% !important; }
.f12-accessory-picker .select2-search__field { width: 100% !important; }
.f12-accessory-picker .select2-container { margin-bottom: 10px; }

.f12-accessory-picker .f12-sortable-list {
    margin: 0;
}

.f12-sortable-item .f12-remove-item {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 18px;
    padding: 2px 6px;
    border-radius: 3px;
    flex-shrink: 0;
    line-height: 1;
}

.f12-sortable-item .f12-remove-item:hover {
    color: #d63638;
    background: #fef0f0;
}

.f12-sortable-item--loading {
    opacity: 0.6;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 8px,
        rgba(0, 122, 255, 0.03) 8px,
        rgba(0, 122, 255, 0.03) 16px
    ) !important;
}

.f12-sortable-list:empty::after {
    content: attr(data-empty-text);
    display: block;
    padding: 20px;
    text-align: center;
    color: #86868b;
    font-size: 13px;
    border: 1px dashed #d2d2d7;
    border-radius: 8px;
    background: #fafafa;
}

/**
 * WooCommerce Product Data Tab: Accessories
 */
#woocommerce-product-data ul.wc-tabs li.f12_accessories_options a::before {
    font-family: dashicons;
    content: "\f111";
}

.f12-tab-panel {
    padding: 20px 24px !important;
}

/**
 * Panel Sections (Apple-style cards)
 */
.f12-panel-section {
    background: #fff;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}

.f12-panel-section:last-child {
    margin-bottom: 0;
}

.f12-panel-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: #f5f5f7;
    border-bottom: 1px solid #d2d2d7;
}

.f12-panel-section-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.01em;
}

.f12-panel-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 7px;
    background: #007aff;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    line-height: 1;
}

.f12-panel-section-body {
    padding: 20px;
}

/**
 * Panel Fields
 */
.f12-panel-field {
    margin-bottom: 16px;
}

.f12-panel-field:last-child {
    margin-bottom: 0;
}

.f12-tab-panel .f12-panel-field > label {
    display: block;
    float: none;
    width: auto;
    margin: 0 0 6px 0;
    padding: 0;
    font-size: 12px;
    font-weight: 600;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.f12-tab-panel .f12-panel-field input[type="text"],
.f12-tab-panel .f12-panel-field input[type="number"],
.f12-tab-panel .f12-panel-field textarea,
.f12-tab-panel .f12-panel-field select:not(.wc-product-search) {
    width: 100% !important;
    max-width: 100%;
    padding: 8px 12px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 14px;
    color: #1d1d1f;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
    float: none;
    margin: 0;
}

.f12-tab-panel .f12-panel-field input[type="text"]:focus,
.f12-tab-panel .f12-panel-field input[type="number"]:focus,
.f12-tab-panel .f12-panel-field textarea:focus,
.f12-tab-panel .f12-panel-field select:focus {
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
    outline: none;
}

.f12-tab-panel .f12-panel-field input[type="text"]::placeholder,
.f12-tab-panel .f12-panel-field textarea::placeholder {
    color: #c7c7cc;
}

.f12-tab-panel .f12-panel-field textarea {
    resize: vertical;
    min-height: 60px;
}

.f12-panel-field-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #86868b;
    line-height: 1.4;
}

.f12-panel-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.f12-panel-field-row:last-child {
    margin-bottom: 0;
}

.f12-panel-field-row .f12-panel-field {
    margin-bottom: 0;
}

/**
 * Panel Info Banner
 */
.f12-panel-info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
    margin-top: 16px;
    background: #f5f5f7;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 12px;
    color: #636366;
    line-height: 1.5;
}

.f12-panel-info > .dashicons {
    flex-shrink: 0;
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-top: 1px;
    color: #86868b;
}

/**
 * Panel Section Locked (Pro upsell)
 */
.f12-panel-section--locked {
    border-color: #d2d2d7;
    opacity: 0.7;
}

.f12-panel-section--locked .f12-panel-section-header {
    background: #f5f5f7;
}

.f12-panel-section--locked .f12-pro-locked-wrapper {
    position: relative;
    pointer-events: none;
    user-select: none;
}

.f12-panel-section--locked .f12-pro-locked-overlay {
    border-radius: 0;
}

/**
 * Sortable items Apple-style refinement
 */
.f12-tab-panel .f12-sortable-list {
    margin: 0;
    padding: 0;
}

.f12-tab-panel .f12-sortable-list .f12-sortable-item {
    border-radius: 8px;
    border-color: #e5e5ea;
    padding: 10px 14px;
    margin-bottom: 6px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.f12-tab-panel .f12-sortable-list .f12-sortable-item:last-child {
    margin-bottom: 0;
}

.f12-tab-panel .f12-sortable-list .f12-sortable-item:hover {
    border-color: #007aff;
    box-shadow: 0 1px 4px rgba(0, 122, 255, 0.1);
}

.f12-tab-panel .f12-sortable-list .f12-sortable-item.sortable-ghost {
    background: #f0f5ff;
    border-color: #007aff;
}

.f12-tab-panel .f12-sortable-list .f12-sortable-item img {
    border-radius: 6px;
}

.f12-tab-panel .f12-sortable-list .f12-sortable-item .f12-drag-handle {
    color: #c7c7cc;
}

.f12-tab-panel .f12-sortable-list .f12-sortable-item .f12-remove-item {
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 16px;
    color: #c7c7cc;
    transition: all 0.15s;
}

.f12-tab-panel .f12-sortable-list .f12-sortable-item .f12-remove-item:hover {
    color: #ff3b30;
    background: rgba(255, 59, 48, 0.08);
}

/**
 * Select2 inside panel - Apple-style
 */
.f12-tab-panel .f12-accessory-picker .select2-container--default .select2-selection--multiple {
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    min-height: 40px;
    padding: 4px 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.f12-tab-panel .f12-accessory-picker .select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.f12-tab-panel .f12-accessory-picker .select2-search__field::placeholder {
    color: #c7c7cc;
}