:root {
    --primary: #FF6B6B;
    --danger: #C92A2A;
    --success: #51CF66;
    --secondary: #667eea;
    --dark: #1a1a1a;
    --light: #f5f5f5;
    --gray: #999;
    --border: #ddd;
}

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

html, body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: white;
    color: var(--dark);
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
}

#app {
    width: 100%;
    height: 100%;
    position: relative;
}

.screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    flex-direction: column;
    background: white;
    z-index: 10;
    animation: slideIn 0.3s ease;
}

.screen.active {
    display: flex;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* HOME */
#home {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    align-items: center;
    justify-content: center;
}

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

.logo {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

h1 {
    font-size: 44px;
    font-weight: 700;
    margin-bottom: 10px;
}

.tagline {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 40px;
}

.home-footer {
    position: absolute;
    bottom: 20px;
    left: 20px;
}

/* SCREEN */
.screen-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.screen-header h1 {
    flex: 1;
    font-size: 20px;
    margin: 0;
}

.btn-back {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
}

.screen-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* TRANSPORT GRID */
.transport-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.transport-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--light);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 120px;
}

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

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

.transport-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.transport-label {
    font-size: 12px;
    font-weight: 600;
}

/* FORMS */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
}

.form-group input,
.form-group select {
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* BUTTONS */
.btn {
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 12px 16px;
    transition: all 0.2s;
}

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

.btn-primary:active {
    background: #5568d3;
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--light);
    color: var(--dark);
    border: 1px solid var(--border);
}

.btn-secondary:active {
    background: #eee;
}

.btn-large {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

.btn-location {
    background: var(--light);
    border: 2px dashed var(--secondary);
    color: var(--secondary);
    width: 100%;
}

.btn-icon {
    background: transparent;
    border: none;
    font-size: 22px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-sos {
    width: 100%;
    padding: 16px;
    background: var(--danger);
    color: white;
    font-size: 18px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.btn-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* LOCATION STATUS */
.loc-status {
    padding: 12px;
    background: var(--light);
    border-radius: 8px;
    font-size: 13px;
    color: var(--secondary);
}

.loc-status.hidden {
    display: none;
}

/* MONITORING */
.monitor-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px 16px;
}

.monitor-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.15);
    padding: 10px;
    border-radius: 8px;
    color: white;
}

.stat-label {
    font-size: 11px;
    opacity: 0.8;
}

.stat-value {
    font-size: 14px;
    font-weight: 700;
    margin-top: 4px;
}

.status-ok { color: var(--success); }
.status-warning { color: #FFA500; }
.status-danger { color: var(--danger); }

.map {
    flex: 1;
    background: #f0f0f0;
}

.monitor-controls {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* MODALS */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 100;
    align-items: flex-end;
}

.modal.active {
    display: flex;
}

.modal.hidden {
    display: none !important;
}

.modal-box {
    width: 100%;
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-box h2 {
    font-size: 18px;
    margin-bottom: 15px;
}

.modal-box h3 {
    font-size: 14px;
    margin-top: 15px;
    margin-bottom: 8px;
}

.modal-box p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--gray);
    margin-bottom: 10px;
}

.btn-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--light);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
}

/* DRAWER */
.drawer {
    position: fixed;
    left: -100%;
    top: 0;
    width: 80%;
    height: 100%;
    background: white;
    z-index: 300;
    transition: left 0.3s ease;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.drawer.open {
    left: 0;
}

.drawer-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.drawer-content {
    flex: 1;
    padding: 12px 0;
}

.drawer-item {
    display: block;
    width: 100%;
    padding: 16px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid var(--border);
    color: var(--dark);
}

.drawer-item:active {
    background: var(--light);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 250;
    display: none;
}

.overlay.open {
    display: block;
}

/* NOTIFICATION */
.notification {
    position: fixed;
    bottom: 24px;
    left: 16px;
    right: 16px;
    background: var(--success);
    color: white;
    padding: 14px;
    border-radius: 8px;
    z-index: 500;
    font-size: 14px;
    font-weight: 500;
}

.notification.hidden {
    display: none;
}

/* CONTACT ITEMS */
.contact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--light);
    border-radius: 8px;
    margin: 8px 0;
}

.contact-name {
    flex: 1;
    font-weight: 500;
}

.contact-remove {
    background: #ffebee;
    border: none;
    color: var(--danger);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}


/* AUTOCOMPLETE SUGGESTIONS */
.suggestions{
    margin-top:10px;
    border:1px solid var(--border);
    border-radius:10px;
    overflow:hidden;
    background:white;
}
.suggestions.hidden{display:none;}
.suggestion-item{
    padding:12px 14px;
    font-size:14px;
    cursor:pointer;
    border-bottom:1px solid var(--border);
}
.suggestion-item:last-child{border-bottom:none;}
.suggestion-item:active{background:var(--light);}
.suggestion-main{font-weight:600;}
.suggestion-sub{font-size:12px;color:var(--gray);margin-top:2px;}
/* MANUAL CONTACT */ 
.manual-contact{margin-top:10px;}
.section-title{font-size:14px;margin:8px 0;}
.manual-contact-form{
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
}
.manual-contact-form input{
    padding:12px 14px;
    border:2px solid var(--border);
    border-radius:8px;
    font-size:16px;
}
.hint{font-size:12px;color:var(--gray);line-height:1.4;margin-top:8px;}

/* .logo{
  width:56px;
  height:56px;
  background:url("logo.png") center/contain no-repeat;
} */


.brand{
  display:flex;
  align-items:center;
  gap:14px;
}

.brand-logo{
  width:50px;
  height:50px;
  object-fit:contain;
}

.brand-text h1{
  margin:0;
  font-size:26px;
}

.brand-sub{
    font-size:12px;
    opacity:0.5;
    font-weight:500;
}

