/* Custom styles for ISP Dashboard */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Gradient backgrounds */
.gradient-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.gradient-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.gradient-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.gradient-accent {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

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

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

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

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

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

/* Loading spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #6366f1;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .mobile-padding {
        padding-bottom: 80px;
    }

    .mobile-card {
        margin-bottom: 1rem;
    }

    .mobile-chart {
        height: 250px !important;
    }
}

/* Custom button styles */
.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: white;
    color: #6366f1;
    border: 1px solid #e5e7eb;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #6366f1;
}

/* Status indicators */
.status-online {
    background: #10b981;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-offline {
    background: #ef4444;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-maintenance {
    background: #f59e0b;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Chart container styles */
.chart-container {
    position: relative;
    height: 320px;
    width: 100%;
}

/* Activity type badges */
.activity-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.activity-badge.maintenance {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.activity-badge.meeting {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.activity-badge.installation {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

/* Star logo animations */
.star-logo {
    animation: starPulse 8s infinite;
}

@keyframes starPulse {
    0% {
        transform: scale(1) rotate(0deg);
        filter: brightness(1);
    }
    10% {
        transform: scale(1.1) rotate(5deg);
        filter: brightness(1.2);
    }
    15% {
        transform: scale(1.05) rotate(-3deg);
        filter: brightness(1.1);
    }
    20% {
        transform: scale(1.08) rotate(2deg);
        filter: brightness(1.15);
    }
    25% {
        transform: scale(1) rotate(0deg);
        filter: brightness(1);
    }
    100% {
        transform: scale(1) rotate(0deg);
        filter: brightness(1);
    }
}

.star-logo:hover {
    animation: starHover 0.6s ease-in-out;
}

@keyframes starHover {
    0% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.2) rotate(10deg);
    }
    50% {
        transform: scale(1.15) rotate(-5deg);
    }
    75% {
        transform: scale(1.1) rotate(3deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* Avatar menu responsive positioning */
@media (max-width: 768px) {
    #avatarMenu {
        right: 0.5rem !important;
        left: auto !important;
        transform: none !important;
        width: 11rem !important;
    }
}

/* Responsive grid adjustments */
@media (max-width: 640px) {
    .grid-responsive {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .grid-responsive {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1025px) {
    .grid-responsive {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}
