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

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.glass-panel-strong {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Animations */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fade-in 0.3s ease-out forwards;
}

@keyframes slide-in-right {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

/* Maritime specific styles */
.wave-bg {
    background: linear-gradient(135deg, #0f172a 0%, #164e63 100%);
    position: relative;
    overflow: hidden;
}

.wave-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(6, 182, 212, 0.03) 10px,
        rgba(6, 182, 212, 0.03) 20px
    );
    animation: wave 20s linear infinite;
}

@keyframes wave {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Status badges */
.status-badge {
    @apply px-2.5 py-0.5 rounded-full text-xs font-medium;
}

.status-active {
    @apply bg-emerald-500/20 text-emerald-400 border border-emerald-500/30;
}

.status-maintenance {
    @apply bg-secondary-500/20 text-secondary-400 border border-secondary-500/30;
}

.status-docked {
    @apply bg-blue-500/20 text-blue-400 border border-blue-500/30;
}

.status-transit {
    @apply bg-primary-500/20 text-primary-400 border border-primary-500/30;
}

/* Form styles */
.form-input {
    @apply w-full px-4 py-2 bg-slate-900/50 border border-slate-700 rounded-lg text-slate-200 placeholder-slate-500 focus:outline-none focus:border-primary-500/50 focus:ring-1 focus:ring-primary-500/50 transition-all;
}

.form-label {
    @apply block text-sm font-medium text-slate-300 mb-1.5;
}

/* Card hover effects */
.vessel-card {
    @apply relative overflow-hidden transition-all duration-300 hover:transform hover:-translate-y-1 hover:shadow-2xl hover:shadow-primary-500/10;
}

.vessel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #06b6d4, transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.vessel-card:hover::before {
    opacity: 1;
}

/* Map placeholder grid */
.map-grid {
    background-image: 
        linear-gradient(rgba(30, 41, 59, 0.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 41, 59, 0.5) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Custom checkbox */
.custom-checkbox {
    @apply appearance-none w-5 h-5 border border-slate-600 rounded bg-slate-900/50 checked:bg-primary-600 checked:border-primary-600 cursor-pointer transition-colors relative;
}

.custom-checkbox::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 2px;
    transition: transform 0.2s;
}

.custom-checkbox:checked::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Toast notifications */
.toast {
    @apply fixed bottom-4 right-4 px-6 py-3 rounded-lg shadow-2xl flex items-center gap-3 transform translate-y-20 opacity-0 transition-all duration-300 z-50;
}

.toast.show {
    @apply translate-y-0 opacity-100;
}

.toast-success {
    @apply bg-emerald-900/90 border border-emerald-500/30 text-emerald-100;
}

.toast-error {
    @apply bg-red-900/90 border border-red-500/30 text-red-100;
}

/* Typography enhancements */
.font-mono-numbers {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

/* Tooltip */
.tooltip {
    @apply relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    padding: 4px 8px;
    background: rgba(15, 23, 42, 0.95);
    color: white;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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