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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0d0d0d;
    color: #fff;
    min-height: 100vh;
}

.hidden { display: none !important; }

/* === LOGIN === */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 30px;
}

.logo {
    text-align: center;
}

.shield-icon {
    font-size: 64px;
    margin-bottom: 10px;
}

.logo h1 {
    font-size: 48px;
    color: #e53935;
    font-weight: 900;
    letter-spacing: 4px;
}

.logo p {
    color: #888;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.pin-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 300px;
}

.pin-input-group label {
    color: #888;
    text-align: center;
}

.pin-input-group input {
    background: #1a1a1a;
    border: 2px solid #333;
    color: #fff;
    padding: 16px;
    font-size: 24px;
    text-align: center;
    border-radius: 12px;
    letter-spacing: 8px;
    outline: none;
}

.pin-input-group input:focus {
    border-color: #e53935;
}

#login-btn {
    background: #e53935;
    color: white;
    border: none;
    padding: 16px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

#login-btn:hover {
    background: #c62828;
}

.error {
    color: #e53935;
    text-align: center;
}

/* === HEADER === */
header {
    background: #1a1a1a;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e53935;
}

header h1 {
    font-size: 20px;
    color: #e53935;
}

.status-bar {
    display: flex;
    gap: 12px;
    align-items: center;
}

.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-badge.active {
    background: #1b5e20;
    color: #4caf50;
}

.status-badge.inactive {
    background: #b71c1c33;
    color: #e53935;
}

.logout-btn {
    background: transparent;
    color: #888;
    border: 1px solid #333;
    padding: 6px 16px;
    border-radius: 8px;
    cursor: pointer;
}

/* === MAIN === */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.card {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #262626;
}

.card h2 {
    font-size: 16px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

/* === STATUS === */
.status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

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

.status-item .label {
    display: block;
    color: #666;
    font-size: 12px;
    margin-bottom: 4px;
}

/* === COMMANDS === */
.command-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.cmd-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    border: 2px solid #333;
    background: #0d0d0d;
    color: #fff;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: bold;
}

.cmd-btn:hover {
    border-color: #e53935;
    background: #1a0000;
}

.cmd-btn .cmd-icon {
    font-size: 32px;
}

.cmd-btn.wipe {
    border-color: #e53935;
    background: #1a0000;
}

.cmd-btn.wipe:hover {
    background: #e53935;
}

.cmd-btn.alarm {
    border-color: #ff9800;
}

.cmd-btn.alarm:hover {
    border-color: #ff9800;
    background: #1a0d00;
}

/* === MAP === */
#map-container {
    background: #0d0d0d;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    min-height: 100px;
}

#map-link {
    display: inline-block;
    margin-top: 12px;
    color: #2196f3;
    text-decoration: none;
    font-weight: bold;
}

/* === PHOTO === */
#photo-container {
    text-align: center;
}

#thief-photo {
    max-width: 100%;
    border-radius: 12px;
    margin-top: 12px;
}

#no-photo {
    color: #444;
    padding: 40px;
}

/* === MODAL === */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #1a1a1a;
    padding: 40px;
    border-radius: 20px;
    border: 2px solid #e53935;
    max-width: 450px;
    text-align: center;
}

.modal-content h2 {
    color: #e53935;
    margin-bottom: 16px;
}

.modal-content input {
    width: 100%;
    background: #0d0d0d;
    border: 2px solid #333;
    color: #fff;
    padding: 14px;
    font-size: 20px;
    text-align: center;
    border-radius: 10px;
    margin: 16px 0;
    letter-spacing: 6px;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.btn-cancel, .btn-danger {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.btn-cancel {
    background: #333;
    color: #fff;
}

.btn-danger {
    background: #e53935;
    color: #fff;
}

.btn-danger:hover {
    background: #b71c1c;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    header {
        flex-direction: column;
        gap: 12px;
    }

    .command-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .status-grid {
        grid-template-columns: 1fr;
    }
}
