* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b35;
    --primary-dark: #e55a2b;
    --secondary-color: #2a9d8f;
    --dark-color: #264653;
    --light-color: #f8f9fa;
    --danger-color: #e63946;
    --success-color: #2a9d8f;
    --warning-color: #f4a261;
    --company-gradient: linear-gradient(135deg, #ff6b35 0%, #ff8e53 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-color);
    min-height: 100vh;
}

#app {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
    position: relative;
}

.screen {
    height: 100vh;
    overflow-y: auto;
}

/* Company Branding */
.company-branding {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--company-gradient);
    border-radius: 15px;
    color: white;
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.company-logo {
    font-size: 48px;
    margin-bottom: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.company-name {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.app-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.company-tagline {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 300;
}

/* Auth Container */
.auth-container {
    padding: 20px;
}

.input-group {
    position: relative;
    margin: 15px 0;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    z-index: 1;
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
    background: var(--light-color);
}

.input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    outline: none;
}

.btn-primary {
    width: 100%;
    padding: 15px;
    background: var(--company-gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin: 10px 0;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
    width: 100%;
    padding: 15px;
    background: var(--dark-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    margin: 10px 0;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-secondary:hover {
    background: #1d3557;
}

.company-features {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid #e9ecef;
}

.company-features h3 {
    color: var(--dark-color);
    margin-bottom: 15px;
    text-align: center;
}

.company-features ul {
    list-style: none;
}

.company-features li {
    padding: 8px 0;
    color: #555;
    display: flex;
    align-items: center;
    gap: 10px;
}

.company-features i {
    color: var(--success-color);
}

.company-info {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.company-info p {
    margin: 5px 0;
    color: #555;
}

.contact-info {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: white;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.company-header {
    display: flex;
    flex-direction: column;
}

.company-header h2 {
    color: var(--dark-color);
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.company-badge {
    background: var(--company-gradient);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 3px;
    display: inline-block;
}

.header-right {
    display: flex;
    gap: 10px;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--dark-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s;
}

.btn-icon:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

/* SOS Section */
.sos-section {
    padding: 20px;
    text-align: center;
}

.sos-header {
    margin-bottom: 20px;
}

.sos-header h3 {
    color: var(--dark-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 5px;
}

.company-tag {
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 600;
}

#sos-btn {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: white;
    border: none;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: pulse 2s infinite;
    box-shadow: 0 10px 30px rgba(255, 65, 108, 0.4);
    margin: 0 auto;
    transition: all 0.3s;
    position: relative;
}

#sos-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 65, 108, 0.6);
}

#sos-btn small {
    font-size: 12px;
    opacity: 0.9;
    font-weight: normal;
}

#timer {
    font-size: 24px;
    color: var(--danger-color);
    font-weight: bold;
    margin-top: 15px;
    font-family: monospace;
}

.sos-info {
    margin-top: 15px;
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Map Section */
.map-section {
    padding: 0 20px 20px;
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.map-header h3 {
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

#location-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--success-color);
    font-size: 14px;
    font-weight: 600;
}

#map {
    width: 100%;
    height: 250px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e9ecef;
}

/* Controls */
.controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    margin: 0 20px;
    border-radius: 10px;
}

.btn-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    border: 2px solid #e9ecef;
    color: var(--dark-color);
    padding: 15px 10px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    gap: 8px;
    transition: all 0.3s;
}

.btn-control:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn-control i {
    font-size: 24px;
}

/* Contacts Section */
.contacts-section {
    padding: 20px;
}

.contacts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.contacts-header h3 {
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

#contacts-list {
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: all 0.3s;
}

.contact-item:hover {
    background: #f8f9fa;
    border-radius: 8px;
}

.contact-info {
    display: flex;
    flex-direction: column;
}

.contact-name {
    font-weight: 600;
    color: var(--dark-color);
}

.contact-phone {
    color: #666;
    font-size: 14px;
}

.contact-actions {
    display: flex;
    gap: 10px;
}

/* Company Footer */
.company-footer {
    background: var(--dark-color);
    color: white;
    padding: 20px;
    margin-top: 20px;
}

.footer-content {
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-copyright {
    color: #aaa;
    font-size: 12px;
    margin-top: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    color: var(--dark-color);
    margin-bottom: 5px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions .btn-primary,
.modal-actions .btn-secondary {
    flex: 1;
}

/* Settings Modal */
.settings-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.settings-section h4 {
    color: var(--dark-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.switch {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
}

.switch input {
    display: none;
}

.slider {
    position: relative;
    width: 50px;
    height: 26px;
    background: #ccc;
    border-radius: 34px;
    margin-right: 10px;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background: white;
    border-radius: 50%;
    transition: .4s;
}

input:checked + .slider {
    background: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.switch-label {
    font-size: 14px;
    color: #333;
}

/* Status Indicators */
.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-online {
    background: var(--success-color);
    box-shadow: 0 0 10px var(--success-color);
}

.status-offline {
    background: var(--danger-color);
}

/* Responsive */
@media (max-width: 500px) {
    .company-name {
        font-size: 24px;
    }
    
    .app-title {
        font-size: 30px;
    }
    
    #sos-btn {
        width: 180px;
        height: 180px;
        font-size: 18px;
    }
    
    .controls {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .btn-control {
        padding: 12px 8px;
    }
    
    .company-footer {
        padding: 15px;
    }
    
    .footer-links {
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 30px;
    color: #666;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ddd;
}