.landingpage {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 10px 10px 0px 10px;
    /*overflow: hidden;*/
    background-color: #121212; /* Dark Background */
    color: #fff; /* Light Text */
}

/* Header styling */
.header {
    background-color: #212121; /* Darker Background */
    color: #bb86fc; /* Purple Accent */
    padding: 20px;
    text-align: center;
}

.header-content h1 {
    margin: 0;
    font-size: 2rem;
}

.header-nav a {
    color: #03dac6; /* Teal Accent */
    margin-left: 1rem;
    text-decoration: none;
}

.header-nav a:hover {
    text-decoration: underline;
    color: #3700b3;
}

/* Body Content Styling */
.body-content {
    display: flex;
    flex: 1; /* Allow body to take up remaining space */
    height: calc(100% - 4rem); /* Adjust height for header and footer */
}

/*.sidebar {
    width: 250px;
    background-color: #303030;*/ /* Slightly Lighter Sidebar */
    /*color: #eeeeee;*/ /* Light Gray Text */
    /*padding: 1rem;*/
    /*height: 100%;
    position: sticky;
    top: 0;
}*/

.main-content {
    flex: 1;
    padding: 1rem; /* Reduced padding */
    background-color: #1e1e1e; /* Dark Main Content Background */
}

.top-row {
    background-color: white !important;
    border-bottom: 1px solid #555;
    height: 3.0rem;
    display: flex;
    align-items: center;
}

.top-row a {
    margin-left: auto;
    text-decoration: none;
    color: #03dac6; /* Teal Accent */
}

.top-row a:hover {
    text-decoration: underline;
    color: #bb86fc;
}

/* Footer styling */
.footer {
    background-color: #212121; /* Darker Background */
    color: #03dac6; /* Teal Accent */
    padding: 25px;
    text-align: center;
    position: relative;
    bottom: 0;
    width: 100%;
}

.footer a {
    margin: 0 10px;
    color: #03dac6;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
    color: #bb86fc;
}

/* Responsive adjustments */
@media (max-width: 640.98px) {
    .header-content h1 {
        font-size: 1.5rem !important;
    }

    .body-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100% !important;
        height: auto;
    }

    .main-content {
        padding: 1rem !important;
    }
}

/* ----------------------------------------------------------------------------
   NEW LAYOUT-SPECIFIC STYLES
   ---------------------------------------------------------------------------- */

/* =================== DASH STYLES =================== */
    /* General Page Styles */
    html, body {
        height: 100%;
        margin: 0;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        background-color: #121212;
        /* overflow-y: hidden !important; */

    }

    /* Global container for the page */
    .dash-page {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    /* Header Styling */
    .dash-header {
        background-color: #212121;
        color: #fff;
        padding: 0px 10px; /* Reduced padding for a smaller header height */
        display: flex;
        justify-content: space-between;
        align-items: center;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    }

    /* Header content */
    .dash-header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .dash-logo img {
        height: 30px; /* Reduced logo size */
        margin-right: 20px;
        display: flex;
    }

    .dash-header-nav {
        display: flex;
        align-items: center;
    }
   /* .dropdown-toggle{
        color: white!important;
    }*/
    /* Profile icon styling */
    .dash-dropdown button {
        background: transparent;
        border: none;
        cursor: pointer;
    }

    .dash-dropdown .material-icons {
        font-size: 24px; /* Smaller profile icon size */
        /*color: #fff;*/    /* White color for the profile icon */
    }

    /* Dropdown menu styling */
    .dash-dropdown-menu {
        position: absolute;
        top: 51px; /* Adjusted to be just below the icon */
        right: 12px;
        background-color: 
        #ffffff;
        border: 1px solid #666;
        padding: 10px;
        border-radius: 5px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
        z-index: 2;
    }

    .dash-dropdown-menu a {
        display: block;
        padding: 10px;
        color: #fff;
        text-decoration: none;
        font-weight: 600;
    }

    .dash-dropdown-menu a:hover {
        background-color: #e2e2e2;
    }

    /* Sidebar Styling */
    .dash-sidebar {
        width: 250px;
         background-image: linear-gradient(rgb(104, 145, 162), rgb(12, 97, 33));
        /* background-color: #2c3e50; */
        color: #fff;
        padding: 20px;
        position: sticky;
        top: 0;
        height: 100%;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.4);
    }

    .dash-sidebar .dash-nav-item {
        padding: 10px;
        font-size: 16px;
        font-weight: 500;
        color: #fff;
        text-decoration: none;
        display: block;
        margin-bottom: 15px;
        border-radius: 5px;
    }

    .dash-sidebar .dash-nav-item:hover {
        background-color: #34495e;
    }

    /* Main content area */
    .dash-main-content {
        flex: 1;
        padding: 10px;
        /* background-color: #82b0b1; */
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
        border-radius: 10px;
        overflow-y: auto;
    }

    .dash-main-content h1 {
        font-size: 2rem;
        color: #fff;
        margin-bottom: 10px;
    }

    /* Footer Styling */
    .dash-footer {
        background-color: #212121;
        color: #fff;
        padding: 5px 20px; /* Reduced padding for a smaller footer height */
        text-align: center;
        width: 100%;
    display:none !important;
        bottom: 0;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4);
    }

    .dash-footer p {
        margin: 0;
        font-size: 14px;
    }

    .dash-footer a {
        margin: 0 10px;
        color: #fff;
        text-decoration: none;
        font-weight: 500;
    }

    .dash-footer a:hover {
        text-decoration: underline;
    }

    /* Modal Styling */
    .dash-modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .dash-modal {
        background-color: #303030;
        padding: 30px;
        border-radius: 10px;
        width: 400px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
        color: #fff;
    }

    .dash-modal h3 {
        margin-bottom: 20px;
        font-size: 1.25rem;
        color: #bb86fc;
    }

    .dash-modal input {
        width: 100%;
        padding: 12px;
        margin-bottom: 15px;
        border: 1px solid #666;
        border-radius: 5px;
        font-size: 1rem;
        color: #eee;
        background-color: #424242;
    }

    .dash-modal button {
        width: 100%;
        padding: 12px;
        border: none;
        border-radius: 5px;
        margin-top: 15px;
        font-size: 1rem;
        color: #fff;
        cursor: pointer;
    }

    .dash-modal button:first-child {
        background-color: #27ae60;
    }

    .dash-modal button:last-child {
        background-color: #e74c3c;
    }

    /* Responsive design */
    @media (max-width: 768px) {
       /* .dash-header-content {
            flex-direction: column;
            align-items: flex-start;
        }*/

        .dash-header-nav {
            width: 100%;
            justify-content: space-between;
        }

        #headerFullName {
            font-size: 14px;
            margin: 5px 0;
        }

        .dash-dropdown .dropdown-toggle {
            padding: 5px;
        }

        .dash-body-content {
            flex-direction: column !important;
            /* background-color: #023d39e3; */
        }

        .dash-sidebar {
            width: 100% !important;
            height: auto !important;
        }

        .dash-main-content {
            margin-left: 0 !important;
        }
    }

    @media (max-width: 480px) {
        .dash-sidebar {
            display: none !important; /* Hide sidebar on smaller screens */
        }

        .dash-main-content {
            margin-left: 0 !important;
            padding: 15px !important;
        }

     /*   .dash-header-content {
            padding: 10px !important;
            flex-direction: column !important;
        }*/
    }

.dash-body-content {
    display: flex !important;
    /* background-color: #023d39e3; */
}




    #arrow {
      color: white;
    font-size: 15px;
  transition: transform 0.5s ease;
  position: relative;
}

#arrow[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: white;
  padding: 5px;
  border-radius: 3px;
  font-size: 12px;
  white-space: nowrap;
}

#arrow:hover {
  transform: translateX(20px);
}
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    width: auto !important;
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    width: 20%;
  /*  max-height: 70%;*/
    overflow-y: auto;
    text-align: left;
    color: black;
}

.warning-icon {
    color: orange;
    font-size: 2em;
    margin-right: 10px;
}
/*
.close-btn {
    font-size: 1.5em;
    color: red;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 10px;
}
*/





/* --- Base Styles (Mostly Existing) --- */
.button-container {
    margin-left: 70%; /* Default for large screens */
    margin-bottom: 10px;
    text-align: right; /* Align content to the right */
}


/* Base Grid Layout (Admin/SuperAdmin) */
.dashboard-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Default: 2 columns */
    grid-template-rows: auto auto; /* Let rows size automatically */
    gap: 15px;
    padding: 15px;
    min-height: calc(90vh - 70px); /* Example: Adjust if you have header/footer */
    box-sizing: border-box;
}

/* User Layout Base - Uses Bootstrap grid */
.user-layout-container {
    padding: 15px;
    box-sizing: border-box;
    min-height: calc(90vh - 70px); /* Example: Adjust */
}

/* Spacing for rows in user layout */
.user-layout-row {
    margin-bottom: 15px;
}
/* Remove extra bottom margin on last row in user layout */
.user-layout-container .row:last-child {
    margin-bottom: 0;
}
/* Add margin between stacked columns in user layout on smaller screens */
.user-layout-row > [class^="col-"]:not(:last-child) {
    margin-bottom: 15px;
}

@media (min-width: 992px) { /* lg breakpoint and up */
    .user-layout-row > [class^="col-"]:not(:last-child) {
        margin-bottom: 0; /* Remove bottom margin when side-by-side */
    }
}


.dashboard-box {
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
   /* padding: 15px;*/
    overflow: hidden; /* Keep hidden unless specific inner element needs scroll */
    display: flex;
    flex-direction: column;
    min-height: 280px; /* Default min-height */
}

.alert-card-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Default: 4 cards per row */
    gap: 10px;
    padding: 10px 0;
}

.alert-box-custom {
    background-color: #f9f9f9;
    border-left: 5px solid #2196f3;
    padding: 8px;
    border-radius: 6px;
    height: 80px; /* Default height */
    width: 100%;
    font-size: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

    .alert-box-custom p {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        font-size: 12px;
    }

    .alert-box-custom a {
        font-size: 11px;
        align-self: flex-end;
        margin-top: 4px;
        color: #007bff; /* Make link color consistent */
        text-decoration: underline; /* Add underline for clarity */
    }

.transformer-alert-count {
    font-weight: bold;
    color: #d32f2f;
    font-size: 16px;
    margin-left: 20px;
    display: block;
}

.alert-icon {
    font-size: 20px;
    color: #2196f3;
    margin-right: 5px;
    vertical-align: middle;
}

.chart-container {
    flex: 1;
    min-height: 200px;
    position: relative; /* Important for Chart.js responsiveness */
}

    .chart-container canvas {
        max-width: 100%;
        height: auto !important; /* Ensure chart scales */
    }

.chart-select-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 10px;
    gap: 5px; /* Add gap between label and select */
}

    .chart-select-container label {
        margin: 0; /* Remove default margins */
        font-size: 14px;
        white-space: nowrap; /* Prevent label wrapping */
    }

.chart-btn { /* Style the select */
    padding: 5px 10px;
    font-size: 14px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: white; /* Explicit background */
    flex-shrink: 0; /* Prevent shrinking */
}

.data-table-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 300px; /* Default max height */
    min-height: 150px;
    position: relative; /* Needed for sticky header */
}

.scrollable-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Use fixed layout for consistent columns */
}

    /* Make tbody scrollable relative to the container */
    .scrollable-table tbody {
        /* No special display/height needed here now, parent container scrolls */
    }

    .scrollable-table th, .scrollable-table td {
        padding: 10px;
        text-align: left;
        border-bottom: 1px solid #eee;
        word-wrap: break-word; /* Wrap long text */
        vertical-align: middle; /* Align cell content vertically */
    }

    .scrollable-table th {
        color: black;
        font-weight: bold;
        background-color: #366a87; /* Ensure sticky header has background */
    }

    .scrollable-table td span[style*="cursor: pointer"] {
        text-decoration: underline; /* Add underline to clickable spans */
    }


.map-container {
    flex: 1;
    height: 100%;
    min-height: 310px; /* Default minimum height */
}

#map {
    height: 100%;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
}


/* --- Modal Styles (Mostly Existing) --- */
/*.modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #ffffff;
    color: #333;
    padding: 20px;
    border-radius: 8px;
    margin: auto;*/
    /*max-width: 500px;*/ /* Limit max width */
    /*width: 90%;*/ /* Responsive width */
    /*position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}*/

/*.close-btn {
    color: #888;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;*/ /* Prevent extra height */
/*}*/

   /* .close-btn:hover {
        color: #555;
    }*/

.warning-icon {
    color: #ff9800;
    font-size: 24px;
    vertical-align: middle;
    margin-right: 8px;
}

.alert-info {
    margin-top: 10px;
}
    /* Adjust modal heading and paragraph styles */
    .alert-info p:first-of-type { /* Target the first paragraph with the icon */
        font-weight: bold !important; /* Keep it bold */
        margin-bottom: 5px !important;
    }

    .alert-info h4 {
        margin-top: 5px;
        margin-bottom: 10px;
        font-size: 1.1rem; /* Slightly smaller heading in modal */
    }

.alert-list p {
    font-weight: normal !important; /* Normal weight for list items */
    margin-bottom: 5px !important;
    font-size: 14px;
    color: #555 !important; /* Slightly lighter color for list items */
}


/* --- Media Queries for Responsiveness --- */

/* Large devices (desktops, less than 1200px) */
@media (max-width: 1199.98px) {
    .alert-card-container {
        grid-template-columns: repeat(3, 1fr); /* 3 cards per row */
    }

    .button-container {
        margin-left: 60%; /* Adjust margin */
    }
}

/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
    /* Admin/SuperAdmin Grid */
    .dashboard-container {
        grid-template-columns: 1fr; /* Stack to single column */
        height: auto;
        padding: 10px;
        min-height: unset; /* Allow natural height */
    }
        /* Add margin between stacked admin boxes */
        .dashboard-container > .dashboard-box:not(:last-child) {
            margin-bottom: 15px;
        }

    /* User Layout - Bootstrap handles stacking, ensure spacing reviewed above */
    .user-layout-container {
        padding: 10px;
        min-height: unset;
    }

    .alert-card-container {
        grid-template-columns: repeat(2, 1fr); /* 2 cards per row */
    }

    .button-container {
        margin-left: 0; /* Remove large left margin */
        /* Text-align right is already set */
    }

    .dashboard-box {
        min-height: 250px; /* Adjust min height */
    }

    .map-container {
        min-height: 280px;
    }

    .data-table-container {
        max-height: 250px;
    }

    h4 {
        font-size: 1.15rem;
    }

    p {
        /* Keep bold, maybe adjust font size slightly if needed */
        /* font-size: 0.95rem; */
    }

    .alert-box-custom {
        font-size: 11px;
        height: 75px;
    }

    .transformer-alert-count {
        font-size: 15px;
    }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
    .alert-card-container {
        grid-template-columns: 1fr; /* 1 card per row */
        gap: 8px;
    }

    .dashboard-box {
        padding: 10px;
        min-height: 200px; /* Further adjust min height */
    }

    .scrollable-table th, .scrollable-table td {
        padding: 8px;
        font-size: 0.85rem;
    }

    .alert-box-custom {
        height: auto; /* Let height adjust */
        min-height: 65px;
        padding: 6px 10px; /* Adjust padding */
        /* Optional: Change layout for very small alerts */
        /* flex-direction: row;
            align-items: center;
            justify-content: space-between; */
    }
    /* Optional: Target inner elements if changing direction */
    /* .alert-box-custom p { margin-bottom: 0 !important; flex-basis: 60%; } */
    /* .alert-box-custom div { flex-basis: 35%; align-items: flex-end; } */

    .transformer-alert-count {
        margin-left: 5px; /* Reduce margin if needed */
        font-size: 14px;
    }

    .alert-box-custom a {
        margin-top: 2px;
    }

    .button-container {
        /* Keep aligned right or move if needed */
        margin-bottom: 15px;
    }

    .chart-select-container {
        /* Allow wrapping if needed, or adjust parent layout */
        /* flex-wrap: wrap; */
        justify-content: flex-end; /* Keep to right */
    }

    .map-container {
        min-height: 250px;
    }

    .data-table-container {
        max-height: 200px;
        min-height: 120px;
    }

    h4 {
        font-size: 1.1rem;
    }
    /* Reduce p font size if needed */
    /* p { font-size: 0.9rem; } */

  /*  .modal-content {
        width: 95%;
        padding: 15px;
    }*/

    .alert-info h4 {
        font-size: 1rem;
    }

    .alert-list p {
        font-size: 13px;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .dashboard-container, .user-layout-container {
        padding: 8px; /* Minimal padding */
    }

    .dashboard-box {
        padding: 10px;
        min-height: unset; /* Remove min-height, let content dictate */
        border-radius: 6px;
    }
    /* Ensure bottom margin on stacked elements */
    .dashboard-container > .dashboard-box:not(:last-child) {
        margin-bottom: 10px;
    }

    .user-layout-row > [class^="col-"]:not(:last-child) {
        margin-bottom: 10px;
    }


    h4 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    /* p { font-size: 0.85rem; } */

    .alert-icon {
        font-size: 18px;
    }

    .transformer-alert-count {
        font-size: 13px;
        margin-left: 15px; /* Readjust */
    }

    .alert-box-custom {
        min-height: 60px;
        padding: 5px 8px;
    }

        .alert-box-custom p {
            font-size: 11px;
        }

        .alert-box-custom a {
            font-size: 10px;
        }

    .scrollable-table th, .scrollable-table td {
        padding: 6px;
        font-size: 0.8rem;
    }

    .map-container {
        min-height: 200px;
    }

    .data-table-container {
        max-height: 180px;
        min-height: 100px;
    }

    /* Stack chart select below title */
    .dashboard-chart .d-flex {
        flex-direction: column;
        align-items: flex-start; /* Align title left */
    }

    .chart-select-container {
        justify-content: flex-start; /* Align select left */
        width: 100%; /* Take full width */
        margin-top: 5px;
    }

    .button-container { /* Reset button container for chart */
        margin-left: 0;
        text-align: left;
    }

    .chart-btn, .chart-select-container label {
        font-size: 13px;
    }

   /* .modal-content {
        padding: 10px;
    }*/

    .close-btn {
        top: 5px;
        right: 10px;
        font-size: 24px;
    }

    .alert-info h4 {
        font-size: 0.95rem;
    }

    .alert-list p {
        font-size: 12px;
    }
}