/* css/homepage.css */

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz@14..32&display=swap');

* {
    font-family: 'Inter', system-ui, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f4f7fb;
}

/* custom navy/teal palette */
.bg-navy-sidebar {
    background-color: #0c2538;
}

.bg-navy-deep {
    background-color: #0b1f33;
}

.text-teal-logo {
    color: #5ee0d0;
}

.border-teal-light {
    border-color: #2aa79b33;
}

/* hover effect for nav items */
.hover-nav:hover {
    background-color: #1f4e5e;
    color: white;
}

/* active navigation item */
.active-nav {
    background-color: #1a4450;
    border-left: 4px solid #2aa79b;
}

/* stat card styles */
.stat-card {
    transition: all 0.2s ease;
    border: 1px solid #eef2f6;
    background-color: white;
    border-radius: 0.75rem;
}

.stat-card:hover {
    box-shadow: 0 8px 20px -8px rgba(18, 79, 86, 0.15);
    transform: translateY(-2px);
}

/* badge styles - General */
.badge-pending, .badge-pending-review {
    background-color: #fef9e7;
    color: #b78103;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 500;
}

.badge-approved {
    background-color: #e3f7ec;
    color: #0f7b4b;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 500;
}

.badge-draft {
    background-color: #edf2f7;
    color: #385d7a;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 500;
}

.badge-expired {
    background-color: #fee9e7;
    color: #b33f2f;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 500;
}

.badge-validated {
    background-color: #e0f2fe;
    color: #0369a1;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Category badges */
.badge-instruction {
    background-color: #dbeafe;
    color: #1d4ed8;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 500;
}

.badge-research {
    background-color: #dcfce7;
    color: #15803d;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 500;
}

.badge-extension {
    background-color: #fef3c7;
    color: #b45309;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 500;
}

.badge-employment {
    background-color: #f3e8ff;
    color: #7e22ce;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* dashboard background */
.bg-dashboard-bg {
    background-color: #f4f7fb;
}

/* utility classes */
.text-teal-300 {
    color: #5eead4;
}

.text-teal-300\/70 {
    color: rgba(94, 234, 212, 0.7);
}

.bg-teal-800\/40 {
    background-color: rgba(17, 94, 89, 0.4);
}

.border-teal-400 {
    border-color: #2dd4bf;
}

/* hover states */
.hover\:bg-teal-50:hover {
    background-color: #f0fdfa;
}

.hover\:text-teal-800:hover {
    color: #115e59;
}

/* transitions */
.transition {
    transition: all 0.2s ease;
}

.transition-colors {
    transition: all 0.2s ease;
}

/* button styling */
.bg-teal-700 {
    background-color: #0f766e;
}

.bg-teal-700:hover {
    background-color: #115e59;
}

/* ============================================ */
/* ACTION BUTTON STYLES */
/* ============================================ */

/* Modern button styles with icons */
.action-btn-view,
.action-btn-download,
.action-btn-edit {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.action-btn-view {
    background-color: #0d9488;
    color: white;
}

.action-btn-view:hover {
    background-color: #0f766e;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

.action-btn-download {
    background-color: #3b82f6;
    color: white;
}

.action-btn-download:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.action-btn-edit {
    background-color: #f59e0b;
    color: white;
}

.action-btn-edit:hover {
    background-color: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* Button styles matching documents.js */
.btn-view, .btn-view-sm,
.btn-download, .btn-download-sm,
.btn-edit, .btn-edit-sm {
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    padding: 0.3rem 0.85rem;
    border-radius: 0.375rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-view:hover, .btn-view-sm:hover {
    background-color: #e5e7eb;
    border-color: #d1d5db;
}

.btn-download, .btn-download-sm {
    background-color: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.btn-download:hover, .btn-download-sm:hover {
    background-color: #bbf7d0;
}

.btn-edit, .btn-edit-sm {
    background-color: #fef3c7;
    border: 1px solid #fde68a;
    color: #d97706;
}

.btn-edit:hover, .btn-edit-sm:hover {
    background-color: #fde68a;
}

.disabled-btn {
    opacity: 0.5;
    cursor: not-allowed !important;
    background-color: #f3f4f6 !important;
    color: #9ca3af !important;
    border-color: #e5e7eb !important;
}

.disabled-btn:hover {
    background-color: #f3f4f6 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Legacy button styles for compatibility */
.view-btn, .download-btn {
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn:hover, .download-btn:hover {
    background-color: #e5e7eb;
    border-color: #d1d5db;
}

.view-btn-sm, .download-btn-sm {
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    padding: 0.35rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn-sm:hover, .download-btn-sm:hover {
    background-color: #e5e7eb;
}

/* ============================================ */
/* RESPONSIVE DESIGN */
/* ============================================ */

/* Mobile header spacer */
.mobile-header-spacer {
    height: 60px;
    width: 100%;
}

/* Sidebar - Mobile */
@media (max-width: 768px) {
    .w-72 {
        width: 100%;
        max-width: 280px;
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .w-72.open {
        left: 0;
    }
    
    main {
        width: 100%;
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
        position: fixed;
        top: 12px;
        left: 12px;
        z-index: 1001;
        background: #0c2538;
        color: white;
        border: none;
        border-radius: 0.5rem;
        padding: 0.625rem 0.875rem;
        cursor: pointer;
        font-size: 1.25rem;
        line-height: 1;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
}

@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
    
    .sidebar-overlay {
        display: none !important;
    }
    
    .w-72 {
        position: relative;
        left: 0 !important;
    }
    
    .mobile-header-spacer {
        display: none;
    }
}

/* Header responsive */
@media (max-width: 640px) {
    h1.text-3xl {
        font-size: 1.5rem;
    }
    
    .text-sm.text-gray-500.mt-1 {
        font-size: 0.75rem;
    }
    
    .bg-white.rounded-full.px-4.py-2 {
        padding: 0.5rem 0.75rem;
        font-size: 0.7rem;
    }
}

/* Stats cards responsive */
@media (max-width: 640px) {
    .grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-4 {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card .text-3xl {
        font-size: 1.75rem;
    }
    
    .stat-card .text-gray-500.text-sm {
        font-size: 0.7rem;
    }
    
    .stat-card .text-xs {
        font-size: 0.65rem;
    }
}

/* Category cards responsive */
@media (max-width: 640px) {
    .grid-cols-1.md\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem;
    }
}

/* Mobile card view styling */
@media (max-width: 768px) {
    .border.rounded-lg.p-4 {
        background-color: white;
        transition: all 0.2s ease;
    }
    
    .border.rounded-lg.p-4:hover {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        transform: translateY(-1px);
    }
    
    .p-4.md\:p-7 {
        padding-top: 0.75rem;
    }
}

/* Table styling */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    font-weight: 500;
    text-align: left;
    font-size: 0.7rem;
    color: #6b7280;
    padding: 0.75rem 0.5rem;
    letter-spacing: 0.5px;
}

td {
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
    border-bottom: 1px solid #f3f4f6;
}

/* Touch-friendly improvements */
@media (max-width: 768px) {
    button, 
    a,
    .clickable,
    [role="button"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    .overflow-y-auto {
        -webkit-overflow-scrolling: touch;
    }
    
    body {
        font-size: 14px;
    }
}

/* Print styles */
@media print {
    .sidebar,
    nav,
    .menu-toggle,
    button:not(.no-print) {
        display: none !important;
    }
    
    main {
        margin: 0;
        padding: 0;
    }
    
    .stat-card {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .mobile-header-spacer {
        display: none;
    }
}

/* Color utilities */
.bg-teal-100 { background-color: #ccfbf1; }
.text-teal-700 { color: #0f766e; }
.bg-amber-100 { background-color: #fef3c7; }
.text-amber-700 { color: #b45309; }
.bg-indigo-100 { background-color: #e0e7ff; }
.text-indigo-700 { color: #4338ca; }
.bg-green-100 { background-color: #dcfce7; }
.text-green-700 { color: #15803d; }
.bg-red-100 { background-color: #fee2e2; }
.text-red-700 { color: #dc2626; }
.bg-blue-100 { background-color: #dbeafe; }
.text-blue-700 { color: #1d4ed8; }
.bg-purple-100 { background-color: #f3e8ff; }
.text-purple-700 { color: #7e22ce; }

/* Progress bar colors */
.bg-teal-600 { background-color: #0d9488; }
.bg-amber-600 { background-color: #d97706; }
.bg-indigo-500 { background-color: #6366f1; }
.bg-blue-500 { background-color: #3b82f6; }
.bg-green-500 { background-color: #22c55e; }
.bg-amber-500 { background-color: #f59e0b; }
.bg-purple-500 { background-color: #a855f7; }