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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a3d2e 0%, #1a5f4a 50%, #0d3326 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    overflow: hidden;
    width: 100%;
    max-width: 650px;
}

.header {
    background: linear-gradient(135deg, #0a3d2e, #1a5f4a);
    color: white;
    padding: 35px 30px;
    text-align: center;
    position: relative;
}

.logo-area {
    position: absolute;
    top: 15px;
    left: 20px;
    font-weight: bold;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.header h1 { font-size: 1.8rem; margin-bottom: 5px; font-weight: 600; }
.header p { opacity: 0.9; font-size: 0.95rem; }

.content { padding: 35px 30px; }

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: none;
}

.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert.show { display: block; animation: slideIn 0.3s ease; }

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Forms */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1a5f4a;
    background: white;
    box-shadow: 0 0 0 4px rgba(26,95,74,0.1);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 15px; }

/* Buttons */
.btn {
    padding: 16px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #0a3d2e, #1a5f4a);
    color: white;
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(10,61,46,0.3); }

.btn-success {
    background: linear-gradient(135deg, #2e7d32, #4caf50);
    color: white;
    margin-top: 25px;
}

.btn-success:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(46,125,50,0.3); }

/* Login */
.login-form { display: flex; flex-direction: column; gap: 5px; }

.hint {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: #666;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.user-info { color: #666; font-size: 0.9rem; }

.logout-btn {
    background: #dc3545;
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}

.logout-btn:hover { background: #c82333; }

.section-title {
    font-size: 1.2rem;
    color: #0a3d2e;
    margin: 30px 0 20px;
    padding-left: 15px;
    border-left: 4px solid #1a5f4a;
}

.hint-text {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
}

/* Photos */
.photo-upload-area {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.photo-box {
    border: 3px dashed #ccc;
    border-radius: 15px;
    height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: #fafafa;
}

.photo-box:hover { border-color: #1a5f4a; background: #f0f8f5; }
.photo-box.has-image { border-style: solid; border-color: #4caf50; }

.photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0; left: 0;
}

.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220,53,69,0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.photo-placeholder {
    text-align: center;
    color: #999;
    pointer-events: none;
}

.photo-placeholder svg { width: 40px; height: 40px; margin-bottom: 8px; opacity: 0.5; }
.photo-placeholder span { font-size: 0.8rem; }

input[type="file"] { display: none; }

/* Preview */
.data-preview {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #e9ecef;
}

.data-preview h3 { color: #0a3d2e; margin-bottom: 15px; font-size: 1rem; }

.data-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.data-item:last-child { border-bottom: none; }

.data-label { font-weight: 600; color: #555; }
.data-value { color: #333; text-align: right; }

/* History */
.history-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.history-card:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.08); }

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.history-header strong { color: #0a3d2e; font-size: 1.05rem; }

.history-body {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.7;
}

.history-date {
    font-size: 0.8rem;
    color: #999;
    margin-top: 8px;
}

.history-photos {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.history-photos img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.history-photos img:hover { transform: scale(1.05); }

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pendente { background: #fff3cd; color: #856404; }
.status-enviado { background: #d4edda; color: #155724; }
.status-processado { background: #cce5ff; color: #004085; }

.empty-state {
    text-align: center;
    color: #999;
    padding: 30px;
    font-size: 0.9rem;
}

/* Loading */
.loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

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

.hidden { display: none !important; }

/* Responsive */
@media (max-width: 600px) {
    .grid-2, .grid-2-1 { grid-template-columns: 1fr; }
    .photo-upload-area { grid-template-columns: 1fr; }
    .content { padding: 25px 20px; }
    .header h1 { font-size: 1.4rem; }
    .dashboard-header { flex-direction: column; gap: 15px; text-align: center; }
}