/* Parafix - Listy Opłatkowe - Główne style */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Kontener logowania */
.login-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    width: 100%;
    max-width: 500px;
    animation: slideUp 0.5s ease-out;
}

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

/* Sekcja logo */
.logo-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    text-align: center;
}

.logo {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.logo-section h1 {
    color: white;
    font-size: 36px;
    font-weight: 300;
    margin-bottom: 5px;
    letter-spacing: 2px;
}

.subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 16px;
    font-weight: 300;
}

/* Formularz logowania */
.login-form {
    padding: 40px;
}

.login-form h2 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 400;
}

.input-group {
    margin-bottom: 25px;
    position: relative;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.input-group label i {
    font-size: 16px;
    color: #667eea;
    width: 20px;
    text-align: center;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-group input::placeholder {
    color: #a0aec0;
}

/* Modern select for parish */
.parish-select-wrapper {
    position: relative;
}

.parish-select-wrapper select {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    appearance: none;
    cursor: pointer;
}

.parish-select-wrapper select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.select-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    pointer-events: none;
    font-size: 14px;
}

/* Password field with toggle */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.password-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    background: rgba(102, 126, 234, 0.1);
}

/* Error messages */
.error-message {
    background: #fee;
    color: #c53030;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #fed7d7;
    animation: shake 0.5s ease;
    transition: opacity 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Ikona kłódki dla pola hasła */
.input-group.password::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 48px;
    width: 20px;
    height: 20px;
    background: url('../icons/lock.png') no-repeat center;
    background-size: contain;
    opacity: 0.5;
    pointer-events: none;
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

/* Komunikaty */
.error-message {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #fcc;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Informacje o logowaniu */
.login-info {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.login-info p {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.login-info ul {
    list-style: none;
    padding-left: 0;
}

.login-info li {
    color: #777;
    font-size: 13px;
    margin-bottom: 5px;
    padding-left: 20px;
    position: relative;
}

.login-info li:before {
    content: "•";
    color: #667eea;
    position: absolute;
    left: 0;
    font-size: 18px;
}

/* Stopka */
.footer {
    text-align: center;
    margin-top: 40px;
    color: rgba(255,255,255,0.8);
    font-size: 12px;
}

.footer p {
    margin-bottom: 5px;
}

/* Style responsywne */
@media (max-width: 600px) {
    .login-card {
        max-width: 100%;
        margin: 10px;
    }
    
    .logo-section {
        padding: 30px;
    }
    
    .logo {
        width: 60px;
        height: 60px;
    }
    
    .logo-section h1 {
        font-size: 28px;
    }
    
    .login-form {
        padding: 30px;
    }
    
    .input-group input {
        padding: 12px;
    }
}

/* Style dla dashboardów */
.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dashboard-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header h1 {
    font-size: 24px;
    font-weight: 300;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    text-align: right;
}

.user-name {
    font-weight: 500;
    font-size: 16px;
}

.user-role {
    font-size: 12px;
    opacity: 0.9;
}

.logout-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 8px 16px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Karty statystyk */
.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Przyciski akcji */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.action-btn {
    background: white;
    color: #667eea;
    padding: 15px 20px;
    border: 2px solid #667eea;
    border-radius: 10px;
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s;
}

.action-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Role badges */
.role-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge.admin {
    background: #fee;
    color: #c33;
}

.role-badge.proboszcz {
    background: #e3f2fd;
    color: #1976d2;
}

.role-badge.dystrybutor {
    background: #e8f5e9;
    color: #388e3c;
}
