/* static/css/style.css */
:root {
    --primary-color: #6366F1;
    --primary-dark: #4F46E5;
    --secondary-color: #06B6D4;
    --accent-color: #F97316;
    --success-color: #10B981;
    --text-color: #1E293B;
    --text-secondary: #64748B;
    --bg-color: #F8FAFC;
    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Removed global transition to prevent tooltip flickering issues */
/* Individual elements now have their own transitions defined */

/* Tooltip styles */
.group:hover .group-hover\:opacity-100 {
    opacity: 1 !important;
}

.group:hover .group-hover\:visible {
    visibility: visible !important;
}

.group:hover .group-hover\:pointer-events-auto {
    pointer-events: auto !important;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.7;
    font-weight: 400;
}

/* Announcement list tweaks */
.announcement-scroll {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 0.5rem;
    margin-right: -0.5rem;
}

.announcement-scroll::-webkit-scrollbar {
    width: 6px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color), var(--primary-color));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shine 3s ease infinite;
    font-size: 1.75rem !important;
    font-weight: 800;
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
    line-height: 1.2;
    vertical-align: middle;
    overflow: hidden;
}

.gradient-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: shine-sweep 4s ease-in-out infinite;
}

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

@keyframes shine-sweep {
    0%, 100% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
}

.gradient-text:hover {
    transition: filter 0.3s ease;
    animation: gradient-shine 1.5s ease infinite;
    filter: brightness(1.2) drop-shadow(0 0 8px rgba(99, 102, 241, 0.4));
}

/* Card Styles */
.card-modern, .card {
    background: white;
    border-radius: 20px;
    border: none;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
    margin-bottom: 1.5rem;
}

.card-modern::before, .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}

.card-modern:hover, .card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-5px);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    padding: 1.25rem 1.5rem;
    font-size: 1.1rem;
}

/* Button Styles */
.btn-gradient, .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    border-radius: 12px;
    padding: 0.85rem 2rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    position: relative;
    overflow: hidden;
    color: white;
    transition: all 0.3s ease;
}

.btn-gradient::before, .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-gradient:hover, .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    color: white;
}

.btn-gradient:hover::before, .btn-primary:hover::before {
    left: 100%;
}

/* Navigation Styles */
header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 100;
}

header > div > div {
    align-items: center;
    min-height: 48px;
}

header > div > div > div {
    align-items: center;
}

header .overflow-x-auto::-webkit-scrollbar {
    display: none;
}

header .overflow-x-auto {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Prevent buttons from becoming too wide on large screens */
@media (min-width: 1400px) {
    header > div > div > div {
        max-width: 1400px;
        margin: 0 auto;
    }
}

.nav-link-modern {
    color: var(--text-color) !important;
    font-weight: 600;
    padding: 0.65rem 1.1rem !important;
    border-radius: 12px;
    position: relative;
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    text-decoration: none;
    white-space: nowrap;
    min-width: fit-content;
    box-sizing: border-box;
    overflow: hidden;
}

.nav-link-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    border-radius: 10px;
    z-index: -1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link-modern:hover {
    color: white !important;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 0 0 3px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.2);
}

.nav-link-modern:hover::before {
    opacity: 1;
}

.nav-link-modern.active,
.nav-link-modern.text-indigo-600 {
    color: white !important;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 0 0 3px rgba(99, 102, 241, 0.2);
    border-color: transparent;
}

.nav-link-modern.active::before,
.nav-link-modern.text-indigo-600::before {
    opacity: 1;
}

.nav-link-modern:active {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.new-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 0.65rem;
    padding: 3px 7px;
    border-radius: 9999px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
    z-index: 10;
    font-family: 'Poppins', sans-serif;
    line-height: 1;
}

/* Form Styles */
.form-control, input[type="email"], input[type="text"], select {
    border-radius: 12px;
    border: 2px solid var(--border-color);
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus, input:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
    outline: none;
}

/* Alert Styles */
.alert {
    border-radius: 16px;
    border: none;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-md);
    font-weight: 500;
    margin-bottom: 1rem;
}

.alert-success {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    color: #065F46;
    border-left: 4px solid var(--success-color);
}

.alert-danger, .alert-error {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    color: #991B1B;
    border-left: 4px solid #DC2626;
}

.alert-info {
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
    color: #1E40AF;
    border-left: 4px solid #3B82F6;
}

.alert-warning {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    color: #92400E;
    border-left: 4px solid #F59E0B;
}

/* Table Styles */
.table {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    vertical-align: top;
    border-color: #dee2e6;
}

.table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: #F1F5F9;
    transform: scale(1.01);
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

/* Floating Button */
.floating-aclik-siniri-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #EF476F, #F78C6B);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(239, 71, 111, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.floating-aclik-siniri-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(239, 71, 111, 0.6);
    color: white;
    text-decoration: none;
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
    z-index: 999;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.6);
}

/* Loading Animation */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.loading {
    animation: shimmer 2s infinite;
    background: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
    background-size: 1000px 100%;
}

/* Tablet and Medium Screens */
@media (max-width: 1200px) {
    .nav-link-modern {
        padding: 0.6rem 0.8rem !important;
        font-size: 0.8rem;
    }
    
    header .gradient-text,
    .gradient-text {
        font-size: 1.5rem !important;
        margin-right: 0.5rem !important;
    }
    
    .new-badge {
        font-size: 0.55rem;
        padding: 2px 5px;
        top: -5px;
        right: -5px;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container { padding: 0.75rem; }
    .card-modern, .card { margin-bottom: 1rem; border-radius: 16px; }
    .card-header { padding: 1rem; font-size: 1rem; }
    .btn-primary, .btn-gradient { width: 100%; margin-bottom: 0.5rem; }
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    .floating-aclik-siniri-btn { bottom: 90px; right: 20px; padding: 12px 20px; } /* Moved up to avoid overlap with back-to-top or bottom bars */
    .floating-btn-text { display: none; }
    #back-to-top { bottom: 20px; left: 20px; width: 40px; height: 40px; }
    
    .nav-link-modern {
        padding: 0.5rem 0.6rem !important;
        font-size: 0.75rem;
        flex: 0 0 auto !important;
    }
    
    header .gradient-text,
    .gradient-text {
        font-size: 1.25rem !important;
        margin-right: 0.4rem !important;
    }
    
    header > div > div {
        justify-content: flex-start !important;
        align-items: center !important;
    }
    
    header > div > div > div {
        flex: 0 !important;
        gap: 0.5rem !important;
        align-items: center !important;
    }
    
    .new-badge {
        font-size: 0.5rem;
        padding: 2px 4px;
        top: -4px;
        right: -4px;
    }
}

