/**
 * DevForge Admin Cleaner
 * True macOS Settings Style
 */

.devfadto-settings-wrap {
    max-width: 680px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    color: #1d1d1f;
}

.devfadto-settings-wrap * {
    box-sizing: border-box;
}

/* Header */
.devfadto-settings-wrap h1 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.devfadto-settings-wrap h1 .dashicons {
    display: none;
}

.devfadto-version {
    font-size: 11px;
    font-weight: 400;
    color: #86868b;
}

.devfadto-pro-badge {
    font-size: 10px;
    font-weight: 500;
    background: #1d1d1f;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
}

.devfadto-pro-badge-small {
    font-size: 9px;
    background: #1d1d1f;
    color: #fff;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 5px;
    vertical-align: middle;
}

/* Tabs - Segmented Control */
.devfadto-tabs {
    display: inline-flex;
    background: #e8e8ed;
    border-radius: 8px;
    padding: 2px;
    margin-bottom: 20px;
    gap: 0;
    border: none;
}

.devfadto-tabs .nav-tab {
    background: transparent;
    border: none;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    color: #1d1d1f;
    border-radius: 6px;
    margin: 0;
    cursor: pointer;
    transition: background 0.15s;
}

.devfadto-tabs .nav-tab:hover {
    background: rgba(0,0,0,0.05);
}

.devfadto-tabs .nav-tab-active,
.devfadto-tabs .nav-tab-active:hover {
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Content Box */
.devfadto-tab-content {
    background: #fff;
    border: 1px solid #d1d1d6;
    border-radius: 10px;
    overflow: hidden;
}

/* Section */
.devfadto-settings-section {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e5ea;
}

.devfadto-settings-section:last-child {
    border-bottom: none;
}

.devfadto-settings-section h2 {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #86868b;
    margin: 0 0 12px 0;
}

.devfadto-settings-section > p.description {
    display: none;
}

/* Row Item */
.devfadto-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e5e5ea;
}

.devfadto-row:last-child {
    border-bottom: none;
}

.devfadto-row-label {
    font-size: 14px;
    color: #1d1d1f;
}

.devfadto-row-label small {
    display: block;
    font-size: 11px;
    color: #86868b;
    margin-top: 2px;
}

/* Toggle Switch - iOS Style */
.devfadto-switch {
    position: relative;
    width: 51px;
    height: 31px;
    flex-shrink: 0;
}

.devfadto-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.devfadto-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #e9e9eb;
    border-radius: 31px;
    transition: 0.2s;
}

.devfadto-switch-slider:before {
    position: absolute;
    content: "";
    height: 27px;
    width: 27px;
    left: 2px;
    bottom: 2px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: 0.2s;
}

.devfadto-switch input:checked + .devfadto-switch-slider {
    background: #34c759;
}

.devfadto-switch input:checked + .devfadto-switch-slider:before {
    transform: translateX(20px);
}

/* Checkbox List */
.devfadto-checkbox-list {
    display: flex;
    flex-direction: column;
}

.devfadto-checkbox-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e5e5ea;
    cursor: pointer;
}

.devfadto-checkbox-item:last-child {
    border-bottom: none;
}

.devfadto-checkbox-item:hover {
    background: #f5f5f7;
    margin: 0 -20px;
    padding: 12px 20px;
}

.devfadto-checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #007aff;
}

.devfadto-checkbox-item span {
    flex: 1;
    font-size: 14px;
    margin-right: 12px;
}

/* Role Section */
.devfadto-role-block {
    margin-bottom: 16px;
}

.devfadto-role-block:last-child {
    margin-bottom: 0;
}

.devfadto-role-header {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #86868b;
    margin-bottom: 8px;
}

.devfadto-role-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.devfadto-role-grid label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    padding: 8px 10px;
    background: #f5f5f7;
    border-radius: 6px;
    cursor: pointer;
}

.devfadto-role-grid label:hover {
    background: #e8e8ed;
}

.devfadto-role-grid input {
    width: 16px;
    height: 16px;
    accent-color: #007aff;
}

/* Form Table */
.devfadto-settings-section .form-table {
    margin: 0;
}

.devfadto-settings-section .form-table th {
    width: 140px;
    padding: 12px 12px 12px 0;
    font-size: 14px;
    font-weight: 400;
    color: #1d1d1f;
}

.devfadto-settings-section .form-table td {
    padding: 12px 0;
}

.devfadto-settings-section input[type="text"],
.devfadto-settings-section input[type="url"],
.devfadto-settings-section input[type="number"],
.devfadto-settings-section select,
.devfadto-settings-section textarea {
    font-family: inherit;
    font-size: 14px;
    padding: 8px 12px;
    border: 1px solid #d1d1d6;
    border-radius: 6px;
    background: #fff;
}

.devfadto-settings-section input:focus,
.devfadto-settings-section textarea:focus,
.devfadto-settings-section select:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0,122,255,0.15);
}

.devfadto-settings-section input[type="color"] {
    width: 40px;
    height: 40px;
    padding: 2px;
    border-radius: 6px;
    border: 1px solid #d1d1d6;
    cursor: pointer;
}

/* Buttons */
.devfadto-settings-form .submit {
    padding: 16px 20px;
    margin: 0;
    background: #f5f5f7;
    border-top: 1px solid #e5e5ea;
}

.devfadto-settings-form .button-primary,
.devfadto-settings-wrap .button-primary {
    background: #007aff;
    border: none;
    border-radius: 6px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 500;
    height: auto;
    line-height: 1.4;
}

.devfadto-settings-form .button-primary:hover {
    background: #0056b3;
}

.devfadto-settings-wrap .button-secondary,
.devfadto-settings-wrap .button {
    background: #e5e5ea;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    color: #1d1d1f;
}

.devfadto-settings-wrap .button-secondary:hover {
    background: #d1d1d6;
}

/* Stats Grid */
.devfadto-stats-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.devfadto-stat-box {
    flex: 1;
    text-align: center;
    padding: 16px;
    background: #f5f5f7;
    border-radius: 8px;
}

.devfadto-stat-num {
    font-size: 28px;
    font-weight: 600;
    color: #1d1d1f;
    line-height: 1;
}

.devfadto-stat-label {
    font-size: 11px;
    color: #86868b;
    margin-top: 4px;
}

/* Action Buttons Grid */
.devfadto-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.devfadto-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f5f5f7;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #1d1d1f;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.devfadto-action-btn:hover {
    background: #e8e8ed;
}

.devfadto-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.devfadto-action-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #007aff;
}

/* Result Message */
.devfadto-result {
    margin-top: 12px;
    padding: 10px 14px;
    background: #f5f5f7;
    border-radius: 6px;
    font-size: 13px;
}

.devfadto-result.success {
    background: #d4edda;
    color: #155724;
}

.devfadto-result.error {
    background: #f8d7da;
    color: #721c24;
}

/* Activity Log */
.devfadto-log-list {
    max-height: 300px;
    overflow-y: auto;
}

.devfadto-log-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #e5e5ea;
    font-size: 13px;
}

.devfadto-log-item:last-child {
    border-bottom: none;
}

.devfadto-log-icon {
    width: 28px;
    height: 28px;
    background: #f5f5f7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.devfadto-log-icon .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #86868b;
}

.devfadto-log-text {
    flex: 1;
}

.devfadto-log-meta {
    font-size: 11px;
    color: #86868b;
}

/* Export/Import */
.devfadto-export-import-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.devfadto-ei-box {
    padding: 16px;
    background: #f5f5f7;
    border-radius: 8px;
}

.devfadto-ei-box h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.devfadto-ei-box p {
    font-size: 12px;
    color: #86868b;
    margin: 0 0 12px 0;
}

/* Pro Upsell */
.devfadto-pro-box {
    text-align: center;
    padding: 40px;
}

.devfadto-pro-box .dashicons-lock {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #86868b;
}

.devfadto-pro-box h2 {
    font-size: 18px;
    margin: 12px 0 6px 0;
}

.devfadto-pro-box > p {
    color: #86868b;
    margin-bottom: 20px;
}

.devfadto-pro-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    text-align: left;
    display: inline-block;
}

.devfadto-pro-list li {
    padding: 4px 0;
    font-size: 13px;
}

.devfadto-pro-box .button-hero {
    background: #1d1d1f;
    color: #fff;
    border: none;
    padding: 12px 28px;
    font-size: 14px;
    border-radius: 8px;
}

.devfadto-pro-box .button-hero:hover {
    background: #000;
}

/* Responsive */
@media (max-width: 600px) {
    .devfadto-tabs {
        display: flex;
        flex-wrap: wrap;
    }
    
    .devfadto-tabs .nav-tab {
        flex: 1 1 auto;
        text-align: center;
    }
    
    .devfadto-role-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .devfadto-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .devfadto-export-import-row {
        grid-template-columns: 1fr;
    }
    
    .devfadto-stats-row {
        flex-wrap: wrap;
    }
    
    .devfadto-stat-box {
        flex: 1 1 45%;
    }
}


/* Admin Menu Icon Scaling */
#toplevel_page_devforge-admin-toolkit .wp-menu-image img {
    width: 20px !important;
    height: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 1 !important;
    border-radius: 5px !important;
}
#toplevel_page_devforge-admin-toolkit .wp-menu-image {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
