/* Body and main container setup for sticky footer */
html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 15px 0;
    margin-top: auto;
    width: 100%;
}

/* Navbar Styling */
.navbar {
    border-radius: 15px !important;
    padding: 0.5rem 1rem;
    margin-top: 15px;
}

.navbar .nav-link {
    transition: all 0.3s ease;
    font-weight: 500;
}

.navbar .nav-link.hover-effect:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.navbar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

/* QR Code Container */
.qr-code {
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    text-align: center;
    margin: 20px 0;
}

.qr-code img {
    max-width: 100%;
    height: auto;
}

/* Status Indicators */
.status-badge {
    font-size: 0.85rem;
    padding: 0.35em 0.65em;
}

.status-connected {
    background-color: #198754;
}

.status-created {
    background-color: #0d6efd;
}

.status-disconnected {
    background-color: #dc3545;
}

/* Countdown styling */
.countdown-container {
    background-color: #f8f9fa;
    padding: 15px;
    margin-top: 15px;
    border-radius: 5px;
    text-align: center;
}

.countdown {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* Dashboard Stats */
.stat-card {
    transition: all 0.3s;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.card {
    border-radius: 10px;
    overflow: hidden;
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
}

/* Action buttons in small width */
@media (max-width: 768px) {
    .action-btn {
        margin-bottom: 5px;
        display: block;
        width: 100%;
    }
    
    .device-actions form {
        margin-bottom: 5px;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .navbar {
        border-radius: 10px !important;
    }
    
    .navbar .nav-link {
        margin: 2px 0;
    }
}

/* Form improvements */
.form-container {
    max-width: 500px;
    margin: 0 auto;
}

.form-control, .btn, .input-group-text {
    border-radius: 8px;
}

.input-group > .form-control {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group > .input-group-text {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Ensure buttons are consistent on mobile */
.btn {
    margin-bottom: 0.25rem;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.btn:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.2);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.btn:hover:after {
    transform: translateX(0);
}