/* style.css */

* { box-sizing: border-box; }
body { font-family: -apple-system, system-ui, sans-serif; margin: 0; background: #f4f4f9; }
.app-container { max-width: 600px; margin: 0 auto; background: #fff; min-height: 100vh; display: flex; flex-direction: column; }

/* Tabs */
.tabs { display: flex; border-bottom: 1px solid #ccc; background: #fff; position: sticky; top: 0; z-index: 10; }
.tabs button { flex: 1; padding: 15px; border: none; background: none; font-size: 16px; font-weight: 500; }
.tabs button.active { border-bottom: 3px solid #0056b3; color: #0056b3; }

/* Content */
.tab-content { display: none; padding: 15px; flex-direction: column; flex: 1; }
.tab-content.active { display: flex; }

/* Camera */
.camera-wrapper { background: #000; border-radius: 8px; overflow: hidden; height: 40vh; margin-bottom: 15px; }
video { width: 100%; height: 100%; object-fit: cover; }

/* Controls */
.controls { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.input-group { display: flex; gap: 8px; }
input, select { padding: 12px; border: 1px solid #ccc; border-radius: 6px; font-size: 16px; }
#state-select { width: 70px; }
#manual-plate { flex: 1; }

.btn-secondary { background: #e2e6ea; border: none; border-radius: 6px; padding: 0 15px; font-weight: bold; }
#scan-btn { margin-top: auto; background: #0056b3; color: white; border: none; padding: 18px; font-size: 18px; border-radius: 8px; font-weight: bold; }

/* Results */
.result-box { padding: 20px; text-align: center; border-radius: 8px; background: #eee; margin-top: 10px; }
.result-box.hidden { display: none; }
.result-box.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.result-box.failure { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.result-box.processing { background: #fff3cd; color: #856404; }

/* History */
#history-list { list-style: none; padding: 0; }
#history-list li { padding: 12px; border-bottom: 1px solid #eee; }
.h-main { display: flex; justify-content: space-between; font-weight: bold; }
.h-sub { font-size: 0.85em; color: #666; margin-top: 4px; }

/* Landing page (sign-in) */
.landing-box {
    max-width: 360px;
    margin: 2rem auto;
    padding: 2rem;
    text-align: center;
}
.landing-box h1 { margin-bottom: 0.5rem; }
.landing-box p { color: #555; margin-bottom: 1.5rem; }
.btn-google {
    display: inline-block;
    padding: 12px 24px;
    background: #fff;
    color: #333;
    border: 1px solid #dadce0;
    border-radius: 4px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn-google:hover {
    background: #f8f9fa;
    border-color: #dadce0;
}

/* Camera page: logged-in user footer */
.user-footer {
    max-width: 600px;
    margin: 0 auto;
    padding: 12px 15px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}
.user-email { color: #555; }
.btn-logout {
    padding: 8px 16px;
    background: #e2e6ea;
    color: #333;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}
.btn-logout:hover { background: #d0d4d8; }
