html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

.wallpaper-radial-dark {
    background: radial-gradient(circle at center, #0f2027, #203a43, #2c5364);
    color: #fff;
    font-family: 'Segoe UI', sans-serif;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}
/* Optional padding class */
.wallpaper-padded {
    padding-left: 5vw;
    padding-right: 5vw;
}

.form-floating label {
    color: #212529; /* Bootstrap's default text color */
}

.role-badge.tenantowner {
    background-color: #007bff;
    color: aliceblue;
    font-weight: bold;
    padding: 2px;
}

.role-badge.manager {
    background-color: #28a745;
}

.role-badge.user {
    background-color: #6c757d;
}

.role-badge.none {
    background-color: #8e44ad; /* regal purple */
    color: #fff;
    font-weight: bold;
    padding: 2px;
}

.role-display {
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: inline-block;
}

.role-header {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #343a40;
}

.user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 0 1rem;
}

.user-card {
    background-color: #fdfdfd;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.user-header h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #343a40;
}

.user-email {
    font-size: 0.95rem;
    color: #6c757d;
}

.user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.user-card strong {
    font-size: 1.1rem;
    color: #333;
}

.user-card span {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.9rem;
}

.user-card button {
    margin-top: 0.75rem;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

    .user-card button:hover {
        background-color: #0056b3;
    }

.invite-form {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

    .invite-form h3 {
        margin-bottom: 1rem;
        font-size: 1.25rem;
        color: #333;
    }

    .invite-form .form-group {
        margin-bottom: 1rem;
    }

    .invite-form label {
        display: block;
        margin-bottom: 0.25rem;
        font-weight: 600;
        color: #555;
    }

    .invite-form input,
    .invite-form select {
        width: 100%;
        padding: 0.5rem;
        border: 1px solid #ccc;
        border-radius: 4px;
        font-size: 0.95rem;
    }

.btn-invite {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

    .btn-invite:hover {
        background-color: #0056b3;
    }

.btn-create-tenant {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 0.6rem 1.2rem;
    background-color: #2c3e50;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    .btn-create-tenant:hover {
        background-color: #34495e;
    }

.form-group input,
.form-group select {
    display: block;
    width: 100%;
    max-width: 400px;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-edit {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    text-decoration: none;
    display: inline-block;
}

    .btn-edit:hover {
        background-color: #0056b3;
    }

    .btn-edit:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.4);
    }

.table-overlay {
    background-color: rgba(30, 30, 30, 0.85); /* semi-transparent dark */
    color: #f0f0f0;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    padding: 1rem;
    border-collapse: collapse;
    width: 100%;
}

    .table-overlay th,
    .table-overlay td {
        padding: 0.75rem;
        border: 1px solid #555;
    }

    .table-overlay thead {
        background-color: rgba(50, 50, 50, 0.9);
        color: #ffffff;
    }

    .table-overlay tbody tr:hover {
        background-color: rgba(70, 70, 70, 0.9);
        transition: background-color 0.2s ease-in-out;
    }

.btn-delete {
    background-color: #c0392b;
    border-color: #a93226;
    color: #fff;
}

    .btn-delete:hover {
        background-color: #e74c3c;
        border-color: #c0392b;
    }

.area-view-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
    padding: 2rem;
    text-align: center;
}

.map-preview {
    max-width: 90vw;
    max-height: 70vh;
    object-fit: contain; /* shrink to fit without distortion */
    border-radius: 8px;
    box-shadow: 0 0 12px rgba(0,0,0,0.2);
    margin-bottom: 1rem;
}

.sensor-dot {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: grab;
    z-index: 10;
    user-select:none;
}

.map-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: auto;
}

.map-image {
    width: 100%;
    display: block;
    border-radius: 8px;
}

.sensor-card {
    position: absolute;
    width: 100px;
    height: 80px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    padding: 6px;
    cursor: grab;
    user-select: none;
    transition: transform 0.2s ease;
}
    .sensor-card.inactive {
        background: rgba(70, 70, 70, 0.25);
        opacity:0.2;
       
    }

    .sensor-card:active {
        transform: scale(1.05);
        box-shadow: 0 0 10px rgba(0,123,255,0.6);
    }

.sensor-header {
    font-weight: bold;
    font-size: 0.9em;
    margin-bottom: 4px;
    text-align: center;
}

.sensor-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.sensor-icon {
    font-size: 1.2em;
}

.sensor-value {
    font-size: 1em;
    font-weight: 600;
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
}
    .sensor-value.fresh {
        background: #f0f0f0;
    }

    .sensor-value.stale {
        background-color: #ffe0e0; /* light red */
    }
    .sensor-value.inactive {
        background-color: #555;
        opacity:20%;
    }


.card-body {
    color: #212529; /* Bootstrap default text */
}
.card-img-top {
    height: 180px;
    object-fit: cover;
}
.card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: start;
}

.card {
    width: 18rem;
    flex-shrink: 0;
}
/* Ensure modal text is readable */
.modal-content {
    background-color: #fff; /* Light background */
    color: #212529; /* Bootstrap's default text color */
}

/* Optional: make modal title bold and clear */
.modal-title {
    font-weight: 600;
    color: #000;
}

/* Optional: style the password input */
.modal-body input[type="password"] {
    border: 1px solid #ccc;
    padding: 0.5rem;
    font-size: 1rem;
}
.top-right-buttons {
    position: fixed;
    top: 4.5rem;
    right: 1rem;
    z-index: 50;
    display: flex;
    gap: 0.5rem;
    pointer-events:auto;
}

    .top-right-buttons .btn {
        box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    }

.sensorGraphModal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 40px; /* optional spacing around content */
    display: flex;
    align-items: center;
    justify-content: center;
}

.graphModal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 75vw;
    height: 75vh;
    overflow:hidden;
    background: white;
    padding: 20px;
    border-radius: 8px;
    display:flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}
.sensorGraph {
    flex-grow: 1; /* Take remaining vertical space */
    width: 100% ; 
    padding: 5px;
    padding-bottom: 100px;
    box-sizing: border-box;
}
    .sensorGraphModal.show {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}



