:root {
    --primary-color: #f36c21;
    --primary-dark: #3367d6;
    --accent-color: #fbbc05;
    --text-color: #333333;
    --text-light: #757575;
    --background-color: #f8f9fa;
    --card-color: #ffffff;
    --error-color: #ea4335;
    --success-color: #34a853;
    --border-color: #dadce0;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app-container {
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Login Styles */
.login-container {
    background-color: var(--card-color);
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    margin: auto;
    text-align: center;
}

.app-logo {
    margin-bottom: 1.5rem;
}

.app-logo img {
    width: 80px;
    height: 80px;
}

.login-form {
    margin-top: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-light);
    font-size: 0.9rem;
}

input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.error-message {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    min-height: 1.2rem;
}

.primary-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s;
}

.primary-button:hover {
    background-color: var(--primary-dark);
}

/* Dashboard Styles */
.app-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.header-title h1 {
    font-size: 1.2rem;
    margin: 0;
}

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

.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.icon-button img {
    width: 24px;
    height: 24px;
}

.main-content {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.scanner-container {
    background-color: var(--card-color);
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#scanner-placeholder {
    width: 100%;
    aspect-ratio: 1/1;
    max-width: 300px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.scanner-message {
    text-align: center;
    color: var(--text-light);
}

.scanner-message img {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

#scanner-view {
    width: 100%;
    aspect-ratio: 1/1;
    max-width: 300px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
}

#qr-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-placeholder {
    text-align: center;
    color: var(--text-light);
    padding: 20px;
    max-width: 80%;
}

.camera-placeholder p {
    font-size: 14px;
    line-height: 1.4;
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.scanner-frame {
    width: 70%;
    height: 70%;
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

.result-container {
    background-color: var(--card-color);
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    margin-top: 1rem;
}

.result-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-header h2 {
    font-size: 1.2rem;
    margin: 0;
}

.result-content {
    padding: 1rem;
}

.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none;
}

/* User data styles */
.user-data {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 1rem;
}

.user-data-item {
    display: flex;
    margin-bottom: 0.5rem;
}

.user-data-label {
    font-weight: 500;
    min-width: 120px;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-active {
    background-color: var(--success-color);
    color: white;
}

.status-inactive {
    background-color: var(--error-color);
    color: white;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .main-content {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .scanner-container, .result-container {
        flex: 1;
    }
    
    .result-container {
        margin-top: 0;
    }
}
