﻿/* Reset-ish */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Global background */
.simple-login-body {
    min-height: 100vh;
    background: var(--BackGround);
    color: #f7f9fc;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Center login card */
.logincontainer {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Login card */
.login-card {
    width: 100%;
    max-width: 420px;
    padding: 32px 28px 30px;
    background: var(--BackGround1);
    border-radius: 16px;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.login-logo-wrapper {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo {
    width: 300px;
    height: 80px;
    margin: 0 auto 8px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.login-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-name {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.product-subtitle {
    font-size: 13px;
    color: #9ca3af;
}

/* Form controls */
.controls .form-group {
    margin-bottom: 18px;
}

.controls .control-label {
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 6px;
}

.controls .form-control {
    background-color: var(--GTDialogBackground);
    border-radius: 10px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    color: var(--GTDialogText);
    box-shadow: none;
    height: 44px;
    padding: 10px 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

    .controls .form-control::placeholder {
        color: #6b7280;
    }

    .controls .form-control:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.6);
        background-color: rgba(15, 23, 42, 1);
    }

/* Remember me */
.remember-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #d1d5db;
    cursor: pointer;
}

    .remember-label input {
        margin: 0;
    }

/* Buttons */
.btn-custom {
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border: none;
}

#LoginBtn.btn-primary {
    background: linear-gradient(135deg, var(--AssetHoverShadeTop), var(--AssetHoverShadeBottom));
}

    #LoginBtn.btn-primary:hover {
        background: linear-gradient(135deg, var(--AssetHoverShadeTop), var(--AssetHoverShadeBottom));
        box-shadow: 0px 20px 35px 0px rgba(0, 0, 0, 0.5);
    }

/* Map layout */
.mapcontainer {
    padding-top: 10px;
    padding-bottom: 24px;
    height: calc(100vh - 40px);
    color: #e5e7eb;
}

/* Header above the map */
.map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
    padding: 12px 16px;
    background: var(--MainColor);
    border-radius: 14px;
    border: 1px solid rgba(55, 65, 81, 0.9);
}



.map-header-logo {
    height: 60px;
    max-width: 150px;
    object-fit: contain;
}

.map-header-center {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.map-header-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
    color: var(--TextColorOverMaincolor);
    opacity: 1.0;
}

.map-header-imei {
    font-size: 18px;
    font-weight: 600;
    color: var(--TextColorOverMaincolor);
    word-break: break-all;
}

.map-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

    .map-header-right #LogoutBtn {
        width: 120px;
    }

/* Hide the checkbox */
.follow-toggle-input {
    display: none;
}

/* Base follow button style */
.btn-follow {
    min-width: 100px;
    text-align: center;
    padding: 6px 16px;
    font-size: 13px;
    border-radius: 999px;
    cursor: pointer;
    display: inline-block;
    color: white;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

/* Default (checked) = Following */
.follow-toggle-input:checked + .btn-follow {
    background: #16a34a; /* green */
}

    /* When following: text = "Following" */
    .follow-toggle-input:checked + .btn-follow::after {
        content: "Unfollow";
    }

/* Not checked = Unfollow */
.follow-toggle-input:not(:checked) + .btn-follow {
    background: #dc2626; /* red */
}

    /* When NOT following: text = "Unfollow" */
    .follow-toggle-input:not(:checked) + .btn-follow::after {
        content: "Follow";
    }

/* Hover polish */
.btn-follow:hover {
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

/* Small global spacing for the tracking layout */
.logincontainer,
.mapcontainer {
    width: 100%;
    max-width: 100%;
    padding-left: 12px !important;
    padding-right: 12px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
}

/* Optional: ensure map elements also respect the same spacing */
.map-header,
.map-wrapper,
.map-stats {
    margin-left: 0;
    margin-right: 0;
    border-radius: 12px; /* keeps them looking nice */
}

/* Map itself */
.map-wrapper {
    height: calc(100vh - 220px);
    background: #020617;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(31, 41, 55, 0.9);
}

#map {
    width: 100%;
    height: 100%;
}

/* Stats blocks underneath the map */
.map-stats {
    margin-top: 8px;
    margin-bottom: 8px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.map-stat-card {
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--MainColor);
    border: 1px solid rgba(55, 65, 81, 0.9);
}

.map-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--TextColorOverMaincolor);
    opacity: 1.0;
}

.map-stat-value {
    margin-top: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--TextColorOverMaincolor);
}

/* Mobile tweaks */
@media (max-width: 768px) {
    .login-card {
        padding: 24px 18px 22px;
    }

    .map-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .map-header-center {
        align-items: flex-start;
        text-align: left;
        width: 100%;
    }

    .map-header-right {
        display: flex;
        flex-direction: column; /* ← stack */
        align-items: flex-end;
        justify-content: center;
        gap: 8px;
    }

    .map-wrapper {
        height: calc(100vh - 260px);
    }
}

.map-panel {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px 18px;
    background: var(--MainColor);
    border-radius: 14px;
    border: 1px solid rgba(55, 65, 81, 0.9);
}

.map-info {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    grid-row-gap: 6px;
    grid-column-gap: 20px;
}

.map-info-row {
    display: flex;
    flex-direction: column;
    font-size: 12px;
}

.map-label {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--TextColorOverMaincolor);
    font-weight: 500;
    font-size: 11px;
}

.map-value {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

/* Map actions (logout + follow) */
.map-actions {
    width: 140px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.follow-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    font-size: 13px;
    color: #d1d5db;
    cursor: pointer;
}

    .follow-toggle input {
        margin: 0;
    }

/* Map itself */
.map-wrapper {
    height: calc(100vh - 175px);
    background: #020617;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(31, 41, 55, 0.9);
}
.map-header-left {
    justify-content: flex-start;
    margin-bottom: 0;
    width: 150px;
    height: 60px;
    border-radius: 999px;
    overflow: hidden;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px var(--AssetHoverShadeBottom);
    align-items: center;
    justify-content: center;
    padding: 6px;
}
#map {
    width: 100%;
    height: 100%;
}

/* Mobile tweaks */
@media (max-width: 768px) {
    .login-card {
        padding: 24px 18px 22px;
    }

    .map-panel {
        flex-direction: column;
    }

    .map-actions {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}
.mapcontainer {
    padding-bottom: 0 !important; /* remove big gap */
}
.map-wrapper {
    margin-bottom: 8px; /* small spacing only */
}
@media (max-width: 768px) {
    .login-card {
        padding: 24px 18px 22px;
    }
    .map-wrapper {
        height: 38vh; /* adjust until you like it */
    }

    .map-stats {
        margin-bottom: 0;
    }
    .mapcontainer {
        height: 100vh; /* fit whole thing in the viewport */
        padding-top: 8px;
        padding-bottom: 8px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .map-header {
        flex: 0 0 auto;
        flex-direction: row; /* keep it in one row */
        align-items: center;
        justify-content: space-between;
        padding: 8px 10px;
    }

    .map-header-left {
        justify-content: flex-start;
        margin-bottom: 0;
        width: 150px;
        height: 60px;
        border-radius: 999px;
        overflow: hidden;
        background: white;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 0 30px var(--AssetHoverShadeBottom);
        align-items: center;
        justify-content: center;
        padding: 6px;
    }

    .map-header-logo {
        height: 24px; /* smaller logo on thin screens */
        max-width: 120px;
    }

    .map-header-center {
        flex: 1;
        margin-bottom: 0;
        text-align: center;
        align-items: center;
    }
    .map-header-right {
        flex-direction: column !important;
        align-items: flex-end;
        width: auto;
        gap: 6px;
    }

        .map-header-right #LogoutBtn {
            width: auto;
            padding: 6px 14px;
            font-size: 12px;
        }

    .btn-follow {
        min-width: 80px;
        padding: 6px 12px;
        font-size: 12px;
    }

    /* Map shorter so stats are visible */
    .map-wrapper {
        flex: 0 0 auto;
        height: 40vh;
    }

    .map-stats {
        flex: 0 0 auto;
        margin-top: 8px;
        grid-template-columns: 1fr; /* stack stat cards */
    }
}

@media (max-width: 480px) {
    .map-wrapper {
        height: 35vh;
    }
}
