:root {
    --status-pending: #6c757d;
    --status-progress: #0d6efd;
    --status-success: #198754;
    --status-error: #dc3545;
}

body {
    background-color: #f8f9fa;
}

.login-card {
    width: 100%;
    max-width: 450px;
}

.login-card h1 {
    color: #212529;
    font-size: 1.75rem;
}

#login-btn .btn-spinner {
    display: none;
}

#login-btn.loading .btn-text {
    display: none;
}

#login-btn.loading .btn-spinner {
    display: inline-block;
}

#network-status {
    font-size: 0.9rem;
    padding: 0.5em 1em;
}

#network-status.bg-success {
    background-color: var(--status-success) !important;
}

#network-status.bg-danger {
    background-color: var(--status-error) !important;
}

#network-status.bg-secondary {
    background-color: var(--status-pending) !important;
}

#scanner-input {
    font-size: 1.25rem;
    font-family: monospace;
}

#scanner-input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.box-card {
    transition: all 0.3s ease;
}

.box-card .gateway-id {
    font-family: monospace;
    font-size: 1.1rem;
}

.box-card.status-pending .card-header {
    background-color: var(--status-pending);
    color: white;
}

.box-card.status-progress .card-header {
    background-color: var(--status-progress);
    color: white;
}

.box-card.status-success .card-header {
    background-color: var(--status-success);
    color: white;
}

.box-card.status-error .card-header {
    background-color: var(--status-error);
    color: white;
}

.box-card .progress-bar {
    transition: width 0.3s ease;
}

.box-card.status-pending .progress-bar {
    background-color: var(--status-pending);
}

.box-card.status-progress .progress-bar {
    background-color: var(--status-progress);
}

.box-card.status-success .progress-bar {
    background-color: var(--status-success);
    animation: none;
}

.box-card.status-error .progress-bar {
    background-color: var(--status-error);
    animation: none;
}

.box-card .status-badge {
    font-size: 0.85rem;
}

.box-card .step-info {
    font-size: 0.9rem;
}

.box-card .duration-info {
    font-size: 0.9rem;
    font-family: monospace;
}

#summary-bar {
    position: sticky;
    bottom: 1rem;
}

#summary-bar .card-body {
    font-size: 1rem;
}

@media (max-width: 576px) {
    .login-card {
        margin: 1rem;
    }

    .login-card .card-body {
        padding: 1.5rem !important;
    }

    #scanner-input {
        font-size: 1rem;
    }

    .navbar {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem !important;
    }

    .navbar .d-flex {
        flex-wrap: wrap;
        justify-content: center;
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

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