/* =========================================================
   Master Module — Reusable CRUD Template Styles
   Shared by: Users, Roles, Designations, Districts, Divisions,
   Sub Divisions, Offices, Stations, Feeders, Transformers
   ========================================================= */

.master-page {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ---------------- Header ---------------- */

.master-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.master-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.master-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1f2a37;
}

.master-subtitle {
    margin: 0;
    font-size: 12.5px;
    color: #5a6b7b;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #1E3A8A;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.12s ease;
}

.btn-primary:hover { background-color: #16296b; }

.btn-primary .icon-svg { width: 15px; height: 15px; }

/* ---------------- Toolbar / Search ---------------- */

.master-toolbar {
    display: flex;
    align-items: center;
}

.master-search {
    position: relative;
    max-width: 320px;
    width: 100%;
}

.master-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    color: #8794a8;
    pointer-events: none;
}

.master-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px 8px 32px;
    font-size: 13px;
    font-family: inherit;
    color: #1f2a37;
    background-color: #ffffff;
    border: 1px solid #E4E7EC;
    border-radius: 6px;
    min-height: 36px;
}

.master-search-input::placeholder { color: #9aa5b1; }

.master-search-input:focus {
    outline: none;
    border-color: #1E3A8A;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

/* ---------------- Table ---------------- */

.master-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #E4E7EC;
    border-radius: 8px;
}

.master-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
    font-size: 13px;
}

.master-table thead {
    background-color: #F3F6FA;
}

.master-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #5a6b7b;
    border-bottom: 1px solid #E4E7EC;
    white-space: nowrap;
}

.master-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #EEF1F5;
    color: #1f2a37;
    vertical-align: middle;
}

.master-table tbody tr.master-row:hover {
    background-color: #F9FAFC;
}

.master-table tbody tr:last-child td {
    border-bottom: none;
}

.col-action {
    white-space: nowrap;
    width: 1%;
}

/* ---------------- Action Buttons ---------------- */

.action-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-edit {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: 1px solid #E4E7EC;
    color: #1E3A8A;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.12s ease, border-color 0.12s ease;
}

.btn-edit:hover {
    background-color: #EEF2FB;
    border-color: #c7d3ef;
}

.btn-edit .icon-svg { width: 13px; height: 13px; }

.btn-save {
    background-color: #1E3A8A;
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.12s ease;
}

.btn-save:hover { background-color: #16296b; }

.btn-cancel {
    background-color: #ffffff;
    color: #5a6b7b;
    border: 1px solid #E4E7EC;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.12s ease;
}

.btn-cancel:hover { background-color: #F3F6FA; }

/* ---------------- Inline Add / Edit Row Fields ---------------- */

.inline-add-row,
.inline-edit-row {
    background-color: #F9FAFC;
}

.inline-add-row[hidden],
.inline-edit-row[hidden] {
    display: none;
}

.field-input {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 9px;
    font-size: 12.8px;
    font-family: inherit;
    color: #1f2a37;
    background-color: #ffffff;
    border: 1px solid #E4E7EC;
    border-radius: 5px;
    min-height: 32px;
    min-width: 110px;
}

.field-input:focus {
    outline: none;
    border-color: #1E3A8A;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.field-error-space {
    min-height: 14px;
    font-size: 11px;
    color: #c0392b;
}

/* ---------------- Status Toggle ---------------- */

.status-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.status-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.status-toggle-track {
    width: 36px;
    height: 20px;
    background-color: #d7dce3;
    border-radius: 999px;
    display: inline-block;
    position: relative;
    transition: background-color 0.15s ease;
}

.status-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: transform 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.status-toggle input:checked + .status-toggle-track {
    background-color: #1E3A8A;
}

.status-toggle input:checked + .status-toggle-track .status-toggle-thumb {
    transform: translateX(16px);
}

.status-toggle-readonly {
    cursor: default;
}

.status-toggle-readonly input:disabled + .status-toggle-track {
    opacity: 0.85;
}

/* ---------------- Pagination ---------------- */

.master-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 4px;
}

.master-pagination-info {
    font-size: 12.5px;
    color: #5a6b7b;
}

.master-pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-btn {
    background-color: #ffffff;
    border: 1px solid #E4E7EC;
    color: #1f2a37;
    padding: 6px 11px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.12s ease, border-color 0.12s ease;
}

.page-btn:hover:not(:disabled) {
    background-color: #F3F6FA;
    border-color: #c7d3ef;
}

.page-btn:disabled {
    color: #b6bfc9;
    cursor: not-allowed;
}

.page-btn-active {
    background-color: #1E3A8A;
    border-color: #1E3A8A;
    color: #ffffff;
}

.page-btn-active:hover {
    background-color: #1E3A8A;
}

.master-alert{
    padding:12px 16px;
    margin-bottom:20px;
    border-radius:6px;
    font-size:14px;
    font-weight:500;
}

.master-alert.success{
    background:#d1fae5;
    color:#065f46;
    border:1px solid #10b981;
}

.master-alert.error{
    background:#fee2e2;
    color:#991b1b;
    border:1px solid #ef4444;
}

.password-mask {
    font-family: monospace;
    letter-spacing: 2px;
    color: #666;
    font-weight: 600;
}

.col-mobile {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
}

.col-password {
    width: 160px;
    min-width: 160px;
    max-width: 160px;
}

/* ---------------- Filter Dropdown (e.g. Office filter) ---------------- */

.master-filter {
    position: relative;
    max-width: 220px;
    width: 100%;
}

.master-filter-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    color: #8794a8;
    pointer-events: none;
    z-index: 1;
}

.master-filter-select {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 28px 8px 32px;
    font-size: 13px;
    font-family: inherit;
    color: #1f2a37;
    background-color: #ffffff;
    border: 1px solid #E4E7EC;
    border-radius: 6px;
    min-height: 36px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #8794a8 50%),
        linear-gradient(135deg, #8794a8 50%, transparent 50%);
    background-position: calc(100% - 16px) center, calc(100% - 11px) center;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    cursor: pointer;
}

.master-filter-select:focus {
    outline: none;
    border-color: #1E3A8A;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

/* Toolbar layout: search + filter side by side */

.master-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .master-filter {
        max-width: 100%;
    }
}

.master-empty-state {
    text-align: center;
    padding: 32px 12px;
    color: #8794a8;
    font-size: 13.5px;
}

/* ---------------- Form Section Title ---------------- */

.master-section-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #1E3A8A;
    margin: 4px 0 14px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #E4E7EC;
}

.master-section-title:not(:first-child) {
    margin-top: 20px;
}

/* ---------------- Responsive Form Grid ---------------- */

.master-form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px 16px;
}

.master-form-grid-full {
    grid-column: 1 / -1;
}

.master-form-actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #E4E7EC;
}

.required-mark {
    color: #c0392b;
}

@media (max-width: 1200px) {
    .master-form-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .master-form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .master-form-grid {
        grid-template-columns: 1fr;
    }
}

.master-form-card {
    background-color: #ffffff;
    border: 1px solid #E4E7EC;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(15, 32, 51, 0.07), 0 1px 2px rgba(15, 32, 51, 0.05);
    padding: 20px;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 768px) {
    .master-header {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-primary {
        justify-content: center;
    }

    .master-search {
        max-width: 100%;
    }

    .master-pagination {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ---------------- Status Badges ---------------- */

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.status-badge-open {
    background-color: #fef3c7;
    color: #92400e;
}

.status-badge-forwarded {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-badge-closed {
    background-color: #d1fae5;
    color: #065f46;
}

/* ---------------- Complaint Number Link ---------------- */

.complaint-number-link {
    color: #1E3A8A;
    font-weight: 600;
    text-decoration: none;
}

.complaint-number-link:hover {
    text-decoration: underline;
}

/* ---------------- Action Menu (dropdown via <details>) ---------------- */

.action-menu {
    position: relative;
    display: inline-block;
}

.action-menu-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    color: #5a6b7b;
    cursor: pointer;
    list-style: none;
}

.action-menu-trigger::-webkit-details-marker {
    display: none;
}

.action-menu-trigger:hover {
    background-color: #F3F6FA;
    color: #1E3A8A;
}

.action-menu-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    min-width: 160px;
    background-color: #ffffff;
    border: 1px solid #E4E7EC;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(15, 32, 51, 0.12);
    z-index: 30;
    overflow: hidden;
}

.action-menu-item {
    display: block;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #1f2a37;
    text-decoration: none;
    border-bottom: 1px solid #EEF1F5;
}

.action-menu-item:last-child {
    border-bottom: none;
}

.action-menu-item:hover {
    background-color: #F3F6FA;
}

.action-menu-item-danger {
    color: #c0392b;
}

/* ---------------- Modal (CSS-only, via :target) ---------------- */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.5);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay:target {
    display: flex;
}

.modal-box {
    background-color: #ffffff;
    border-radius: 10px;
    width: 100%;
    max-width: 720px;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #E4E7EC;
    position: sticky;
    top: 0;
    background-color: #ffffff;
}

.modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1E3A8A;
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: #5a6b7b;
    text-decoration: none;
}

.modal-close:hover {
    background-color: #F3F6FA;
}

.modal-body {
    padding: 20px;
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section-title {
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #1E3A8A;
    padding-bottom: 6px;
    margin-bottom: 12px;
    border-bottom: 1px solid #E4E7EC;
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 20px;
}

.modal-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.modal-field-full {
    grid-column: 1 / -1;
}

.modal-field-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #8794a8;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.modal-field-value {
    font-size: 13.5px;
    color: #1f2a37;
}

.modal-not-resolved {
    font-size: 13px;
    color: #8794a8;
    font-style: italic;
    margin: 0;
}

@media (max-width: 600px) {
    .modal-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------------- Dropdown-safe table wrapper (Complaints page) ---------------- */

.master-table-wrapper--dropdown-safe {
    overflow: visible;
}

@media (max-width: 768px) {
    .master-table-wrapper--dropdown-safe {
        overflow-x: auto;
        overflow-y: visible; /* browsers may force this to auto — dropdown can clip on small screens */
    }
}

/* ---------------- Center-aligned table variant ---------------- */

.master-table-centered th,
.master-table-centered td {
    text-align: center;
}

.master-table-centered .action-buttons,
.master-table-centered .status-badge {
    justify-content: center;
}

/* ---------------- Stacked Date / Time cell ---------------- */

.datetime-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.3;
}

.datetime-date {
    font-size: 13px;
    font-weight: 400;
    color: #1f2a37;
}

.datetime-time {
    font-size: 13px;
    color: #1f2a37;
}

.master-table-centered td:nth-child(3) {
    text-align: left;
}

/* ---------------- Mutually-exclusive action menus ---------------- */
/* The `name` attribute on <details> handles the actual exclusivity —
   no CSS needed for that part, this is just cursor/visual polish. */

.action-menu-trigger {
    cursor: pointer;
}

/* ---------------- Readonly / Disabled Field Styling ---------------- */

input.field-input[readonly],
textarea.field-input[readonly],
select.field-input:disabled {
    background-color: #f5f6f8;
    border-color: #e2e5ea;
    color: #6b7280;
    cursor: not-allowed;
}

.field-input-readonly::placeholder,
.field-input:disabled::placeholder {
    color: #9aa1ab;
}

/* Keep the Complaint Description box the same visual height as a normal input */
.field-input-compact {
    resize: none;
    min-height: 42px;
    height: 42px;
    line-height: 1.4;
    overflow-y: auto;
}

/* ---------------- Search Section (Complaints Index) ---------------- */

.master-search-card {
    margin-bottom: 4px;
}

.master-search-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) auto;
    gap: 14px 16px;
    align-items: end;
}

.master-search-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

@media (max-width: 1024px) {
    .master-search-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .master-search-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .master-search-grid {
        grid-template-columns: 1fr;
    }

    .master-search-actions {
        grid-column: auto;
        flex-direction: column;
        align-items: stretch;
    }

    .master-search-actions .btn-save,
    .master-search-actions .btn-cancel {
        width: 100%;
        text-align: center;
    }
}

/* ---------------- Excel-Style Multi-Select Dropdown ---------------- */

.excel-select {
    position: relative;
    width: 100%;
    max-width: 320px;
}

.excel-select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    font-size: 13px;
    font-family: inherit;
    color: #1f2a37;
    background-color: #ffffff;
    border: 1px solid #E4E7EC;
    border-radius: 6px;
    min-height: 36px;
    cursor: pointer;
}

.excel-select-trigger:hover {
    border-color: #c7d3ef;
}

.excel-select-caret {
    width: 14px;
    height: 14px;
    color: #8794a8;
    flex-shrink: 0;
}

.excel-select-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    min-width: 280px;
    background-color: #ffffff;
    border: 1px solid #E4E7EC;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(15, 32, 51, 0.14);
    z-index: 40;
    padding: 10px;
}

.excel-select-search {
    position: relative;
    margin-bottom: 8px;
}

.excel-select-search .icon-svg {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: #8794a8;
    pointer-events: none;
}

.excel-select-search input {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 10px 7px 28px;
    font-size: 12.8px;
    font-family: inherit;
    border: 1px solid #E4E7EC;
    border-radius: 5px;
}

.excel-select-search input:focus {
    outline: none;
    border-color: #1E3A8A;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.excel-select-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 6px;
    font-size: 13px;
    color: #1f2a37;
    border-radius: 5px;
    cursor: pointer;
}

.excel-select-item:hover {
    background-color: #F3F6FA;
}

.excel-select-item-all {
    font-weight: 700;
    border-bottom: 1px solid #E4E7EC;
    border-radius: 0;
    margin-bottom: 4px;
    padding-bottom: 9px;
}

.excel-select-list {
    max-height: 220px;
    overflow-y: auto;
}

/* ---------------- Report Summary Cards ---------------- */

.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.report-summary-card {
    background-color: #ffffff;
    border: 1px solid #E4E7EC;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(15, 32, 51, 0.07), 0 1px 2px rgba(15, 32, 51, 0.05);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-left: 4px solid #1E3A8A;
}

.report-summary-label {
    font-size: 12px;
    font-weight: 600;
    color: #5a6b7b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.report-summary-value {
    font-size: 22px;
    font-weight: 700;
    color: #1f2a37;
}

.report-summary-card-open {
    border-left-color: #92400e;
}

.report-summary-card-forwarded {
    border-left-color: #1e40af;
}

.report-summary-card-closed {
    border-left-color: #065f46;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 1200px) {
    .report-summary-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .report-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .excel-select {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .report-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------------- Compact Horizontal Filter Row ---------------- */

.report-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.report-filter-compact {
    flex: 0 0 auto;
    width: 160px;
}

.report-filter-siteoffice {
    width: 240px;
}

.report-filter-siteoffice .excel-select {
    max-width: 100%;
}

.report-filter-actions {
    flex: 0 0 auto;
}

.report-filter-actions-spacer {
    display: block;
    height: 18px;
}

.report-filter-actions .action-buttons {
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .report-filter-compact,
    .report-filter-siteoffice {
        width: calc(33.33% - 8px);
    }
}

@media (max-width: 768px) {
    .report-filter-compact,
    .report-filter-siteoffice,
    .report-filter-actions {
        width: 100%;
    }

    .report-filter-actions .action-buttons {
        width: 100%;
    }

    .report-filter-actions .btn-save,
    .report-filter-actions .btn-cancel {
        flex: 1;
        text-align: center;
    }
}

/* ---------------- Report Meta Line ---------------- */

.report-meta-line {
    font-size: 12.8px;
    color: #5a6b7b;
    padding: 4px 2px;
}

.report-meta-line strong {
    color: #1f2a37;
}

/* ---------------- Export Toolbar ---------------- */

.report-export-toolbar {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.report-export-toolbar .btn-cancel {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.report-export-toolbar .icon-svg {
    width: 15px;
    height: 15px;
}

@media (max-width: 600px) {
    .report-export-toolbar {
        flex-wrap: wrap;
        justify-content: stretch;
    }

    .report-export-toolbar .btn-cancel {
        flex: 1;
        justify-content: center;
    }
}

/* ---------------- PDF / Print Header (letterhead style) ---------------- */

.report-print-header {
    padding: 14px 16px;
    border: 1px solid #1E3A8A;
    border-radius: 4px;
    margin-bottom: 14px;
    text-align: center;
    background-color: #f7f9fc;
}

.report-print-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1E3A8A;
    letter-spacing: 0.3px;
}

.report-print-header h3 {
    margin: 3px 0 10px 0;
    font-size: 12px;
    font-weight: 600;
    color: #5a6b7b;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.report-print-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px 22px;
    font-size: 10.5px;
    color: #5a6b7b;
    border-top: 1px solid #d8dee5;
    padding-top: 8px;
    margin-top: 6px;
}

.report-print-meta strong {
    color: #1E3A8A;
    font-weight: 700;
}

/* ---------------- PDF Export Mode: fixed width + compact table ---------------- */

.pdf-export-mode table.master-table {
    table-layout: fixed;
    font-size: 10.5px;
}

.pdf-export-mode table.master-table th,
.pdf-export-mode table.master-table td {
    padding: 6px 8px;
    word-wrap: break-word;
    border: 1px solid #e0e4ea;
}

.pdf-export-mode table.master-table th {
    background-color: #1E3A8A !important;
    color: #ffffff !important;
    font-size: 9.5px;
    text-transform: uppercase;
}

.pdf-export-mode .datetime-stack {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.pdf-export-mode .datetime-date {
    font-size: 10px;
    font-weight: 600;
}

.pdf-export-mode .datetime-time {
    font-size: 9px;
    color: #5a6b7b;
}

.pdf-export-mode table.master-table th:nth-child(1),
.pdf-export-mode table.master-table td:nth-child(1)  { width: 4%; }
.pdf-export-mode table.master-table th:nth-child(2),
.pdf-export-mode table.master-table td:nth-child(2)  { width: 10%; }
.pdf-export-mode table.master-table th:nth-child(3),
.pdf-export-mode table.master-table td:nth-child(3)  { width: 11%; }
.pdf-export-mode table.master-table th:nth-child(4),
.pdf-export-mode table.master-table td:nth-child(4)  { width: 9%; }
.pdf-export-mode table.master-table th:nth-child(5),
.pdf-export-mode table.master-table td:nth-child(5)  { width: 12%; }
.pdf-export-mode table.master-table th:nth-child(6),
.pdf-export-mode table.master-table td:nth-child(6)  { width: 8%; }
.pdf-export-mode table.master-table th:nth-child(7),
.pdf-export-mode table.master-table td:nth-child(7)  { width: 12%; }
.pdf-export-mode table.master-table th:nth-child(8),
.pdf-export-mode table.master-table td:nth-child(8)  { width: 8%; }
.pdf-export-mode table.master-table th:nth-child(9),
.pdf-export-mode table.master-table td:nth-child(9)  { width: 8%; }
.pdf-export-mode table.master-table th:nth-child(10),
.pdf-export-mode table.master-table td:nth-child(10) { width: 10%; }
.pdf-export-mode table.master-table th:nth-child(11),
.pdf-export-mode table.master-table td:nth-child(11) { width: 8%; }

/* ---------------- Report Summary Table (print/export only) ---------------- */

/* ---------------- Report Summary Line (print/export only) ---------------- */

.report-summary-line {
    display: none;
    font-size: 11px;
    color: #1f2a37;
    text-align: center;
    padding: 6px 0 10px 0;
    margin-bottom: 4px;
    border-bottom: 1px dashed #d8dee5;
}

.report-summary-line strong {
    color: #1E3A8A;
}

.pdf-export-mode .report-summary-line,
[data-active="true"] ~ .report-summary-line {
    display: block;
}

.pdf-export-mode .master-table-wrapper {
    page-break-inside: auto;
}

.pdf-export-mode table.master-table tr {
    page-break-inside: avoid;
    page-break-after: auto;
}

/* ---------------- Public Complaint Page — Enhanced Design ---------------- */

.public-page-bg {
    min-height: 100vh;
    background-color: #F3F6FA;
}

/* Letterhead bar */

.public-letterhead {
    background-color: #ffffff;
    border-bottom: 3px solid #1E3A8A;
}

.public-letterhead-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.public-letterhead-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    flex-shrink: 0;
}

.public-letterhead-org {
    font-size: 11.5px;
    font-weight: 600;
    color: #5a6b7b;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0 0 2px 0;
}

.public-letterhead-dept {
    font-size: 20px;
    font-weight: 700;
    color: #1E3A8A;
    margin: 0;
}

/* Page content wrapper */

.public-portal-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 26px 16px 50px 16px;
}

/* Intro block */

.public-intro {
    margin-bottom: 16px;
}

.public-intro-badge {
    display: inline-block;
    background-color: #eaf1fd;
    color: #1E3A8A;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
}

.public-intro-title {
    font-size: 21px;
    font-weight: 700;
    color: #1f2a37;
    margin: 0 0 6px 0;
}

.public-intro-subtitle {
    font-size: 13.5px;
    color: #5a6b7b;
    line-height: 1.5;
    margin: 0;
    max-width: 640px;
}

/* Helpline info strip */

.public-helpline-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    background-color: #fff8e6;
    border: 1px solid #f0dca4;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 18px;
}

.public-helpline-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #7a5c1e;
}

.public-helpline-icon {
    display: flex;
    color: #b8860b;
    flex-shrink: 0;
}

.public-helpline-icon .icon-svg {
    width: 15px;
    height: 15px;
}

.public-helpline-item strong {
    color: #1f2a37;
}

/* Form card polish */

.public-form-card {
    box-shadow: 0 2px 10px rgba(15, 32, 51, 0.09);
    border-radius: 12px;
    padding: 28px;
}

/* Section titles with icon */

.public-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #1E3A8A;
    padding-bottom: 8px;
    margin: 4px 0 14px 0;
    border-bottom: 1px solid #E4E7EC;
}

.public-section-title:not(:first-child) {
    margin-top: 22px;
}

.public-section-icon {
    display: flex;
    color: #1E3A8A;
}

.public-section-icon .icon-svg {
    width: 16px;
    height: 16px;
}

.master-form-span-2 {
    grid-column: span 2;
}

/* Submit button */

.public-form-actions {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #E4E7EC;
    justify-content: flex-end;
}

.public-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    font-size: 14px;
}

.public-submit-btn .icon-svg {
    width: 16px;
    height: 16px;
}

.master-form-grid > .form-group {
    min-width: 0;
}

.master-form-grid-2col {
    grid-template-columns: repeat(2, 1fr);
}

/* Footer note */

.public-footer-note {
    text-align: center;
    font-size: 11.5px;
    color: #8794a8;
    margin-top: 20px;
}

/* Responsive */

@media (max-width: 600px) {
    .public-letterhead-dept {
        font-size: 17px;
    }

    .public-intro-title {
        font-size: 18px;
    }

    .public-form-card {
        padding: 18px;
    }

    .public-form-actions {
        justify-content: stretch;
    }

    .public-submit-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ---------------------------------------------------------
   OUTAGE FORM — Selection Box, Two-Column Layout, Summary
   --------------------------------------------------------- */

/* ---------------- Scrollable Selection Box (Feeders / Transformers) ---------------- */

.selection-scroll-box {
    border: 1px solid #E4E7EC;
    border-radius: 8px;
    padding: 8px;
    height: 350px;
    overflow-y: auto;
    background-color: #ffffff;
}

.selection-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.selection-table thead {
    position: sticky;
    top: 0;
    background-color: #F3F6FA;
    z-index: 1;
}

.selection-table th {
    text-align: left;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #5a6b7b;
    border-bottom: 1px solid #E4E7EC;
}

.selection-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #EEF1F5;
    color: #1f2a37;
}

.selection-table tbody tr:hover {
    background-color: #F9FAFC;
}

.selection-table tbody tr:last-child td {
    border-bottom: none;
}

.selection-col-check {
    width: 34px;
    text-align: center;
}

.selection-col-consumers {
    text-align: center;
}

.selection-table th.selection-col-consumers {
    text-align: center;
}

/* ---------------- Select All ---------------- */

.select-all-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #344054;
    cursor: pointer;
    user-select: none;
}

.select-all-label input[type="checkbox"] {
    cursor: pointer;
}

/* ---------------- Selection Summary (legacy inline text version) ---------------- */

.selection-summary {
    margin-top: 10px;
    font-size: 14px;
    color: #667085;
}

.selection-summary strong {
    color: #175CD3;
    font-weight: 600;
}


/* ---------------------------------------------------------
   Register Outage — Fit-to-Viewport Two-Column Layout
   --------------------------------------------------------- */

/* NOTE: 56px matches --header-height from admin.css.
   If your actual admin header height differs, adjust this value. */
.outage-page-fit {
    height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.outage-form-card-fit {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.outage-form-fit {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.outage-split-layout {
    flex: 1;
    display: flex;
    gap: 24px;
    min-height: 0;
    align-items: stretch;
}

.outage-col-left {
    flex: 0 0 45%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.outage-col-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Left column rows */

.outage-row-2col {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr);
    gap: 12px;
    margin-bottom: 4px;
}

.outage-row-2col > .form-group,
.master-form-grid > .form-group {
    min-width: 0;
}

.outage-row-2col > .form-group input[type="datetime-local"] {
    min-width: 0;
    width: 100%;
    font-size: 13px;
}

.outage-form-grid-1col {
    grid-template-columns: 1fr;
}

.outage-row-full {
    display: flex;
    flex-direction: column;
}

.outage-remarks-textarea {
    resize: none;
    flex: 1;
    min-height: 70px;
}

/* Right column stretches to match left column height */

.outage-right-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.outage-select-all-row {
    margin: 10px 0 8px 0;
    font-size: 13px;
    flex-shrink: 0;
}

.selection-scroll-box-lg {
    height: 420px;
}

.outage-scroll-box-fit {
    flex: 1;
    min-height: 0;
    height: auto;
}

/* ---------------- Summary Card ---------------- */

.outage-summary-card {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    background-color: #F3F6FA;
    border: 1px solid #E4E7EC;
    border-radius: 8px;
    padding: 12px 18px;
}

.outage-summary-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.outage-summary-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #5a6b7b;
    white-space: nowrap;
}

.outage-summary-value {
    font-size: 18px;
    font-weight: 700;
    color: #1E3A8A;
}

.outage-summary-input {
    width: 100px;
    min-height: 32px;
    padding: 5px 10px;
    font-weight: 700;
    color: #1E3A8A;
    background-color: #ffffff;
}

.outage-actions-fixed {
    flex-shrink: 0;
    padding-top: 12px;
}


/* ---------------------------------------------------------
   Responsive — Mobile: normal scrolling page, keep 2-column pairing
   down to 480px, then stack to single column
   --------------------------------------------------------- */

@media (max-width: 1024px) {

    .outage-page-fit {
        height: auto;
        overflow: visible;
    }

    .outage-form-card-fit,
    .outage-form-fit {
        overflow: visible;
        min-height: auto;
    }

    .outage-split-layout {
        flex-direction: column;
        gap: 16px;
    }

    .outage-col-left {
        flex: none;
        overflow-y: visible;
        max-height: none;
    }

    .outage-col-right {
        flex: none;
    }

    .outage-row-2col {
        grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr);
        gap: 10px;
    }

    .outage-scroll-box-fit {
        flex: none;
        height: 320px;
    }

    .outage-summary-card {
        gap: 14px;
        padding: 10px 14px;
    }
}

@media (max-width: 700px) {
    .outage-row-2col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {

    .outage-row-2col {
        grid-template-columns: 1fr;
    }

    .outage-summary-card {
        flex-direction: column;
        gap: 10px;
    }

    .outage-summary-input {
        width: 90px;
    }
}

/* ---------------- Outage Status Badges ---------------- */

.outage-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.outage-status-upcoming {
    background-color: #dbeafe;
    color: #1e40af;
}

.outage-status-ongoing {
    background-color: #fef3c7;
    color: #92400e;
}

.outage-status-restored {
    background-color: #d1fae5;
    color: #065f46;
}

.outage-status-cancelled {
    background-color: #fee2e2;
    color: #991b1b;
}

/* ---------------- Cancel Action (danger variant of btn-edit) ---------------- */

.action-danger {
    color: #c0392b;
    border-color: #f0c4bd;
}

.action-danger:hover {
    background-color: #fdecea;
    border-color: #e8a79c;
}

/* ---------------- Compact Actions Column ---------------- */

.col-action-compact {
    width: 48px;
    text-align: center;
}

/* ---------------- Actions Dropdown Menu ---------------- */

.outage-actions-menu {
    position: relative;
    display: inline-block;
}

.outage-actions-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    border-radius: 6px;
    color: #5a6b7b;
    cursor: pointer;
    padding: 0;
}

.outage-actions-trigger:hover {
    background-color: #F3F6FA;
    color: #1E3A8A;
}

.outage-actions-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    min-width: 150px;
    background-color: #ffffff;
    border: 1px solid #E4E7EC;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(15, 32, 51, 0.12);
    z-index: 30;
    overflow: hidden;
}

.outage-actions-dropdown[hidden] {
    display: none;
}

.outage-actions-item {
    display: block;
    width: 100%;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #1f2a37;
    text-decoration: none;
    background: none;
    border: none;
    border-bottom: 1px solid #EEF1F5;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.outage-actions-item:last-child {
    border-bottom: none;
}

.outage-actions-item:hover {
    background-color: #F3F6FA;
}

.outage-actions-item-danger {
    color: #c0392b;
}

/* ---------------- Affected Area Column ---------------- */

.outage-area-more {
    display: inline-block;
    margin-left: 4px;
    font-size: 12px;
    color: #8794a8;
    font-weight: 600;
}

/* ---------------- Details Modal ---------------- */

.outage-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.5);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.outage-modal-overlay.outage-modal-visible {
    display: flex;
}

.outage-modal-box {
    background-color: #ffffff;
    border-radius: 10px;
    width: 100%;
    max-width: 680px;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
}

.outage-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #E4E7EC;
    position: sticky;
    top: 0;
    background-color: #ffffff;
}

.outage-modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1E3A8A;
}

.outage-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: #5a6b7b;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.outage-modal-close:hover {
    background-color: #F3F6FA;
}

.outage-modal-body {
    padding: 20px;
}

.outage-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 20px;
    margin-bottom: 20px;
}

.outage-modal-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.outage-modal-field-full {
    grid-column: 1 / -1;
}

.outage-modal-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #8794a8;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.outage-modal-value {
    font-size: 13.5px;
    color: #1f2a37;
}

.outage-modal-section {
    border-top: 1px solid #E4E7EC;
    padding-top: 16px;
}

.outage-modal-list {
    list-style: none;
    margin: 10px 0 0 0;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
}

.outage-modal-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
    color: #1f2a37;
}

.outage-modal-list li .icon-svg {
    width: 15px;
    height: 15px;
    color: #16a34a;
    flex-shrink: 0;
}

.outage-modal-list-empty {
    color: #8794a8;
    font-size: 13px;
}

@media (max-width: 600px) {
    .outage-modal-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------------- Cancel Outage — Warning Card ---------------- */

.outage-warning-card {
    display: flex;
    gap: 12px;
    background-color: #fff8e6;
    border: 1px solid #f0dca4;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.outage-warning-icon {
    flex-shrink: 0;
    color: #b8860b;
    display: flex;
    align-items: flex-start;
}

.outage-warning-icon .icon-svg {
    width: 20px;
    height: 20px;
}

.outage-warning-title {
    margin: 0 0 4px 0;
    font-size: 13px;
    font-weight: 700;
    color: #7a5c1e;
}

.outage-warning-message {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: #7a5c1e;
}

/* ---------------- Cancel button (danger, matches project palette) ---------------- */

.btn-danger {
    background-color: #c0392b;
    color: #ffffff;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.12s ease;
}

.btn-danger:hover {
    background-color: #a93226;
}

/* ============================================================
   PPA / POWER GENERATION FORM
   ============================================================ */

.ppa-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.ppa-form-grid .form-group {
    margin-bottom: 0;
}

.ppa-form-remarks {
    margin-top: 18px;
}

/* ============================================================
   PPA / POWER GENERATION ALIGNMENT
   ============================================================ */

.ppa-form-remarks {
    text-align: center;
}

.ppa-form-remarks .field-input {
    text-align: left;
}

.selection-table.ppa-table th,
.selection-table.ppa-table td {
    text-align: center;
    vertical-align: middle;
}

@media (max-width: 1200px) {

    .ppa-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 650px) {

    .ppa-form-grid {
        grid-template-columns: 1fr;
    }

}

/* ============================================================
   DG STATUS UPDATE
   ============================================================ */

.dg-status-edit-row td {
    background: #f8fafc;
    padding: 18px 20px;
}

.dg-status-form {
    width: 100%;
}

.dg-status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr auto;
    gap: 16px;
    align-items: end;
}

.dg-status-grid .form-group {
    margin: 0;
}

.dg-status-grid label {
    display: block;
    margin-bottom: 6px;
}

.dg-status-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-bottom: 0;
}

@media (max-width: 1000px) {

    .dg-status-grid {
        grid-template-columns: 1fr 1fr;
    }

}

@media (max-width: 650px) {

    .dg-status-grid {
        grid-template-columns: 1fr;
    }

}

/* ============================================================
   DG ADMIN INLINE EDIT
   ============================================================ */

.dg-edit-row td {
    background: #f8fafc;
    padding: 18px 20px;
}

.dg-edit-form {
    width: 100%;
}

.dg-edit-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: end;
}

.dg-edit-grid .form-group {
    margin: 0;
}

.dg-edit-grid label,
.dg-edit-form > .form-group label {
    display: block;
    margin-bottom: 6px;
}

.dg-edit-form > .form-group {
    margin-top: 16px;
}

.dg-edit-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    margin-top: 16px;
}

@media (max-width: 1000px) {

    .dg-edit-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 650px) {

    .dg-edit-grid {
        grid-template-columns: 1fr;
    }

}

/* ============================================================
   DAILY POWER DRAWAL
   ============================================================ */

.power-drawal-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.power-drawal-toolbar .form-group {
    margin: 0;
    min-width: 280px;
}

.drawal-office-name {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drawal-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.drawal-office-name strong {
    font-size: 17px;
}

.drawal-month-navigation {
    display: flex;
    align-items: center;
    gap: 12px;
}

.drawal-month-navigation .btn-edit {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    text-decoration: none;
}

.drawal-month-title {
    min-width: 150px;
    text-align: center;
    font-size: 18px;
}


/* ============================================================
   CALENDAR
   ============================================================ */

.power-drawal-calendar {
    width: 100%;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e1e6ed;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(15, 35, 70, 0.04);
}


/* ============================================================
   WEEKDAY HEADER
   ============================================================ */

.calendar-weekdays,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekday {
    padding: 12px 8px;
    text-align: center;

    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;

    background: #f7f9fc;

    color: #19376d;

    border-right: 1px solid #e8ecf2;
    border-bottom: 1px solid #dfe5ed;
}

.calendar-weekday:first-child {
    border-top-left-radius: 14px;
}

.calendar-weekday:last-child {
    border-right: none;
    border-top-right-radius: 14px;
}


/* ============================================================
   CALENDAR DAY
   ============================================================ */

.calendar-day {
    min-height: 125px;
    padding: 11px;

    position: relative;

    background: #ffffff;

    border-right: 1px solid #edf0f4;
    border-bottom: 1px solid #edf0f4;

    transition:
        background-color .15s ease,
        box-shadow .15s ease;
}

.calendar-day:nth-child(7n) {
    border-right: none;
}


/* Subtle hover */

.calendar-day:hover {
    background: #fbfcfe;
}


/* ============================================================
   LAST ROW / OUTER CORNERS
   ============================================================ */

.calendar-day:nth-last-child(-n + 7) {
    border-bottom: none;
}


/* ============================================================
   DAY HEADER
   ============================================================ */

.calendar-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;

    margin-bottom: 18px;
}

.calendar-date {
    font-size: 14px;
    font-weight: 700;
    color: #18345f;
}


/* ============================================================
   OTHER MONTH
   ============================================================ */

.calendar-day.other-month {
    background: #fafbfd;
}

.calendar-day.other-month .calendar-date {
    color: #9aa3af;
}

.calendar-day.other-month .drawal-status {
    color: #9ca3af;
}


/* ============================================================
   TODAY
   ============================================================ */

.calendar-day.today {
    background: #fbfcff;
    box-shadow: inset 0 0 0 2px #d7e0ed;
}

.calendar-day.today .calendar-date {
    color: #183b7a;
}

.today-badge {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .04em;
    color: #193b78;
}


/* ============================================================
   DRAWAL VALUE
   ============================================================ */

.drawal-submitted {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-top: 8px;
}

.drawal-submitted strong {
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    color: #183b78;
}

.drawal-submitted span {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
}

.drawal-status {
    margin-top: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
}

.drawal-status.submitted {
    font-weight: 600;
}

.drawal-status.pending {
    font-weight: 600;
    color: #475569;
}

.drawal-status.expired {
    font-size: 10px;
    color: #9aa3af;
}

.drawal-status.today-status,
.drawal-status.future {
    font-size: 11px;
    color: #94a3b8;
}


/* ============================================================
   CALENDAR ACTIONS
   ============================================================ */

.drawal-enter-btn,
.drawal-edit-btn {
    margin-top: 10px;

    border: 0;
    background: transparent;
    padding: 0;

    font: inherit;
    font-size: 11px;
    font-weight: 700;

    cursor: pointer;
    text-decoration: underline;
}


/* ============================================================
   DRAWAL ENTRY FORM
   ============================================================ */

.drawal-entry-form {
    margin-top: 10px;
}

.drawal-input-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.drawal-input-row .field-input {
    min-width: 0;
    width: 100%;
    padding: 7px 8px;
    font-size: 12px;
}

.drawal-input-row .btn-primary {
    white-space: nowrap;
    padding: 7px 10px;
    font-size: 12px;
}

/* ============================================================
   ADMIN INLINE DRAWAL EDIT
   ============================================================ */

.drawal-edit-form {
    margin-top: 10px;
    width: 100%;
}

.drawal-edit-form .drawal-input-row {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
}

.drawal-edit-form .field-input {
    flex: 1;
    min-width: 0;
    width: 100%;
    padding: 7px 7px;
    font-size: 12px;
}

.drawal-update-btn,
.drawal-edit-cancel {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    padding: 0 !important;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 6px;

    font-size: 16px;
    line-height: 1;
}

.drawal-update-btn {
    font-weight: 700;
}

.drawal-edit-cancel {
    border: 1px solid #dfe4eb;
    background: #ffffff;
    font-weight: 600;
    cursor: pointer;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 900px) {

    .power-drawal-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .power-drawal-toolbar .form-group {
        min-width: 0;
        width: 100%;
    }

    .drawal-month-navigation {
        justify-content: center;
    }

    .calendar-day {
        min-height: 110px;
        padding: 8px;
    }

    .drawal-submitted strong {
        font-size: 16px;
    }

}


/* ============================================================
   SMALL MOBILE
   ============================================================ */

@media (max-width: 600px) {

    .power-drawal-calendar {
        border-radius: 10px;
    }

    .calendar-weekday {
        padding: 8px 3px;
        font-size: 9px;
    }

    .calendar-day {
        min-height: 105px;
        padding: 6px;
    }

    .calendar-day-header {
        margin-bottom: 12px;
    }

    .calendar-date {
        font-size: 13px;
    }

    .today-badge {
        display: none;
    }

    .drawal-submitted {
        display: block;
    }

    .drawal-submitted strong {
        display: block;
        font-size: 14px;
    }

    .drawal-submitted span {
        font-size: 9px;
    }

    .drawal-status {
        font-size: 9px;
        line-height: 1.3;
    }

    .drawal-enter-btn,
    .drawal-edit-btn {
        font-size: 9px;
        margin-top: 8px;
    }

    .drawal-input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .drawal-input-row .btn-primary {
        width: 100%;
    }

}


/* ============================================================
   VERY SMALL MOBILE
   ============================================================ */

@media (max-width: 420px) {

    .calendar-weekday {
        font-size: 8px;
    }

    .calendar-day {
        min-height: 95px;
        padding: 5px;
    }

    .calendar-date {
        font-size: 12px;
    }

    .drawal-submitted strong {
        font-size: 12px;
    }

    .drawal-status {
        font-size: 8px;
    }

}

/* ============================================================
   DG AVAILABILITY
   ============================================================ */

.dg-availability-summary {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 14px 18px;
    border: 1px solid #e1e6ed;
    border-radius: 10px;
    background: #f7f9fc;
}

.dg-summary-label {
    display: block;
    margin-bottom: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
}

.dg-availability-summary strong {
    font-size: 22px;
    line-height: 1;
    color: #183b78;
}


/* ============================================================
   HOURLY GRID
   ============================================================ */

.dg-availability-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    border: 1px solid #e1e6ed;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
}


/* ============================================================
   HOUR CELL
   ============================================================ */

.dg-hour-cell {
    min-height: 145px;
    padding: 12px;

    background: #ffffff;

    border-right: 1px solid #edf0f4;
    border-bottom: 1px solid #edf0f4;

    position: relative;

    transition:
        background-color .15s ease,
        box-shadow .15s ease;
}


/* Remove right border from every 6th cell */

.dg-hour-cell:nth-child(6n) {
    border-right: none;
}


/* Remove bottom border from final 6 cells */

.dg-hour-cell:nth-last-child(-n + 6) {
    border-bottom: none;
}


/* Subtle hover */

.dg-hour-cell:hover {
    background: #fbfcfe;
}


/* ============================================================
   HOUR HEADER
   ============================================================ */

.dg-hour-header {
    margin-bottom: 18px;
}

.dg-hour-header strong {
    font-size: 13px;
    font-weight: 700;
    color: #18345f;
}


/* ============================================================
   TOTAL DG
   ============================================================ */

.dg-hour-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;

    margin-bottom: 8px;
}

.dg-hour-total span {
    font-size: 11px;
    color: #64748b;
}

.dg-hour-total strong {
    font-size: 17px;
    font-weight: 700;
    color: #183b78;
}


/* ============================================================
   AVAILABLE DG
   ============================================================ */

.dg-hour-available {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;

    margin-bottom: 8px;
}

.dg-hour-available span {
    font-size: 11px;
    color: #64748b;
}

.dg-hour-available strong {
    font-size: 17px;
    font-weight: 700;
    color: #183b78;
}


/* ============================================================
   STATUS
   ============================================================ */

.dg-hour-status {
    margin-top: 8px;

    font-size: 10px;
    font-weight: 600;
}

.dg-hour-status.recorded {
    color: #64748b;
}

.dg-hour-status.future {
    color: #a0a9b6;
}

.dg-hour-status.locked {
    color: #9aa3af;
}


/* ============================================================
   ENTRY FORM
   ============================================================ */

.dg-availability-entry-form {
    margin-top: 10px;
}

/* ============================================================
   AVAILABILITY ENTRY
   ============================================================ */

.dg-availability-input-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.dg-availability-input-row label {
    display: none;
}

.dg-availability-input-row .field-input {
    flex: 1;
    min-width: 0;
    width: auto;
    padding: 7px 8px;
    font-size: 13px;
}

.dg-availability-input-row .btn-primary {
    flex: 0 0 auto;
    width: auto;
    padding: 7px 12px;
    font-size: 12px;
}

/* ============================================================
   ADMIN EDIT CANCEL BUTTON
   ============================================================ */

.dg-availability-cancel-btn {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;

    padding: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #cbd5e1;
    border-radius: 6px;

    background: #ffffff;
    color: #475569;

    font-size: 20px;
    line-height: 1;

    cursor: pointer;

    transition:
        background-color .15s ease,
        border-color .15s ease,
        color .15s ease;
}

.dg-availability-cancel-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #1e293b;
}

/* ============================================================
   MOBILE / TABLET
   ============================================================ */

@media (max-width: 1100px) {

    .dg-availability-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .dg-hour-cell:nth-child(6n) {
        border-right: 1px solid #edf0f4;
    }

    .dg-hour-cell:nth-child(4n) {
        border-right: none;
    }

    .dg-hour-cell:nth-last-child(-n + 6) {
        border-bottom: 1px solid #edf0f4;
    }

    .dg-hour-cell:nth-last-child(-n + 4) {
        border-bottom: none;
    }

}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 700px) {

    .dg-availability-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-radius: 10px;
    }

    .dg-hour-cell {
        min-height: 135px;
        padding: 9px;
    }

    .dg-hour-cell:nth-child(4n) {
        border-right: 1px solid #edf0f4;
    }

    .dg-hour-cell:nth-child(2n) {
        border-right: none;
    }

    .dg-hour-cell:nth-last-child(-n + 4) {
        border-bottom: 1px solid #edf0f4;
    }

    .dg-hour-cell:nth-last-child(-n + 2) {
        border-bottom: none;
    }

    .dg-hour-header {
        margin-bottom: 14px;
    }

    .dg-hour-header strong {
        font-size: 12px;
    }

    .dg-hour-total strong,
    .dg-hour-available strong {
        font-size: 15px;
    }

}


/* ============================================================
   VERY SMALL MOBILE
   ============================================================ */

@media (max-width: 420px) {

    .dg-availability-summary {
        padding: 11px 13px;
    }

    .dg-availability-summary strong {
        font-size: 19px;
    }

    .dg-hour-cell {
        min-height: 125px;
        padding: 7px;
    }

    .dg-hour-header strong {
        font-size: 10px;
    }

    .dg-hour-total span,
    .dg-hour-available span {
        font-size: 9px;
    }

    .dg-hour-total strong,
    .dg-hour-available strong {
        font-size: 14px;
    }

    .dg-hour-status {
        font-size: 9px;
    }

    .dg-availability-input-row label {
        font-size: 9px;
    }

    .dg-availability-input-row .field-input {
        padding: 6px;
        font-size: 12px;
    }

}

/* ================================================================
   Report Multi Select Dropdown
================================================================ */

.report-multiselect {
    position: relative;
    width: 240px;
}

.report-multiselect-button {
    width: 100%;
    min-height: 40px;
    padding: 8px 36px 8px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background-color: #ffffff;
    color: #1f2a37;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    position: relative;
}

.report-multiselect-button::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid #667085;
    border-bottom: 1.5px solid #667085;
    transform: translateY(-65%) rotate(45deg);
}

.report-multiselect-button:hover {
    border-color: #98a2b3;
}

.report-multiselect-button:focus {
    outline: none;
    border-color: #1E3A8A;
    box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.10);
}

.report-multiselect-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    min-width: 240px;
    max-height: 280px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    box-shadow: 0 8px 20px rgba(15, 32, 51, 0.12);
    z-index: 1000;
    padding: 6px;
}

.report-multiselect.open .report-multiselect-menu {
    display: block;
}

.report-multiselect-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 9px;
    border-radius: 5px;
    font-size: 13px;
    color: #344054;
    cursor: pointer;
    margin: 0;
}

.report-multiselect-option:hover {
    background-color: #f2f4f7;
}

.report-multiselect-option input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    cursor: pointer;
    accent-color: #1E3A8A;
}

.report-multiselect-select-all {
    font-weight: 600;
    color: #1E3A8A;
    border-bottom: 1px solid #eaecf0;
    border-radius: 0;
    margin-bottom: 4px;
    padding-bottom: 10px;
}

.report-multiselect-empty {
    padding: 10px;
    font-size: 12px;
    color: #98a2b3;
    text-align: center;
}

.report-filter-row .report-multiselect {
    flex: 0 0 auto;
}

@media (max-width: 1200px) {
    .report-multiselect {
        width: 220px;
    }
}

@media (max-width: 768px) {
    .report-multiselect {
        width: 100%;
    }

    .report-filter-row .report-multiselect {
        width: 100%;
    }

    .report-multiselect-menu {
        position: absolute;
        max-height: 240px;
    }
}

/* ================================================================
   Report Filter Layout
================================================================ */

.report-filter-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 16px;
}


/* Date fields */

.report-filter-row .report-filter-compact {
    flex: 0 0 auto;
    width: 150px;
}


/* Multi-select fields */

.report-filter-row .report-filter-compact:has(.report-multiselect) {
    flex: 0 0 auto;
    width: 200px;
}


/* Power Plant gets slightly more room */

.report-filter-row .report-filter-compact:has(
    .report-multiselect
) {
    width: 200px;
}


/* Keep labels on one line */

.report-filter-row .form-group > label {
    white-space: nowrap;
}


/* Actions stay on the same row */

.report-filter-row .report-filter-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    margin-left: auto;
}


/* Remove spacer */

.report-filter-row .report-filter-actions-spacer {
    display: none;
}


/* Buttons */

.report-filter-row .action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}


/* Multi-select width */

.report-multiselect {
    width: 200px;
}

.report-multiselect-menu {
    min-width: 200px;
}


/* ================================================================
   Responsive
================================================================ */

@media (max-width: 1200px) {

    .report-filter-row {
        gap: 12px;
    }

    .report-filter-row .report-filter-compact {
        width: 140px;
    }

    .report-filter-row .report-filter-compact:has(
        .report-multiselect
    ) {
        width: 180px;
    }

    .report-multiselect {
        width: 180px;
    }

    .report-multiselect-menu {
        min-width: 180px;
    }
}


@media (max-width: 1000px) {

    .report-filter-row {
        flex-wrap: wrap;
    }

    .report-filter-row .report-filter-actions {
        margin-left: 0;
    }

}


@media (max-width: 768px) {

    .report-filter-row {
        flex-wrap: wrap;
    }

    .report-filter-row .report-filter-compact {
        width: 180px;
    }

    .report-filter-row .report-filter-compact:has(
        .report-multiselect
    ) {
        width: 200px;
    }

    .report-multiselect {
        width: 100%;
    }

}


@media (max-width: 600px) {

    .report-filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .report-filter-row .report-filter-compact,
    .report-filter-row .report-filter-compact:has(
        .report-multiselect
    ) {
        width: 100%;
    }

    .report-multiselect {
        width: 100%;
    }

    .report-filter-row .report-filter-actions {
        width: 100%;
        margin-left: 0;
    }

}

/* ================================================================
   Fix: Make multiselect buttons match .field-input exactly
================================================================ */

.report-multiselect-button {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;

    padding: 8px 12px;
    min-height: 38px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    color: #1f2a37;
    text-align: left;

    background-color: #ffffff;
    border: 1px solid #d8dee5;
    border-radius: 6px;

    cursor: pointer;
    line-height: 1.3;
}

.report-multiselect-button:hover {
    border-color: #b8c2d0;
}

.report-multiselect-button:focus,
.report-multiselect-button:focus-visible {
    outline: none;
    border-color: #1E3A8A;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

/* Placeholder-style text (e.g. "No Options" / "Select") should look
   the same as native input placeholders, not full black text */
.report-multiselect-button {
    color: #8a94a3;
}

.report-multiselect-button[data-has-selection="true"] {
    color: #1f2a37;
}

/* Dropdown caret, consistently sized and positioned */
.report-multiselect-button::after {
    content: "";
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-right: 2px solid #6b7280;
    border-bottom: 2px solid #6b7280;
    transform: rotate(45deg);
    margin-top: -4px;
}

/* Make every filter box (date + multiselect) exactly the same height,
   regardless of internal markup differences */
.report-filter-row .form-group input.field-input,
.report-filter-row .report-multiselect-button {
    height: 38px;
}

/* Ensure all filter groups sit on the same baseline */
.report-filter-row .form-group {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.report-filter-row .form-group > label {
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #1E3A8A;
}

/* ================================================================
   REPORT PRINT / PDF
================================================================ */

@media print {

    /*
    |--------------------------------------------------------------------------
    | A4 Landscape
    |--------------------------------------------------------------------------
    */

    @page {
        size: A4 landscape;
        margin: 10mm;
    }


    /*
    |--------------------------------------------------------------------------
    | Hide the complete application
    |--------------------------------------------------------------------------
    |
    | Only the report-print-area will remain visible.
    |
    */

    body * {
        visibility: hidden;
    }


    /*
    |--------------------------------------------------------------------------
    | Show Printable Report
    |--------------------------------------------------------------------------
    */

    .report-print-area,
    .report-print-area * {
        visibility: visible;
    }


    /*
    |--------------------------------------------------------------------------
    | Position Report At Page Origin
    |--------------------------------------------------------------------------
    */

    .report-print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        background: #ffffff;
    }


    /*
    |--------------------------------------------------------------------------
    | Remove Screen Styling
    |--------------------------------------------------------------------------
    */

    .report-print-area .master-table-wrapper {
        width: 100%;
        max-width: none;
        overflow: visible;
        border: none;
        box-shadow: none;
    }


    /*
    |--------------------------------------------------------------------------
    | Report Header
    |--------------------------------------------------------------------------
    */

    .report-print-header {
        width: 100%;
        margin-bottom: 8px;
        text-align: center;
    }


    .report-print-header h1,
    .report-print-header h2,
    .report-print-header h3 {
        margin: 0;
    }


    /*
    |--------------------------------------------------------------------------
    | Report Table
    |--------------------------------------------------------------------------
    */

    .report-print-area table {
        width: 100%;
        border-collapse: collapse;
        table-layout: auto;
    }


    .report-print-area th,
    .report-print-area td {
        border: 1px solid #333333;
        padding: 5px 6px;
        font-size: 9px;
        line-height: 1.25;
    }


    .report-print-area th {
        font-weight: 700;
    }


    /*
    |--------------------------------------------------------------------------
    | Prevent Rows From Splitting
    |--------------------------------------------------------------------------
    */

    .report-print-area tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }


    /*
    |--------------------------------------------------------------------------
    | Table Header Repeats On Every Page
    |--------------------------------------------------------------------------
    */

    .report-print-area thead {
        display: table-header-group;
    }


    /*
    |--------------------------------------------------------------------------
    | Report Summary
    |--------------------------------------------------------------------------
    */

    .report-print-area .report-summary-line {
        margin-top: 8px;
        font-size: 10px;
    }


    /*
    |--------------------------------------------------------------------------
    | Hide Screen-only Elements
    |--------------------------------------------------------------------------
    */

    .no-print {
        display: none !important;
    }


    /*
    |--------------------------------------------------------------------------
    | Remove Backgrounds / Shadows
    |--------------------------------------------------------------------------
    */

    .report-print-area,
    .report-print-area * {
        box-shadow: none !important;
    }

}

/* ================================================================
   DG Availability - Hourly Entry Fields
================================================================ */

.dg-availability-input-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.dg-availability-input-group {
    width: 100%;
    min-width: 0;
}

.dg-availability-input-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: #667085;
}

.dg-availability-input-group .field-input {
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.dg-availability-input-row .btn-primary {
    width: 100%;
    box-sizing: border-box;
    margin-top: 2px;
}

.dg-availability-input-row .dg-availability-cancel-btn {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

/* ================================================================
   Power Availability - Compact Hour Card
================================================================ */

.dg-hour-power-availability {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 6px;
    white-space: nowrap;
}

.dg-hour-power-availability span {
    font-size: 11px;
    color: #667085;
}

.dg-hour-power-availability strong {
    font-size: 14px;
    font-weight: 600;
    color: #1E3A8A;
}

/* ================================================================
   POWER AVAILABILITY REPORT
   Table Presentation
================================================================ */

.power-availability-report-table th,
.power-availability-report-table td {
    vertical-align: middle;
}


/* ----------------------------------------------------------------
   Contracted Capacity
---------------------------------------------------------------- */

.power-availability-report-table .report-capacity-cell {
    text-align: center !important;
    vertical-align: middle;
    font-weight: 500;
    white-space: nowrap;
}


/* ----------------------------------------------------------------
   Particulars
---------------------------------------------------------------- */

.power-availability-report-table .report-particular-total-dg,
.power-availability-report-table .report-particular-available-dg,
.power-availability-report-table .report-particular-power-availability {
    text-align: left !important;
    padding-left: 18px;
    font-weight: 500;
}


/* ----------------------------------------------------------------
   Subtle Row Backgrounds
---------------------------------------------------------------- */

.power-availability-report-table
.report-particular-total-dg {
    background-color: #f8fafc;
}

.power-availability-report-table
.report-particular-available-dg {
    background-color: #f4f8fb;
}

.power-availability-report-table
.report-particular-power-availability {
    background-color: #f6faf7;
}


/* ----------------------------------------------------------------
   Complete Row Shading
---------------------------------------------------------------- */

.power-availability-report-table
.report-row-total-dg td {
    background-color: #fbfcfd;
}

.power-availability-report-table
.report-row-available-dg td {
    background-color: #f8fafc;
}

.power-availability-report-table
.report-row-power-availability td {
    background-color: #fafcfb;
}


/* ----------------------------------------------------------------
   Particular Labels
---------------------------------------------------------------- */

.power-availability-report-table
.report-particular-total-dg,
.power-availability-report-table
.report-particular-available-dg,
.power-availability-report-table
.report-particular-power-availability {
    font-weight: 600;
}


/* ----------------------------------------------------------------
   Station Block Separation
---------------------------------------------------------------- */

.power-availability-report-table
.report-row-total-dg {
    border-top: 2px solid #d9e0e7;
}

.power-availability-report-table
.report-row-power-availability {
    border-bottom: 1px solid #d9e0e7;
}


/* ----------------------------------------------------------------
   Station Name
---------------------------------------------------------------- */

.power-availability-report-table
.report-station-cell {
    text-align: center !important;
    vertical-align: middle;
    font-weight: 500;
    line-height: 1.5;
}


/* ----------------------------------------------------------------
   Sl. No.
---------------------------------------------------------------- */

.power-availability-report-table
.report-sl-no-cell {
    text-align: center !important;
    vertical-align: middle;
}


/* ----------------------------------------------------------------
   Hourly Values
---------------------------------------------------------------- */

.power-availability-report-table
.report-hourly-cell {
    text-align: center !important;
    vertical-align: middle;
}


/* ----------------------------------------------------------------
   Total Section
---------------------------------------------------------------- */

.power-availability-report-table tfoot th {
    background-color: #eef2f6;
    font-weight: 700;
    text-align: center;
    vertical-align: middle;
}

.power-availability-report-table
.report-total-label {
    text-align: left !important;
    padding-left: 18px;
}


/* ----------------------------------------------------------------
   Report Table Header Alignment
---------------------------------------------------------------- */

.power-availability-report-table thead th {
    text-align: center;
    vertical-align: middle;
}

/* ================================================================
   POWER AVAILABILITY REPORT
   COLUMN SIZING & ALIGNMENT
================================================================ */

/* Sl. No. - keep compact */
.power-availability-report-table .report-sl-no-cell {
    width: 42px;
    min-width: 42px;
    max-width: 42px;
    text-align: center !important;
}


/* Station - give enough room for long plant names */
.power-availability-report-table .report-station-cell {
    width: 125px;
    min-width: 125px;
    max-width: 125px;
    text-align: left !important;
    padding-left: 10px;
    padding-right: 10px;
    vertical-align: middle;
    line-height: 1.4;
}


/* Contracted Capacity - centered */
.power-availability-report-table .report-capacity-cell {
    width: 90px;
    min-width: 90px;
    max-width: 90px;
    text-align: center !important;
    vertical-align: middle;
}


/* Particulars - left aligned */
.power-availability-report-table .report-particular-total-dg,
.power-availability-report-table .report-particular-available-dg,
.power-availability-report-table .report-particular-power-availability {
    width: 150px;
    min-width: 150px;
    text-align: left !important;
    padding-left: 12px;
    white-space: nowrap;
}


/* Particulars heading */
.power-availability-report-table thead th:nth-child(4) {
    text-align: left !important;
    padding-left: 12px;
}

/* ================================================================
   POWER AVAILABILITY REPORT
   Total Row Labels - Left Aligned
================================================================ */

.power-availability-report-table tfoot .report-total-label {
    text-align: left !important;
    padding-left: 12px;
    vertical-align: middle;
}

/* ================================================================
   HOURLY FEEDER LOAD
================================================================ */

.feeder-load-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e4e7ec;
}

.feeder-load-summary > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feeder-load-summary-label {
    font-size: 12px;
    color: #667085;
}

.feeder-load-summary strong {
    font-size: 15px;
    color: #1d2939;
}


/* ================================================================
   GRID
================================================================ */

.feeder-load-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}


/* ================================================================
   HOUR CARD
================================================================ */

.feeder-load-hour-card {
    min-width: 0;
    min-height: 150px;
    padding: 12px;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: #ffffff;
    text-align: center;
}

.feeder-load-hour-card.pending {
    border-color: #e8c46a;
}

.feeder-load-hour-card.current {
    border-color: #9ab7df;
}

.feeder-load-hour-card.recorded {
    border-color: #b7d8c0;
}

.feeder-load-hour-card.future {
    background: #f8f9fa;
    color: #98a2b3;
}


/* ================================================================
   HOUR
================================================================ */

.feeder-load-hour-header {
    margin-bottom: 8px;
    font-size: 13px;
    color: #1d2939;
}


/* ================================================================
   RECORDED VALUE
================================================================ */

.feeder-load-recorded-value {
    margin: 12px 0 5px;
}

.feeder-load-recorded-value strong {
    font-size: 21px;
    color: #163f82;
}

.feeder-load-recorded-value span {
    margin-left: 3px;
    font-size: 12px;
    color: #667085;
}


/* ================================================================
   ENTER / UPDATE
================================================================ */

.feeder-load-enter-btn,
.feeder-load-edit-btn {
    margin-top: 12px;
}

.feeder-load-entry-form,
.feeder-load-edit-form {
    margin-top: 10px;
}

.feeder-load-entry-row,
.feeder-load-edit-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.feeder-load-entry-row .field-input,
.feeder-load-edit-row .field-input {
    min-width: 0;
    width: 100%;
}

.feeder-load-entry-row .btn-primary,
.feeder-load-edit-row .btn-primary {
    flex-shrink: 0;
}


/* ================================================================
   CANCEL
================================================================ */

.feeder-load-cancel-btn {
    border: 0;
    background: transparent;
    color: #667085;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 6px;
}


/* ================================================================
   RESPONSIVE
================================================================ */

@media (max-width: 1200px) {

    .feeder-load-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

}


@media (max-width: 768px) {

    .feeder-load-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .feeder-load-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 480px) {

    .feeder-load-grid {
        grid-template-columns: 1fr;
    }

}

/* ================================================================
   FEEDER LOAD FILTERS
================================================================ */

.feeder-load-filters {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 20px;
}

.feeder-load-filters .form-group {
    flex: 1;
}

.feeder-load-filters .form-group:first-child {
    flex: 0 0 220px;
}


/* Recorded count */

.feeder-load-recorded-count {
    text-align: right;
}


/* Responsive */

@media (max-width: 900px) {

    .feeder-load-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .feeder-load-filters .form-group:first-child {
        flex: 1;
    }

    .feeder-load-recorded-count {
        text-align: left;
    }

}

/* ================================================================
   FEEDER LOAD FILTERS
================================================================ */

.feeder-load-filters {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 20px;
}

.feeder-load-office-field {
    width: 280px;
    flex: 0 0 280px;
}

.feeder-load-feeder-field {
    width: 420px;
    flex: 0 0 420px;
}


/* Responsive */

@media (max-width: 900px) {

    .feeder-load-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .feeder-load-office-field,
    .feeder-load-feeder-field {
        width: 100%;
        flex: 1;
    }

}

/* ================================================================
   FEEDER LOAD SUMMARY
================================================================ */

.feeder-load-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px;
    column-gap: 40px;
    align-items: end;

    margin-bottom: 20px;
    padding: 14px 20px;
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
}

.feeder-load-summary > div {
    min-width: 0;
}

.feeder-load-summary-label {
    display: block;
    margin-bottom: 4px;

    font-size: 12px;
    font-weight: 500;
    color: #667085;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.feeder-load-summary strong {
    display: block;

    font-size: 24px;
    line-height: 1.2;
    color: #174582;
}

.feeder-load-recorded-count {
    text-align: right;
}

.feeder-load-recorded-count strong {
    white-space: nowrap;
}


/* Responsive */

@media (max-width: 700px) {

    .feeder-load-summary {
        grid-template-columns: 1fr;
        row-gap: 12px;
    }

    .feeder-load-recorded-count {
        text-align: left;
    }

}

/* ================================================================
   FEEDER LOAD DATE NAVIGATION
================================================================ */

.feeder-load-date-navigation {
    display: flex;
    align-items: center;
    gap: 14px;
}


/* ================================================================
   CALENDAR BUTTON
================================================================ */

.feeder-load-calendar-picker {
    position: relative;
}

.feeder-load-calendar-picker summary {
    list-style: none;
    cursor: pointer;

    min-width: 190px;

    text-align: center;

    font-size: 20px;
    font-weight: 700;
    color: #1d2939;

    padding: 10px 14px;

    border-radius: 8px;
}

.feeder-load-calendar-picker summary::-webkit-details-marker {
    display: none;
}

.feeder-load-calendar-picker summary:hover {
    background: #f5f7fa;
}


/* ================================================================
   CALENDAR POPUP
================================================================ */

.feeder-load-calendar-popup {
    position: absolute;

    top: calc(100% + 8px);
    right: 0;

    width: 320px;

    padding: 16px;

    background: #ffffff;

    border: 1px solid #dbe3ee;
    border-radius: 10px;

    box-shadow:
        0 10px 30px rgba(16, 24, 40, 0.12);

    z-index: 100;
}


/* ================================================================
   MONTH
================================================================ */

.feeder-load-calendar-title {
    margin-bottom: 14px;

    text-align: center;

    font-size: 16px;
    font-weight: 700;

    color: #163f82;
}


/* ================================================================
   WEEKDAYS
================================================================ */

.feeder-load-calendar-weekdays,
.feeder-load-calendar-days {
    display: grid;

    grid-template-columns:
        repeat(7, 1fr);

    gap: 5px;
}

.feeder-load-calendar-weekdays {
    margin-bottom: 5px;
}

.feeder-load-calendar-weekdays span {
    text-align: center;

    font-size: 11px;
    font-weight: 600;

    color: #667085;
}


/* ================================================================
   DATE
================================================================ */

.feeder-load-calendar-day {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    margin: auto;

    border-radius: 50%;

    text-decoration: none;

    font-size: 12px;
    font-weight: 600;

    color: #344054;
}


/* ================================================================
   COMPLETE
================================================================ */

.feeder-load-calendar-day.complete {
    background: #d1fadf;
    color: #027a48;
}


/* ================================================================
   PENDING
================================================================ */

.feeder-load-calendar-day.pending {
    background: #fef0c7;
    color: #b54708;
}


/* ================================================================
   FUTURE
================================================================ */

.feeder-load-calendar-day.future {
    background: #f2f4f7;
    color: #98a2b3;
}


/* ================================================================
   SELECTED
================================================================ */

.feeder-load-calendar-day.selected {
    box-shadow:
        0 0 0 2px #174582 inset;
}


/* ================================================================
   TODAY
================================================================ */

.feeder-load-calendar-day.today {
    font-weight: 800;
}


/* ================================================================
   EMPTY CELLS
================================================================ */

.feeder-load-calendar-empty {
    width: 34px;
    height: 34px;
}


/* ================================================================
   LEGEND
================================================================ */

.feeder-load-calendar-legend {
    display: flex;

    justify-content: center;

    gap: 12px;

    margin-top: 14px;
    padding-top: 12px;

    border-top: 1px solid #eaecf0;

    font-size: 10px;
    color: #667085;
}

.feeder-load-calendar-legend span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.feeder-load-calendar-legend i {
    width: 8px;
    height: 8px;

    border-radius: 50%;
}

.feeder-load-calendar-legend i.complete {
    background: #12b76a;
}

.feeder-load-calendar-legend i.pending {
    background: #f79009;
}

.feeder-load-calendar-legend i.future {
    background: #98a2b3;
}


/* ================================================================
   RESPONSIVE
================================================================ */

@media (max-width: 600px) {

    .feeder-load-calendar-popup {
        right: auto;
        left: 50%;

        transform: translateX(-50%);

        width: 300px;
    }

}

.feeder-load-calendar-picker summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.feeder-load-calendar-picker summary small {
    font-size: 10px;
    font-weight: 500;
    color: #667085;
}


/* Ensure fields marked hidden stay hidden */
[hidden] {
    display: none !important;
}
