@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: #f8fafc;
    color: #1e293b;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: row;
}

@media (max-width: 900px) {
    body {
        flex-direction: column;
    }
    .col-half {
        width: 100% !important;
        height: auto !important;
        min-height: 50vh;
    }
}

/* ---- Columns ---- */
.col-half {
    width: 50%;
    height: 100vh;
    overflow-y: auto;
}

.col-1 {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(219, 234, 254, 0.7);
    padding: 2rem;
}

.col-2 {
    background-color: #ffffff;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
}

.col-first {
    text-align: center;
    width: 100%;
    max-width: 480px;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.05), 0 10px 10px -5px rgba(59, 130, 246, 0.03);
}

.col-first img {
    width: 90px;
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
}

#time {
    font-size: 4.5rem;
    font-weight: 800;
    color: #1e3a8a;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.col-first h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #3b82f6;
    letter-spacing: 1px;
    margin-bottom: 2rem;
}

.loading {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

.col-first h6 {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- Input RFID (Hidden) ---- */
#input-rfid { 
    position: absolute;
    left: -5000px;
    opacity: 0;
}

/* ---- Tap Info & Header Right ---- */
.col-second {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.col-second h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    border-bottom: 4px solid #3b82f6;
    padding-bottom: 0.75rem;
    width: 130px;
    margin-bottom: 1.5rem;
}

.tap-info {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.tap-info div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tap-info i {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

/* ---- Tap Boxes ---- */
.tap-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tap-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.tap-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.04);
    border-color: #cbd5e1;
}

.tap-time {
    padding: 1rem 1.5rem;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    align-self: stretch;
}

.tap-success {
    background-color: #10b981;
}

.tap-danger {
    background-color: #ef4444;
}

.tap-detail {
    padding: 1rem 1.5rem;
    flex: 1;
}

.tap-detail p {
    font-size: 0.95rem;
    color: #334155;
    margin: 0;
}

.tap-detail strong {
    font-weight: 600;
    color: #0f172a;
}

.tap-detail small {
    background: #e2e8f0;
    color: #475569;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.tap-null {
    width: 100%;
    padding: 2.5rem;
    text-align: center;
    color: #64748b;
    font-weight: 500;
    font-size: 0.9rem;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    background: #f8fafc;
}

.clear {
    clear: both;
}

/* ---- Modern Popup Dialogs ---- */
.alert {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    animation: fadeIn 0.25s ease-out;
}

.alert-modal {
    background-color: #ffffff;
    width: 100%;
    max-width: 460px;
    border-radius: 24px;
    text-align: center;
    padding: 3rem 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
    animation: modalPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.alert-modal img {
    margin-bottom: 1.5rem;
    width: 80px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.06));
}

.alert-modal h4 {
    font-size: 1.2rem;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.alert-modal h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
}

/* ---- Submit Spinner Panel ---- */
.alert-submit {
    display: none;
}

.submit-animation {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.submit-animation .spinner {
    width: 60px;
    height: 60px;
    border-width: 3px;
    border-color: #3b82f6;
    border-top-color: transparent;
}

/* Spinners */
.spinner {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

.spinner-1 {
    border-top-color: transparent;
    border-bottom-color: transparent;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}