/* ── AICOM - AI Commander for WordPress Admin Styles ────────────────────────────────── */

.aicom-wrap { max-width: 1200px; }
.aicom-wrap h1 { margin-bottom: 1.5em; }

/* Cards */
.aicom-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px 24px;
    margin-bottom: 20px;
}
.aicom-card h2 { margin-top: 0; font-size: 1.1em; }
.aicom-card-full { width: 100%; }

/* Dashboard Grid */
.aicom-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

/* Badges */
.aicom-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9em;
    letter-spacing: 0.3px;
}
.aicom-badge-success { background: #d4edda; color: #155724; }
.aicom-badge-warning { background: #fff3cd; color: #856404; }
.aicom-badge-danger  { background: #f8d7da; color: #721c24; }

/* Status dots / pills */
.aicom-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}
.aicom-status-active    { background: #d4edda; color: #155724; }
.aicom-status-suspended { background: #fff3cd; color: #856404; }
.aicom-status-revoked   { background: #f8d7da; color: #721c24; }
.aicom-status-warning   { background: #fff3cd; color: #856404; }

/* Stats grid */
.aicom-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}
.aicom-stat {
    text-align: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
}
.aicom-stat-number { display: block; font-size: 2em; font-weight: 700; line-height: 1; }
.aicom-stat-label  { display: block; font-size: 0.8em; color: #666; margin-top: 4px; }
.aicom-success { color: #28a745; }
.aicom-error   { color: #dc3545; }
.aicom-warning { color: #ffc107; }

/* Module pills */
.aicom-modules-row { display: flex; flex-wrap: wrap; gap: 8px; }
.aicom-module-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}
.aicom-module-active   { background: #d4edda; color: #155724; }
.aicom-module-inactive { background: #e9ecef; color: #495057; }
.aicom-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.aicom-module-active .aicom-dot   { background: #28a745; }
.aicom-module-inactive .aicom-dot { background: #adb5bd; }

/* Modules grid */
.aicom-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.aicom-module-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 16px;
}
.aicom-module-card-active  { border-left: 4px solid #28a745; }
.aicom-module-card-inactive { border-left: 4px solid #adb5bd; opacity: 0.75; }
.aicom-module-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.aicom-module-header h3 { margin: 0; font-size: 1em; flex: 1; }
.aicom-module-status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.aicom-dot-active   { background: #28a745; }
.aicom-dot-inactive { background: #adb5bd; }
.aicom-module-desc  { font-size: 0.85em; color: #555; margin: 0 0 10px; }
.aicom-module-meta  { display: flex; justify-content: space-between; font-size: 0.8em; color: #666; }
.aicom-module-tools { font-weight: 600; }

/* Tool class badges */
.aicom-class-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
}
.aicom-class-public          { background: #cce5ff; color: #004085; }
.aicom-class-discovery       { background: #d1ecf1; color: #0c5460; }
.aicom-class-read            { background: #d4edda; color: #155724; }
.aicom-class-write           { background: #fff3cd; color: #856404; }
.aicom-class-destructive     { background: #f8d7da; color: #721c24; }
.aicom-class-admin_sensitive { background: #e2e3e5; color: #383d41; }

/* Copy row */
.aicom-copy-row { display: flex; gap: 8px; margin-bottom: 12px; align-items: center; }
.aicom-copy-row input { flex: 1; font-family: monospace; }

/* Filters */
.aicom-filters { margin-bottom: 16px; }
.aicom-filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.aicom-filter-row select,
.aicom-filter-row input[type="text"] { max-width: 180px; }

/* Logs table */
.aicom-logs-table td { vertical-align: middle; }
.aicom-logs-table code { font-size: 0.8em; }

/* Scope grid */
.aicom-scope-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 6px;
}
.aicom-scope-label {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 4px;
    cursor: pointer;
}
.aicom-scope-label:hover { background: #f0f0f0; border-radius: 3px; }
.aicom-scope-code { font-size: 0.78em; color: #666; display: block; }
.aicom-check-all-label { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; cursor: pointer; }

/* Notice for new key */
.aicom-notice-key { padding: 12px 16px !important; }
.aicom-notice-key .aicom-copy-row { margin-top: 8px; }

/* Action buttons */
.aicom-btn-danger   { color: #dc3545 !important; border-color: #dc3545 !important; }
.aicom-btn-danger:hover { background: #dc3545 !important; color: #fff !important; }
.aicom-btn-warning  { color: #856404 !important; border-color: #ffc107 !important; }
.aicom-btn-warning:hover { background: #ffc107 !important; color: #000 !important; }
.aicom-btn-primary  { color: #0d6efd !important; border-color: #0d6efd !important; }
.aicom-btn-primary:hover { background: #0d6efd !important; color: #fff !important; }

/* Hard lock notice */
.aicom-hard-lock-notice { color: #856404; font-style: italic; }

/* Count */
.aicom-count { font-size: 0.7em; color: #666; font-weight: normal; }

/* Policy matrix cells */
.aicom-cell-yes { color: #28a745; font-weight: 700; text-align: center; }
.aicom-cell-no  { color: #dc3545; font-weight: 700; text-align: center; }
