/**
 * AOS Shared UI Components
 * 
 * Standardized components for cross-module consistency:
 * - Cards
 * - Tables
 * - Forms
 * - Status badges
 * - Progress bars
 * - Empty states
 * - Alerts
 */

/* ===== CARDS ===== */
.aos-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
}

.aos-card:hover {
    box-shadow: var(--shadow-md);
}

.aos-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.aos-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.aos-card-body {
    flex: 1;
}

.aos-card-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ===== TABLES ===== */
.aos-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: 8px;
    overflow: hidden;
}

.aos-table thead {
    background: var(--background);
    border-bottom: 2px solid var(--border);
}

.aos-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aos-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.aos-table tbody tr:last-child td {
    border-bottom: none;
}

.aos-table tbody tr:hover {
    background: var(--background);
}

.aos-table--compact td,
.aos-table--compact th {
    padding: 8px 12px;
}

/* ===== FORMS ===== */
.aos-form-group {
    margin-bottom: 20px;
}

.aos-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
}

.aos-form-label.required::after {
    content: ' *';
    color: var(--error);
}

.aos-form-input,
.aos-form-select,
.aos-form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--surface);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.aos-form-input:focus,
.aos-form-select:focus,
.aos-form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.aos-form-textarea {
    min-height: 100px;
    resize: vertical;
}

.aos-form-error {
    margin-top: 6px;
    font-size: 12px;
    color: var(--error);
}

.aos-form-hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.aos-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* ===== STATUS BADGES ===== */
.aos-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.aos-badge--success {
    background: #dcfce7;
    color: #166534;
}

.aos-badge--warning {
    background: #fef3c7;
    color: #92400e;
}

.aos-badge--danger {
    background: #fee2e2;
    color: #991b1b;
}

.aos-badge--info {
    background: #dbeafe;
    color: #1e40af;
}

.aos-badge--neutral {
    background: #f1f5f9;
    color: #475569;
}

/* Status-specific badges */
.aos-status-ready,
.aos-status-complete {
    @extend .aos-badge--success;
}

.aos-status-in_progress,
.aos-status-scheduled,
.aos-status-active {
    @extend .aos-badge--info;
}

.aos-status-draft,
.aos-status-inactive {
    @extend .aos-badge--neutral;
}

.aos-status-blocked,
.aos-status-overdue,
.aos-status-needs_attention,
.aos-status-incomplete {
    @extend .aos-badge--warning;
}

.aos-status-critical {
    @extend .aos-badge--danger;
}

/* ===== PROGRESS BARS ===== */
.aos-progress {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.aos-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.aos-progress-bar--success {
    background: var(--success);
}

.aos-progress-bar--warning {
    background: var(--warning);
}

.aos-progress-bar--danger {
    background: var(--error);
}

.aos-progress--large {
    height: 12px;
}

.aos-progress--small {
    height: 4px;
}

.aos-progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ===== EMPTY STATES ===== */
.aos-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.aos-empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.aos-empty-state-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.aos-empty-state-description {
    font-size: 14px;
    margin-bottom: 20px;
}

.aos-empty-state-action {
    display: inline-block;
}

.aos-empty-state--success .aos-empty-state-icon {
    color: var(--success);
}

.aos-empty-state--warning .aos-empty-state-icon {
    color: var(--warning);
}

.aos-empty-state--danger .aos-empty-state-icon {
    color: var(--error);
}

/* ===== ALERTS ===== */
.aos-alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aos-alert-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.aos-alert-content {
    flex: 1;
}

.aos-alert-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.aos-alert-message {
    font-size: 14px;
}

.aos-alert--success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.aos-alert--warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.aos-alert--danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.aos-alert--info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* ===== BUTTONS ===== */
.aos-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    gap: 8px;
}

.aos-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.aos-btn:active {
    transform: translateY(0);
}

.aos-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.aos-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.aos-btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.aos-btn--primary {
    background: var(--primary-color);
    color: white;
}

.aos-btn--primary:hover {
    background: var(--primary-dark);
}

.aos-btn--secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.aos-btn--secondary:hover {
    background: var(--background);
}

.aos-btn--danger {
    background: var(--error);
    color: white;
}

.aos-btn--danger:hover {
    background: #dc2626;
}

.aos-btn--sm {
    padding: 6px 12px;
    font-size: 13px;
}

.aos-btn--lg {
    padding: 14px 28px;
    font-size: 16px;
}

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

/* ===== LISTS ===== */
.aos-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aos-list-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.aos-list-item:last-child {
    border-bottom: none;
}

.aos-item-title {
    font-weight: 500;
    color: var(--text-primary);
}

.aos-item-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.aos-item-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===== TAGS ===== */
.aos-tag {
    display: inline-block;
    padding: 4px 8px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.aos-tag--primary {
    background: #e0e7ff;
    border-color: #c7d2fe;
    color: #4338ca;
}

.aos-tag--success {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

/* ===== DASHBOARD SPECIFIC ===== */
.aos-dashboard-wrapper {
    padding: 20px;
}

.aos-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.aos-dashboard-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.aos-dashboard-section {
    margin-bottom: 30px;
}

.aos-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.aos-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.aos-scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.aos-score-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.aos-score-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background);
    border-radius: 8px;
}

.aos-score-content {
    flex: 1;
}

.aos-score-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.aos-score-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.aos-score-message {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.aos-score-details {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    font-size: 12px;
}

.aos-guidance-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aos-guidance-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.aos-guidance-icon {
    font-size: 20px;
}

.aos-guidance-content {
    flex: 1;
}

.aos-guidance-title {
    font-weight: 500;
    color: var(--text-primary);
}

.aos-guidance-action {
    font-size: 13px;
    color: var(--text-secondary);
}

.aos-guidance-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 13px;
}

.aos-guidance-link:hover {
    text-decoration: underline;
}

/* Score colors */
.aos-score-success {
    border-left: 4px solid var(--success);
}

.aos-score-warning {
    border-left: 4px solid var(--warning);
}

.aos-score-danger {
    border-left: 4px solid var(--error);
}

/* Priority classes */
.aos-priority-danger {
    border-left: 4px solid var(--error);
}

.aos-priority-warning {
    border-left: 4px solid var(--warning);
}

.aos-priority-info {
    border-left: 4px solid var(--primary-color);
}

/* Guidance type classes */
.aos-guidance-setup {
    background: #f0f9ff;
}

.aos-guidance-branding {
    background: #fdf4ff;
}

.aos-guidance-blocker {
    background: #fef2f2;
}

.aos-guidance-workflow {
    background: #f0fdf4;
}
    background: #fdf4ff;
}

.aos-guidance-blocker {
    background: #fef2f2;
}

.aos-guidance-workflow {
    background: #f0fdf4;
}
