/* Custom styles for User Management System */

body {
    background-color: #f8f9fa;
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.navbar-brand {
    font-weight: 600;
}

.table th {
    font-weight: 600;
    border-top: none;
}

.badge {
    font-size: 0.75em;
}

.btn-group .btn {
    margin: 0;
}

.alert {
    border: none;
    border-radius: 0.375rem;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.input-group-text {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.card-header {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 500;
}

.table-responsive {
    border-radius: 0.375rem;
}

.btn-outline-primary:hover,
.btn-outline-danger:hover {
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

/* Loading animation */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }

    .table-responsive {
        font-size: 0.875rem;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        margin-bottom: 2px;
        border-radius: 0.25rem !important;
    }
}

/* Animation for alerts */
.alert {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom button styles */
.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
}

.btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* Dashboard cards */
.card.text-white {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-primary) 100%);
}

.card.bg-success {
    background: linear-gradient(135deg, #198754 0%, #146c43 100%) !important;
}

.card.bg-info {
    background: linear-gradient(135deg, #0dcaf0 0%, #087990 100%) !important;
}

/* Form improvements */
.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Custom styles for QR Payment System */

body {
    background-color: #f8f9fa;
}

/* Dashboard Cards */
.border-left-primary {
    border-left: 0.25rem solid #4e73df !important;
}

.border-left-success {
    border-left: 0.25rem solid #1cc88a !important;
}

.border-left-info {
    border-left: 0.25rem solid #36b9cc !important;
}

.border-left-warning {
    border-left: 0.25rem solid #f6c23e !important;
}

.text-xs {
    font-size: 0.7rem;
}

.text-gray-800 {
    color: #5a5c69 !important;
}

.text-gray-300 {
    color: #dddfeb !important;
}

/* QR Code Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qr-animate {
    animation: fadeInUp 0.5s ease-out;
}

/* Loading states */
.loading-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Button hover effects */
.btn-custom {
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.btn-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Form enhancements */
.form-floating-custom {
    position: relative;
}

.form-floating-custom .form-control {
    padding: 1rem 0.75rem;
    border-radius: 0.5rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-floating-custom .form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Toast notifications positioning */
.toast-container {
    z-index: 1060;
}

/* QR Code container */
#qrcode {
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0.5rem;
    border: 2px dashed #dee2e6;
    transition: all 0.3s ease;
}

#qrcode:has(canvas) {
    background: white;
    border: 1px solid #dee2e6;
    border-style: solid;
}

#qrcode canvas {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Statistics cards */
.stats-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e9ecef 100%);
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 0.75rem 0.5rem; /* zmenšené paddingy */
    margin-bottom: 0.5rem;
    min-height: 80px; /* menšia výška */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* max-width: 220px;
    width: 100%;
    margin-left: auto;
    margin-right: auto; */
}

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

.stats-number {
    font-size: 1.5rem; /* menšie číslo */
    font-weight: 700;
    margin-bottom: 0.25rem;
}

/* Rovnaká šírka a výška stĺpcov dashboardu bez dashboard-cols */
.dashboard-equal > [class^="col-"] {
    display: flex;
    flex-direction: column;
}

.dashboard-equal > [class^="col-"] > .card,
.dashboard-equal > [class^="col-"] > .row > .col-6 > .card {
    flex: 1 1 100%;
    height: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

@media (min-width: 992px) {
    .dashboard-equal > [class^="col-"] {
        flex: 1 1 0;
        max-width: 33.3333%;
    }
}

/* Template cards */
.template-card {
    transition: all 0.3s ease;
    border-radius: 0.75rem;
}

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

/* Payment history table */
.history-table {
    border-radius: 0.5rem;
    overflow: hidden;
}

.history-table thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    font-weight: 600;
    color: #495057;
}

/* QR Generator specific styles */
#qrcode {
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#qrcode canvas {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.qr-animate {
    animation: qrFadeIn 0.5s ease-in-out;
}

@keyframes qrFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.word-break {
    word-break: break-all;
    word-wrap: break-word;
}

/* QR Image styling */
.qr-image {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    padding: 10px;
    margin: 10px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* IBAN input styling */
input[data-type="iban"] {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

/* Template and account buttons */
.load-template,
.load-account {
    transition: all 0.2s ease;
    text-align: left;
}

.load-template:hover,
.load-account:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Auto-save indicator */
#autoSaveIndicator {
    transition: opacity 0.3s ease;
    font-size: 0.875rem;
}

/* Toast container positioning */
.toast-container {
    z-index: 1055;
}

/* Form validation styles */
.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.was-validated .form-control:valid,
.form-control.is-valid {
    border-color: #198754;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

/* Loading states */
.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1rem;
    height: 1rem;
    margin: -0.5rem 0 0 -0.5rem;
    border: 2px solid transparent;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal improvements */
.modal-content {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

/* Profile management styles */
.profile-buttons {
    margin-top: 1rem;
}

.profile-buttons .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.profile-card .user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, #007bff, #0056b3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.profile-card .profile-buttons {
    margin-top: 1rem;
}

.profile-card .profile-buttons .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Recent activity styles */
#recentActivity ul {
    margin-bottom: 0;
}

#recentActivity .list-group-item {
    border: none;
    border-bottom: 1px solid #f1f1f1;
    padding: 0.5rem 0.75rem;
}

#recentActivity .list-group-item:last-child {
    border-bottom: none;
}

/* Password strength indicator */
.password-strength {
    height: 4px;
    border-radius: 2px;
    margin-top: 0.25rem;
    transition: all 0.3s ease;
}

.password-strength.weak {
    background-color: #dc3545;
    width: 33%;
}

.password-strength.medium {
    background-color: #ffc107;
    width: 66%;
}

.password-strength.strong {
    background-color: #198754;
    width: 100%;
}

/* Profile card enhancements */
.profile-card .card-body {
    padding: 1.5rem;
}

.profile-card .badge {
    font-size: 0.8rem;
}

/* User avatar placeholder */
.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, #007bff, #0056b3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

/* Dashboard stats cards improvements */
.border-left-primary {
    border-left: 4px solid #007bff !important;
}

.border-left-success {
    border-left: 4px solid #198754 !important;
}

.border-left-info {
    border-left: 4px solid #0dcaf0 !important;
}

.border-left-warning {
    border-left: 4px solid #ffc107 !important;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .container-fluid {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        margin-bottom: 0.25rem;
        border-radius: 0.375rem !important;
    }
    
    #qrcode {
        min-height: 200px;
    }
}

/* Dark mode support (if implemented) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #212529;
        color: #fff;
    }
    
    .card {
        background-color: #343a40;
        border-color: #495057;
    }
    
    .card-header {
        background-color: #495057;
        border-color: #6c757d;
    }
    
    .form-control {
        background-color: #495057;
        border-color: #6c757d;
        color: #fff;
    }
    
    .form-control:focus {
        background-color: #495057;
        border-color: #80bdff;
        color: #fff;
    }
}