﻿:root {
    --bg-main: #090d16;
    --bg-card: #131b2e;
    --bg-input: #1a243b;
    --border-color: #24324f;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --accent: #38bdf8;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --warning: #f59e0b;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    padding-bottom: env(safe-area-inset-bottom, 24px);
}

.app-header {
    background: rgba(19, 27, 46, 0.85);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
}

.header-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.brand h1 {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.tenant-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.badge-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid transparent;
}

    .badge-status.online {
        background: rgba(16, 185, 129, 0.15);
        color: #34d399;
        border-color: rgba(16, 185, 129, 0.3);
    }

    .badge-status.offline {
        background: rgba(245, 158, 11, 0.15);
        color: #fbbf24;
        border-color: rgba(245, 158, 11, 0.3);
    }

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.app-container {
    max-width: 600px;
    margin: 16px auto;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.telemetry-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.card-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.telemetry-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.telemetry-item {
    background: var(--bg-input);
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

    .telemetry-item.highlight {
        grid-column: span 2;
        border: 1px solid rgba(56, 189, 248, 0.3);
        background: rgba(56, 189, 248, 0.05);
    }

.telemetry-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.telemetry-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    font-family: monospace;
}

.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
}

.form-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.form-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.field-group {
    margin-bottom: 16px;
}

    .field-group label {
        display: block;
        font-size: 0.85rem;
        font-weight: 500;
        margin-bottom: 8px;
        color: #cbd5e1;
    }

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--text-muted);
    transition: border-color 0.2s;
}

    .input-wrapper:focus-within {
        border-color: var(--accent);
    }

    .input-wrapper input,
    .input-wrapper select {
        background: transparent;
        border: none;
        outline: none;
        color: var(--text-main);
        font-size: 0.95rem;
        width: 100%;
        font-family: inherit;
    }

.camera-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    background: var(--bg-input);
    transition: all 0.2s;
}

    .camera-dropzone:hover {
        border-color: var(--accent);
    }

.dropzone-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.foto-preview {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 8px;
}

.hidden {
    display: none !important;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), #1e40af);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    margin-top: 10px;
}

    .btn-primary:active {
        transform: scale(0.98);
    }

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    font-size: 0.9rem;
    z-index: 100;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 20px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}
