/**
 * Frontend Styles for MIC Invitations & Endorsements
 * File: assets/css/frontend.css
 */

/* ============================================
   Dashboard Styles
   ============================================ */

.mic-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Welcome Section */
.mic-welcome-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    flex-wrap: wrap;
    gap: 20px;
}

.mic-welcome-text h1 {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 600;
}

.mic-welcome-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

.mic-academic-badge {
    background: rgba(255,255,255,0.2);
    padding: 10px 20px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.badge-label {
    font-size: 14px;
    opacity: 0.9;
}

.badge-value {
    font-weight: 600;
    margin-left: 8px;
}

/* Quick Actions */
.mic-quick-actions {
    margin-bottom: 40px;
}

.mic-quick-actions h3 {
    margin-bottom: 20px;
    color: #1f2937;
    font-size: 20px;
}

.mic-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.mic-action-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.mic-action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    border-color: #3b82f6;
}

.mic-action-card .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #3b82f6;
    margin-bottom: 15px;
}

.action-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.action-desc {
    font-size: 13px;
    color: #6b7280;
}

/* Statistics Grid */
.mic-stats-section {
    margin-bottom: 40px;
}

.mic-stats-section h3 {
    margin-bottom: 20px;
    color: #1f2937;
    font-size: 20px;
}

.mic-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.mic-stat-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.mic-stat-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 8px;
}

.stat-trend {
    font-size: 12px;
    color: #9ca3af;
}

/* Recent Section */
.mic-recent-section {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    margin-bottom: 40px;
}

.mic-section-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.mic-section-header h3 {
    margin: 0;
    color: #1f2937;
}

.mic-view-all {
    color: #3b82f6;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.mic-view-all:hover {
    text-decoration: underline;
}

/* Invitations Table */
.mic-invitations-table-wrapper {
    overflow-x: auto;
}

.mic-invitations-table {
    width: 100%;
    border-collapse: collapse;
}

.mic-invitations-table th,
.mic-invitations-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

.mic-invitations-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.mic-invitations-table tr:hover {
    background: #f9fafb;
}

.invitee-email {
    font-weight: 500;
    color: #1f2937;
}

/* Status Badges */
.mic-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-sent {
    background: #dbeafe;
    color: #1e40af;
}

.status-accepted {
    background: #d1fae5;
    color: #065f46;
}

.status-expired {
    background: #fee2e2;
    color: #991b1b;
}

.status-pending {
    background: #fed7aa;
    color: #92400e;
}

/* Type Badges */
.type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.type-ambassador {
    background: #e0e7ff;
    color: #3730a3;
}

.type-expert {
    background: #cffafe;
    color: #0e7490;
}

.type-endorse_expert {
    background: #fce7f3;
    color: #9d174d;
}

.type-review {
    background: #fef3c7;
    color: #92400e;
}

/* Buttons */
.mic-button {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.mic-button-primary {
    background: #3b82f6;
    color: white;
}

.mic-button-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.mic-button-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.mic-button-secondary:hover {
    background: #e5e7eb;
}

.mic-button-small {
    padding: 6px 12px;
    font-size: 12px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    margin: 0 4px;
}

.mic-button-small:hover {
    background: #e5e7eb;
}

.invite-actions {
    white-space: nowrap;
}

/* Empty State */
.mic-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.mic-empty-state .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
    color: #9ca3af;
    margin-bottom: 20px;
}

.mic-empty-state h3 {
    margin: 0 0 10px;
    color: #374151;
}

.mic-empty-state p {
    color: #6b7280;
    margin-bottom: 20px;
}

/* Tips Section */
.mic-tips-section {
    background: #f9fafb;
    border-radius: 12px;
    padding: 30px;
}

.mic-tips-section h3 {
    margin: 0 0 20px;
    color: #1f2937;
}

.mic-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.mic-tip {
    text-align: center;
}

.tip-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 15px;
}

.mic-tip h4 {
    margin: 0 0 10px;
    color: #1f2937;
}

.mic-tip p {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* ============================================
   My Invitations Page
   ============================================ */

.mic-my-invitations {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.mic-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.mic-page-header h1 {
    margin: 0;
    color: #1f2937;
}

/* Summary Cards */
.mic-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.summary-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.summary-card a {
    display: block;
    padding: 20px;
    text-decoration: none;
}

.summary-card.active {
    border-color: #3b82f6;
    background: #eff6ff;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.summary-number {
    font-size: 28px;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 5px;
}

.summary-label {
    font-size: 13px;
    color: #6b7280;
}

/* Filters Section */
.mic-filters-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.mic-filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.mic-filter-select,
.mic-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.mic-filter-select:focus,
.mic-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    ring: 2px solid #3b82f6;
}

.mic-button-link {
    display: inline-block;
    padding: 8px 16px;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
}

.mic-button-link:hover {
    color: #374151;
}

/* Table Wrapper */
.mic-table-wrapper {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 30px;
}

/* Pagination */
.mic-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.mic-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    transition: all 0.2s;
}

.mic-pagination .page-numbers.current {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.mic-pagination .page-numbers:hover:not(.current) {
    background: #f3f4f6;
}

/* Loading State */
.spinning {
    animation: spin 1s linear infinite;
}

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

/* Error Messages */
.mic-error {
    background: #fee2e2;
    border-left: 4px solid #dc2626;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    color: #991b1b;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mic-welcome-section {
        flex-direction: column;
        text-align: center;
    }
    
    .mic-actions-grid,
    .mic-stats-grid,
    .mic-tips-grid {
        grid-template-columns: 1fr;
    }
    
    .mic-filters-form {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .mic-invitations-table th,
    .mic-invitations-table td {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .invite-actions {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    
    .mic-button-small {
        width: 100%;
        text-align: center;
    }
}

/* Print Styles */
@media print {
    .mic-quick-actions,
    .mic-filters-section,
    .invite-actions,
    .mic-pagination {
        display: none;
    }
}