/* Settings Page Container */
.bua-settings-wrap {
    max-width: 1100px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Header */
.bua-settings-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 25px 30px;
    background: linear-gradient(135deg, #e64d3d 0%, #f77163 100%);
    border-radius: 12px;
    margin-bottom: 20px;
}

.bua-settings-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    flex-shrink: 0;
}

.bua-settings-header-icon .dashicons {
    font-size: 30px;
    width: 30px;
    height: 30px;
    color: #fff;
}

.bua-settings-header-info h1 {
    margin: 0;
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
}

.bua-settings-header-info p {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
}

/* Navigation */
.bua-settings-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.bua-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #fff;
    border-radius: 8px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    font-size: 14px;
    border: 1px solid #e5e5e5;
    transition: all 0.2s ease;
}

.bua-nav-item:hover {
    color: #667eea;
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.bua-nav-item.active {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.bua-nav-item .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Content */
.bua-settings-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Section Header */
.bua-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 30px 0 15px;
}

.bua-section-header:first-child {
    margin-top: 0;
}

.bua-section-header .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
    color: #667eea;
}

.bua-section-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

/* Setting Row */
.bua-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f1;
}

.bua-setting-row:last-child {
    border-bottom: none;
}

.bua-setting-info strong {
    display: block;
    font-size: 14px;
    color: #1d2327;
    margin-bottom: 2px;
}

.bua-setting-info p {
    margin: 0;
    font-size: 12px;
    color: #888;
}

/* Switch */
.bua-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.bua-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.bua-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 34px;
}

.bua-switch-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.bua-switch input:checked + .bua-switch-slider {
    background-color: #667eea;
}

.bua-switch input:checked + .bua-switch-slider:before {
    transform: translateX(22px);
}

/* Textarea */
.bua-textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.bua-textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 1px #667eea;
    outline: none;
}

/* Number Field */
.bua-number-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bua-number-field input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    width: 100px;
}

.bua-number-suffix {
    font-size: 14px;
    color: #666;
}

/* Field Description */
.bua-field-desc {
    margin: 8px 0 0;
    font-size: 12px;
    color: #888;
    font-style: italic;
}

/* Submit Button */
.bua-settings-submit {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f1;
    text-align: right;
}

.bua-settings-submit .button-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    font-size: 14px;
}

/* Statistics */
.bua-stats-overview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.bua-stat-box {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-radius: 10px;
    color: #fff;
}

.bua-stat-primary { background: linear-gradient(135deg, #667eea, #764ba2); }
.bua-stat-danger { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.bua-stat-success { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.bua-stat-warning { background: linear-gradient(135deg, #f39c12, #e67e22); }
.bua-stat-info { background: linear-gradient(135deg, #3498db, #2980b9); }
.bua-stat-dark { background: linear-gradient(135deg, #2c3e50, #34495e); }

.bua-stat-icon .dashicons {
    font-size: 30px;
    width: 30px;
    height: 30px;
    opacity: 0.8;
}

.bua-stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.bua-stat-label {
    font-size: 12px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Cards */
.bua-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
}

.bua-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e5e5;
}

.bua-card-header .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #667eea;
}

.bua-card-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.bua-card-body {
    padding: 20px;
}

.bua-card-body p {
    margin: 0 0 15px;
    color: #666;
    font-size: 13px;
    line-height: 1.6;
}

/* Tools Grid */
.bua-tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.bua-card-full {
    grid-column: 1 / -1;
}

/* Table */
.bua-table {
    width: 100%;
    border-collapse: collapse;
}

.bua-table th {
    text-align: left;
    padding: 10px 15px;
    background: #f8f9fa;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e5e5e5;
}

.bua-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f1;
    font-size: 13px;
    vertical-align: middle;
}

.bua-table-avatar {
    vertical-align: middle;
    border-radius: 50%;
    margin-right: 6px;
}

/* Status Badges */
.bua-status-active {
    display: inline-block;
    padding: 3px 10px;
    background: #e8f8f0;
    color: #27ae60;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.bua-status-inactive {
    display: inline-block;
    padding: 3px 10px;
    background: #f0f0f1;
    color: #999;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

/* Responsive */
@media screen and (max-width: 782px) {
    .bua-settings-nav {
        flex-direction: column;
    }

    .bua-stats-overview {
        grid-template-columns: 1fr 1fr;
    }

    .bua-tools-grid {
        grid-template-columns: 1fr;
    }

    .bua-setting-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .bua-settings-content {
        padding: 15px;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .bua-settings-content,
    .bua-card {
        background: #1d2327;
        border-color: #2c3338;
    }

    .bua-card-header,
    .bua-section-header {
        background: #2c3338;
        border-bottom-color: #3c434a;
    }

    .bua-card-header h3,
    .bua-section-header h2,
    .bua-setting-info strong {
        color: #f0f0f1;
    }

    .bua-setting-row {
        border-bottom-color: #2c3338;
    }

    .bua-table th {
        background: #2c3338;
        color: #a7aaad;
    }

    .bua-table td {
        border-bottom-color: #2c3338;
        color: #f0f0f1;
    }

    .bua-textarea,
    .bua-number-field input {
        background: #2c3338;
        border-color: #3c434a;
        color: #f0f0f1;
    }

    .bua-nav-item {
        background: #1d2327;
        border-color: #2c3338;
        color: #a7aaad;
    }

    .bua-nav-item:hover {
        color: #667eea;
        border-color: #667eea;
    }
}