/* Reset i podstawowe style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    line-height: 1.6;
}

/* Navbar */
.navbar-dark {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.2rem;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    transform: translateY(-1px);
}

.nav-link.active {
    background-color: rgba(255,255,255,0.2) !important;
    border-radius: 6px;
}

/* Strona logowania */
.login-page {
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255,255,255,0.05) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite;
    z-index: 0;
}

.bg-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    position: relative;
    z-index: 1;
}

.login-form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 3rem;
    border-radius: 25px;
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.15),
        0 0 0 1px rgba(255,255,255,0.3),
        inset 0 1px 0 rgba(255,255,255,0.9);
    max-width: 420px;
    width: 100%;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255,255,255,0.3);
    animation: containerSlideIn 0.8s ease-out;
}

/* Animacja kontenera */
@keyframes containerSlideIn {
    0% {
        opacity: 0;
        transform: translateX(50px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Fancy header z ikoną */
.login-icon-container {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.login-main-icon {
    font-size: 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: iconPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.3));
}

.icon-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Particles background */
.particles-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 50%;
    animation: float var(--duration) linear infinite;
    animation-delay: var(--delay);
    opacity: 0.6;
}

.particle:nth-child(1) { left: 10%; top: 90%; }
.particle:nth-child(2) { left: 20%; top: 80%; }
.particle:nth-child(3) { left: 30%; top: 70%; }
.particle:nth-child(4) { left: 70%; top: 80%; }
.particle:nth-child(5) { left: 80%; top: 90%; }
.particle:nth-child(6) { left: 90%; top: 75%; }

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Fancy inputs */
.input-group-fancy {
    position: relative;
    margin-bottom: 1.5rem;
}

.fancy-input {
    border-radius: 15px;
    border: 2px solid #e9ecef;
    padding: 1.2rem 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    position: relative;
    z-index: 2;
}

.fancy-input:focus {
    border-color: #667eea;
    box-shadow: 
        0 0 0 0.2rem rgba(102, 126, 234, 0.25),
        0 0 20px rgba(102, 126, 234, 0.15);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
}

.input-highlight {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
    border-radius: 2px;
}

.fancy-input:focus + label + .input-highlight {
    width: 100%;
}

/* Fancy button */
.fancy-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 15px;
    padding: 1rem 1.5rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.3),
        0 0 0 1px rgba(255,255,255,0.2);
}

.btn-content {
    position: relative;
    z-index: 2;
}

.btn-ripple {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fancy-btn:hover .btn-ripple {
    left: 100%;
}

.fancy-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-3px);
    box-shadow: 
        0 15px 35px rgba(102, 126, 234, 0.4),
        0 0 30px rgba(102, 126, 234, 0.3);
}

.fancy-btn:active {
    transform: translateY(-1px);
    box-shadow: 
        0 8px 20px rgba(102, 126, 234, 0.4);
}

.login-form .form-floating {
    margin-bottom: 1rem;
}

.login-form .form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 1rem 0.75rem;
    transition: all 0.4s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

.login-form .form-control:focus {
    border-color: #667eea;
    box-shadow: 
        0 0 0 0.2rem rgba(102, 126, 234, 0.25),
        0 0 15px rgba(102, 126, 234, 0.1);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.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.6s ease;
}

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

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 10px 25px rgba(102, 126, 234, 0.4),
        0 0 20px rgba(102, 126, 234, 0.2);
}

/* Karty na dashboardzie */
.welcome-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-left: 5px solid #667eea;
}

.stats-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stats-content h3 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
    color: #2d3748;
}

.stats-content p {
    color: #718096;
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Szybkie akcje */
.quick-actions-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.action-btn {
    display: block;
    text-decoration: none;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    color: #2d3748;
    height: 100%;
}

.action-btn:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    text-decoration: none;
    color: #667eea;
}

.action-btn i {
    color: #667eea;
    transition: all 0.3s ease;
}

.action-btn:hover i {
    transform: scale(1.1);
}

.action-btn h5 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Ostatnie vouchery */
.recent-vouchers-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Tabele */
.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.table th {
    background-color: #f8f9fa;
    border: none;
    font-weight: 600;
    color: #2d3748;
    padding: 1rem 0.75rem;
}

.table td {
    border: none;
    padding: 1rem 0.75rem;
    vertical-align: middle;
}

.table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

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

.table tbody tr:last-child {
    border-bottom: none;
}

/* Karty */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.card-body {
    padding: 1.5rem;
}

/* Przyciski */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-outline-primary {
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline-primary:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.btn-success:hover {
    background: linear-gradient(135deg, #218838, #1eb89a);
}

/* Formularze */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Alerty */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
}

/* Badge'y */
.badge {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
}

/* Paginacja */
.pagination {
    --bs-pagination-border-radius: 8px;
}

.page-link {
    border: none;
    color: #667eea;
    font-weight: 500;
}

.page-item.active .page-link {
    background: #667eea;
    border-color: #667eea;
}

/* Auto-searched input */
.auto-searched {
    border-color: #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25) !important;
}

/* Loading states */
.loading-spinner {
    display: none;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-content .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Stopka */
.footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    margin-top: 2rem;
}

.footer a {
    color: #667eea;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: #764ba2;
    text-decoration: none !important;
}

/* Animacje dla statystyk */
.stats-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Floating elements dla strony logowania */
.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    animation: float 6s ease-in-out infinite;
    opacity: 0.6;
    font-size: 1.5rem;
    left: 50%;
    top: 50%;
    transform: translate(var(--x), var(--y));
    animation-delay: var(--delay);
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.floating-icon {
    animation: logoFloat 3s ease-in-out infinite;
    position: relative;
    display: inline-block;
}

.floating-icon::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: glow 2s ease-in-out infinite alternate;
    z-index: -1;
}

.floating-icon::after {
    content: '';
    position: absolute;
    top: -30px;
    left: -30px;
    right: -30px;
    bottom: -30px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    animation: pulse-ring 2s ease-in-out infinite;
    z-index: -2;
}

/* Animacje */
@keyframes float {
    0%, 100% {
        transform: translate(var(--x), var(--y)) translateY(0px);
    }
    50% {
        transform: translate(var(--x), var(--y)) translateY(-20px);
    }
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

@keyframes glow {
    0% {
        opacity: 0.4;
        transform: scale(1);
    }
    100% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes backgroundShift {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(-5px) translateY(-10px);
    }
    50% {
        transform: translateX(10px) translateY(5px);
    }
    75% {
        transform: translateX(-8px) translateY(8px);
    }
}

/* Animacja fade-in dla elementów */
.fade-in {
    animation: fadeIn 1.2s ease-out;
}

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

/* Animacja slide-in dla formularza */
.slide-in-right {
    animation: slideInRight 1s ease-out;
}

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

/* Animacja slajdu dla navbar */
.navbar {
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Efekt hover dla przycisków */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}
