/* =========================================================
   Public Homepage — Power Outage & Complaint Management System
   Electricity Department, Andaman & Nicobar Administration
   ========================================================= */

:root {
    --pd-primary: #1E3A8A;
    --pd-primary-dark: #16296b;
    --pd-primary-light: #eaf1fd;
    --pd-bg: #F3F6FA;
    --pd-white: #ffffff;
    --pd-border: #E4E7EC;
    --pd-text: #1f2a37;
    --pd-text-muted: #5a6b7b;
    --pd-success: #065f46;
    --pd-success-bg: #d1fae5;
    --pd-warning: #92400e;
    --pd-warning-bg: #fef3c7;
    --pd-danger: #991b1b;
    --pd-danger-bg: #fee2e2;
    --pd-shadow: 0 1px 3px rgba(15, 32, 51, 0.08), 0 1px 2px rgba(15, 32, 51, 0.06);
    --pd-shadow-lg: 0 4px 16px rgba(15, 32, 51, 0.10);
    --pd-radius: 10px;
    --pd-radius-sm: 6px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background-color: var(--pd-bg);
    color: var(--pd-text);
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

.pd-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

.pd-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ---------------- Header ---------------- */

.pd-header {
    background-color: var(--pd-white);
    border-bottom: 3px solid var(--pd-primary);
}

.pd-header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

.pd-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pd-emblem {
    width: 46px;
    height: 46px;
    object-fit: contain;
    flex-shrink: 0;
}

.pd-header-org {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--pd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 2px 0;
}

.pd-header-dept {
    font-size: 19px;
    font-weight: 700;
    color: var(--pd-primary);
    margin: 0;
}

.pd-header-system {
    font-size: 12px;
    font-weight: 500;
    color: var(--pd-text);
    margin: 2px 0 0 0;
}

.pd-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.pd-header-datetime {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 12px;
    color: var(--pd-text-muted);
    line-height: 1.3;
}

.pd-header-date {
    font-weight: 600;
    color: var(--pd-text);
}

.pd-lang-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: var(--pd-white);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius-sm);
    padding: 7px 11px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--pd-text-muted);
    cursor: pointer;
}

.pd-lang-btn:hover {
    background-color: var(--pd-bg);
}

.pd-lang-btn .pd-icon {
    width: 15px;
    height: 15px;
}

.pd-login-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background-color: var(--pd-primary);
    color: var(--pd-white);
    border-radius: var(--pd-radius-sm);
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    transition: background-color 0.15s ease;
}

.pd-login-btn:hover {
    background-color: var(--pd-primary-dark);
}

.pd-login-btn .pd-icon {
    width: 15px;
    height: 15px;
}

/* ---------------- Hero ---------------- */

.pd-hero {
    background: linear-gradient(135deg, var(--pd-primary) 0%, var(--pd-primary-dark) 100%);
    padding: 64px 20px;
    text-align: center;
}

.pd-hero-inner {
    max-width: 760px;
    margin: 0 auto;
}

.pd-hero-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--pd-white);
    margin: 0 0 14px 0;
}

.pd-hero-subtitle {
    font-size: 15.5px;
    color: #d6e0f5;
    margin: 0 0 32px 0;
}

.pd-hero-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.pd-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: var(--pd-radius-sm);
    font-size: 14.5px;
    font-weight: 700;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.pd-btn:hover {
    transform: translateY(-2px);
}

.pd-btn-primary {
    background-color: var(--pd-white);
    color: var(--pd-primary);
}

.pd-btn-primary:hover {
    background-color: #eef2fb;
}

.pd-btn-secondary {
    background-color: rgba(255, 255, 255, 0.12);
    color: var(--pd-white);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.pd-btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* ---------------- Sections (general) ---------------- */

.pd-section {
    padding: 48px 0;
}

.pd-section-alt {
    background-color: var(--pd-white);
}

.pd-section-title {
    font-size: 21px;
    font-weight: 700;
    color: var(--pd-text);
    margin: 0 0 24px 0;
}

.pd-empty-state {
    text-align: center;
    color: var(--pd-text-muted);
    font-size: 13.5px;
    padding: 24px 0;
}

/* ---------------- Live Statistics ---------------- */

.pd-stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.pd-stat-card {
    background-color: var(--pd-white);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    box-shadow: var(--pd-shadow);
    padding: 20px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.pd-stat-card:hover {
    box-shadow: var(--pd-shadow-lg);
    transform: translateY(-3px);
}

.pd-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-stat-icon .pd-icon {
    width: 20px;
    height: 20px;
}

.pd-stat-icon-primary {
    background-color: var(--pd-primary-light);
    color: var(--pd-primary);
}

.pd-stat-icon-warning {
    background-color: var(--pd-warning-bg);
    color: var(--pd-warning);
}

.pd-stat-icon-success {
    background-color: var(--pd-success-bg);
    color: var(--pd-success);
}

.pd-stat-icon-info {
    background-color: #dbeafe;
    color: #1e40af;
}

.pd-stat-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--pd-text);
}

.pd-stat-label {
    font-size: 12.5px;
    color: var(--pd-text-muted);
    font-weight: 600;
}

/* ---------------- Table (Current Outages) ---------------- */

.pd-table-wrapper {
    background-color: var(--pd-white);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    box-shadow: var(--pd-shadow);
    overflow-x: auto;
}

.pd-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.pd-table thead {
    background-color: var(--pd-bg);
}

.pd-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--pd-text-muted);
    border-bottom: 1px solid var(--pd-border);
}

.pd-table td {
    padding: 12px 16px;
    font-size: 13.5px;
    border-bottom: 1px solid #EEF1F5;
}

.pd-table tbody tr:last-child td {
    border-bottom: none;
}

.pd-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.pd-status-in-progress {
    background-color: var(--pd-warning-bg);
    color: var(--pd-warning);
}

.pd-status-delayed {
    background-color: var(--pd-danger-bg);
    color: var(--pd-danger);
}

.pd-status-resolved {
    background-color: var(--pd-success-bg);
    color: var(--pd-success);
}

/* ---------------- Planned Shutdowns ---------------- */

.pd-shutdown-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.pd-shutdown-card {
    background-color: var(--pd-white);
    border: 1px solid var(--pd-border);
    border-left: 4px solid var(--pd-primary);
    border-radius: var(--pd-radius);
    box-shadow: var(--pd-shadow);
    padding: 18px;
}

.pd-shutdown-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--pd-primary);
    margin-bottom: 10px;
}

.pd-shutdown-date .pd-icon {
    width: 15px;
    height: 15px;
}

.pd-shutdown-area {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--pd-text);
    margin: 0 0 6px 0;
}

.pd-shutdown-time {
    font-size: 13px;
    color: var(--pd-text-muted);
    margin: 0 0 4px 0;
}

.pd-shutdown-reason {
    font-size: 13px;
    color: var(--pd-text);
    margin: 0;
}

/* ---------------- Quick Services ---------------- */

.pd-services-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.pd-service-card {
    background-color: var(--pd-white);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    box-shadow: var(--pd-shadow);
    padding: 24px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.pd-service-card:hover {
    box-shadow: var(--pd-shadow-lg);
    transform: translateY(-3px);
}

.pd-service-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--pd-primary-light);
    color: var(--pd-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-service-icon .pd-icon {
    width: 22px;
    height: 22px;
}

.pd-service-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--pd-text);
}

/* ---------------- Emergency Contact ---------------- */

.pd-emergency {
    background-color: var(--pd-warning-bg);
    border-top: 1px solid #f0dca4;
    border-bottom: 1px solid #f0dca4;
    padding: 28px 0;
}

.pd-emergency-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.pd-emergency-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--pd-white);
    color: var(--pd-warning);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pd-emergency-icon .pd-icon {
    width: 26px;
    height: 26px;
}

.pd-emergency-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--pd-text);
    margin: 0 0 8px 0;
}

.pd-emergency-details {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
    font-size: 13px;
    color: var(--pd-text);
}

.pd-emergency-details strong {
    color: var(--pd-warning);
}

/* ---------------- Announcements ---------------- */

.pd-announcements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.pd-announcement-card {
    background-color: var(--pd-white);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    box-shadow: var(--pd-shadow);
    padding: 20px;
}

.pd-announcement-date {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--pd-primary);
    background-color: var(--pd-primary-light);
    padding: 3px 9px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.pd-announcement-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--pd-text);
    margin: 0 0 8px 0;
}

.pd-announcement-summary {
    font-size: 13px;
    color: var(--pd-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ---------------- Safety Tips ---------------- */

.pd-safety-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.pd-safety-card {
    background-color: var(--pd-white);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    box-shadow: var(--pd-shadow);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pd-safety-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--pd-primary);
    color: var(--pd-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.pd-safety-card p {
    font-size: 13px;
    color: var(--pd-text);
    margin: 0;
    line-height: 1.5;
}

/* ---------------- Footer ---------------- */

.pd-footer {
    background-color: var(--pd-primary-dark);
    color: #d6e0f5;
    padding: 32px 0;
}

.pd-footer-inner {
    text-align: center;
}

.pd-footer-dept {
    font-size: 16px;
    font-weight: 700;
    color: var(--pd-white);
    margin: 0 0 2px 0;
}

.pd-footer-org,
.pd-footer-system {
    font-size: 12.5px;
    margin: 0 0 2px 0;
}

.pd-footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.pd-footer-links a {
    font-size: 12.5px;
    color: #d6e0f5;
}

.pd-footer-links a:hover {
    color: var(--pd-white);
    text-decoration: underline;
}

.pd-footer-copyright {
    font-size: 11.5px;
    color: #a8bce0;
    margin: 0;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1024px) {
    .pd-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pd-services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pd-shutdown-grid,
    .pd-announcements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .pd-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .pd-header-right {
        width: 100%;
        justify-content: space-between;
    }

    .pd-hero-title {
        font-size: 24px;
    }

    .pd-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pd-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pd-shutdown-grid,
    .pd-announcements-grid {
        grid-template-columns: 1fr;
    }

    .pd-emergency-inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .pd-stats-grid,
    .pd-services-grid {
        grid-template-columns: 1fr;
    }

    .pd-hero {
        padding: 44px 16px;
    }

    .pd-hero-actions {
        flex-direction: column;
    }
}

/* ===================== PLANNED SHUTDOWN LIST ===================== */

.pd-shutdown-list {
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

.pd-shutdown-row {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 16px 20px;
    display: grid;
    grid-template-columns: 150px 1fr 180px 30px;
    align-items: center;
    gap: 20px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
    font: inherit;
    color: inherit;
}

.pd-shutdown-row:last-child {
    border-bottom: 0;
}

.pd-shutdown-row:hover {
    background: #f8fafc;
}

.pd-shutdown-row-date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #334155;
}

.pd-shutdown-row-date .pd-icon {
    width: 19px;
    height: 19px;
}

.pd-shutdown-row-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pd-shutdown-row-main strong {
    font-size: 15px;
    color: #0f172a;
}

.pd-shutdown-row-main span {
    font-size: 13px;
    color: #64748b;
}

.pd-shutdown-row-time {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.pd-shutdown-row-arrow {
    display: flex;
    justify-content: flex-end;
    color: #64748b;
}

.pd-shutdown-row-arrow .pd-icon {
    width: 20px;
    height: 20px;
}


/* ===================== PLANNED SHUTDOWN MODAL ===================== */

.pd-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pd-modal[hidden] {
    display: none;
}

.pd-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.pd-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
}

.pd-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.pd-modal-close:hover {
    background: #e2e8f0;
}

.pd-modal-close .pd-icon {
    width: 18px;
    height: 18px;
}

.pd-modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 24px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.pd-modal-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #eff6ff;
    color: #1d4ed8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pd-modal-icon .pd-icon {
    width: 23px;
    height: 23px;
}

.pd-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #0f172a;
}

.pd-modal-header p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #64748b;
}

.pd-modal-body {
    padding: 22px 24px 26px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.pd-modal-detail {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pd-modal-detail-full {
    grid-column: 1 / -1;
}

.pd-modal-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pd-modal-detail strong {
    font-size: 15px;
    color: #1e293b;
    font-weight: 600;
}

@media (max-width: 700px) {

    .pd-shutdown-row {
        grid-template-columns: 1fr 30px;
        gap: 8px;
    }

    .pd-shutdown-row-date,
    .pd-shutdown-row-time {
        grid-column: 1;
    }

    .pd-shutdown-row-main {
        grid-column: 1;
    }

    .pd-shutdown-row-arrow {
        grid-column: 2;
        grid-row: 1 / span 3;
    }

    .pd-modal-body {
        grid-template-columns: 1fr;
    }

    .pd-modal-detail-full {
        grid-column: auto;
    }
}

/* Additional feeder names link */
.pd-feeder-more {
    display: inline;
    margin-left: 6px;
    padding: 0;
    border: none;
    background: none;
    color: var(--pd-primary);
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.pd-feeder-more:hover {
    text-decoration: underline;
    color: var(--pd-primary-dark);
}