/* 
 * SZPMA Támogatás Elszámoló Rendszer
 * Egyedi stílusok
 * Bootstrap 5.3 kiegészítő stílusok
 * WCAG 2.1 AA kompatibilis
 */

/* Google Fonts - Roboto */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&display=swap');

/* Globális beállítások */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #212529;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Fő konténer */
main {
    flex: 1;
    padding-top: 100px;
    padding-bottom: 40px;
}

/* Login oldalon a top/bottom padding 0 legyen */
body.login-page main {
    padding-top: 0;
    padding-bottom: 0;
}

/* Navigáció */
.navbar {
    background-color: #fefdf8 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    /* padding: 1rem 0; */
}

.navbar-brand img {
    max-height: 75px;
    width: auto;
}

.navbar-nav .nav-link {
    color: #212529 !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: #a1ae99 !important;
}

.navbar-nav .nav-link.active {
    color: #a1ae99 !important;
    font-weight: 700;
}

/* Visszaszámláló és kilépés elkülönítése */
.navbar-nav .nav-item:nth-last-child(-n+2) {
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 2px solid #dee2e6;
}

/* Footer */
footer {
    background-color: #798171;
    color: #ffffff;
    padding: 2rem 0;
    margin-top: auto;
}

footer a {
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

footer a:hover,
footer a:focus {
    opacity: 0.8;
    text-decoration: underline;
}

/* Gombok */
.btn {
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.btn:focus {
    box-shadow: 0 0 0 0.25rem rgba(161, 174, 153, 0.25);
    outline: 2px solid transparent;
}

.btn-primary {
    background-color: #a1ae99;
    border-color: #a1ae99;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #8a9882;
    border-color: #8a9882;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

/* Kártyák */
.card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 700;
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

/* Űrlap elemek */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #212529;
}

.form-control,
.form-select {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
    outline: none;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Bejelentkezési oldal */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fefdf8;
}

.login-card {
    width: 100%;
    max-width: 450px;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
}

.login-header {
    background-color: #a1ae99;
    color: #ffffff;
    padding: 2rem;
    text-align: center;
}

.login-header img {
    max-width: 200px;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.login-body {
    padding: 2rem;
}

.login-footer {
    background-color: #f8f9fa;
    padding: 1rem 2rem;
    text-align: center;
    border-top: 1px solid #dee2e6;
}

/* Alert üzenetek */
.alert {
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Táblázatok */
.table {
    background-color: #ffffff;
    border-radius: 0.5rem;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 700;
    color: #212529;
    padding: 1rem;
}

.table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0,0,0,0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(0,0,0,0.05);
}

/* Badge-ek */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 0.25rem;
}

.badge-role-user {
    background-color: #17a2b8;
    color: #ffffff;
}

.badge-role-admin {
    background-color: #ffc107;
    color: #212529;
}

.badge-role-superadmin {
    background-color: #dc3545;
    color: #ffffff;
}

.badge-status-active {
    background-color: #28a745;
    color: #ffffff;
}

.badge-status-announced {
    background-color: #17a2b8;
    color: #ffffff;
}

.badge-status-supplement {
    background-color: #d9534f;
    color: #ffffff;
}

.badge-status-expired {
    background-color: #6c757d;
    color: #ffffff;
}

.badge-status-inactive {
    background-color: #6c757d;
    color: #ffffff;
}

.badge-status-closed {
    background-color: #dc3545;
    color: #ffffff;
}

/* Dokumentum lista */
.document-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.document-item:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
}

.document-icon {
    font-size: 2rem;
    margin-right: 1rem;
    color: #007bff;
}

.document-info {
    flex: 1;
}

.document-info h6 {
    margin: 0;
    font-weight: 500;
    color: #212529;
}

.document-info small {
    color: #6c757d;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
}

/* Feltöltés zóna */
.upload-zone {
    border: 2px dashed #ced4da;
    border-radius: 0.5rem;
    padding: 3rem 2rem;
    text-align: center;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: #007bff;
    background-color: #e7f3ff;
}

.upload-zone i {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 1rem;
}

.upload-zone p {
    margin: 0;
    color: #6c757d;
}

/* Statisztikai kártyák */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-card.primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.stat-card.success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.stat-card.warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
}

.stat-card.danger {
    background: linear-gradient(135deg, #dc3545 0%, #bd2130 100%);
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.stat-card p {
    margin: 0;
    opacity: 0.9;
}

/* Modal */
.modal-content {
    border-radius: 0.5rem;
    border: none;
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 1.5rem;
}

.modal-title {
    font-weight: 700;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0.75rem 0;
    margin-bottom: 1rem;
}

.breadcrumb-item a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb-item a:hover,
.breadcrumb-item a:focus {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* Spinner / Betöltés */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* Toast üzenetek */
.toast {
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toast-header {
    font-weight: 700;
}

/* WCAG 2.1 Accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #007bff;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Responsive */
@media (max-width: 768px) {
    main {
        padding-top: 70px;
    }
    
    .navbar-brand img {
        max-height: 40px;
    }
    
    .login-card {
        margin: 1rem;
    }
    
    .login-body,
    .login-header {
        padding: 1.5rem;
    }
    
    .stat-card h3 {
        font-size: 2rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .document-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .document-actions {
        margin-top: 1rem;
        width: 100%;
    }
    
    .document-actions .btn {
        flex: 1;
    }
}

@media (max-width: 576px) {
    body {
        font-size: 14px;
    }
    
    .btn {
        padding: 0.4rem 1rem;
        font-size: 0.875rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Print stílusok */
@media print {
    .navbar,
    .btn,
    footer,
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* Dark mode támogatás (opcionális) */
@media (prefers-color-scheme: dark) {
    /* Később implementálható */
}

/* Animációk */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Segédosztályok */
.text-muted {
    color: #6c757d !important;
}

.text-primary {
    color: #007bff !important;
}

.bg-light {
    background-color: #f8f9fa !important;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15) !important;
}

.rounded {
    border-radius: 0.5rem !important;
}

.mt-auto {
    margin-top: auto !important;
}

/* Fokuszált elemek kiemeléséhez (WCAG) */
*:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}
