/* Great Kings Academy - Custom Styles */

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #f0fdf4 100%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #16a34a 0%, #15803d 100%);
}

/* ========================================
   ENHANCED ANIMATIONS
   ======================================== */

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slideOutRight {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(34, 197, 94, 0.5), 0 0 20px rgba(34, 197, 94, 0.3); }
    50% { box-shadow: 0 0 20px rgba(34, 197, 94, 0.8), 0 0 40px rgba(34, 197, 94, 0.5); }
}

@keyframes ripple {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(4); opacity: 0; }
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes rotateIn {
    from {
        transform: rotate(-200deg) scale(0);
        opacity: 0;
    }
    to {
        transform: rotate(0) scale(1);
        opacity: 1;
    }
}

@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-scale-in {
    animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-slide-in {
    animation: slideIn 0.3s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

.animate-slide-out-right {
    animation: slideOutRight 0.3s ease-out;
}

.animate-bounce-in {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

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

/* Staggered animation delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* Card Styles */
.card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(34, 197, 94, 0.1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #22c55e, #4ade80, #22c55e);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-4px);
    border-color: rgba(34, 197, 94, 0.3);
}

.card:hover::before {
    transform: scaleX(1);
}

/* Glass Card Variant */
.card-glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

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

.btn-primary {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #475569;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

.form-input:hover:not(:focus) {
    border-color: #22c55e;
}

.form-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.form-error {
    font-size: 0.75rem;
    color: #ef4444;
    margin-top: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #052e16 0%, #14532d 50%, #166534 100%);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 40;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(74, 222, 128, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(34, 197, 94, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 0.75rem;
    margin: 0.375rem 0.75rem;
    position: relative;
    overflow: hidden;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
    border-radius: 0 4px 4px 0;
    transition: height 0.3s ease;
}

.sidebar-link:hover {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    color: white;
    transform: translateX(5px);
}

.sidebar-link:hover::before {
    height: 60%;
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(74, 222, 128, 0.2) 0%, rgba(34, 197, 94, 0.1) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.sidebar-link.active::before {
    height: 80%;
}

.sidebar-link i {
    transition: transform 0.3s ease;
}

.sidebar-link:hover i {
    transform: scale(1.2);
}

/* Main Content */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #f0fdf4 100%);
}

@media (max-width: 1023px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    border-radius: 1rem;
    border: 1px solid rgba(34, 197, 94, 0.1);
}

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

.data-table th {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: #166534;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 2px solid rgba(34, 197, 94, 0.2);
}

.data-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.data-table tr {
    transition: all 0.3s ease;
}

.data-table tbody tr:hover {
    background: linear-gradient(90deg, #f0fdf4 0%, #ffffff 100%);
    transform: scale(1.01);
}

.data-table tbody tr:hover td {
    color: #166534;
}

/* Sticky header for vertical scrolling */
.data-table .sticky-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Sticky first column for horizontal scrolling */
.data-table .sticky-col {
    position: sticky;
    left: 0;
    z-index: 5;
    background: white;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
}

/* Header cell that is both sticky row and column */
.data-table th.sticky-col {
    z-index: 15;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
}

/* Ensure sticky column has background on hover */
.data-table tbody tr:hover .sticky-col {
    background: linear-gradient(90deg, #f0fdf4 0%, #ffffff 100%);
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    transition: all 0.3s ease;
}

.badge-success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

.badge-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.badge-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.badge-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

/* Stat Card */
.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(34, 197, 94, 0.1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, transparent 60%);
    border-radius: 0 1rem 0 100%;
    transition: all 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
}

.stat-card:hover::before {
    width: 150px;
    height: 150px;
}

.stat-card .stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 1;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Toast Styles */
.toast {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 400px;
}

.toast-success {
    background: #dcfce7;
    border-left: 4px solid #22c55e;
    color: #166534;
}

.toast-error {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.toast-warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.toast-info {
    background: #dbeafe;
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-content {
    background: white;
    border-radius: 1.5rem;
    max-width: 32rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border-radius: 1.5rem 1.5rem 0 0;
}

.modal-header h3 {
    font-weight: 700;
    color: #166534;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 0 0 1.5rem 1.5rem;
}

/* Avatar */
.avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 1rem;
    object-fit: cover;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    transition: all 0.3s ease;
}

.avatar-lg {
    width: 5rem;
    height: 5rem;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.75rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    min-width: 14rem;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dropdown-item:hover {
    background: linear-gradient(90deg, #f0fdf4 0%, #ecfdf5 100%);
    color: #16a34a;
    padding-left: 1.25rem;
}

.dropdown-item i {
    transition: transform 0.3s ease;
}

.dropdown-item:hover i {
    transform: scale(1.1);
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 0.375rem;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Page Transition Loader */
.page-loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #052e16 0%, #14532d 50%, #166534 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    overflow: hidden;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.page-loader.visible {
    opacity: 1;
    visibility: visible;
}

.loader-content {
    text-align: center;
    position: relative;
    z-index: 10;
}

/* Text Animation Container */
.text-animation {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 0.75rem;
    perspective: 1000px;
}

.text-animation.subtitle {
    gap: 8px;
    margin-bottom: 2.5rem;
    margin-top: 0.5rem;
}

/* Individual Letter Styling */
.text-animation .letter {
    display: inline-block;
    font-size: 4rem;
    font-weight: 900;
    color: transparent;
    background: linear-gradient(180deg, #ffffff 0%, #bbf7d0 50%, #86efac 100%);
    -webkit-background-clip: text;
    background-clip: text;
    opacity: 0;
    transform: translateY(80px) rotateY(90deg) scale(0.5);
    animation: letterWaveIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: calc(var(--delay) * 0.1s);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    position: relative;
}

.text-animation.subtitle .letter {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(180deg, #4ade80 0%, #22c55e 50%, #16a34a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    letter-spacing: 0.3em;
    filter: drop-shadow(0 2px 4px rgba(34, 197, 94, 0.5));
    animation-delay: calc(var(--delay) * 0.1s + 0.3s);
}

.text-animation .letter.space {
    width: 1.5rem;
    background: none;
}

/* Wave In Animation */
@keyframes letterWaveIn {
    0% {
        opacity: 0;
        transform: translateY(80px) rotateY(90deg) scale(0.5);
        filter: blur(10px);
    }
    50% {
        opacity: 1;
        transform: translateY(-20px) rotateY(-20deg) scale(1.1);
        filter: blur(0);
    }
    75% {
        transform: translateY(10px) rotateY(10deg) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateY(0) scale(1);
        filter: blur(0);
    }
}

/* Continuous Glow Pulse after letters appear */
.page-loader.visible .text-animation .letter {
    animation:
        letterWaveIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
        letterFloat 3s ease-in-out infinite,
        letterShine 4s ease-in-out infinite;
    animation-delay:
        calc(var(--delay) * 0.1s),
        calc(var(--delay) * 0.1s + 1.5s),
        calc(var(--delay) * 0.1s + 2s);
}

.page-loader.visible .text-animation.subtitle .letter {
    animation:
        letterWaveIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
        letterFloat 3s ease-in-out infinite,
        letterGreenShine 3s ease-in-out infinite;
    animation-delay:
        calc(var(--delay) * 0.1s + 0.3s),
        calc(var(--delay) * 0.1s + 1.8s),
        calc(var(--delay) * 0.1s + 2.3s);
}

/* Floating Animation */
@keyframes letterFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.02);
    }
}

/* Shine Effect for Main Text */
@keyframes letterShine {
    0%, 100% {
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 20px rgba(255, 255, 255, 0));
    }
    50% {
        filter: drop-shadow(0 4px 15px rgba(34, 197, 94, 0.5)) drop-shadow(0 0 40px rgba(255, 255, 255, 0.3));
    }
}

/* Green Shine Effect for Subtitle */
@keyframes letterGreenShine {
    0%, 100% {
        filter: drop-shadow(0 2px 4px rgba(34, 197, 94, 0.3));
    }
    50% {
        filter: drop-shadow(0 4px 20px rgba(34, 197, 94, 0.8)) drop-shadow(0 0 30px rgba(74, 222, 128, 0.4));
    }
}

/* Loader Dots */
.loader-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 1rem;
}

.loader-dots .dot {
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border-radius: 50%;
    animation: dotPulse 1.8s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.5);
}

.loader-dots .dot:nth-child(1) {
    animation-delay: 0s;
}

.loader-dots .dot:nth-child(2) {
    animation-delay: 0.3s;
}

.loader-dots .dot:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes dotPulse {
    0%, 100% {
        transform: scale(0.5);
        opacity: 0.4;
        box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
        box-shadow: 0 0 30px rgba(34, 197, 94, 0.8);
    }
}

/* Animated Background Elements */
.page-loader::before,
.page-loader::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    animation: floatOrb 8s ease-in-out infinite;
}

.page-loader::before {
    width: 400px;
    height: 400px;
    top: -200px;
    left: -200px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.15) 0%, transparent 70%);
    animation-delay: 0s;
}

.page-loader::after {
    width: 500px;
    height: 500px;
    bottom: -250px;
    right: -250px;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.1) 0%, transparent 70%);
    animation-delay: -4s;
}

@keyframes floatOrb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(50px, 30px) scale(1.1);
    }
    50% {
        transform: translate(30px, 60px) scale(0.95);
    }
    75% {
        transform: translate(-20px, 40px) scale(1.05);
    }
}

/* Particle effect lines */
.loader-content::before,
.loader-content::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.6), transparent);
    animation: lineSlide 2s ease-in-out infinite;
}

.loader-content::before {
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
}

.loader-content::after {
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 1s;
}

@keyframes lineSlide {
    0%, 100% {
        width: 50px;
        opacity: 0.3;
    }
    50% {
        width: 200px;
        opacity: 1;
    }
}

/* Initial page loader (before app loads) */
.loader-logo {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
}

.logo-shield {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: shieldPulse 2s ease-in-out infinite;
}

.logo-shield i {
    font-size: 2.5rem;
    color: #052e16;
}

.logo-crown {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    animation: crownBounce 2s ease-in-out infinite;
}

.logo-crown i {
    font-size: 2rem;
    color: #4ade80;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

@keyframes shieldPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 15px 50px rgba(34, 197, 94, 0.4); }
}

@keyframes crownBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-5px); }
}

.loader-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loader-progress {
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, #4ade80 0%, #22c55e 50%, #4ade80 100%);
    background-size: 200% 100%;
    border-radius: 2px;
    animation: progressSlide 1.5s ease-in-out infinite;
}

@keyframes progressSlide {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(150%); }
    100% { transform: translateX(400%); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    color: #9ca3af;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: #6b7280;
    font-size: 0.875rem;
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Tablet and below */
@media (max-width: 768px) {
    /* Page Loader - smaller text for mobile */
    .text-animation .letter {
        font-size: 2.5rem;
        letter-spacing: 0.1em;
    }

    .text-animation.subtitle .letter {
        font-size: 1.25rem;
        letter-spacing: 0.2em;
    }

    .loader-dots .dot {
        width: 10px;
        height: 10px;
        margin: 0 6px;
    }

    .loader-content::before,
    .loader-content::after {
        display: none;
    }

    .page-loader::before,
    .page-loader::after {
        width: 200px;
        height: 200px;
    }

    /* Navbar adjustments */
    .navbar-brand h1 {
        font-size: 1rem;
    }

    .navbar-brand p {
        display: none;
    }

    /* Forms */
    .form-grid {
        grid-template-columns: 1fr;
    }

    /* Tables */
    .data-table {
        font-size: 0.75rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }

    /* Cards */
    .stat-card {
        padding: 1rem;
    }

    /* Profile */
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
}

/* Mobile */
@media (max-width: 480px) {
    /* Page Loader - even smaller for small phones */
    .text-animation .letter {
        font-size: 1.75rem;
        letter-spacing: 0.05em;
    }

    .text-animation.subtitle .letter {
        font-size: 0.875rem;
        letter-spacing: 0.15em;
    }

    .loader-dots {
        margin-top: 1.5rem;
    }

    .loader-dots .dot {
        width: 8px;
        height: 8px;
        margin: 0 4px;
    }

    /* Hide background orbs on very small screens */
    .page-loader::before,
    .page-loader::after {
        display: none;
    }

    /* General mobile adjustments */
    .page-header h1 {
        font-size: 1.25rem;
    }

    .page-header p {
        font-size: 0.875rem;
    }

    /* Buttons */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    /* Dashboard stats */
    .dashboard-stats {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    /* Modals */
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
}

