/* ========================================
   IGACOS Emergency Citizen App
   Mobile-First Design
   ======================================== */

/* CSS Variables */
:root {
    /* Primary Colors - Emergency Theme */
    --primary: #dc2626;
    --primary-light: #ef4444;
    --primary-dark: #b91c1c;

    /* Emergency Type Colors */
    --fire: #dc2626;
    --medical: #059669;
    --crime: #1e40af;
    --traffic: #d97706;
    --disaster: #7c3aed;
    --other: #6b7280;

    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;

    /* Font */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
}

.hidden {
    display: none !important;
}

/* ========================================
   Splash Screen
   ======================================== */
.splash-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.splash-content {
    text-align: center;
    color: var(--white);
}

.splash-logo {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    animation: pulse 2s infinite;
}

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

.splash-content h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.splash-content p {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: var(--space-xl);
}

.splash-loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ========================================
   App Header
   ======================================== */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    padding: 0 var(--space-md);
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.header-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.2);
    padding: 4px;
}

.header-text h1 {
    font-size: 1.125rem;
    font-weight: 700;
}

.header-text span {
    font-size: 0.6875rem;
    opacity: 0.9;
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
    padding-top: 64px;
    padding-bottom: 80px;
    min-height: 100vh;
}

.tab-content {
    display: none;
    padding: var(--space-md);
    animation: fadeIn var(--transition-normal);
}

.tab-content.active {
    display: block;
}

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

/* ========================================
   Emergency Call Banner
   ======================================== */
.emergency-call-banner {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.emergency-call-banner:active {
    transform: scale(0.98);
}

.call-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    animation: ring 2s ease infinite;
}

@keyframes ring {
    0%, 100% { transform: rotate(0); }
    10%, 30% { transform: rotate(-10deg); }
    20%, 40% { transform: rotate(10deg); }
    50% { transform: rotate(0); }
}

.call-text {
    flex: 1;
}

.call-label {
    display: block;
    font-size: 0.75rem;
    opacity: 0.9;
}

.call-number {
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
}

/* ========================================
   Section Headers
   ======================================== */
.section-header {
    margin-bottom: var(--space-md);
}

.section-header h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-800);
}

.section-header p {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* ========================================
   Emergency Grid
   ======================================== */
.emergency-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.emergency-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.emergency-btn:active {
    transform: scale(0.95);
}

.emergency-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
}

.emergency-btn span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-700);
}

.emergency-btn.fire .emergency-icon { background: var(--fire); }
.emergency-btn.medical .emergency-icon { background: var(--medical); }
.emergency-btn.crime .emergency-icon { background: var(--crime); }
.emergency-btn.traffic .emergency-icon { background: var(--traffic); }
.emergency-btn.disaster .emergency-icon { background: var(--disaster); }
.emergency-btn.other .emergency-icon { background: var(--other); }

/* ========================================
   Safety Tips
   ======================================== */
.safety-section {
    margin-top: var(--space-lg);
}

.tips-carousel {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-sm);
}

.tips-carousel::-webkit-scrollbar {
    display: none;
}

.tip-card {
    min-width: 200px;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    scroll-snap-align: start;
    box-shadow: var(--shadow-sm);
}

.tip-card i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

.tip-card h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: var(--space-xs);
}

.tip-card p {
    font-size: 0.75rem;
    color: var(--gray-600);
    line-height: 1.4;
}

/* ========================================
   Report Form
   ======================================== */
.report-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.btn-back {
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-700);
}

.report-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.selected-emergency {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: var(--white);
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-sm);
}

.selected-emergency .emergency-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    font-size: 1.25rem;
}

.selected-emergency span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
}

.form-section {
    margin-bottom: var(--space-lg);
}

.section-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-sm);
}

.section-label i {
    color: var(--primary);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: var(--space-md);
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-input + .form-input {
    margin-top: var(--space-sm);
}

.form-textarea {
    resize: none;
}

/* Location Box */
.location-box {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--space-sm);
}

.location-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    font-size: 0.875rem;
    color: var(--gray-600);
}

.location-status i {
    color: var(--primary);
    animation: pulse 1.5s infinite;
}

.location-status.success {
    color: var(--success);
}

.location-status.success i {
    animation: none;
}

.location-map {
    height: 150px;
    background: var(--gray-100);
}

/* Media Upload */
.media-upload {
    display: flex;
    gap: var(--space-sm);
}

.upload-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-md);
    background: var(--white);
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-md);
    color: var(--gray-600);
    font-size: 0.75rem;
    transition: all var(--transition-fast);
}

.upload-btn i {
    font-size: 1.25rem;
    color: var(--primary);
}

.upload-btn:active {
    border-color: var(--primary);
    background: var(--gray-50);
}

.media-preview {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    flex-wrap: wrap;
}

.media-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.media-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: var(--danger);
    color: var(--white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: var(--space-sm);
    cursor: pointer;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Submit Button */
.btn-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--primary);
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    margin-top: var(--space-lg);
    transition: background var(--transition-fast);
}

.btn-submit:active {
    background: var(--primary-dark);
}

/* ========================================
   Success Screen
   ======================================== */
.success-content {
    text-align: center;
    padding: var(--space-xl) 0;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: var(--success);
    color: var(--white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto var(--space-lg);
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.success-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: var(--space-sm);
}

.success-content > p {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: var(--space-lg);
}

.ticket-info {
    background: var(--gray-100);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.ticket-label {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: var(--space-xs);
}

.ticket-number {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

/* Status Timeline */
.status-timeline {
    text-align: left;
    padding: var(--space-md);
    background: var(--white);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
}

.status-timeline .timeline-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding-bottom: var(--space-md);
    position: relative;
}

.status-timeline .timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 11px;
    top: 24px;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

.status-timeline .timeline-item.active::after {
    background: var(--success);
}

.status-timeline .timeline-dot {
    width: 24px;
    height: 24px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.status-timeline .timeline-item.active .timeline-dot {
    background: var(--success);
}

.status-timeline .timeline-item.active .timeline-dot::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.625rem;
    color: var(--white);
}

.status-timeline .timeline-content {
    flex: 1;
}

.status-timeline .timeline-title {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-800);
}

.status-timeline .timeline-time {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.success-actions {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.btn-secondary,
.btn-primary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.emergency-reminder {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--gray-100);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    color: var(--gray-600);
}

.emergency-reminder i {
    color: var(--primary);
}

/* ========================================
   My Reports
   ======================================== */
.tab-header-simple {
    margin-bottom: var(--space-lg);
}

.tab-header-simple h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.reports-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.report-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.report-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.report-card-header .emergency-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

.report-card-info {
    flex: 1;
}

.report-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-800);
}

.report-card-id {
    font-size: 0.6875rem;
    color: var(--gray-500);
}

.report-status {
    padding: 4px 10px;
    font-size: 0.625rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.report-status.pending {
    background: var(--warning);
    color: var(--gray-800);
}

.report-status.dispatched {
    background: var(--info);
    color: var(--white);
}

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

.report-card-location {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.75rem;
    color: var(--gray-600);
    margin-bottom: var(--space-sm);
}

.report-card-location i {
    color: var(--primary);
}

.report-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--gray-100);
    font-size: 0.75rem;
    color: var(--gray-500);
}

.empty-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    color: var(--gray-500);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-xs);
}

.empty-state p {
    font-size: 0.875rem;
}

/* ========================================
   Info Tab / Contacts
   ======================================== */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.contact-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: var(--white);
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.contact-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--white);
}

.contact-icon.emergency { background: var(--danger); }
.contact-icon.cdrrmo { background: var(--disaster); }
.contact-icon.fire { background: var(--fire); }
.contact-icon.police { background: var(--crime); }
.contact-icon.medical { background: var(--medical); }

.contact-info {
    flex: 1;
}

.contact-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-800);
}

.contact-number {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.contact-card > i:last-child {
    color: var(--success);
    font-size: 1.25rem;
}

.about-section {
    background: var(--white);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
}

.about-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.about-section p {
    font-size: 0.8125rem;
    color: var(--gray-600);
    line-height: 1.6;
}

.app-version {
    margin-top: var(--space-md);
    font-size: 0.75rem;
    color: var(--gray-400);
}

.powered-by {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    color: var(--gray-400);
    font-size: 0.75rem;
}

.powered-by img {
    height: 30px;
    opacity: 0.6;
}

/* ========================================
   Bottom Navigation
   ======================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--white);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--space-sm);
    color: var(--gray-500);
    font-size: 0.625rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.nav-item i {
    font-size: 1.25rem;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.sos-btn {
    position: relative;
    top: -15px;
}

.sos-icon {
    width: 56px;
    height: 56px;
    background: var(--primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
    animation: sosPulse 2s infinite;
}

@keyframes sosPulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(220, 38, 38, 0.6); }
}

.nav-item.sos-btn span {
    margin-top: var(--space-xs);
    color: var(--primary);
    font-weight: 700;
}

/* ========================================
   Loading Overlay
   ======================================== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
}

.loading-content {
    text-align: center;
    color: var(--white);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-md);
}

.loading-content span {
    font-size: 0.875rem;
}

/* ========================================
   Toast
   ======================================== */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-800);
    color: var(--white);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    z-index: 600;
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.toast-content {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
}

/* ========================================
   Modal
   ======================================== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    z-index: 400;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 320px;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.sos-modal {
    text-align: center;
    padding: var(--space-xl);
}

.sos-header {
    margin-bottom: var(--space-md);
}

.sos-pulse {
    width: 80px;
    height: 80px;
    background: var(--danger);
    color: var(--white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto var(--space-md);
    animation: sosPulse 1s infinite;
}

.sos-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
}

.sos-modal > p {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: var(--space-lg);
}

.sos-actions {
    display: flex;
    gap: var(--space-sm);
}

.btn-cancel {
    flex: 1;
    padding: var(--space-md);
    background: var(--gray-200);
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
}

.btn-sos {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--danger);
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
}

/* ========================================
   Responsive
   ======================================== */
@media (min-width: 480px) {
    .emergency-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-md);
    }

    .emergency-btn {
        padding: var(--space-lg);
    }

    .emergency-icon {
        width: 64px;
        height: 64px;
        font-size: 1.75rem;
    }
}

@media (min-width: 768px) {
    .main-content {
        max-width: 600px;
        margin: 0 auto;
    }

    .bottom-nav {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    }
}
