/* Modern CSS Responsive Design with Clamp */
/* ========================================= */

/* CSS Variables for Responsive Scaling */
:root {
  --font-size-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --font-size-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
  --font-size-md: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --font-size-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
  --font-size-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --font-size-xxl: clamp(1.5rem, 1.3rem + 1vw, 2rem);

  --spacing-unit: clamp(0.5rem, 0.4rem + 0.5vw, 1rem);
  --border-radius: clamp(0.25rem, 0.2rem + 0.25vw, 0.5rem);
  --table-padding: clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);

  /* Theme Colors */
  --header-bg: #284390;
  --accent-color: #f8cb18;
  --danger-color: #dc3545;
}

/* Professional Header Styling */
.cd-main-header {
  background: var(--header-bg) !important;
  border-bottom: 3px solid var(--accent-color) !important;
  padding: clamp(0.75rem, 0.6rem + 0.75vw, 1.5rem) !important;
  position: sticky !important;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cd-main-header .cd-logo {
  color: #f8cb18 !important;
  font-weight: 700 !important;
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem) !important;
  text-decoration: none !important;
  display: flex !important;
  align-items: center !important;
  gap: clamp(0.5rem, 0.4rem + 0.5vw, 1rem) !important;
  line-height: 1.2 !important;
}

.header-logo {
  width: clamp(2rem, 1.6rem + 2vw, 3rem) !important;
  height: clamp(2rem, 1.6rem + 2vw, 3rem) !important;
  object-fit: contain !important;
  display: block !important;
  border: 2px solid #f8cb18 !important;
  border-radius: 50% !important;
}

/* Navigation Styling */
.cd-top-nav a,

/* --- CUSTOMER DASHBOARD ENHANCEMENTS --- */
.dashboard-header-row {
.cd-nav a {
  color: #f8cb18 !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  font-size: var(--font-size-sm);
  padding: clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
.dashboard-header-row .dashboard-title {
  transition: all 0.3s ease;
}

.cd-top-nav a:hover,
.cd-nav a:hover {
.dashboard-header-row .dashboard-welcome {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
}
.dashboard-header-row .dashboard-logout {

/* Hamburger menu lines */
.cd-nav-trigger span,
.cd-nav-trigger span::before,
.cd-nav-trigger span::after {
  background: #f8cb18 !important;
}

/* User info in header */
.cd-top-nav .account a {
  color: #f8cb18 !important;
.dashboard-header-row .dashboard-logout:hover {
  font-weight: 600 !important;
}


.dashboard-summary-row {
/* Action buttons in tables */
.btn-action {
  width: clamp(5rem, 4rem + 2vw, 6rem) !important;
  margin-bottom: 5px;
  font-size: var(--font-size-xs);
.dashboard-summary-card {
  padding: clamp(0.375rem, 0.3rem + 0.375vw, 0.5rem) clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
}

.btn-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Global improvements for responsiveness across the app */
.dashboard-summary-card .summary-label {
/* Ensure long, unbroken strings (e.g., login codes) wrap inside table cells */
.table th,
.table td {
  word-break: break-word;          /* break long words when needed */
.dashboard-summary-card .summary-value {
  overflow-wrap: anywhere;         /* allow wrapping in any point if necessary */
  white-space: normal;             /* avoid nowrap from third-party styles */
  vertical-align: middle;          /* better vertical alignment */
  padding: var(--table-padding);   /* consistent responsive padding */
.dashboard-summary-card .summary-icon {
  font-size: var(--font-size-sm);
  line-height: 1.4;
}


@media (max-width: 991px) {
  .dashboard-summary-row {
     flex-direction: column;
     gap: 1rem;
  }
  .dashboard-summary-card {
     max-width: 100%;
     min-width: 0;
  }
}

.dashboard-section-title {
/* Override jquery.bootgrid.css's `white-space: nowrap` for table cells */
.bootgrid-table td {
    white-space: normal !important;
}

/* Make all responsive table containers horizontally scrollable on any viewport */
.table-responsive {
    overflow-x: auto;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
.dashboard-info-cards-row {
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Professional table styling */
.dashboard-info-card {
.table {
    margin-bottom: 0;
    font-size: var(--font-size-sm);
    width: 100%;
    max-width: 100%;
}

.table thead th {
    background-color: #284390;
    border-bottom: 2px solid #f8cb18;
.dashboard-info-card.billing {
    font-weight: 600;
    color: #f8cb18 !important;
.dashboard-info-card.financial {
    z-index: 10;
    vertical-align: middle;
.dashboard-info-card h6 {
    text-align: left;
    white-space: normal;
    line-height: 1.3;
}

.dashboard-info-card p {
.table thead th:first-child {
    border-top-left-radius: var(--border-radius);
}
.dashboard-info-card p:last-child {

.table thead th:last-child {
    border-top-right-radius: var(--border-radius);
}

.table tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--border-radius);
}

.table tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--border-radius);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(40, 67, 144, 0.03);
}

.table-hover tbody tr:hover {
    background-color: rgba(248, 203, 24, 0.1);
    transition: background-color 0.2s ease;
}

.table-bordered {
    border: 1px solid #dee2e6;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #dee2e6;
}

/* Button styling for action column */
.btn-edit, .btn-delete {
    margin: 2px;
    font-size: 12px;
    padding: 4px 8px;
}

/* Avoid overlapping when columns get tight on medium screens */
@media (max-width: 1199px) {
    .content-wrapper .row [class*="col-"] {
        margin-bottom: 15px;
    }
}

/* Force vertical stacking of Employer Dashboard tables on laptop and larger widths */
@media (min-width: 992px) {
  .employer-stack-laptop > [class*="col-md-"] {
    float: none !important;
    width: 100% !important;
    margin-bottom: 15px; /* spacing between stacked panels */
  }
}

/* Allow nested content (like tables) to shrink inside Bootstrap columns without overflow */
[class^="col-"][class*="col-"],
.col-xs-12, .col-sm-12, .col-md-12, .col-lg-12,
.col-xs-6, .col-sm-6, .col-md-6, .col-lg-6,
.col-xs-9, .col-sm-9, .col-md-9, .col-lg-9,
.col-xs-3, .col-sm-3, .col-md-3, .col-lg-3 {
    min-width: 0; /* helps avoid content overflow within float columns */
}

/* Panel body: allow horizontal scroll for wide content; don't clip vertically */
.panel .panel-body {
    overflow-x: auto;
    overflow-y: visible;
}

/* Mobile-specific table adjustments */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 12px;
    }

    .table th,
    .table td {
        padding: 6px 8px;
    }

    .btn-action {
        width: 70px !important;
        font-size: 11px;
        padding: 3px 6px;
    }
}

/* Ensure table headers are visible during horizontal scroll */
.table-responsive::-webkit-scrollbar,
.sticky-horizontal-scrollbar::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track,
.sticky-horizontal-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb,
.sticky-horizontal-scrollbar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover,
.sticky-horizontal-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.sticky-horizontal-scrollbar {
    overflow-x: auto;
    overflow-y: hidden;
    height: 12px;
    background: #f1f1f1;
    border-top: 1px solid #ddd;
}

.sticky-dummy-content {
    height: 1px;
}

/* Reusable Action Button Grid and Styles */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    min-width: 160px;
    padding: 5px;
}

.action-btn {
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px !important;
    padding: 2px 4px !important;
    white-space: nowrap;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-decoration: none !important;
    text-align: center;
    font-weight: 700 !important;
    text-transform: uppercase;
    border: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    filter: brightness(1.1);
    color: white !important;
}

/* Specific Action Button Colors */
.btn-pay { background-color: #f39c12 !important; color: white !important; }
.btn-discount { background-color: #3bc0e3 !important; color: white !important; }
.btn-invoice { background-color: #5cb85c !important; color: white !important; }
.btn-statement { background-color: #286090 !important; color: white !important; }
.btn-remarks { background-color: #8b104e !important; color: white !important; }
.btn-view { background-color: #795548 !important; color: white !important; }
.btn-edit-custom { background-color: #33a1ff !important; color: white !important; }
.btn-delete-custom { background-color: #ff851b !important; color: white !important; }
.btn-consume { background-color: #009688 !important; color: white !important; }
.btn-disconnect-custom { background-color: #ff0000 !important; color: white !important; }

/* Full-width button for Disconnect */
.action-btn-danger-span {
    grid-column: span 2;
    margin-top: 2px;
}

.action-btn-danger-span {
    grid-column: span 1; /* Reset to 1 column to match 2-column grid in sketch */
    width: 100%;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Contact section enhancements */
.contact-info-container {
    margin-top: var(--spacing-unit);
    font-size: var(--font-size-sm);
}

.contact-title {
    background-color: #f8cb18;
    color: #284390;
    padding: clamp(0.25rem, 0.2rem + 0.25vw, 0.375rem) clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
    display: inline-block;
    font-weight: 700;
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-unit);
}

.contact-info-container table {
    border-collapse: collapse;
    width: 100%;
    max-width: 100%;
}

.contact-info-container td {
    padding: clamp(0.375rem, 0.3rem + 0.375vw, 0.5rem);
}

.contact-info-container td:first-child {
    font-weight: 600;
    color: #284390;
    width: clamp(7rem, 6rem + 2.5vw, 8rem);
}

/* ============================================================================
   DEBUG RESPONSIVE CLAMP() - REMOVE IN PRODUCTION
   ============================================================================
   Uncomment to visualize responsive breakpoints during testing
--------------------------------------------------------------------------- */
/*
body::after {
    content: "MOBILE (<768px)";
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: #284390;
    color: #f8cb18;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 9999;
    font-weight: 600;
}

@media only screen and (min-width: 769px) and (max-width: 1200px) {
    body::after {
        content: "TABLET (769-1200px)";
    }
}

@media only screen and (min-width: 1201px) and (max-width: 1920px) {
    body::after {
        content: "LAPTOP (1201-1920px)";
    }
}

@media only screen and (min-width: 1921px) {
    body::after {
        content: "SMART TV (1921px+)";
    }
}
*/

/* Notification System Styles */
.cd-top-nav .notifications,
.cd-top-nav .notifications.selected,
.cd-top-nav .notifications:hover {
    background-color: transparent !important;
}

.notifications > a {
    position: relative;
    padding: 0 !important;
    width: 60px !important;
    height: 55px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    background-color: transparent !important;
}

.notifications > a::after {
    display: none !important; /* Hide the dropdown arrow for a cleaner "just icon" look */
}

.notifications .count {
    position: absolute;
    top: 10px !important;
    right: 12px !important;
    background-color: var(--danger-color) !important;
    color: white !important;
    font-size: 10px !important;
    font-weight: bold !important;
    padding: 0 !important;
    border-radius: 50% !important;
    line-height: 1 !important;
    min-width: 16px !important;
    height: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid var(--header-bg) !important; /* Match header background for cut-out effect */
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

#notifications-dropdown ul {
    width: clamp(250px, 80vw, 350px) !important;
    right: 0 !important;
    left: auto !important;
    display: none;
    background: #ffffff !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2) !important;
    border-radius: 0 0 8px 8px !important;
    padding: 0 !important;
    border: 1px solid #e2e2e2 !important;
}

#notifications-dropdown.selected ul {
    display: block !important;
}

#notification-list {
    max-height: 350px;
    overflow-y: auto;
}

#notification-list li a {
    display: block !important;
    color: #333 !important;
    text-decoration: none !important;
    transition: background 0.2s !important;
}

#notification-list li a:hover {
    background-color: #f8f9fa !important;
}

.cd-top-nav .notifications > a i {
    font-size: clamp(1.2rem, 1rem + 1vw, 1.5rem) !important;
    vertical-align: middle !important;
    color: #f8cb18 !important;
    transition: transform 0.2s ease;
}

.notifications > a:hover i {
    transform: scale(1.1);
    color: #ffffff !important;
}

@media only screen and (max-width: 767px) {
    #notifications-dropdown ul {
        position: static !important;
        width: 100% !important;
        box-shadow: none !important;
        border: none !important;
    }
}

/* Floating Notification Bell Styles */
.floating-bell {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--header-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1001;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: 3px solid var(--accent-color);
}

.floating-bell:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    background-color: #3152af;
}

.floating-bell a {
    color: var(--accent-color) !important;
    font-size: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    width: 100%;
    height: 100%;
    position: relative;
}

.floating-bell .count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger-color);
    color: white;
    font-size: 12px;
    font-weight: bold;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
    .floating-bell {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    .floating-bell a {
        font-size: 22px !important;
    }
}

/* Payment proof: normal-sized preview; click opens near-fullscreen modal */
.payment-proof-thumb-wrap {
    margin: 0 0 1rem 0;
}

.payment-proof-thumb {
    display: block;
    max-width: min(100%, 360px);
    max-height: 260px;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: zoom-in;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px;
    background: #fafafa;
}

.payment-proof-thumb:hover {
    border-color: #284390;
}

.payment-proof-modal-dialog {
    width: 96%;
    max-width: 1200px;
    margin: 1vh auto;
}

.payment-proof-modal-body {
    text-align: center;
    padding: 15px;
    overflow: auto;
    max-height: calc(100vh - 120px);
}

.payment-proof-full {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}