/* ===== WŁASNY CSS ZAMIAST PICO CSS ===== */
/* Kompletny system dark mode dla całej aplikacji */

/* ===== RESET I BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    color: #e2e8f0;
    line-height: 1.6;
    min-height: 100vh;
    padding: 1rem;
}

/* ===== TYPOGRAFIA ===== */
h1, h2, h3, h4, h5, h6 {
    color: #f7fafc;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: #cbd5e0;
}

a {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #3182ce;
    text-decoration: underline;
}

/* ===== MODERN NAVIGATION ===== */
.modern-header {
    background: rgba(26, 32, 44, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Brand Section */
.header-brand {
    flex-shrink: 0;
}

.brand-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #60a5fa;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex: 1;
    justify-content: center;
}

.nav-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.nav-label {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.1), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.2);
}

.nav-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.nav-text {
    font-size: 0.9rem;
}

/* User Info Section */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(96, 165, 250, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(96, 165, 250, 0.3);
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-name {
    font-size: 0.9rem;
    color: #e2e8f0;
    font-weight: 600;
}

.user-role {
    font-size: 0.8rem;
    font-weight: 500;
}

.nav-logout {
    border-color: rgba(239, 68, 68, 0.2);
}

.nav-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(96, 165, 250, 0.1);
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: #e2e8f0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 320px;
    max-width: 90vw;
    background: rgba(26, 32, 44, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-nav-overlay.active .mobile-nav-panel {
    transform: translateX(0);
}

.mobile-nav-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3);
}

.mobile-user-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-user-name {
    font-size: 1rem;
    color: #e2e8f0;
    font-weight: 600;
}

.mobile-user-role {
    font-size: 0.85rem;
    font-weight: 500;
}

.mobile-nav-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.mobile-nav-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

.mobile-nav {
    padding: 1rem 0;
}

.mobile-nav-section {
    margin-bottom: 2rem;
}

.mobile-nav-title {
    font-size: 0.85rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin: 0 0 1rem 0;
    padding: 0 1.5rem;
}

.mobile-nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.mobile-nav-link:hover {
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
    border-left-color: #60a5fa;
}

.mobile-nav-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.mobile-nav-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border-left-color: #f87171;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .desktop-nav {
        gap: 2rem;
    }
    
    .nav-links {
        gap: 0.75rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
    }
    
    .nav-text {
        display: none;
    }
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-container {
        padding: 1rem;
    }
    
    .brand-title {
        font-size: 1.2rem;
    }
    
    .mobile-nav-panel {
        width: 280px;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0.75rem;
    }
    
    .brand-title {
        font-size: 1.1rem;
    }
    
    .mobile-nav-panel {
        width: 100%;
        max-width: 100%;
    }
    
    .mobile-nav-header {
        padding: 1.5rem 1rem;
    }
    
    .mobile-nav-title {
        padding: 0 1rem;
    }
    
    .mobile-nav-link {
        padding: 0.875rem 1rem;
    }
}

/* ===== GŁÓWNY KONTENER ===== */
main {
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== HEADER SECTIONS ===== */
.header-section {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.header-section h2 {
    color: #f7fafc;
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
    flex: 1;
}

/* ===== PRZYCISKI ===== */
.btn, button, input[type="submit"], input[type="button"] {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    min-height: 44px;
    touch-action: manipulation;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:hover, button:hover, input[type="submit"]:hover, input[type="button"]:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:active, button:active, input[type="submit"]:active, input[type="button"]:active {
    transform: translateY(0);
}

/* Warianty przycisków */
.btn-primary {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
}

.btn-info {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

/* ===== FORMULARZE ===== */
form {
    background: rgba(45, 55, 72, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid rgba(74, 85, 104, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    color: #e2e8f0;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-control, .form-select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(26, 32, 44, 0.8);
    border: 2px solid rgba(74, 85, 104, 0.5);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.form-control:focus, .form-select:focus, textarea:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
    background: rgba(26, 32, 44, 0.9);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* ===== PASSWORDS LAYOUT ===== */
.passwords-layout {
    display: flex !important;
    gap: 2rem;
    max-width: 1400px;
    margin: 1rem auto;
    position: relative;
    flex-wrap: nowrap;
}

/* Mobile Filters Toggle */
.mobile-filters-toggle {
    display: none !important;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
    transition: all 0.3s ease;
}

.mobile-filters-toggle:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(66, 153, 225, 0.4);
}

.mobile-overlay {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

/* Filters Sidebar */
.filters-sidebar {
width: 320px;
flex-shrink: 0;
display: block !important;
}

.filters-card {
background: rgba(45, 55, 72, 0.7);
backdrop-filter: blur(20px);
border-radius: 16px;
border: 1px solid rgba(74, 85, 104, 0.3);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
overflow: hidden;
position: sticky;
top: 2rem;
}

.filters-header {
background: rgba(26, 32, 44, 0.8);
padding: 1.5rem;
border-bottom: 2px solid rgba(96, 165, 250, 0.3);
display: flex;
justify-content: space-between;
align-items: center;
}

.filters-header h5 {
color: #f7fafc;
margin: 0;
font-size: 1.125rem;
font-weight: 600;
display: flex;
align-items: center;
gap: 0.5rem;
}

.close-filters {
display: none;
background: none;
border: none;
color: #e2e8f0;
font-size: 1.25rem;
cursor: pointer;
padding: 0.25rem;
border-radius: 4px;
transition: all 0.2s ease;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-filters:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.filters-form {
    padding: 1.5rem;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group .form-label {
    display: block;
    color: #e2e8f0;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.filter-group .form-select {
    width: 100%;
    background: rgba(26, 32, 44, 0.9);
    border: 2px solid rgba(74, 85, 104, 0.3);
    color: #e2e8f0;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.filter-group .form-select:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(74, 85, 104, 0.3);
}

.filter-actions .btn {
    text-align: center;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Search Section */
.passwords-search-card {
    background: rgba(26, 32, 44, 0.4);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.search-header h5 {
    color: #f7fafc;
    font-weight: 600;
    margin: 0;
}

.search-input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(26, 32, 44, 0.6);
    color: #e2e8f0;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #60a5fa;
    background: rgba(26, 32, 44, 0.8);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.search-input::placeholder {
    color: #9ca3af;
}

.clear-search-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.clear-search-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.clear-search-btn:active {
    transform: translateY(0);
}

.search-help {
    margin-top: 0.5rem;
}

.search-help .form-help-text {
    color: #9ca3af;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Search Input in Filters */
.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(26, 32, 44, 0.6);
    color: #e2e8f0;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.search-input:focus {
    outline: none;
    border-color: #60a5fa;
    background: rgba(26, 32, 44, 0.8);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.search-input::placeholder {
    color: #9ca3af;
    font-size: 0.85rem;
}

.search-help {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.search-help .form-help-text {
    color: #9ca3af;
    font-size: 0.8rem;
    line-height: 1.3;
}

/* Form Input with Button */
.input-with-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-with-button .form-select {
    flex: 1;
    min-width: 0;
}

.btn-add-new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 2px solid #60a5fa;
    border-radius: 6px;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-add-new:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    color: white;
    text-decoration: none;
}

.btn-add-new:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.3);
}

/* Responsive for form inputs */
@media (max-width: 768px) {
    .input-with-button {
        flex-direction: column;
        align-items: stretch;
    }
    
    .input-with-button .form-select {
        margin-bottom: 0.5rem;
    }
    
    .btn-add-new {
        width: 100%;
        height: 40px;
        font-size: 16px;
    }
}

/* Main Content */
.passwords-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 100%;
    width: 100%;
    min-width: 0; /* Zapobiega wychodzeniu poza kontener */
}

.passwords-header {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.passwords-header h2 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 600;
}

.mobile-filters-toggle-inline {
    display: none;
    background: rgba(255,255,255,0.2);
    border: 2px solid white;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.875rem;
}

.mobile-filters-toggle-inline:hover {
    background: white;
    color: #4299e1;
    transform: translateY(-2px);
}

/* Add Password Section */
.add-password-section {
    margin-top: auto;
}

.add-password-card {
    background: rgba(45, 55, 72, 0.7);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(74, 85, 104, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.add-password-header {
    background: rgba(26, 32, 44, 0.8);
    padding: 1.5rem;
    border-bottom: 2px solid rgba(96, 165, 250, 0.3);
}

.add-password-header h5 {
    color: #f7fafc;
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-password-content {
    padding: 2rem;
    text-align: center;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 12px;
    font-weight: 600;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .passwords-layout {
        gap: 1.5rem;
    }
    
    .filters-sidebar {
        width: 280px;
    }
}

@media (max-width: 768px) {
    .passwords-layout {
        flex-direction: column !important;
        gap: 1rem;
    }
    
    .mobile-filters-toggle {
        display: none !important;
    }
    
    .mobile-filters-toggle-inline {
        display: block !important;
    }
    
    .mobile-overlay.active {
        display: block !important;
    }
    
    .filters-sidebar {
        position: fixed !important;
        top: 0;
        left: -320px;
        width: 300px;
        height: 100vh;
        z-index: 1001;
        transition: left 0.3s ease;
        border-radius: 0 16px 16px 0;
        display: none !important;
    }
    
    .filters-sidebar.active {
        left: 0 !important;
        display: block !important;
    }
    
    .filters-card {
        height: 100%;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }
    
    .filters-header {
        padding: 1rem;
    }
    
    .close-filters {
        display: block !important;
    }
    
    .filters-form {
        padding: 1rem;
    }
    
    .filter-group {
        margin-bottom: 1rem;
    }
    
    .passwords-main {
        gap: 1rem;
        width: 100%;
        min-width: 0;
        overflow-x: hidden; /* Zapobiega horizontal scroll */
    }
    
    .passwords-header {
        padding: 1.5rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .passwords-header h2 {
        font-size: 1.5rem;
        margin: 0;
    }
    
    .add-password-content {
        padding: 1.5rem;
    }
    
    .btn-large {
        width: 100%;
        padding: 0.875rem 1.5rem;
    }
    
    /* Responsywność tabeli haseł */
    .passwords-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1rem; /* Kompensuje padding body */
        padding: 0 1rem;
    }
    
    .passwords-table-wrapper .table {
        min-width: 600px; /* Minimalna szerokość tabeli */
        font-size: 0.875rem;
    }
    
    .passwords-table-wrapper .table th,
    .passwords-table-wrapper .table td {
        padding: 0.5rem;
        white-space: nowrap;
    }
    
    .passwords-table-wrapper .table .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Responsywność wyszukiwania */
    .passwords-search-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .search-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .search-input-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .search-input {
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
    }
    
    .clear-search-btn {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
        width: 100%;
    }
    
    .search-help .form-help-text {
        font-size: 0.8rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .mobile-filters-toggle {
        top: 10px;
        left: 10px;
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .filters-sidebar {
        width: 280px;
        left: -280px;
    }
    
    .passwords-header {
        padding: 1rem;
    }
    
    .passwords-header h2 {
        font-size: 1.25rem;
    }
    
    .add-password-content {
        padding: 1rem;
    }
    
    .btn-large {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* ===== LOGIN PAGE ===== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    padding: 2rem;
}

.login-card {
    background: rgba(45, 55, 72, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(74, 85, 104, 0.3);
    max-width: 450px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #60a5fa 0%, #3182ce 50%, #2563eb 100%);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h2 {
    color: #e2e8f0;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.login-header p {
    color: #a0aec0;
    font-size: 1rem;
    margin: 0;
    font-weight: 400;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-actions {
    margin-top: 1rem;
}

.btn-large {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, #60a5fa 0%, #3182ce 100%);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(96, 165, 250, 0.3);
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(96, 165, 250, 0.4);
    background: linear-gradient(135deg, #3182ce 0%, #2563eb 100%);
}

.btn-large:active {
    transform: translateY(0);
}

/* Responsive dla login */
@media (max-width: 768px) {
    .login-container {
        padding: 1rem;
    }
    
    .login-card {
        padding: 2rem;
        margin: 1rem;
    }
    
    .login-header h2 {
        font-size: 1.75rem;
    }
    
    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
    }
    
    .login-header h2 {
        font-size: 1.5rem;
    }
    
    .login-header p {
        font-size: 0.9rem;
    }
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    color: white;
    text-decoration: none;
}

.btn-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.2);
}

.btn-info:hover {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
    color: white;
    text-decoration: none;
}

/* ===== IMPORT COMPONENTS ===== */
.column-mapping {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(55, 65, 81, 0.3);
    border-radius: 12px;
    border: 1px solid #4a5568;
}

.mapping-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #4a5568;
}

.mapping-header h3 {
    color: #e2e8f0;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.mapping-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(45, 55, 72, 0.5);
    border-radius: 8px;
    border: 1px solid #4a5568;
}

.required-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.csv-column {
    display: flex;
    flex-direction: column;
}

.csv-preview {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(55, 65, 81, 0.3);
    border-radius: 12px;
    border: 1px solid #4a5568;
}

.csv-preview h3 {
    color: #e2e8f0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.missing-items {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(251, 191, 36, 0.1);
    border: 2px solid #f59e0b;
    border-radius: 12px;
}

.missing-section {
    margin-bottom: 1.5rem;
}

.missing-section:last-child {
    margin-bottom: 0;
}

.missing-section h3 {
    color: #fbbf24;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.missing-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.missing-list li {
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    background: rgba(251, 191, 36, 0.05);
    border-left: 4px solid #f59e0b;
    border-radius: 4px;
    color: #e2e8f0;
    font-weight: 500;
}

.missing-list li:last-child {
    margin-bottom: 0;
}

.import-summary {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(34, 197, 94, 0.1);
    border: 2px solid #22c55e;
    border-radius: 12px;
}

.import-summary h3 {
    color: #4ade80;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.import-summary p {
    color: #e2e8f0;
    margin: 0;
    font-size: 1.1rem;
}

.import-summary strong {
    color: #4ade80;
    font-weight: 700;
}

/* Responsive dla importu */
@media (max-width: 768px) {
    .mapping-header,
    .mapping-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .column-mapping,
    .csv-preview,
    .missing-items,
    .import-summary {
        padding: 1rem;
    }
    
    .mapping-row {
        padding: 0.75rem;
    }
    
    .table-wrapper {
        font-size: 0.875rem;
    }
}

/* ===== KEYGEN COMPONENTS ===== */
.recent-section {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(55, 65, 81, 0.3);
    border-radius: 12px;
    border: 1px solid #4a5568;
}

.recent-section h3 {
    color: #e2e8f0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.recent-section code {
    background: rgba(45, 55, 72, 0.8);
    color: #60a5fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    font-weight: 600;
}

.muted {
    opacity: 0.6;
    color: #718096;
    font-style: italic;
}

.form-help {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(96, 165, 250, 0.1);
    border-radius: 8px;
    border-left: 4px solid #60a5fa;
}

/* ===== ADDITIONAL FORM COMPONENTS ===== */
.alert-success {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
    border: none;
    color: #d1fae5;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-weight: 500;
}

.permissions-fieldset {
    border: 2px solid #4a5568;
    border-radius: 8px;
    padding: 1.5rem;
    background: rgba(55, 65, 81, 0.5);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    color: #e2e8f0;
    transition: color 0.3s ease;
}

.checkbox-label:hover {
    color: #60a5fa;
}

.form-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: #60a5fa;
}

.checkbox-text {
    font-weight: 500;
}

.permission-note {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(96, 165, 250, 0.1);
    border-left: 4px solid #60a5fa;
    border-radius: 4px;
}

.permission-note small {
    color: #93c5fd;
    font-style: italic;
}

.form-help-text {
    display: block;
    margin-top: 0.5rem;
    color: #a0aec0;
    font-size: 0.875rem;
    font-style: italic;
}

.app-info {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #4a5568;
    text-align: center;
}

.info-text {
    color: #718096;
    font-size: 0.875rem;
}

.info-section, .access-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(55, 65, 81, 0.3);
    border-radius: 12px;
    border: 1px solid #4a5568;
}

.info-section h3, .access-section h3 {
    color: #e2e8f0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(45, 55, 72, 0.5);
    border-radius: 6px;
    border: 1px solid #4a5568;
}

.info-label {
    color: #a0aec0;
    font-weight: 500;
}

.info-value {
    color: #e2e8f0;
    font-weight: 600;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #a0aec0;
    font-style: italic;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
}

.danger-zone {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.1) 0%, rgba(153, 27, 27, 0.1) 100%);
    border: 2px solid #dc2626;
    border-radius: 12px;
}

.danger-zone h3 {
    color: #ef4444;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.danger-zone p {
    color: #f87171;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
}

.btn-danger:active {
    transform: translateY(0);
}

/* ===== PASSWORD FORM ===== */
.password-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    color: #e2e8f0;
}

.form-header {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.form-header h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    color: #e2e8f0;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
    display: block;
}

.form-control, .form-select {
    background: #374151;
    border: 2px solid #4a5568;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.form-control:focus, .form-select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.alert-danger {
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
    border: none;
    color: #fecaca;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-weight: 500;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Responsywność */
@media (max-width: 768px) {
    .password-form-container {
        padding: 10px;
    }
    
    .form-header {
        padding: 20px;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        margin: 5px 0;
    }
}

/* ===== TABELE ===== */
.table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    background: rgba(45, 55, 72, 0.6);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(74, 85, 104, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.passwords-table-wrapper .table {
    border-radius: 0;
    border: none;
}

.table thead {
    background: transparent;
    border-radius: 16px 16px 0 0;
}

.table thead th {
    background: rgba(26, 32, 44, 0.9);
    color: #f7fafc;
    padding: 1.25rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid rgba(96, 165, 250, 0.4);
    position: relative;
    white-space: nowrap;
    border: none;
}

.table thead th:first-child {
    border-radius: 16px 0 0 0;
}

.table thead th:last-child {
    border-radius: 0 16px 0 0;
}

.passwords-table-wrapper .table thead th:first-child {
    border-radius: 0 0 0 0;
}

.passwords-table-wrapper .table thead th:last-child {
    border-radius: 0 0 0 0;
}

.table thead th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.6), transparent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.table thead th:hover::after {
    transform: scaleX(1);
}

.table tbody td {
    padding: 0.5rem 0.5rem;
    border-bottom: 1px solid rgba(74, 85, 104, 0.15);
    color: #e2e8f0;
    vertical-align: middle;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    position: relative;
}

.table tbody tr {
    transition: all 0.3s ease;
    position: relative;
}

.table tbody tr:hover {
    background: rgba(96, 165, 250, 0.08);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table.table-hover tbody tr:hover {
    background: rgba(96, 165, 250, 0.08);
}

/* ===== PASSWORD MANAGER SPECIFIC ===== */
.passwords-table-card {
    background: rgba(45, 55, 72, 0.7);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 0;
    border: 1px solid rgba(74, 85, 104, 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.passwords-table-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.5), transparent);
}

.passwords-table-header {
    background: rgba(26, 32, 44, 0.8);
    padding: 1.5rem;
    border-bottom: 2px solid rgba(96, 165, 250, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.passwords-table-header h5 {
    color: #f7fafc;
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.passwords-table-wrapper {
    background: rgba(26, 32, 44, 0.4);
    overflow-x: auto;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.passwords-table-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(96, 165, 250, 0.2), transparent, rgba(96, 165, 250, 0.2));
}

/* ===== CREDENTIALS DISPLAY ===== */
.table tbody td:has(.credentials-hidden) {
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    white-space: nowrap;
}

.table tbody td:has(.credentials-hidden) > * {
    display: inline-flex;
    vertical-align: middle;
}

.credentials-hidden {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.875rem;
    color: #a0aec0;
    background: linear-gradient(135deg, rgba(26, 32, 44, 0.8), rgba(45, 55, 72, 0.8));
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(74, 85, 104, 0.4);
    display: inline-flex;
    min-width: 180px;
    text-align: center;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.credentials-hidden::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.2), transparent);
    transition: left 0.6s ease;
}

.credentials-hidden:hover::before {
    left: 100%;
}

.toggle-credentials {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.2), rgba(49, 130, 206, 0.2));
    border: 1px solid rgba(96, 165, 250, 0.4);
    color: #60a5fa;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 0.75rem;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.toggle-credentials::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(96, 165, 250, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
}

.toggle-credentials:hover::before {
    width: 100%;
    height: 100%;
}

.toggle-credentials:hover {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.3), rgba(49, 130, 206, 0.3));
    border-color: #60a5fa;
    color: #93c5fd;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3);
}

.toggle-credentials:active {
    transform: scale(0.98);
}

.toggle-credentials:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== ACTION BUTTONS ===== */
.table tbody td:has(.action-buttons) {
    padding: 0.5rem 1rem;
    white-space: nowrap;
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: nowrap;
}

.action-buttons form {
    display: inline;
    margin: 0;
    padding: 0;
}

.action-buttons .btn {
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 44px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin: 0;
}

.action-buttons .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.action-buttons .btn:hover::before {
    left: 100%;
}

.action-buttons .btn-warning {
    background: linear-gradient(135deg, rgba(237, 137, 54, 0.9), rgba(221, 107, 32, 0.9));
    border: 1px solid rgba(237, 137, 54, 0.5);
    color: #fef3c7;
    box-shadow: 0 2px 8px rgba(237, 137, 54, 0.3);
}

.action-buttons .btn-warning:hover {
    background: linear-gradient(135deg, rgba(221, 107, 32, 0.95), rgba(194, 65, 12, 0.95));
    border-color: #f59e0b;
    color: #fef3c7;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(237, 137, 54, 0.4);
}

.action-buttons .btn-danger {
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.9), rgba(220, 38, 38, 0.9));
    border: 1px solid rgba(245, 101, 101, 0.5);
    color: #fef2f2;
    box-shadow: 0 2px 8px rgba(245, 101, 101, 0.3);
}

.action-buttons .btn-danger:hover {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.95), rgba(185, 28, 28, 0.95));
    border-color: #ef4444;
    color: #fef2f2;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(245, 101, 101, 0.4);
}

/* ===== EMPTY STATE ===== */
.no-passwords {
    text-align: center;
    padding: 4rem 2rem;
    color: #a0aec0;
    font-style: italic;
    background: rgba(45, 55, 72, 0.3);
    border-radius: 12px;
    border: 2px dashed rgba(74, 85, 104, 0.3);
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.no-passwords::before {
    content: '🔐';
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-passwords::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(96, 165, 250, 0.05), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===== KARTY I KONTENERY ===== */
.card, .container-card {
    background: rgba(45, 55, 72, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid rgba(74, 85, 104, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.card-header, .card-header-custom {
    border-bottom: 2px solid rgba(96, 165, 250, 0.3);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-header h5, .card-header-custom h5 {
    color: #f7fafc;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

/* ===== GRID SYSTEM ===== */
.row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.col-md-3 { grid-column: span 1; }
.col-md-4 { grid-column: span 2; }
.col-md-6 { grid-column: span 3; }
.col-md-8 { grid-column: span 4; }
.col-md-9 { grid-column: span 5; }
.col-md-12 { grid-column: span 6; }

/* ===== KAFELKI APLIKACJI ===== */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
    padding: 0;
}

.app-tile-container {
    position: relative;
    transition: transform 0.3s ease;
}

.app-tile {
    background: rgba(45, 55, 72, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(74, 85, 104, 0.4);
    border-radius: 16px;
    padding: 2rem;
    text-decoration: none;
    color: #e2e8f0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Gradient overlay effect */
.app-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #60a5fa, #3182ce, #805ad5, #60a5fa);
    background-size: 300% 100%;
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    border-radius: 16px 16px 0 0;
}

.app-tile:hover::before {
    transform: translateX(0);
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Icon background */
.app-tile::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.app-tile:hover::after {
    opacity: 1;
}

.app-tile:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    background: rgba(45, 55, 72, 0.9);
    border-color: rgba(96, 165, 250, 0.5);
}

.app-tile:active {
    transform: translateY(-4px) scale(1.01);
}

/* App icon */
.app-tile .app-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #60a5fa, #3182ce);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3);
    transition: all 0.3s ease;
}

.app-tile:hover .app-icon {
    transform: rotate(5deg) scale(1.1);
    box-shadow: 0 8px 20px rgba(96, 165, 250, 0.4);
}

/* App content */
.app-tile .app-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.app-tile h3 {
    color: #f7fafc;
    margin: 0 0 0.75rem 0;
    font-size: 1.375rem;
    font-weight: 600;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.app-tile:hover h3 {
    color: #60a5fa;
}

.app-tile .app-meta {
    color: #a0aec0;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-tile .app-meta::before {
    content: '📍';
    font-size: 0.75rem;
}

.app-tile .app-description {
    color: #cbd5e0;
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
    flex: 1;
    font-size: 0.95rem;
}

.app-tile .app-path {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(74, 85, 104, 0.3);
    font-size: 0.875rem;
    color: #718096;
    font-family: 'Courier New', monospace;
    background: rgba(26, 32, 44, 0.5);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    word-break: break-all;
}

.app-tile .no-path {
    color: #f56565;
    font-style: italic;
    text-align: center;
    padding: 0.5rem;
    background: rgba(245, 101, 101, 0.1);
    border-radius: 6px;
    font-size: 0.875rem;
}

/* Action buttons */
.app-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.app-tile-container:hover .app-actions {
    opacity: 1;
    transform: translateY(0);
}

.edit-btn, .manage-btn {
    background: rgba(45, 55, 72, 0.9);
    backdrop-filter: blur(10px);
    color: #e2e8f0;
    border: 1px solid rgba(74, 85, 104, 0.5);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.edit-btn:hover, .manage-btn:hover {
    background: rgba(96, 165, 250, 0.2);
    border-color: #60a5fa;
    color: #60a5fa;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.2);
}

.edit-btn {
    background: rgba(72, 187, 120, 0.2);
    border-color: rgba(72, 187, 120, 0.5);
    color: #68d391;
}

.edit-btn:hover {
    background: rgba(72, 187, 120, 0.3);
    border-color: #48bb78;
    color: #9ae6b4;
}

.manage-btn {
    background: rgba(237, 137, 54, 0.2);
    border-color: rgba(237, 137, 54, 0.5);
    color: #f6ad55;
}

.manage-btn:hover {
    background: rgba(237, 137, 54, 0.3);
    border-color: #ed8936;
    color: #fbd38d;
}

/* Status indicators */
.app-status {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #48bb78;
    box-shadow: 0 0 0 2px rgba(72, 187, 120, 0.3);
    animation: pulse 2s infinite;
}

.app-status.inactive {
    background: #f56565;
    box-shadow: 0 0 0 2px rgba(245, 101, 101, 0.3);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

/* ===== ALERTS ===== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid;
    backdrop-filter: blur(10px);
}

.alert-danger {
    background: rgba(245, 101, 101, 0.1);
    border-left-color: #f56565;
    color: #feb2b2;
}

.alert-success {
    background: rgba(72, 187, 120, 0.1);
    border-left-color: #48bb78;
    color: #9ae6b4;
}

.alert-info {
    background: rgba(66, 153, 225, 0.1);
    border-left-color: #4299e1;
    color: #90cdf4;
}

/* ===== UTILITIES ===== */
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

/* ===== RESPONSYWNOŚĆ ===== */
@media (max-width: 768px) {
    body {
        padding: 0.5rem;
    }
    
    nav {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    nav ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .app-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .app-tile {
        padding: 1.5rem;
    }
    
    .app-tile .app-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .app-tile h3 {
        font-size: 1.25rem;
    }
    
    .app-actions {
        position: static;
        margin-top: 1rem;
        opacity: 1;
        transform: none;
        justify-content: center;
    }
    
    .edit-btn, .manage-btn {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .app-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .app-tile {
        padding: 1.25rem;
    }
    
    .app-tile .app-icon {
        width: 36px;
        height: 36px;
        font-size: 1.125rem;
    }
    
    .app-tile h3 {
        font-size: 1.125rem;
    }
    
    .app-tile .app-description {
        font-size: 0.875rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.75rem 0.4rem;
        font-size: 0.8rem;
    }
    
    .credentials-hidden {
        min-width: 120px;
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
    }
    
    .toggle-credentials {
        padding: 0.35rem 0.5rem;
        font-size: 0.7rem;
        min-width: 32px;
        min-height: 32px;
    }
    
    .action-buttons .btn {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
        min-height: 36px;
    }
    
    .table tbody tr:hover {
        transform: none;
    }
    
    .table tbody tr:hover::before {
        transform: none;
    }
}

/* ===== ANIMACJE ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(45, 55, 72, 0.3);
}

::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 165, 250, 0.7);
}

/* ===== SELEKTY ===== */
::selection {
    background: rgba(96, 165, 250, 0.3);
    color: #f7fafc;
}

::-moz-selection {
    background: rgba(96, 165, 250, 0.3);
    color: #f7fafc;
}
