/**
 * Flying Cloud Tools - Dashboard Styles
 * Styles specific to the main dashboard / index page
 * 
 * Note: General styles are in styles.css
 * This file handles: tool cards, category sections, alerts, loading states
 */

/* =============================================================================
   TOOL CARDS & GRID
   ============================================================================= */

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.tool-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.tool-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.tool-name {
    font-size: 1.2em;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.tool-description {
    color: #6b7280;
    font-size: 0.9em;
    line-height: 1.5;
}

/* =============================================================================
   CATEGORY SECTIONS
   ============================================================================= */

.category-section {
    margin-bottom: 35px;
}

.category-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 5px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

/* =============================================================================
   ADMIN SECTION
   ============================================================================= */

.admin-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 3px solid #1e3a8a;
}

.admin-section .category-title {
    color: #1e3a8a;
    border-bottom-color: #1e3a8a;
}

/* =============================================================================
   LOADING & ERROR STATES
   ============================================================================= */

.loading-state {
    text-align: center;
    padding: 60px 40px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-state {
    text-align: center;
    padding: 40px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    color: #dc2626;
}

.no-tools {
    color: #6b7280;
    text-align: center;
    padding: 40px;
    background: #f9fafb;
    border-radius: 12px;
}

/* =============================================================================
   ALERTS SECTION (Action Required)
   ============================================================================= */

.alerts-section {
    margin-bottom: 30px;
}

.alerts-section .category-title {
    color: #dc2626;
    border-bottom-color: #dc2626;
}

.alerts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.alert-card {
    background: linear-gradient(135deg, #fef2f2 0%, #fff 100%);
    border: 2px solid #fecaca;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.alert-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
    border-color: #f87171;
}

/* Alert Priority Variants */
.alert-card.priority-high {
    border-color: #dc2626;
    background: linear-gradient(135deg, #fef2f2 0%, #fff 100%);
}

.alert-card.priority-medium {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fff 100%);
}

.alert-card.priority-low {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #fff 100%);
}

.alert-icon {
    font-size: 2em;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.alert-description {
    color: #6b7280;
    font-size: 0.85em;
    line-height: 1.4;
}

.alert-arrow {
    color: #9ca3af;
    font-size: 1.2em;
    align-self: center;
}

.alert-card:hover .alert-arrow {
    color: #6b7280;
}
