/* 
 * Green Rays Technology - Solar Site Monitoring
 * Modern Professional White Theme Stylesheet
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #10b981;        /* Emerald Green */
    --primary-hover: #059669;  /* Darker Green */
    --primary-light: #ecfdf5;  /* Emerald Tint */
    --secondary: #0f172a;      /* Slate Blue for text/menus */
    --bg-main: #f8fafc;        /* Soft White */
    --bg-card: #ffffff;        /* Pure White */
    --text-main: #334155;      /* Slate Gray */
    --text-muted: #64748b;     /* Medium Gray */
    --border: #e2e8f0;         /* Light Gray Border */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.02);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 15px -3px rgba(16, 185, 129, 0.05), 0 4px 6px -4px rgba(16, 185, 129, 0.03);
    --shadow-focus: 0 0 0 4px rgba(16, 185, 129, 0.15);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--secondary);
    font-weight: 700;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* Header & Navigation */
header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.header-top {
    max-width: 100%;
    margin: 0;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
}

.logo-img {
    height: 70px;
    transition: var(--transition);
}

.logo-headline {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -0.5px;
    transition: var(--transition);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.logo-highlight {
    color: var(--primary);
}
.logo-dark {
    color: var(--secondary) !important;
}
.logo-light {
    color: var(--primary) !important;
}
.logo-version-tag {
    background: var(--secondary) !important;
    color: var(--primary) !important;
    padding: 2px 8px !important;
    border-radius: 12px !important;
    font-size: 0.75rem !important;
    margin-left: 6px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    font-weight: 800 !important;
    letter-spacing: normal !important;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.header-bottom {
    max-width: 100%;
    margin: 0;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--bg-card);
    border-color: var(--border);
    color: var(--secondary);
}

.btn-secondary:hover {
    background-color: var(--bg-main);
    border-color: var(--text-muted);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary-light);
    color: var(--primary-hover);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

/* Hero Section */
.hero {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

/* Feature Cards & Sections */
.section-container {
    max-width: 1400px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2.5rem;
    position: relative;
    padding-bottom: 0.75rem;
    text-align: center;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary);
    border-radius: 2px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(16, 185, 129, 0.3);
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
    background-color: #fff;
    color: var(--text-main);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.maintenance-modal-content {
    padding: 2.5rem;
}

.maintenance-packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    padding: 2.5rem;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    border: 1px solid var(--border);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--secondary);
}

.modal-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
}

/* Dashboard Layout */
.sidebar {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    height: fit-content;
    box-shadow: var(--shadow-sm);
}

.dashboard-container {
    max-width: 100%;
    margin: 2rem 0;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1.5rem;
}

.sidebar-toggle-btn {
    background: var(--primary-light);
    color: var(--primary-hover);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 6px 14px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-link:hover,
.sidebar-link.active {
    background-color: var(--primary-light);
    color: var(--primary-hover);
}

.main-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    min-height: 600px;
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

/* Monitoring Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.stat-info h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.stat-info p {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary);
}

/* Data Tables */
.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    margin-top: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

#admin-sites-table {
    width: 100%;
    border-collapse: collapse;
}

#admin-sites-table th,
#admin-sites-table td{
    padding: 0.75rem 0.5rem;
    font-size: 0.82rem;
    vertical-align: middle;
}

#admin-sites-table tbody tr:nth-child(even) {
    background-color: #ecfdf5; /* var(--primary-light) light green */
}

#admin-sites-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

#admin-sites-table tbody tr:hover {
    background-color: #d1fae5; /* hover emerald tint */
}

th, td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

th {
    background-color: var(--bg-main);
    color: var(--secondary);
    font-weight: 700;
    font-family: var(--font-heading);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: rgba(16, 185, 129, 0.02);
}

/* Map Containers */
.map-container {
    width: 100%;
    height: 500px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background-color: #e5e7eb;
    margin-top: 1.5rem;
    overflow: hidden;
    position: relative;
}

/* Custom Leaflet Tooltip for Site Markers */
.leaflet-tooltip.site-marker-tooltip {
    background-color: var(--primary);
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    border: none;
    border-radius: 6px;
    padding: 5px 10px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.leaflet-tooltip-top.site-marker-tooltip::before {
    border-top-color: var(--primary);
}

/* Site Details Upload Form and Grids */
.site-photo-preview {
    width: 100%;
    height: 200px;
    border-radius: var(--radius-sm);
    border: 2px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    margin-top: 0.5rem;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.site-photo-thumbnail {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border);
}

/* Tabs & Toggle Visibility */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Contact Page Layout */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-info-icon {
    color: var(--primary);
    font-size: 1.25rem;
    margin-top: 0.2rem;
}

/* Engineering Map Layout */
.eng-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
}

.eng-site-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.eng-site-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.eng-site-card:hover,
.eng-site-card.active {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
    background-color: var(--primary-light);
}

.eng-site-card h4 {
    font-size: 1rem;
    color: var(--secondary);
    margin-bottom: 0.25rem;
}

.eng-site-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.eng-card-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.btn-danger {
    background-color: #ef4444;
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-danger:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }
    
    .eng-grid {
        grid-template-columns: 1fr;
    }
    
    #customer-dashboard-grid {
        grid-template-columns: 1fr !important;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}


















/* =========================
   RESPONSIVE FIXES
========================= */



/* ==========================================
   PROFESSIONAL MOBILE RESPONSIVE SYSTEM
========================================== */

html,
body{
    overflow-x:hidden;
}
/* Dashboard Layout */

.dashboard-container{
    display:grid;
    grid-template-columns:280px minmax(0, 1fr);
    gap:1.5rem;
}

.sidebar{
    position:relative;
    top:0;
}





#admin-sites-table th:last-child,
#admin-sites-table td:last-child{
    width:140px;
    min-width:140px;
    text-align:center;
    white-space:nowrap;
}

#admin-sites-table td:last-child .btn{
    padding:4px 8px;
    font-size:11px;
    margin:2px;
}

/* Forms */

form{
    width:100%;
}

.form-control{
    width:100%;
}

/* Images */

img{
    max-width:100%;
    height:auto;
}

/* Tablet */

@media screen and (max-width:1024px){

    .dashboard-container,
    .eng-grid,
    .contact-grid,
    #customer-dashboard-grid{
        display:grid !important;
        grid-template-columns:1fr !important;
    }

    .sidebar{
        position:relative;
        top:0;
    }

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

    .main-content{
        padding:20px;
    }
}

/* Laptop / medium screens — prevent headline overlapping nav */
@media screen and (min-width: 769px) and (max-width: 1280px) {
    .logo-headline {
        position: static !important;
        transform: none !important;
        left: auto !important;
        top: auto !important;
        font-size: 1.4rem !important;
    }

    .header-top {
        justify-content: flex-start !important;
        gap: 1.5rem;
    }

    nav {
        margin-left: auto;
    }
}

/* Mobile */

@media screen and (max-width:768px){

    .sidebar-toggle-btn {
        display: none !important;
    }

    header{
        position:relative;
    }

    .header-top{
        flex-direction:column;
        gap:12px;
        text-align:center;
        padding:15px;
    }

    .header-bottom{
        flex-wrap:wrap;
        justify-content:center;
        gap:10px;
        padding:10px;
    }

    .logo {
        width: 100%;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 8px !important;
        position: relative;
        padding: 0 10px;
        min-height: 35px;
    }

    .logo-img {
        height: 24px !important;
        position: static !important;
        transform: none !important;
    }

    .logo-headline {
        position: static !important;
        transform: none !important;
        font-size: 1.25rem !important;
        white-space: nowrap !important;
    }

    .dashboard-container{
        display:flex;
        flex-direction:column;
        padding:10px;
        gap:15px;
    }

    .sidebar{
        width:100%;
        overflow-x:auto;
        padding:10px;
    }

    .sidebar-menu{
        display:flex;
        flex-direction:row;
        gap:8px;
        overflow-x:auto;
        white-space:nowrap;
        padding-bottom:5px;
    }

    .sidebar-link{
        min-width:max-content;
        padding:10px 14px;
    }

    .main-content{
    width:100%;
    padding:12px;
}
    .stats-grid{
        grid-template-columns:1fr;
    }

    .card{
        padding:15px;
    }

    .hero{
        padding:0 10px;
    }

    .hero h1{
        font-size:1.8rem;
        line-height:1.3;
    }

    .hero p{
        font-size:.95rem;
    }

    .btn{
        width:auto;
    }

    /* all 2 column forms -> single column */

    div[style*="grid-template-columns: 1fr 1fr"]{
        display:flex !important;
        flex-direction:column !important;
        gap:0 !important;
    }

    div[style*="grid-template-columns: 1fr 180px"]{
        display:flex !important;
        flex-direction:column !important;
    }

    div[style*="grid-template-columns: 1fr 200px"]{
        display:flex !important;
        flex-direction:column !important;
    }

    .modal-overlay {
        z-index: 100000 !important;
    }

    .modal-content,
    .maintenance-modal-content {
        width: 95% !important;
        max-width: 95% !important;
        padding: 1.25rem 1rem !important;
        border-radius: 16px !important;
        max-height: 92vh !important;
    }

    .modal-close {
        top: 0.75rem !important;
        right: 0.75rem !important;
        font-size: 1.4rem !important;
        width: 32px !important;
        height: 32px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(0, 0, 0, 0.05) !important;
        border-radius: 50% !important;
    }

    #maintenance-step-packages > div:first-child {
        margin-bottom: 1.25rem !important;
        padding-right: 1.5rem !important;
    }

    #maintenance-step-packages i.fa-screwdriver-wrench {
        font-size: 2.2rem !important;
        margin-bottom: 0.5rem !important;
    }

    #maintenance-step-packages h2 {
        font-size: 1.4rem !important;
        margin-bottom: 0.25rem !important;
    }

    #maintenance-step-packages p {
        font-size: 0.85rem !important;
    }

    .maintenance-packages-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .maintenance-packages-grid > div {
        padding: 1rem !important;
    }

    .maintenance-packages-grid h3 {
        font-size: 1.25rem !important;
    }

    .maintenance-packages-grid ul {
        margin-bottom: 1rem !important;
        font-size: 0.85rem !important;
    }

    .map-container{
        height:320px;
    }

    th,
    td{
        padding:10px;
        font-size:13px;
    }

}

/* Small Mobile */

@media screen and (max-width:480px){

    .hero h1{
        font-size:1.45rem;
    }

    h2{
        font-size:1.3rem;
    }

    h3{
        font-size:1rem;
    }

    .logo{
        font-size:.95rem;
    }

    .main-content{
        padding:10px;
    }

    .card{
        padding:12px;
    }

    .map-container{
        height:250px;
    }

    .stat-info p{
        font-size:1.4rem;
    }
}

/* =================================
   ENGINEERING MOBILE FIX ONLY
================================= */

@media screen and (max-width:768px){

    .section-container{
        width:100% !important;
        max-width:100% !important;
        padding:10px !important;
        margin:10px auto !important;
    }

    .eng-grid{
        display:flex !important;
        flex-direction:column !important;
        gap:15px !important;
    }

    .eng-grid > div{
        width:100% !important;
    }

    .eng-site-list{
        max-height:none !important;
        overflow:visible !important;
    }

    #site-specs-card > div{
        display:flex !important;
        flex-direction:column !important;
        gap:15px !important;
    }

    .map-container,
    #eng-map{
        width:100% !important;
        height:280px !important;
    }

    .eng-card-buttons{
        flex-wrap:wrap;
    }

    .eng-card-buttons .btn{
        flex:1;
        min-width:120px;
    }

    #eng-customers-table{
        min-width:700px;
    }

    .card{
        width:100% !important;
        overflow:hidden;
    }

    header nav{
        flex-direction:column !important;
        gap:10px !important;
    }
}

@media screen and (max-width:480px){

    .map-container,
    #eng-map{
        height:220px !important;
    }
    .nav-links{
        flex-direction:column !important;
        gap:8px !important;    }

    .card{
        padding:12px !important;
    }

    h2{
        font-size:1.2rem !important;
    }

    h3{
        font-size:1rem !important;
    }
}



/* Actions Column */

#admin-sites-table th:nth-child(12),
#admin-sites-table td:nth-child(12){
    min-width:170px;
    width:170px;
    white-space:nowrap;
}

.action-cell{
    white-space:nowrap;
}

.action-cell .btn{
    display:inline-block;
    width:auto !important;
    min-width:50px;
    margin:2px;
    padding:4px 8px;
}


@media screen and (max-width:768px){

    .main-content{
        padding:12px;
    }
}

/* View Solar Sites - Always Horizontal Scroll */


.table-responsive{
    width:100%;
    overflow-x:auto !important;
    overflow-y:hidden;
    display:block;
}


#admin-sites-table th:nth-child(13),
#admin-sites-table td:nth-child(13){
    min-width:180px;
}

.table-responsive{
    width:100%;
    overflow-x:auto !important;
    overflow-y:hidden;
    display:block;
    -webkit-overflow-scrolling:touch;
}

/* ADMIN VIEW SOLAR SITES FIX */

#admin-view-sites{
    overflow:hidden;
}

#admin-view-sites h2,
#admin-view-sites p{
    position:sticky;
    left:0;
    background:#fff;
    z-index:2;
}

.table-responsive{
    width:100%;
    overflow-x:auto;
    overflow-y:hidden;
    display:block;
    -webkit-overflow-scrolling:touch;
}

#admin-view-sites{
    width:100%;
}

#admin-view-sites .table-responsive{
    width:100%;
    max-width:100%;
    overflow-x:auto !important;
    overflow-y:hidden;
    display:block;
}

#admin-sites-table{
    table-layout: auto;
    width: 100% !important;
    min-width: 1450px !important;
}

#admin-sites-table th {
    white-space: nowrap;
}

#admin-sites-table td:nth-child(1),
#admin-sites-table td:nth-child(2),
#admin-sites-table td:nth-child(3),
#admin-sites-table td:nth-child(6),
#admin-sites-table td:nth-child(9),
#admin-sites-table td:nth-child(10),
#admin-sites-table td:nth-child(11) {
    white-space: nowrap;
}

#admin-sites-table th:nth-child(7), 
#admin-sites-table td:nth-child(7) {
    width: 110px !important;
    max-width: 120px !important;
}

#admin-sites-table th:nth-child(5), 
#admin-sites-table td:nth-child(5) {
    min-width: 280px !important;
    width: 280px !important;
    max-width: 320px !important;
}

#admin-sites-table th:nth-child(12), 
#admin-sites-table td:nth-child(12) {
    width: 140px !important;
    max-width: 160px !important;
}

#admin-sites-table th:last-child,
#admin-sites-table td:last-child {
    min-width: 180px !important;
    width: 180px !important;
}

.action-cell {
    display: flex !important;
    gap: 8px;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.action-btn {
    display: inline-block !important;
    visibility: visible !important;
}


/* WhatsApp Floating Button */

.whatsapp-float{
    position: fixed;
    right: 20px;
    bottom: 20px;

    width: 60px;
    height: 60px;

    background: #25D366;
    color: white;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 32px;

    text-decoration: none;

    box-shadow: 0 4px 12px rgba(0,0,0,.25);

    z-index: 99999;

    transition: all .3s ease;
}

.whatsapp-float:hover{
    transform: scale(1.1);
}

.whatsapp-float i{
    color: white;
}

#additional-service-card{
    margin-top:20px;
}

#additional-service-card .btn{
    min-width:140px;
}

.eng-card-buttons{
    display:flex;
    flex-direction:column;
    gap:8px;
    margin-top:12px;
}

.eng-btn-row{
    display:flex;
    gap:6px;
    width:100%;
}

.eng-btn-row .btn{
    flex:1;
    min-width:0;
    font-size:12px;
    padding:8px 4px;
}

.eb-status-btn{
    width:100%;
}

.map-wrapper{
    display:flex;
    gap:20px;
    align-items:flex-start;
}

.map-section{
    flex:1;
}

.service-panel{
    width:250px;
    min-width:250px;

    border:1px solid #e5e7eb;
    border-radius:12px;

    padding:20px;

    background:#f8fafc;
}

.service-panel h3{
    margin-bottom:15px;
}

.service-btn{
    width:100%;
    margin-bottom:10px;
}

@media (max-width:768px){

    .eng-site-card{
        overflow:hidden;
    }

    .eng-card-buttons{
        width:100%;
    }

    .eng-btn-row{
        width:100%;
    }

    .eng-btn-row .btn{
        width:50%;
    }

    .eb-status-btn{
        width:100%;
    }

}

@media (max-width:768px){

    .map-wrapper{
        display:block;
    }

    .service-panel{
        width:100%;
        margin-bottom:15px;
    }

    .map-section{
        width:100%;
    }

    #eng-map{
        height:350px !important;
        min-height:350px !important;
        width:100% !important;
    }

}


body{
background:#f4f6f9;
font-family:Segoe UI;
}

.container{
display:flex;
gap:30px;
padding:30px;
}

.left-panel{
width:25%;
}

.right-panel{
width:75%;
}

.portal-btn{
display:block;
background:#10b981;
color:white;
padding:12px;
text-align:center;
border-radius:8px;
text-decoration:none;
margin-bottom:20px;
}

.left-panel input{
width:100%;
padding:10px;
margin-bottom:15px;
}

.upload-grid{
display:grid;
grid-template-columns:repeat(2,1fr);
gap:20px;
}

.doc-card{
background:white;
padding:20px;
border-radius:15px;
box-shadow:0 2px 10px rgba(0,0,0,.1);
text-align:center;
}
.status-circle{
width:30px;
height:30px;
display:flex;
align-items:center;
justify-content:center;
margin:auto;
font-size:18px;
font-weight:bold;
color:#f59e0b;
}
.document-table td:nth-child(3){
    width:80px;
    text-align:center;
    vertical-align:middle;
}


.document-table{
width:100%;
overflow-x:auto;
margin-top:20px;
}

.document-table table{
width:100%;
border-collapse:collapse;
background:white;
}

.document-table th{
background:#10b981;
color:white;
padding:12px;
}

.document-table td{
padding:12px;
border-bottom:1px solid #ddd;
text-align:center;
}

.document-table button{
background:#10b981;
color:white;
border:none;
padding:8px 15px;
border-radius:5px;
cursor:pointer;
}

.file-actions{
display:flex;
justify-content:center;
gap:12px;
margin-top:10px;
}

.file-actions a{
background:#2563eb;
color:white;
padding:8px 15px;
border-radius:6px;
text-decoration:none;
}


.document-table td:nth-child(3){
width:60px;
font-size:22px;
font-weight:bold;
}

.tick{
    color:#10b981;
    font-size:30px;
    font-weight:bold;
    display:inline-block;
}

.document-table td:nth-child(3){
    width:80px;
    text-align:center;
    vertical-align:middle;
}

.tick{
    color:#10b981;
    font-size:30px;
    font-weight:bold;
    display:inline-block;
}

.delete-btn{
background:#ef4444;
color:white;
border:none;
padding:8px 15px;
border-radius:6px;
cursor:pointer;
margin-bottom:10px;
}

.delete-btn:hover{
background:#dc2626;
}

.file-actions{
display:flex;
justify-content:center;
gap:10px;
margin-top:8px;
flex-wrap:wrap;
}

.view-btn,
.download-btn,
.delete-btn{
padding:8px 14px;
border-radius:5px;
text-decoration:none;
color:white;
border:none;
cursor:pointer;
}

.view-btn{
background:#2563eb;
}

.download-btn{
background:#2563eb;
}

.delete-btn{
background:#ef4444;
}


/* ================= FOOTER ================= */

.footer{
    background:#0f172a;
    color:#fff;
    margin-top:auto;
}

.footer-container{
    max-width:100%;
    margin:0;
    display:flex;
    justify-content:space-between;
    gap:40px;
    padding:40px 1.5rem;
    flex-wrap:wrap;
}

.footer-logo{
    width:180px;
    margin-bottom:15px;
}

.footer-left{
    flex:1;
    min-width:250px;
}

.footer-center{
    flex:1;
    min-width:200px;
}

.footer-right{
    flex:1;
    min-width:250px;
}

.footer h3{
    margin-bottom:15px;
    color:#10b981;
}

.footer a{
    display:block;
    color:#fff;
    text-decoration:none;
    margin-bottom:10px;
}

.footer a:hover{
    color:#10b981;
}

.footer-bottom{
    text-align:center;
    border-top:1px solid rgba(255,255,255,.1);
    padding:15px;
    font-size:14px;
}

/* Mobile */

@media(max-width:768px){

.footer-container{
    flex-direction:column;
    text-align:center;
}

.footer-logo{
    margin:auto;
    margin-bottom:15px;
}

}
/* Tables Width & Layout fixes */
table {
    width: 100%;
    border-collapse: collapse;
}

#admin-sites-table {
    font-size: 13px;
    width: 100%;
    min-width: 1500px;
}

#admin-sites-table th, 
#admin-sites-table td {
    padding: 0.6rem 0.8rem;
}

.checkbox-column {
    display: none;
}

/* Monitored Solar Sites Matrix Controls */
.matrix-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    background-color: var(--bg-main);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.search-box-container input {
    width: 320px;
    padding: 10px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.search-box-container input:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}

.download-controls-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.download-controls-container label {
    font-weight: 700;
    color: var(--secondary);
    font-size: 0.95rem;
}

.download-controls-container select {
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: white;
    min-width: 180px;
    font-size: 0.9rem;
    height: 40px;
    outline: none;
}

.download-controls-container select:focus {
    border-color: var(--primary);
}

.download-controls-container button {
    height: 40px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.25rem;
}

@media (max-width: 768px) {
    .matrix-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .search-box-container input {
        width: 100%;
    }
    
    .download-controls-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .download-controls-container label {
        margin-bottom: 0.25rem;
    }
    
    .download-controls-container select,
    .download-controls-container button {
        width: 100%;
    }
}

/* =========================================================================
   2K DISPLAY SCREEN OPTIMIZATIONS (1600px - 2560px+)
   ========================================================================= */

@media screen and (min-width: 1600px) {
    .section-container {
        max-width: 1800px !important;
    }
    .eng-grid {
        grid-template-columns: 420px 1fr !important;
        gap: 2.5rem !important;
    }
    .stats-grid {
        gap: 2rem;
    }
    .card {
        padding: 2.5rem;
    }
    .map-container {
        height: 600px !important;
    }
}

@media screen and (min-width: 2000px) {
    .section-container {
        max-width: 2200px !important;
    }
    .eng-grid {
        grid-template-columns: 480px 1fr !important;
        gap: 3rem !important;
    }
    .stats-grid {
        gap: 2.5rem;
    }
    .card {
        padding: 3rem;
    }
    .map-container {
        height: 700px !important;
    }
    body {
        font-size: 17px;
    }
    .btn-lg {
        padding: 1rem 2.2rem;
        font-size: 1.1rem;
    }
}

/* Premium Utility Cards Style */
.utility-card {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-lg) !important;
    padding: 2.25rem 2rem;
    box-shadow: 0 4px 20px -2px rgba(148, 163, 184, 0.08), 0 2px 8px -1px rgba(148, 163, 184, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 350px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.utility-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-hover));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.utility-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(16, 185, 129, 0.08), 0 10px 10px -5px rgba(16, 185, 129, 0.03);
    border-color: rgba(16, 185, 129, 0.25);
}

.utility-card:hover::after {
    opacity: 1;
}

.utility-icon-container {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(16, 185, 129, 0.15));
    color: var(--primary-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px 0 rgba(16, 185, 129, 0.06);
}

.utility-card:hover .utility-icon-container {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #ffffff;
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.2);
}

.utility-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.utility-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1.75rem;
}

/* =========================================================================
   INVERTER PORTALS GRID & MOBILE SWIPE CAROUSEL SYSTEM
   ========================================================================= */

.inverter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.inverter-select-dropdown {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    border: 1.5px solid var(--border, #e2e8f0);
    background-color: #ffffff;
    color: var(--secondary, #0f172a);
    font-size: 0.88rem;
    font-weight: 600;
    outline: none;
    margin-top: 0.5rem;
    margin-bottom: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.inverter-select-dropdown:focus, 
.inverter-select-dropdown:hover {
    border-color: var(--primary, #10b981);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

@media (max-width: 1100px) {
    .inverter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile optimizations for inverter grid (App-style Swiper) */
@media (max-width: 768px) {
    .inverter-grid {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        gap: 1.25rem !important;
        padding: 0.5rem 1.25rem 1.5rem !important;
        margin-left: -1.25rem !important; /* Pull to edge of screen */
        margin-right: -1.25rem !important;
        scrollbar-width: none !important; /* Hide scrollbar for Firefox */
        -webkit-overflow-scrolling: touch !important;
    }
    
    .inverter-grid::-webkit-scrollbar {
        display: none !important; /* Hide scrollbar for Chrome/Safari */
    }
    
    .inverter-grid .utility-card {
        flex: 0 0 85% !important; /* 85% width so next card peeks in */
        scroll-snap-align: center !important;
        min-height: 380px !important;
        margin: 0 !important;
        text-align: center !important;
    }
}

/* Premium Login Card */
.premium-login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 3rem 2.5rem 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.15), 
                0 0 0 1px rgba(226, 232, 240, 0.8);
    position: relative;
    max-width: 440px;
    width: 90%;
    backdrop-filter: blur(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.login-brand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.login-logo-img {
    height: 32px;
    width: auto;
}

.login-badge-container {
    display: flex;
    align-items: center;
}

/* Role Badges */
.role-badge {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 100px;
    letter-spacing: 0.5px;
    display: inline-block;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.badge-sales {
    background: #f0fdfa;
    color: #0d9488;
    border: 1px solid rgba(13, 148, 136, 0.2);
}

.badge-admin {
    background: #eff6ff;
    color: #1e3a8a;
    border: 1px solid rgba(30, 58, 138, 0.2);
}

.badge-engineering {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.badge-customer {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid rgba(22, 163, 74, 0.2);
}

.premium-login-title {
    font-size: 1.75rem;
    font-family: var(--font-heading);
    font-weight: 800;
    color: #0f172a;
    margin-top: 0;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
}

/* Inputs styling */
.premium-input-group {
    margin-bottom: 1.5rem;
}

.premium-input-group label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.5rem;
    display: block;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1.25rem;
    color: #94a3b8;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.premium-control {
    padding: 0.85rem 1rem 0.85rem 3rem !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 14px !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    background-color: #f8fafc !important;
    transition: all 0.2s ease !important;
}

.premium-control:focus {
    border-color: #0d9488 !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.15) !important;
}

.premium-control:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: #0d9488;
}

/* Submit Button */
.btn-premium-login {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.95rem;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #1e3a8a 0%, #0d9488 100%);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(13, 148, 136, 0.3);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-premium-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -5px rgba(13, 148, 136, 0.4);
    filter: brightness(1.05);
}

.btn-premium-login:active {
    transform: translateY(0);
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .premium-login-card {
        padding: 2.25rem 1.5rem 2rem;
        border-radius: 20px;
        width: 92%;
    }
    
    .premium-login-title {
        font-size: 1.4rem;
        margin-bottom: 1.25rem;
    }
    
    .login-brand-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .login-logo-img {
        height: 26px;
    }
    
    .role-badge {
        padding: 4px 10px;
        font-size: 0.7rem;
    }
    
    .premium-control {
        padding: 0.75rem 1rem 0.75rem 2.75rem !important;
        font-size: 0.9rem !important;
    }
    
    .input-icon {
        left: 1rem;
        font-size: 0.9rem;
    }
}

/* Inverter Links inside Map Layout */
.inverter-btn-link {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.inverter-btn-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    border-color: currentColor !important;
}

@media (max-width: 992px) {
    .map-layout-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    .map-container {
        height: 300px !important;
    }
}

/* =========================================================================
   GLOBAL MULTI-DEVICE RESPONSIVE ALIGNMENT (Mobile, Tablet, Laptop, Computer)
   ========================================================================= */

/* Mobile Phones (max-width: 575px) */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

@media screen and (max-width: 575px) {
    .header-top {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        text-align: center;
    }
    .header-top .logo {
        justify-content: center;
    }
    .header-top .logo-img {
        height: 48px;
    }
    .header-top .logo-headline {
        font-size: 1.15rem;
    }
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 0.85rem !important;
    }
    .section-container {
        padding: 0 0.75rem !important;
    }
    .footer-container {
        flex-direction: column;
        text-align: center;
        padding: 30px 1rem;
        gap: 24px;
    }
    .footer-logo {
        margin: 0 auto 12px;
    }
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Tablets (576px to 991px) */
@media screen and (min-width: 576px) and (max-width: 991px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
        gap: 1rem !important;
    }
    .section-container {
        padding: 0 1.25rem !important;
    }
    .footer-container {
        flex-wrap: wrap;
        gap: 30px;
        padding: 35px 1.25rem;
    }
}

/* Laptops (992px to 1399px) */
@media screen and (min-width: 992px) and (max-width: 1399px) {
    .section-container {
        max-width: 1160px;
        margin: 0 auto;
        padding: 0 1.5rem;
    }
}

/* Computers / Desktops (>= 1400px) */
@media screen and (min-width: 1400px) {
    .section-container {
        max-width: 1520px;
        margin: 0 auto;
        padding: 0 2.5rem;
    }
    .footer-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 40px 3.5rem 30px 3.5rem !important;
    }
}

/* =========================================================================
   MODAL OVERLAY & POPUP STYLING
   ========================================================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease-in-out;
}

.modal-overlay.active,
.modal-overlay.show {
    display: flex !important;
    opacity: 1 !important;
}

.modal-content {
    background: var(--bg-card, #ffffff);
    border-radius: var(--radius-md, 12px);
    border: 1px solid var(--border, #e2e8f0);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: relative;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.25s ease-in-out;
}

.modal-overlay.active .modal-content,
.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--text-muted, #64748b);
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #ef4444;
}

.role-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-admin { background: #fee2e2; color: #dc2626; }
.badge-sales { background: #e0e7ff; color: #4338ca; }
.badge-engineering { background: #dcfce7; color: #15803d; }
.badge-customer { background: #fef3c7; color: #b45309; }

/* =========================================================================
   EXECUTIVE DASHBOARD CARD ELEVATION & RESPONSIVE POLISH
   ========================================================================= */

.stat-card {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06) !important;
}

.utility-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.utility-card:hover {
    transform: translateY(-4px);
    border-color: rgba(16, 185, 129, 0.4) !important;
    box-shadow: 0 14px 30px rgba(16, 185, 129, 0.08) !important;
}

@media (max-width: 1200px) {
    .eng-grid {
        grid-template-columns: 1fr !important;
    }
    
    .grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    }

    #site-specs-card > div:nth-child(3) {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
}

@media (max-width: 768px) {
    .section-container {
        padding: 0 0.85rem !important;
    }

    .grid-3 {
        grid-template-columns: 1fr !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }
}

/* =========================================================================
   SITE SPECS CARD MOBILE RESPONSIVE LAYOUTS
   ========================================================================= */

.specs-main-layout {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 2rem;
    align-items: center;
}

.specs-widgets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.specs-telemetry-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, #ecfdf5 0%, #f0fdf4 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 10px;
    padding: 0.75rem 1.25rem;
}

.specs-credentials-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: monospace;
    font-size: 0.85rem;
    background: #ffffff;
    padding: 0.4rem 0.65rem;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .specs-main-layout {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .specs-widgets-grid {
        grid-template-columns: 1fr !important;
        gap: 0.85rem !important;
    }

    .specs-telemetry-strip {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.6rem !important;
        padding: 0.75rem !important;
    }

    .specs-telemetry-strip > div:last-child {
        flex-direction: flex-start !important;
        gap: 0.5rem !important;
        width: 100%;
    }

    #site-specs-card {
        padding: 1.25rem 1rem !important;
    }
}

@media (max-width: 480px) {
    .specs-credentials-box {
        font-size: 0.78rem !important;
        padding: 0.35rem 0.5rem !important;
    }
    
    .card {
        padding: 1rem 0.85rem !important;
        border-radius: 12px !important;
    }
}

/* =========================================================================
/* =========================================================================
   DESKTOP (TIGHT FLOW WITH ZERO GAPS) & 4K DISPLAY RESPONSIVE LAYOUTS
   ========================================================================= */

@media (min-width: 1201px) {
    .eng-grid {
        display: grid !important;
        grid-template-columns: minmax(360px, 420px) 1fr !important;
        gap: 1.75rem !important;
        align-items: start !important;
    }

    .eng-left-panel, .eng-right-panel {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.75rem !important;
    }
}

/* 4K & Ultra-Wide Monitor Optimization (1920px+) */
@media (min-width: 1920px) {
    .section-container {
        max-width: 1800px !important;
        margin: 2rem auto !important;
    }

    .eng-grid {
        grid-template-columns: 460px 1fr !important;
        gap: 2rem !important;
    }

    .eng-left-panel, .eng-right-panel {
        gap: 2rem !important;
    }

    #eng-map {
        height: 420px !important;
    }

    .stats-grid {
        gap: 1.75rem !important;
    }
}

/* 4K Extreme Resolution Optimization (2560px+) */
@media (min-width: 2560px) {
    .section-container {
        max-width: 2200px !important;
    }

    .eng-grid {
        grid-template-columns: 500px 1fr !important;
        gap: 2.25rem !important;
    }
}

/* Mobile & Tablet Layout (Flattens panels via display: contents to allow explicit card order) */
@media (max-width: 1200px) {
    .eng-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    .eng-left-panel, .eng-right-panel {
        display: contents !important;
    }

    .eng-card-sites {
        order: 1 !important;
    }

    .eng-card-map {
        order: 2 !important; /* GEOGRAPHICAL MAP */
    }

    .eng-card-specs {
        order: 3 !important; /* PRIYASREE / FELIX PRASAD SOLAR ARRAY (SITE SPECS CARD ABOVE CUSTOMER SETUP PORTAL) */
    }

    .eng-card-setup {
        order: 4 !important; /* CUSTOMER SETUP PORTAL */
    }

    .eng-card-customers {
        order: 5 !important; /* CREATED CUSTOMERS & ACCESS CREDENTIALS */
    }
}

/* =========================================================================
 * KNOWLEDGE CENTRE (VIDEO HUB) STYLES
 * ========================================================================= */
.kc-hero-card {
    background: linear-gradient(135deg, #0f172a 0%, #064e3b 60%, #0f172a 100%);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 3.5rem 3rem;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.2);
    position: relative;
    overflow: hidden;
}

.kc-hero-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -15%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.kc-hero-content h1 {
    color: #ffffff;
    font-size: 2.75rem;
    margin-bottom: 0.75rem;
    font-weight: 800;
}

.kc-hero-content p {
    color: #cbd5e1;
    font-size: 1.1rem;
    max-width: 750px;
    margin-bottom: 2rem;
    line-height: 1.65;
}

.kc-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #34d399;
    padding: 0.4rem 1.1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kc-stats-row {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 1.75rem;
}

.kc-stat-item {
    display: flex;
    flex-direction: column;
}

.kc-stat-val {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kc-stat-lbl {
    font-size: 0.825rem;
    color: #94a3b8;
    margin-top: 0.1rem;
}

.kc-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.kc-filter-pills {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.kc-pill {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.kc-pill:hover,
.kc-pill.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.kc-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.25rem;
}

.kc-video-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.kc-video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.08);
    border-color: rgba(16, 185, 129, 0.4);
}

.kc-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    max-height: 540px;
    background: #090d16;
    overflow: hidden;
}

.kc-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.kc-video-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.kc-tag-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.kc-tag {
    background: var(--primary-light);
    color: var(--primary-hover);
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.kc-duration {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.kc-video-body h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    line-height: 1.35;
    color: var(--secondary);
}

.kc-video-body p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.kc-card-actions {
    display: flex;
    gap: 0.6rem;
}

@media (max-width: 768px) {
    .kc-hero-card {
        padding: 2rem 1.5rem;
    }
    .kc-hero-content h1 {
        font-size: 2rem;
    }
    .kc-video-grid {
        grid-template-columns: 1fr;
    }
}

/* HD Poster & Modal Styles */
.kc-poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: brightness(0.92) contrast(1.05);
}

.kc-video-card:hover .kc-poster-img {
    transform: scale(1.05);
    filter: brightness(0.98) contrast(1.08);
}

.kc-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.kc-play-overlay:hover {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.8) 100%);
}

.kc-hd-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(16, 185, 129, 0.9);
    backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.kc-play-btn {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #ef4444;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    padding-left: 4px;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5), 0 0 0 6px rgba(255, 255, 255, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.kc-video-card:hover .kc-play-btn {
    transform: scale(1.12);
    background: #dc2626;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.7), 0 0 0 8px rgba(255, 255, 255, 0.35);
}

.kc-play-text {
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 700;
    margin-top: 1rem;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
    letter-spacing: 0.3px;
}

/* HD Video Modal Lightbox */
.kc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.kc-modal-content {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    width: 100%;
    max-width: 460px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.kc-modal-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.kc-modal-header h3 {
    color: #ffffff;
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kc-modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.75rem;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}

.kc-modal-close:hover {
    color: #ffffff;
}

.kc-modal-body {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    max-height: 72vh;
    background: #000;
}

.kc-modal-body iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* =========================================================================
 * GOVERNMENT SCHEMES & SUBSIDY LIVE FEED STYLES
 * ========================================================================= */
.feed-header-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #065f46 100%);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    box-shadow: 0 14px 30px rgba(0,0,0,0.12);
}

.feed-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    margin-bottom: 0.85rem;
    letter-spacing: 0.5px;
}

.feed-live-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.feed-header-left h2 {
    color: #ffffff;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.feed-header-left p {
    color: #cbd5e1;
    font-size: 1rem;
    max-width: 700px;
    margin: 0;
    line-height: 1.5;
}

.feed-header-right {
    display: flex;
    gap: 1.5rem;
}

.feed-quick-stat {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 1rem 1.35rem;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feed-quick-stat .stat-num {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: #34d399;
}

.feed-quick-stat .stat-lbl {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.2rem;
}

/* Ticker Bar */
.feed-ticker-bar {
    background: #0f172a;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    margin-top: 1.25rem;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #f8fafc;
    font-size: 0.9rem;
    overflow: hidden;
}

.feed-ticker-title {
    font-weight: 800;
    color: #10b981;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.feed-ticker-content {
    flex-grow: 1;
    overflow: hidden;
}

/* Filter Bar */
.feed-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
    margin-bottom: 1.75rem;
}

.feed-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.feed-pill {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.5rem 1.1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.feed-pill:hover,
.feed-pill.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.feed-search-box {
    position: relative;
    min-width: 260px;
}

.feed-search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.feed-search-box input {
    width: 100%;
    padding: 0.55rem 1rem 0.55rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.875rem;
    font-family: var(--font-body);
    transition: var(--transition);
    outline: none;
}

.feed-search-box input:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}

/* Feed Grid */
.feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

.feed-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.feed-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(16, 185, 129, 0.35);
}

.feed-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.feed-tag {
    font-size: 0.725rem;
    font-weight: 800;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.tag-primary { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.tag-success { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.tag-warning { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.tag-info { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.tag-purple { background: #faf5ff; color: #6b21a8; border: 1px solid #e9d5ff; }

.feed-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.feed-card h3 {
    font-size: 1.2rem;
    color: var(--secondary);
    margin-bottom: 0.6rem;
    line-height: 1.35;
}

.feed-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.subsidy-table-mini {
    background: var(--bg-main);
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.sub-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.825rem;
}

.sub-lbl { color: var(--text-muted); font-weight: 500; }
.sub-val { color: var(--secondary); font-weight: 700; }

.feed-card-actions {
    display: flex;
    gap: 0.6rem;
}

/* =========================================================================
 * MOBILE RESPONSIVE OPTIMIZATIONS FOR LIVE FEED
 * ========================================================================= */
@media (max-width: 768px) {
    .feed-header-card {
        padding: 1.5rem 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
        border-radius: var(--radius-md);
    }

    .feed-header-left h2 {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .feed-header-left p {
        font-size: 0.875rem;
    }

    .feed-header-right {
        width: 100%;
        gap: 0.75rem;
    }

    .feed-quick-stat {
        flex: 1;
        padding: 0.75rem 0.5rem;
        border-radius: 10px;
    }

    .feed-quick-stat .stat-num {
        font-size: 1.2rem;
    }

    .feed-quick-stat .stat-lbl {
        font-size: 0.7rem;
    }

    .feed-ticker-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
        padding: 0.65rem 0.85rem;
        border-radius: 10px;
    }

    .feed-ticker-title {
        font-size: 0.75rem;
    }

    .feed-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        margin-top: 1.5rem;
        margin-bottom: 1.25rem;
    }

    .feed-pills {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
        width: 100%;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .feed-pills::-webkit-scrollbar {
        display: none;
    }

    .feed-pill {
        white-space: nowrap;
        font-size: 0.8rem;
        padding: 0.45rem 0.85rem;
        flex-shrink: 0;
    }

    .feed-search-box {
        width: 100%;
        min-width: 100%;
    }

    .feed-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .feed-card {
        padding: 1.25rem;
        border-radius: 14px;
    }

    .feed-card-header {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .feed-card h3 {
        font-size: 1.1rem;
    }

    .feed-card p {
        font-size: 0.85rem;
    }

    .subsidy-table-mini {
        padding: 0.6rem 0.85rem;
    }

    .sub-row {
        font-size: 0.78rem;
    }

    .feed-card-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .feed-card-actions .btn {
        width: 100% !important;
    }
}

/* =========================================================================
   PRICING PAGE & MAINTENANCE SUBSCRIPTION STYLES
   ========================================================================= */

.pricing-hero {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 2.5rem 1.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(15, 23, 42, 0.03) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(16, 185, 129, 0.15);
    position: relative;
    overflow: hidden;
}

.pricing-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-light);
    color: var(--primary-hover);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid rgba(16, 185, 129, 0.25);
    margin-bottom: 1rem;
}

.pricing-audience-tabs {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin: 1.5rem 0 1.25rem 0;
    flex-wrap: wrap;
}

.pricing-tab-btn {
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-heading);
    border: 2px solid var(--border);
    border-radius: 30px;
    background: var(--bg-card);
    color: var(--secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: var(--shadow-sm);
}

.pricing-tab-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.pricing-tab-btn.active {
    background: var(--secondary);
    color: #ffffff;
    border-color: var(--secondary);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
}

.pricing-tab-btn.active i {
    color: var(--primary);
}

.pricing-billing-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    background: #ffffff;
    padding: 0.5rem 1.25rem;
    border-radius: 30px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.billing-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
}

.billing-label.active {
    color: var(--secondary);
    font-weight: 700;
}

.discount-pill {
    background: #ef4444;
    color: #ffffff;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.3rem;
    font-weight: 800;
}

/* Switch styling */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary);
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* Audience Content Container */
.pricing-audience-content {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.pricing-audience-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.pricing-banner-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(59, 130, 246, 0.08));
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    color: #065f46;
    font-size: 0.95rem;
}

.pricing-banner-info i {
    font-size: 1.5rem;
    color: var(--primary);
    flex-shrink: 0;
}

/* Pricing Grid & Cards */
.pricing-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
    align-items: stretch;
    margin-bottom: 2.5rem;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.pricing-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px -10px rgba(16, 185, 129, 0.12), var(--shadow-md);
    border-color: rgba(16, 185, 129, 0.4);
}

.pricing-card.featured {
    border: 2px solid var(--primary);
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.15);
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.featured-ribbon {
    position: absolute;
    top: -14px;
    right: 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.pricing-card-header {
    margin-bottom: 1.25rem;
}

.pricing-card-tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary-hover);
    background: var(--primary-light);
    padding: 0.25rem 0.65rem;
    border-radius: 14px;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.4rem;
    color: var(--secondary);
}

.pricing-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 1rem;
    min-height: 42px;
}

.pricing-card-price {
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
    margin-top: 0.5rem;
}

.pricing-card-price .currency {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
}

.pricing-card-price .amount {
    font-size: 2.35rem;
    font-weight: 800;
    color: var(--secondary);
    font-family: var(--font-heading);
}

.pricing-card-price .period {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-left: 0.2rem;
}

.price-kw-note {
    font-size: 0.78rem;
    color: var(--primary);
    font-weight: 700;
    margin-top: 0.2rem;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 1.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    font-size: 0.9rem;
    color: var(--text-main);
    flex-grow: 1;
}

.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    line-height: 1.4;
}

.pricing-features li i {
    color: var(--primary);
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.pricing-btn {
    width: 100%;
    padding: 0.8rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

/* EPC Highlights Box */
.epc-highlights-box {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 1rem;
    box-shadow: var(--shadow-sm);
}

.epc-highlights-box h3 {
    font-size: 1.25rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.highlight-item {
    background: var(--bg-main);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.highlight-item:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.highlight-item i {
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.highlight-item h4 {
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.highlight-item p {
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Customer Category Nav & Panels */
.customer-category-nav {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.customer-cat-btn {
    padding: 0.65rem 1.35rem;
    font-size: 0.92rem;
    font-weight: 700;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: #ffffff;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.customer-cat-btn:hover {
    border-color: var(--primary);
    color: var(--primary-hover);
}

.customer-cat-btn.active {
    background: var(--primary-light);
    color: var(--primary-hover);
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.12);
}

.customer-cat-panel {
    display: none;
    animation: fadeIn 0.35s ease-in-out;
}

.customer-cat-panel.active {
    display: block;
}

.cat-header-intro {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.75rem;
}

.cat-header-intro h3 {
    font-size: 1.2rem;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cat-header-intro p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* Interactive Calculator */
.pricing-calculator-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    margin: 3rem 0;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.2);
}

.calc-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 1.25rem;
}

.calc-icon {
    font-size: 2.2rem;
    color: var(--primary);
    background: rgba(16, 185, 129, 0.15);
    padding: 0.85rem;
    border-radius: 16px;
}

.calc-header h3 {
    color: #ffffff;
    font-size: 1.35rem;
    margin-bottom: 0.2rem;
}

.calc-header p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin: 0;
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.calc-inputs label {
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.9rem;
}

.calc-inputs select {
    background: #1e293b;
    color: #ffffff;
    border: 1px solid #334155;
}

.calc-capacity-val {
    background: var(--primary);
    color: #ffffff;
    font-weight: 800;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.9rem;
}

.calc-range-slider {
    width: 100%;
    accent-color: var(--primary);
    margin-top: 0.75rem;
    cursor: pointer;
}

.calc-result {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    text-align: center;
}

.calc-result-badge {
    display: inline-block;
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.calc-price-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.calc-price-display .currency {
    font-size: 1.75rem;
    font-weight: 800;
    color: #ffffff;
}

.calc-price-display .amount {
    font-size: 2.75rem;
    font-weight: 800;
    color: #ffffff;
    font-family: var(--font-heading);
}

.calc-price-display .period {
    font-size: 0.95rem;
    color: #94a3b8;
}

.calc-savings-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px dashed rgba(16, 185, 129, 0.3);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    text-align: left;
}

.calc-savings-box i {
    font-size: 1.5rem;
    color: #34d399;
}

/* Pricing FAQ */
.pricing-faq-container {
    max-width: 850px;
    margin: 3rem auto 1rem auto;
}

.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--secondary);
}

.faq-icon {
    transition: transform 0.3s ease;
    color: var(--primary);
}

.faq-answer {
    display: none;
    margin-top: 0.85rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    border-top: 1px dashed var(--border);
    padding-top: 0.85rem;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-item.active .faq-answer {
    display: block;
}

@media (max-width: 768px) {
    .pricing-grid-3 {
        grid-template-columns: 1fr;
    }
    .calc-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .pricing-audience-tabs {
        flex-direction: column;
    }
    .pricing-tab-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Custom Month & Year Picker Styles */
.custom-month-picker-wrapper {
    position: relative;
    width: 100%;
}

.month-picker-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.custom-month-picker-wrapper:hover .month-picker-icon {
    color: var(--primary);
}

.custom-month-picker-popup {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 1000;
    width: 280px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    padding: 12px;
    font-family: inherit;
    animation: fadeInPopup 0.15s ease-out;
}

.custom-month-picker-popup.hidden {
    display: none !important;
}

@keyframes fadeInPopup {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.month-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border-radius: 8px;
    padding: 6px 10px;
    margin-bottom: 12px;
}

.year-nav-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #334155;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.year-nav-btn:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: scale(1.05);
}

.year-nav-btn:active {
    transform: scale(0.95);
}

.year-display {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.5px;
}

.month-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.month-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 4px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}

.month-btn:hover {
    background: #f1f5f9;
    color: var(--primary);
    border-color: #cbd5e1;
}

.month-btn.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
}

.month-picker-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
}

.picker-footer-btn {
    background: transparent;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0284c7;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.picker-footer-btn:hover {
    background: #f0f9ff;
    text-decoration: underline;
}

#picker-clear-btn {
    color: #64748b;
}

#picker-clear-btn:hover {
    background: #f8fafc;
    color: #ef4444;
}

/* Compact Utility & Additional Services Hub */
.compact-service-card:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.12) !important;
    transform: translateY(-2px);
}

.utility-link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #334155;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.utility-link-item span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.utility-link-item .link-arrow {
    font-size: 0.72rem;
    color: #94a3b8;
    transition: transform 0.2s ease, color 0.2s ease;
}

.utility-link-item:hover {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

.utility-link-item:hover .link-arrow {
    color: #059669;
    transform: translate(2px, -2px);
}