/*
 * Amigo Performance Plugin - Modern Admin Stylesheet
 * Version: 3.3
 * Author: Amigo Dheena
 * Description: Modern, clean, and professional admin interface
 */

/* ========================================
   RESET & BASE STYLES
======================================== */
* {
    box-sizing: border-box;
}

.amigo-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    margin-left: -20px; /* Adjusted for better alignment */
    padding: 0;
    line-height: 1.6;
    color: #334155;
}

/* ========================================
   ACCORDION STYLES
======================================== */
.amigo-accordion-container {
    margin-top: 20px;
}

.amigo-accordion-item {
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.amigo-accordion-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.amigo-accordion-header {
    padding: 16px 20px;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.amigo-accordion-header:hover {
    background: #e9ecef;
}

.amigo-accordion-header.active {
    background: #667eea;
    color: white;
    border-bottom-color: rgba(255,255,255,0.2);
}

.amigo-page-info {
    flex: 1;
}

.amigo-page-url {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.amigo-folder-icon {
    font-size: 16px;
}

.amigo-external-link {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.amigo-external-link:hover {
    opacity: 1;
}

.amigo-external-link svg {
    stroke: currentColor;
}

.amigo-page-summary {
    display: flex;
    gap: 12px;
    font-size: 12px;
    opacity: 0.8;
}

.amigo-bulk-actions {
    display: flex;
    gap: 4px;
    margin-left: auto;
    margin-right: 16px;
    align-items: center;
}

.amigo-btn-tiny {
    font-size: 9px;
    padding: 3px 8px;
    display: flex;
    align-items: center;
    gap: 3px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
    min-width: 65px;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    height: 22px;
}

.amigo-btn-tiny::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.amigo-btn-tiny:hover::before {
    left: 100%;
}

.amigo-btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.amigo-btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.amigo-btn-success:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 1px 4px rgba(16, 185, 129, 0.3);
}

.amigo-btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.amigo-btn-warning:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.amigo-btn-warning:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 1px 4px rgba(245, 158, 11, 0.3);
}

.amigo-accordion-header.active .amigo-btn-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.95));
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.amigo-accordion-header.active .amigo-btn-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(217, 119, 6, 0.95));
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.amigo-accordion-header.active .amigo-btn-tiny:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.amigo-asset-count {
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.amigo-accordion-header.active .amigo-asset-count {
    background: rgba(255,255,255,0.2);
}

.amigo-disabled-count {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.amigo-accordion-header.active .amigo-disabled-count {
    background: rgba(255,255,255,0.2);
    color: white;
}

.amigo-accordion-arrow {
    transition: transform 0.3s ease;
}

.amigo-accordion-arrow svg {
    stroke: currentColor;
    transition: transform 0.3s ease;
}

.amigo-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: white;
}

.amigo-accordion-content.active {
    border-top: 1px solid #e1e5e9;
}

.amigo-assets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
    padding: 12px;
}

.amigo-asset-card {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    padding: 8px;
    transition: all 0.3s ease;
    font-size: 12px;
}

.amigo-asset-card:hover {
    border-color: #667eea;
    box-shadow: 0 1px 4px rgba(102, 126, 234, 0.1);
}

.amigo-asset-card.disabled {
    opacity: 0.7;
    background: #fff5f5;
    border-color: #fed7d7;
}

.amigo-asset-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.amigo-asset-type-badge {
    font-size: 8px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 3px;
    text-transform: uppercase;
}

.amigo-asset-type-css {
    background: #e3f2fd;
    color: #1976d2;
}

.amigo-asset-type-js {
    background: #fff3e0;
    color: #f57c00;
}

.amigo-status-indicator svg {
    stroke: currentColor;
    width: 12px;
    height: 12px;
}

.amigo-status-indicator.enabled svg {
    stroke: #28a745;
}

.amigo-status-indicator.disabled svg {
    stroke: #dc3545;
}

.amigo-asset-name {
    font-size: 11px;
    margin-bottom: 3px;
    word-break: break-word;
    line-height: 1.2;
}

.amigo-asset-status {
    font-size: 10px;
    color: #6c757d;
    margin-bottom: 6px;
}

.amigo-asset-card.disabled .amigo-asset-status {
    color: #dc3545;
}

.amigo-asset-card.enabled .amigo-asset-status {
    color: #28a745;
}

.amigo-asset-actions {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.amigo-btn-small {
    font-size: 9px;
    padding: 3px 6px;
    border-radius: 3px;
}

@media (max-width: 768px) {
    .amigo-assets-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 6px;
        padding: 8px;
    }
    
    .amigo-asset-card {
        padding: 6px;
    }
    
    .amigo-asset-name {
        font-size: 10px;
    }
    
    .amigo-asset-status {
        font-size: 9px;
    }
    
    .amigo-btn-small {
        font-size: 8px;
        padding: 2px 4px;
    }
    
    .amigo-page-summary {
        flex-wrap: wrap;
    }
    
    .amigo-accordion-header {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .amigo-page-info {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
    }
    
    .amigo-bulk-actions {
        margin-left: 0;
        margin-right: 0;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
    }
    
    .amigo-btn-tiny {
        font-size: 8px;
        padding: 2px 6px;
        min-width: 55px;
        letter-spacing: 0.2px;
        height: 20px;
    }
    
    .amigo-accordion-arrow {
        position: absolute;
        top: 16px;
        right: 16px;
    }
}

/* ========================================
   HEADER SECTION
======================================== */
.amigo-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

.amigo-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.amigo-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.amigo-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.amigo-title-section {
    margin: 0;
}

.amigo-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.amigo-subtitle {
    font-size: 0.95rem;
    margin: 0.25rem 0 0 0;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
}

.amigo-version-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ========================================
   MAIN CONTENT AREA
======================================== */
.amigo-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    margin-top: -1rem;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    min-height: calc(100vh - 200px);
}

/* ========================================
   NAVIGATION TABS
======================================== */
.amigo-nav {
    margin-bottom: 2rem;
}

.amigo-nav-container {
    display: flex;
    background: #f8fafc;
    border-radius: 12px;
    padding: 0.25rem;
    border: 1px solid #e2e8f0;
}

.amigo-nav-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.9rem;
    color: #64748b;
    text-decoration: none;
}

.amigo-nav-item:hover {
    background: #e2e8f0;
    color: #475569;
}

.amigo-nav-item.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    font-weight: 600;
}

.amigo-nav-item svg {
    flex-shrink: 0;
}

/* ========================================
   CONTENT SECTIONS
======================================== */
.amigo-content {
    position: relative;
}

.amigo-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.amigo-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.amigo-section {
    margin-bottom: 2rem;
}

.amigo-section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.amigo-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
}

.amigo-section-desc {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   CARDS GRID (Core Settings)
======================================== */
.amigo-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.amigo-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1rem;
    transition: all 0.2s ease;
    position: relative;
    margin-bottom: 0rem;
}

.amigo-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.amigo-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.amigo-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

.amigo-card-icon.query-strings { background: linear-gradient(135deg, #667eea, #764ba2); }
.amigo-card-icon.emoji { background: linear-gradient(135deg, #f093fb, #f5576c); }
.amigo-card-icon.javascript { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.amigo-card-icon.iframe { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.amigo-card-icon.images { background: linear-gradient(135deg, #fa709a, #fee140); }
.amigo-card-icon.css { background: linear-gradient(135deg, #16a085, #3498db); }

.amigo-card-title-area {
    flex: 1;
}

.amigo-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
}

.amigo-card-desc {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.amigo-card-control {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
}

/* ========================================
   TOGGLE SWITCHES
======================================== */
.amigo-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.amigo-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.amigo-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.amigo-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.amigo-toggle input:checked + .amigo-toggle-slider {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.amigo-toggle input:checked + .amigo-toggle-slider:before {
    transform: translateX(20px);
}

.amigo-toggle:hover .amigo-toggle-slider {
    box-shadow: 0 0 0 8px rgba(102, 126, 234, 0.1);
}

/* ========================================
   BUTTONS
======================================== */
.amigo-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-weight: 400;
    font-size: 0.6rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
}

.amigo-btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.amigo-btn-primary:hover {
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

.amigo-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.amigo-btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.amigo-form-footer {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

/* ========================================
   MANAGER LAYOUT (JS/CSS Tabs)
======================================== */
.amigo-manager-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    align-items: start;
}

.amigo-manager-table {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.amigo-table-header {
    padding: 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.amigo-table-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
}

.amigo-info-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #fef3cd;
    color: #92400e;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    border: 1px solid #fde68a;
    margin-top: 1rem;
}

.amigo-table-container {
    max-height: 500px;
    overflow-y: auto;
}

.amigo-table {
    width: 100%;
    border-collapse: collapse;
}

.amigo-table th {
    background: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.amigo-table-select { width: 50px; }
.amigo-table-handle { width: 200px; }
.amigo-table-source { width: auto; }

.amigo-table-row {
    transition: background-color 0.15s ease;
}

.amigo-table-row:hover {
    background: #f8fafc;
}

.amigo-table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.amigo-handle-info {
    display: flex;
    flex-direction: column;
}

.amigo-handle-name {
    font-weight: 500;
    color: #1e293b;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
}

.amigo-source-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.amigo-source-link:hover {
    background: #f0f4ff;
    color: #5a67d8;
}

.amigo-source-text {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.amigo-source-na {
    color: #94a3b8;
    font-style: italic;
    font-size: 0.875rem;
}

/* ========================================
   MANAGER PANEL
======================================== */
.amigo-manager-panel {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    position: sticky;
    top: 2rem;
}

.amigo-panel-header {
    padding: 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.amigo-panel-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
}

.amigo-panel-header p {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
}

.amigo-textarea-container {
    padding: 1.5rem;
}

.amigo-textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    resize: vertical;
    background: #fafafa;
    color: #374151;
}

.amigo-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.amigo-panel-actions {
    padding: 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

/* ========================================
   CHECKBOXES
======================================== */
.amigo-item-checkbox,
.amigo-select-all {
    width: 16px;
    height: 16px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    appearance: none;
    background: white;
    transition: all 0.15s ease;
}

.amigo-item-checkbox:checked,
.amigo-select-all:checked {
    background: #667eea;
    border-color: #667eea;
}

.amigo-item-checkbox:checked::after,
.amigo-select-all:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.amigo-item-checkbox:hover,
.amigo-select-all:hover {
    border-color: #94a3b8;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */
@media (max-width: 1024px) {
    .amigo-manager-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .amigo-manager-panel {
        position: static;
    }
}

@media (max-width: 768px) {
    .amigo-main {
        padding: 1rem;
        margin-top: 0;
        border-radius: 0;
    }
    
    .amigo-header-content {
        padding: 0 1rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .amigo-cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .amigo-nav-container {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .amigo-nav-item {
        justify-content: flex-start;
    }
    
    .amigo-panel-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .amigo-header {
        padding: 1.5rem 0;
    }
    
    .amigo-title {
        font-size: 1.5rem;
    }
    
    .amigo-card {
        padding: 1rem;
    }
    
    .amigo-card-header {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .amigo-card-control {
        position: static;
        display: flex;
        justify-content: center;
        margin-top: 1rem;
    }
}

/* ========================================
   ASSET MANAGER STYLES
======================================== */

/* Stats Grid */
.amigo-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.amigo-stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.amigo-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.amigo-stat-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.amigo-stat-icon.disabled {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.amigo-stat-icon.css {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.amigo-stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.amigo-stat-label {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* Empty State */
.amigo-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    border: 2px dashed #e5e7eb;
    margin: 2rem 0;
}

.amigo-empty-icon {
    margin-bottom: 1.5rem;
    color: #94a3b8;
}

.amigo-empty-state h3 {
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.amigo-empty-state p {
    color: #64748b;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Asset Table */
.amigo-assets-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.amigo-assets-table th {
    background: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.amigo-assets-table td {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.amigo-assets-table tr:hover {
    background: #f9fafb;
}

.amigo-page-link {
    color: #667eea;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
}

.amigo-page-link:hover {
    color: #4f46e5;
}

.amigo-asset-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.amigo-asset-type-css {
    background: #ecfdf5;
    color: #059669;
}

.amigo-asset-type-js {
    background: #fef3c7;
    color: #d97706;
}

.amigo-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.amigo-status-badge.enabled {
    background: #ecfdf5;
    color: #059669;
}

.amigo-status-badge.disabled {
    background: #fee2e2;
    color: #dc2626;
}

.amigo-btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    margin-right: 0.5rem;
}

.amigo-btn-danger {
    background: #ef4444;
    color: white;
    border: 1px solid #ef4444;
}

.amigo-btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

/* How to Use Steps */
.amigo-steps {
    display: grid;
    gap: 1.5rem;
    margin-top: 1rem;
}

.amigo-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.amigo-step-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.amigo-step-content h4 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
    font-size: 1rem;
}

.amigo-step-content p {
    margin: 0;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Admin Bar Styles for Asset Manager */
#wpadminbar .amigoperf-asset-item .ab-item {
    padding: 4px 12px !important;
    white-space: nowrap !important;
    max-width: 320px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-height: 28px !important;
    line-height: 1.3 !important;
    transition: all 0.2s ease !important;
}

#wpadminbar .amigoperf-asset-submenu .ab-item {
    font-weight: 700 !important;
    color: #72aee6 !important;
    background: rgba(0, 0, 0, 0.2) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
    letter-spacing: 0.5px !important;
    padding: 12px 16px !important;
}

#wpadminbar .asset-enabled .ab-item { 
    color: #68d391 !important; 
}

#wpadminbar .asset-disabled .ab-item { 
    color: #f56565 !important; 
}

/* Asset Manager Tab Responsive */
@media (max-width: 768px) {
    .amigo-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .amigo-stat-card {
        padding: 1rem;
    }
    
    .amigo-assets-table {
        font-size: 0.875rem;
    }
    
    .amigo-assets-table th,
    .amigo-assets-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .amigo-step {
        flex-direction: column;
        text-align: center;
    }
    
    .amigo-step-number {
        align-self: center;
    }
}

/* ========================================
   CORE SETTINGS – REDESIGNED
======================================== */

/* Header Meta */
.amigo-header-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.amigo-header-status {
    background: rgba(255, 255, 255, 0.18);
    padding: 0.45rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Status Overview Bar */
.amigo-core-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.25rem 1.75rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.amigo-core-status-indicator {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.amigo-core-status-ring {
    position: relative;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.amigo-core-status-ring svg {
    transform: rotate(-90deg);
}

.amigo-core-status-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1;
}

.amigo-core-status-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.amigo-core-status-text strong {
    font-size: 0.95rem;
    color: #1e293b;
    font-weight: 700;
}

.amigo-core-status-text span {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 400;
}

.amigo-core-status-actions {
    display: flex;
    gap: 0.5rem;
}

.amigo-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: transparent;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
}

.amigo-btn-outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

.amigo-btn-outline svg {
    stroke: currentColor;
}

/* Sections */
.amigo-core-section {
    margin-bottom: 2.5rem;
}

.amigo-core-section-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
    position: relative;
}

.amigo-core-section-dot {
    position: absolute;
    left: 0;
    top: 0.35rem;
    width: 4px;
    height: 1.1rem;
    border-radius: 4px;
}

.amigo-core-section-label h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    letter-spacing: -0.01em;
}

.amigo-core-section-label p {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0;
    font-weight: 400;
}

/* Cards */
.amigo-core-cards {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.amigo-core-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.125rem 1.5rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.amigo-core-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    box-shadow: 0 4px 24px rgba(102, 126, 234, 0.12);
}

.amigo-core-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.amigo-core-card:hover::before {
    opacity: 1;
}

.amigo-core-card.is-active {
    border-color: #c7d2fe;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.02) 0%, rgba(118, 75, 162, 0.02) 100%);
}

.amigo-core-card.is-active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, #667eea, #764ba2);
}

.amigo-core-card-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.amigo-core-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    background: var(--icon-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.amigo-core-card-info {
    flex: 1;
    min-width: 0;
}

.amigo-core-card-info h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.2rem 0;
    line-height: 1.3;
}

.amigo-core-card-info p {
    font-size: 0.775rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.45;
}

/* Save Button (Core Settings) */
.amigo-core-form-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.amigo-btn-save {
    padding: 0.7rem 2rem !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    gap: 0.5rem !important;
    letter-spacing: 0.01em;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.amigo-btn-save:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.35) !important;
}

.amigo-btn-save:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3) !important;
}

/* Responsive – Core Settings */
@media (max-width: 768px) {
    .amigo-core-status-bar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.25rem;
    }

    .amigo-core-status-indicator {
        flex-direction: column;
    }

    .amigo-core-status-text {
        align-items: center;
    }

    .amigo-core-card {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem 1.25rem;
    }

    .amigo-core-card.is-active::after {
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 60%;
        height: 3px;
        border-radius: 0 0 4px 4px;
    }

    .amigo-core-card .amigo-toggle {
        align-self: flex-end;
    }

    .amigo-core-form-footer {
        justify-content: center;
    }

    .amigo-header-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .amigo-core-card-icon {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }

    .amigo-core-card-icon svg {
        width: 16px;
        height: 16px;
    }

    .amigo-core-card-info h3 {
        font-size: 0.85rem;
    }

    .amigo-core-card-info p {
        font-size: 0.7rem;
    }
}

/* ========================================
   ASSET MANAGER – REDESIGNED
======================================== */

/* Status Overview Bar */
.amigo-am-overview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.25rem 1.75rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.amigo-am-overview-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.amigo-am-overview-ring {
    position: relative;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.amigo-am-overview-ring svg {
    transform: rotate(-90deg);
}

.amigo-am-overview-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1;
}

.amigo-am-overview-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.amigo-am-overview-text strong {
    font-size: 0.95rem;
    color: #1e293b;
    font-weight: 700;
}

.amigo-am-overview-text span {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 400;
}

.amigo-am-overview-actions {
    display: flex;
    gap: 0.5rem;
}

/* Compact Stats Bar */
.amigo-am-stats-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.amigo-am .amigo-am-stats-bar .amigo-stat-card.amigo-am-stat-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: none;
    flex: 1;
    min-width: 0;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.amigo-am .amigo-am-stats-bar .amigo-stat-card.amigo-am-stat-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

.amigo-am .amigo-am-stats-bar .amigo-stat-card .amigo-stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1;
}

.amigo-am-stat-label {
    font-size: 0.65rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

/* Colored top borders for stat chips */
.amigo-am-stat-chip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
}

.amigo-am-stat-chip:nth-child(1)::before { background: linear-gradient(90deg, #667eea, #764ba2); }
.amigo-am-stat-chip:nth-child(2)::before { background: linear-gradient(90deg, #ef4444, #dc2626); }
.amigo-am-stat-chip:nth-child(3)::before { background: linear-gradient(90deg, #10b981, #059669); }
.amigo-am-stat-chip:nth-child(4)::before { background: linear-gradient(90deg, #3b82f6, #2563eb); }
.amigo-am-stat-chip:nth-child(5)::before { background: linear-gradient(90deg, #f59e0b, #d97706); }

/* Accordion Card Wrapper */
.amigo-am .amigo-am-accordion-card {
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
}

.amigo-am .amigo-am-accordion-card:hover {
    transform: none;
}

/* Accordion Item Override */
.amigo-am .amigo-accordion-item {
    border: none;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 0;
    margin-bottom: 0;
}

.amigo-am .amigo-accordion-item:last-child {
    border-bottom: none;
}

.amigo-am .amigo-accordion-item:hover {
    border-color: #f1f5f9;
    box-shadow: none;
}

/* Accordion Header Override */
.amigo-am .amigo-accordion-header {
    padding: 1rem 1.5rem;
    background: #fafbfc;
    border-bottom: none;
}

.amigo-am .amigo-accordion-header:hover {
    background: #f1f5f9;
}

.amigo-am .amigo-accordion-header.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Page Icon */
.amigo-am-page-icon {
    flex-shrink: 0;
    opacity: 0.5;
}

.amigo-am .amigo-accordion-header.active .amigo-am-page-icon {
    opacity: 0.8;
}

/* Asset List */
.amigo-am-assets-list {
    padding: 0.5rem;
}

/* ---- Asset Card Redesign ---- */
.amigo-am .amigo-asset-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0;
    border-radius: 10px;
    border: 1px solid transparent;
    background: #fafbfc;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-size: 0.875rem;
    opacity: 1;
}

.amigo-am .amigo-asset-card + .amigo-asset-card {
    margin-top: 4px;
}

.amigo-am .amigo-asset-card:hover {
    border-color: #e2e8f0;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* Enabled Card */
.amigo-am .amigo-asset-card.enabled {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.03) 0%, rgba(5, 150, 105, 0.02) 100%);
    border-color: #d1fae5;
}

.amigo-am .amigo-asset-card.enabled::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, #10b981, #059669);
}

/* Disabled Card */
.amigo-am .amigo-asset-card.disabled {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.02) 0%, rgba(220, 38, 38, 0.01) 100%);
    border-color: #fee2e2;
    opacity: 0.78;
}

.amigo-am .amigo-asset-card.disabled:hover {
    opacity: 1;
}

.amigo-am .amigo-asset-card.disabled::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, #ef4444, #dc2626);
}

/* Delete animation */
.amigo-am .amigo-asset-card.deleting {
    opacity: 0;
    transform: translateX(-20px);
    max-height: 0;
    padding: 0;
    margin: 0;
    border: 0;
    overflow: hidden;
}

/* Asset Card – Left */
.amigo-am-asset-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.amigo-am-asset-handle {
    font-weight: 600;
    color: #1e293b;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Asset Card – Center (status) */
.amigo-am-asset-center {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.amigo-am .amigo-status-indicator {
    display: flex;
    align-items: center;
}

.amigo-am .amigo-status-indicator svg {
    width: 14px;
    height: 14px;
}

.amigo-am .amigo-asset-status {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0;
}

.amigo-am .amigo-asset-card.enabled .amigo-asset-status {
    color: #059669;
}

.amigo-am .amigo-asset-card.disabled .amigo-asset-status {
    color: #dc2626;
}

/* Asset Card – Actions */
.amigo-am .amigo-asset-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.amigo-am .amigo-btn-small.amigo-btn-secondary {
    font-size: 0.7rem;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.amigo-am .amigo-asset-card.enabled .amigo-btn-secondary {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.amigo-am .amigo-asset-card.enabled .amigo-btn-secondary:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

.amigo-am .amigo-asset-card.disabled .amigo-btn-secondary {
    background: #ecfdf5;
    color: #059669;
    border-color: #a7f3d0;
}

.amigo-am .amigo-asset-card.disabled .amigo-btn-secondary:hover {
    background: #d1fae5;
    border-color: #6ee7b7;
}

.amigo-am .amigo-am-btn-icon {
    padding: 0.3rem !important;
    border-radius: 6px;
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.amigo-am .amigo-am-btn-icon:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #ef4444;
}

/* Type Badge Override */
.amigo-am .amigo-asset-type-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    flex-shrink: 0;
}

/* ---- Responsive – Asset Manager ---- */
@media (max-width: 768px) {
    .amigo-am-overview {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.25rem;
    }

    .amigo-am-overview-left {
        flex-direction: column;
    }

    .amigo-am-overview-text {
        align-items: center;
    }

    .amigo-am-stats-bar {
        flex-wrap: wrap;
    }

    .amigo-am-stat-chip {
        min-width: calc(33.33% - 0.5rem);
    }

    .amigo-am .amigo-asset-card {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .amigo-am-asset-left {
        width: 100%;
    }

    .amigo-am-asset-center {
        margin-left: auto;
    }

    .amigo-am .amigo-accordion-header {
        padding: 0.875rem 1rem;
    }
}

@media (max-width: 480px) {
    .amigo-am-stat-chip {
        min-width: calc(50% - 0.5rem);
    }

    .amigo-am-asset-handle {
        font-size: 0.7rem;
    }

    .amigo-am .amigo-btn-small.amigo-btn-secondary {
        font-size: 0.6rem;
        padding: 0.25rem 0.5rem;
    }
}
