:root {
    --main-gradient: linear-gradient(135deg, #ffb347 0%, #ffcc33 50%, #ff5733 100%);
    --night-gradient: linear-gradient(135deg, #232526 0%, #414345 60%, #ff5733 100%);
}
body {
    background: var(--main-gradient);
    min-height: 100vh;
    transition: background 0.8s cubic-bezier(.4,2,.6,1);
}
.attendance-container {
    background: rgba(255,255,255,0.97);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    max-width: 430px;
    margin: 40px auto 0 auto;
    padding: 24px 18px 18px 18px; /* reduced padding */
    position: relative;
    z-index: 2;
}
#attendanceForm .form-control {
    padding: 6px 10px;
    font-size: 0.98rem;
    height: 28px; /* smaller input height */
}
#attendanceForm .form-label {
    font-size: 0.98rem;
    margin-bottom: 4px;
}
.logo {
    display: block;
    margin: 0 auto 10px auto;
    max-width: 220px;
    filter: drop-shadow(0 0 12px #ffb34788);
}

.carousel {
    margin-bottom: 28px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.13);
}
.carousel-inner img {
    object-fit: cover;
    height: 200px;
    width: 100%;
    filter: brightness(0.93) saturate(1.1);
}
.form-label {
    color: #ff5733;
    font-weight: 600;
}
.form-control:focus {
    border-color: #ffb347;
    box-shadow: 0 0 0 0.2rem #ffb34744;
}
.btn-attendance {
    background: linear-gradient(90deg, #ffb347 0%, #ff5733 100%);
    color: #fff;
    font-weight: 700;
    border: none;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px #ffb34744;
    transition: background 0.3s;
}
.btn-attendance:hover {
    background: linear-gradient(90deg, #ff5733 0%, #ffb347 100%);
}
.message {
    margin-top: 20px;
    font-weight: bold;
    text-align: center;
    font-size: 1.1rem;
    min-height: 32px;
    transition: color 0.5s;
}
.footer {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, #232526 0%, #232526 100%);
    color: #ffb347;
    text-align: center;
    padding: 10px 0 6px 0;
    font-size: 1rem;
    letter-spacing: 1px;
    z-index: 10;
    box-shadow: 0 -2px 12px #0003;
}
/* Night mode for out of library */
body.night {
    background: var(--night-gradient);
}
.night .attendance-container {
    background: rgba(30,30,30,0.98);
    color: #fff;
}
.night .form-label {
    color: #ffb347;
}
.night .btn-attendance {
    background: linear-gradient(90deg, #232526 0%, #ff5733 100%);
}
.night .btn-attendance:hover {
    background: linear-gradient(90deg, #ff5733 0%, #232526 100%);
}
.night .tagline {
    color: #ffb347;
    text-shadow: 0 2px 8px #232526cc;
}
.night .message {
    color: #ffb347 !important;
}
.night .footer {
    background: linear-gradient(90deg, #111 0%, #232526 100%);
    color: #ff5733;
}
/* Spinner overlay */
#spinner-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.18);
    align-items: center;
    justify-content: center;
}
#spinner-overlay.active {
    display: flex;
}
.spinner-border {
    width: 3rem;
    height: 3rem;
    color: #ffb347;
}