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

:root {
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --success: #16a34a;
    --warning: #ca8a04;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #ffffff;
    --bg-secondary: #f9fafb;
    --border: #e5e7eb;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-secondary);
    min-height: 100vh;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

header h1 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-light);
    font-size: 1rem;
}

main {
    flex: 1;
}

#connection-status {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
}

#connection-status.online {
    background: #dcfce7;
    color: #166534;
}

#connection-status.offline {
    background: #fee2e2;
    color: #991b1b;
}

.form-section {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.form-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.help-text {
    display: block;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

.location-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--text-light);
}

.location-icon {
    font-size: 1.25rem;
}

.sos-section {
    margin: 2rem 0;
}

.sos-button {
    width: 100%;
    padding: 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: background 0.2s;
    box-shadow: 0 4px 6px rgba(220, 38, 38, 0.3);
}

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

.sos-button:active {
    transform: scale(0.98);
}

.sos-button:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    transform: none;
}

.sos-icon {
    font-size: 1.5rem;
}

.report-status {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.status-content {
    text-align: center;
}

.status-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.status-message {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.status-details {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.retry-button,
.secondary-button {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.retry-button:hover,
.secondary-button:hover {
    background: var(--primary-dark);
}

.queue-status {
    background: #fef3c7;
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.queue-status h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #92400e;
}

.queue-count {
    font-size: 0.875rem;
    color: #b45309;
    margin-bottom: 1rem;
}

.hidden {
    display: none !important;
}

.info-box {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.info-box p {
    margin-bottom: 0.5rem;
}

.info-box p:last-child {
    margin-bottom: 0;
}

.info-box strong {
    color: #1e40af;
}

footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    .form-section {
        padding: 1rem;
    }

    .sos-button {
        font-size: 1rem;
        padding: 1.25rem;
    }
}
