/* ═══════════════════════════════════════════════════════════════════
   FacultyEval AI — Custom Styles
   AI-Enhanced Faculty Performance Evaluation & Decision Support System
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Base ────────────────────────────────────────────────────────── */
* {
    scrollbar-width: thin;
    scrollbar-color: #c7d2fe transparent;
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: #c7d2fe;
    border-radius: 9999px;
}

*::-webkit-scrollbar-thumb:hover {
    background: #a5b4fc;
}

/* ─── Auth Pages Gradient Background ─────────────────────────────── */
.auth-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #6366f1 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ─── Glass card effect ──────────────────────────────────────────── */
.glass {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.glass-white {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ─── Stat Card Hover ────────────────────────────────────────────── */
.stat-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.06);
}

/* ─── Dashboard card ─────────────────────────────────────────────── */
.dash-card {
    background: white;
    border-radius: 1rem;
    border: 1px solid rgba(229, 231, 235, 0.6);
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.05);
    transition: all 0.3s ease;
}

.dash-card:hover {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
}

/* ─── Animations ─────────────────────────────────────────────────── */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.animate-slideUp {
    animation: slideUp 0.4s ease-out forwards;
}

.animate-slideDown {
    animation: slideDown 0.4s ease-out forwards;
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-pulse-soft {
    animation: pulse-soft 2s ease-in-out infinite;
}

/* ─── Staggered animations for dashboard cards ───────────────────── */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.10s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.20s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.30s; }

/* ─── Progress ring ──────────────────────────────────────────────── */
.progress-ring-bg {
    stroke: #e5e7eb;
}

.progress-ring-fill {
    transition: stroke-dashoffset 1s ease-in-out;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

/* ─── Badge styles ───────────────────────────────────────────────── */
.badge-improving {
    background-color: #d1fae5;
    color: #065f46;
}

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

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

.badge-positive {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-neutral {
    background-color: #f3f4f6;
    color: #4b5563;
}

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

/* ─── Form input focus ───────────────────────────────────────────── */
.input-focus {
    transition: all 0.2s ease;
}

.input-focus:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    outline: none;
}

/* ─── Sidebar active animation ───────────────────────────────────── */
.sidebar a {
    position: relative;
    overflow: hidden;
}

/* ─── Table styles ───────────────────────────────────────────────── */
.data-table {
    width: 100%;
}

.data-table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.data-table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.875rem;
}

.data-table tbody tr:hover {
    background-color: #f9fafb;
}

/* ─── Tooltip ────────────────────────────────────────────────────── */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 10px;
    background: #1f2937;
    color: white;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.tooltip:hover::after {
    opacity: 1;
}

/* ─── Print styles ───────────────────────────────────────────────── */
@media print {
    nav, aside, footer, .no-print {
        display: none !important;
    }
    main {
        padding: 0 !important;
        margin: 0 !important;
    }
    .dash-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}

/* ─── Loading spinner ────────────────────────────────────────────── */
.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e5e7eb;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* ─── Responsive sidebar ─────────────────────────────────────────── */
@media (max-width: 1023px) {
    .sidebar.open {
        transform: translateX(0);
    }
}
