/* Custom CSS for Login System */

/* Stats Cards */
.stats-card {
    min-height: 120px;
    transition: transform 0.2s;
}

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

.stats-card h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0;
}

/* Login History Table */
.login-history-table {
    font-size: 0.9rem;
}

.login-history-table td {
    vertical-align: middle;
}

/* Table Actions */
.table-actions {
    white-space: nowrap;
}

.table-actions .btn {
    margin-right: 5px;
}

/* Backup Codes Display */
.backup-codes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 15px 0;
}

.backup-code {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 10px;
    text-align: center;
    font-family: monospace;
    font-weight: bold;
    border-radius: 4px;
    display: block;
}

/* QR Code Container */
.qr-code-container {
    text-align: center;
    padding: 20px;
}

.qr-code-container img {
    max-width: 250px;
    margin: 20px auto;
    display: block;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
}

.password-strength .progress {
    height: 5px;
}

/* Alert Styling */
.alert {
    border-radius: 5px;
}

/* Card Header Styling */
.card-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 500;
}

/* Navigation Active State */
.navbar .nav-link.active {
    font-weight: bold;
}

/* Responsive Tables */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .stats-card h2 {
        font-size: 2rem;
    }
}

/* Custom Button Spacing */
.btn + .btn {
    margin-left: 5px;
}

/* Form Elements */
.form-label {
    font-weight: 500;
    margin-bottom: 5px;
}

/* Badge Styling */
.badge {
    font-size: 0.85rem;
    padding: 5px 10px;
}

/* Loading State */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}
