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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #FFFFFF;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.screen {
    display: block;
}

.screen.hidden {
    display: none;
}

.card {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 2px solid #E07A5F;
}

h1 {
    color: #000000;
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 700;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-help {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #666666;
    font-weight: 500;
}

input {
    width: 100%;
    padding: 12px;
    border: 2px solid #666666;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    background: #FFFFFF;
    color: #000000;
}

input:focus {
    outline: none;
    border-color: #E07A5F;
    box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.1);
}

button, .download-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #E07A5F 0%, #D4653E 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin: 16px 0;
    box-shadow: 0 4px 15px rgba(224, 122, 95, 0.3);
    transform: translateY(0);
}

button:hover, .download-btn:hover {
    background: linear-gradient(135deg, #D4653E 0%, #E07A5F 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(224, 122, 95, 0.4);
}

button:disabled {
    background: #666666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.voltar-btn {
    background: #666666;
    width: auto;
    padding: 10px 20px;
    font-size: 14px;
    margin-top: 10px;
}

.voltar-btn:hover {
    background: #555555;
}

.error {
    color: #D4653E;
    margin-top: 16px;
    padding: 12px;
    background: #F5F5F5;
    border-radius: 6px;
    display: none;
    border-left: 4px solid #E07A5F;
}

.error.show {
    display: block;
}

.info {
    color: #666666;
    font-size: 14px;
    margin-top: 12px;
}

#loadingMessage {
    color: #E07A5F;
    font-size: 16px;
    margin: 20px 0;
    font-weight: 500;
}

.hidden {
    display: none !important;
}

.download-btn:focus {
    outline: 3px solid #E07A5F;
    outline-offset: 2px;
}

/* Estilos para sistema completo */
.welcome-buttons {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.primary-btn {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.primary-btn:hover {
    background: linear-gradient(135deg, #495057 0%, #6c757d 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.secondary-btn {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    box-shadow: 0 4px 15px rgba(73, 80, 87, 0.3);
}

.secondary-btn:hover {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(73, 80, 87, 0.4);
}

.success {
    color: #28a745;
    margin-top: 16px;
    padding: 12px;
    background: #d4edda;
    border-radius: 6px;
    display: none;
    border-left: 4px solid #28a745;
}

.success.show {
    display: block;
}

#clienteInfo {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #E07A5F;
}

#clienteInfo p {
    margin: 5px 0;
    color: #495057;
    font-size: 14px;
}

.laudo-item {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.laudo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.laudo-item h3 {
    color: #E07A5F;
    margin: 0 0 15px 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.laudo-item p {
    margin: 8px 0;
    color: #495057;
    font-size: 14px;
}

.laudo-item .download-btn {
    margin-top: 15px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3);
}

.laudo-item .download-btn:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

#noLaudos {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

#noLaudos p {
    margin: 10px 0;
    font-size: 16px;
}

#loadingLaudos {
    text-align: center;
    padding: 40px;
    color: #E07A5F;
    font-size: 18px;
    font-weight: 500;
}

.logo {
    width: 120px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.card h1 {
    margin-bottom: 16px;
}

.info-link {
    margin-top: 20px;
}

.info-link p {
    color: #666666;
    font-size: 14px;
}

#veiculoInfo {
    margin-bottom: 20px;
    padding: 16px;
    background: #F5F5F5;
    border-radius: 8px;
    border-left: 4px solid #E07A5F;
}

#proprietarioInfo {
    color: #000000;
    font-weight: 500;
    margin: 0;
}

.success {
    color: #28a745;
    margin-top: 16px;
    padding: 12px;
    background: #d4edda;
    border-radius: 6px;
    display: none;
    border-left: 4px solid #28a745;
}

.success.show {
    display: block;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: #E07A5F;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.btn-primary:hover {
    background: #D4653E;
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    width: 100%;
    padding: 12px;
    background: #666666;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.btn-secondary:hover {
    background: #555555;
    transform: translateY(-2px);
}

.btn-link {
    background: none;
    border: none;
    color: #E07A5F;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    padding: 5px;
    margin: 0 10px;
}

.btn-link:hover {
    color: #D4653E;
}

.welcome-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.form-footer {
    margin-top: 20px;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.success {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    border: 1px solid #c3e6cb;
    opacity: 0;
    transition: opacity 0.3s;
}

.success.show {
    opacity: 1;
}

/* Estilos para loading */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #E07A5F;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Estilos para erro de token */
.error-message {
    background: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    color: #c62828;
}

.error-message p {
    margin: 8px 0;
}

/* Botões de ação */
.action-buttons {
    margin-top: 20px;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-buttons .btn-primary,
.action-buttons .btn-secondary {
    width: 100%;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

/* Seção de sucesso */
.success-section {
    background: #e8f5e8;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.success-section h3 {
    color: #2e7d32;
    margin: 0 0 15px 0;
}

/* Display do token */
.token-display {
    background: white;
    border: 2px solid #4caf50;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.token-code {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    color: #1565c0;
    background: #e3f2fd;
    padding: 8px 12px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 5px;
}