/* ============================================================
   PLReportHub — site.css
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --red:          #CA2124;
    --red-dark:     #971d1f;
    --red-light:    #fef2f2;
    --text:         #111827;
    --text-md:      #374151;
    --text-sm:      #6b7280;
    --text-xs:      #9ca3af;
    --border:       #d1d5db;
    --border-light: #e5e7eb;
    --bg:           #f4f5f7;
    --white:        #ffffff;
    --success:      #166534;
    --success-bg:   #f0fdf4;
    --success-bdr:  #86efac;
    --dark:         #111827;
    --dark-2:       #1f2937;
    --dark-3:       #374151;
    --shadow:       0 1px 4px rgba(0,0,0,0.07);
    --shadow-md:    0 4px 20px rgba(0,0,0,0.10);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
    font-size: 15px;
}

/* ══════════════════════════════════════════════════════════
   AUTH LAYOUT
   ══════════════════════════════════════════════════════════ */

.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 32px 16px 24px;
}

.auth-card {
        background: var(--white);
        border-radius: 14px;
        box-shadow: var(--shadow-md);
        padding: 30px 50px 60px;
        width: 100%;
        max-width: 430px;
}
    /* ── Auth logo (brand text removed — logo only) ── */
.pl-auth-logo {
        height: 46px;
        width: auto;
        max-width: 160px;
        object-fit: contain;
}
    /* ── Auth headings ── */
    .auth-title {
        font-size: 22px;
        font-weight: 700;
        color: var(--text);
        margin-bottom: 4px;
    }

    .auth-subtitle {
        font-size: 14px;
        color: var(--text-sm);
        margin-bottom: 28px;
        line-height: 1.5;
    }
    /* ── Form elements ── */
    .form-group {
        margin-bottom: 20px;
    }

    .form-label {
        display: block;
        font-size: 12px;
        font-weight: 600;
        color: var(--text-md);
        margin-bottom: 6px;
        text-transform: uppercase;
        letter-spacing: 0.4px;
    }

    .form-control {
        width: 100%;
        padding: 0 8px;
        border: 1.5px solid var(--border);
        border-radius: 8px;
        font-size: 14px;
        color: var(--text);
        background: var(--white);
        height: 36px;
        transition: border-color 0.15s, box-shadow 0.15s;
        outline: none;
    }

        .form-control:focus {
            border-color: var(--red);
            box-shadow: 0 0 0 3px rgba(202,33,36,0.12);
        }

        .form-control::placeholder {
            color: var(--text-xs);
        }

    .input-icon-wrap {
        position: relative;
    }

        .input-icon-wrap .form-control {
            padding-left: 34px;
        }

    .input-icon {
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-xs);
        font-size: 13px;
        pointer-events: none;
    }

    .input-suffix {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-xs);
        cursor: pointer;
        font-size: 13px;
    }

        .input-suffix:hover {
            color: var(--text-sm);
        }
    /* ── Buttons ── */
    .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        padding: 11px 20px;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        border: none;
        cursor: pointer;
        transition: background 0.15s, box-shadow 0.15s;
        text-decoration: none;
        line-height: 1;
    }

    .btn-primary {
        background: var(--red);
        color: #fff;
        width: 100%;
    }

        .btn-primary:hover {
            background: var(--red-dark);
            box-shadow: 0 2px 8px rgba(202,33,36,0.3);
        }

        .btn-primary:disabled {
            background: #f0a0a1;
            cursor: not-allowed;
            box-shadow: none;
        }
    /* ── Helper text ── */
    .form-error {
        font-size: 12px;
        color: var(--red);
        margin-top: 5px;
        display: block;
    }

    .auth-footer-link {
        text-align: center;
        margin-top: 20px;
        font-size: 13px;
        color: var(--text-sm);
    }

        .auth-footer-link a {
            color: var(--red);
            text-decoration: none;
            font-weight: 600;
        }

            .auth-footer-link a:hover {
                text-decoration: underline;
            }
    /* ── Alert boxes ── */
    .alert {
        padding: 12px 16px;
        border-radius: 8px;
        font-size: 13px;
        margin-bottom: 20px;
        display: flex;
        align-items: flex-start;
        gap: 10px;
        line-height: 1.5;
    }

    .alert-info {
        background: #eff6ff;
        border: 1px solid #bfdbfe;
        color: #1e40af;
    }

    .alert-success {
        background: var(--success-bg);
        border: 1px solid var(--success-bdr);
        color: var(--success);
    }

    .alert-warning {
        background: #fffbeb;
        border: 1px solid #fde68a;
        color: #92400e;
    }

    .alert i {
        margin-top: 1px;
        flex-shrink: 0;
    }
    /* ── Password rules ── */
    .pwd-rules {
        list-style: none;
        margin-top: 10px;
    }

        .pwd-rules li {
            font-size: 12px;
            color: var(--text-sm);
            display: flex;
            align-items: center;
            gap: 7px;
            margin-bottom: 4px;
        }

            .pwd-rules li i {
                font-size: 11px;
            }

            .pwd-rules li.ok {
                color: var(--success);
            }

                .pwd-rules li.ok i {
                    color: var(--success);
                }
    /* ── OTP boxes ── */
    .otp-row {
        display: flex;
        gap: 10px;
        justify-content: center;
        margin: 24px 0;
    }

    .otp-box {
        width: 52px;
        height: 60px;
        border: 1.5px solid var(--border);
        border-radius: 10px;
        font-size: 24px;
        font-weight: 700;
        text-align: center;
        color: var(--text);
        background: var(--white);
        transition: border-color 0.15s, box-shadow 0.15s;
        outline: none;
    }

        .otp-box:focus {
            border-color: var(--red);
            box-shadow: 0 0 0 3px rgba(202,33,36,0.12);
        }

        .otp-box::selection {
            background: var(--red-light);
        }
    /* ── Phone selection ── */
    .phone-list {
        margin: 20px 0;
    }

    .phone-option {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 14px 16px;
        border: 1.5px solid var(--border-light);
        border-radius: 10px;
        margin-bottom: 10px;
        cursor: pointer;
        transition: border-color 0.15s, background 0.15s;
    }

        .phone-option:hover {
            border-color: var(--red);
            background: var(--red-light);
        }

        .phone-option.selected {
            border-color: var(--red);
            background: var(--red-light);
        }

        .phone-option input[type=radio] {
            accent-color: var(--red);
            width: 16px;
            height: 16px;
        }

    .phone-option-text {
        flex: 1;
    }

    .phone-number {
        font-size: 15px;
        font-weight: 600;
        color: var(--text);
    }

    .phone-label {
        font-size: 12px;
        color: var(--text-sm);
        margin-top: 1px;
    }
    /* ── Resend timer ── */
    .resend-row {
        text-align: center;
        font-size: 13px;
        color: var(--text-sm);
        margin-top: 16px;
    }

        .resend-row a {
            color: var(--red);
            font-weight: 600;
            text-decoration: none;
        }

        .resend-row span {
            color: var(--text-xs);
        }
    /* ── Success icon ── */
    .success-icon-wrap {
        width: 72px;
        height: 72px;
        background: var(--success-bg);
        border: 2px solid var(--success-bdr);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 24px;
        font-size: 32px;
        color: var(--success);
    }
    /* ── Auth footer ── */
    .auth-page-footer {
        text-align: center;
        font-size: 12px;
        color: var(--text-xs);
        margin-top: 20px;
    }
    /* ══════════════════════════════════════════════════════════
   DASHBOARD — FULL PAGE SHELL
   ══════════════════════════════════════════════════════════ */

    .pl-page {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }
    /* ── Dark header ── */
    .pl-header {
        background: var(--dark);
        height: 60px;
        position: sticky;
        top: 0;
        z-index: 100;
        flex-shrink: 0;
    }
    /* Inner wrapper — matches body max-width so logo aligns with "Good morning"
   and user area aligns with the Last Report card edge */
    .pl-header-inner {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 32px;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .pl-header-left {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .pl-header-logo-img {
        height: 34px;
        width: auto;
        max-width: 120px;
        object-fit: contain;
        flex-shrink: 0;
    }

    .pl-header-brand {
        font-size: 17px;
        font-weight: 700;
        color: #fff;
        letter-spacing: -0.2px;
    }
    /* Center nav */
    .pl-nav {
        display: flex;
        align-items: center;
        gap: 2px;
    }

    .pl-nav-link {
        color: #9ca3af;
        text-decoration: none;
        padding: 7px 16px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 500;
        transition: background 0.15s, color 0.15s;
        white-space: nowrap;
    }

        .pl-nav-link:hover {
            background: rgba(255,255,255,0.08);
            color: #fff;
        }

    .pl-nav-link--active {
        color: #fff !important;
        background: rgba(255,255,255,0.1);
    }
    /* Right user area */
    .pl-header-right {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .pl-user-avatar {
        width: 34px;
        height: 34px;
        background: var(--red);
        border-radius: 50%;
        color: #fff;
        font-size: 13px;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .pl-user-info {
        line-height: 1.2;
    }

    .pl-user-name {
        font-size: 13px;
        font-weight: 600;
        color: #f3f4f6;
    }

    .pl-user-email {
        font-size: 11px;
        color: #6b7280;
    }

    .pl-btn-signout {
        padding: 6px 13px;
        border: 1px solid rgba(255,255,255,0.18);
        border-radius: 6px;
        font-size: 12px;
        font-weight: 600;
        color: #9ca3af;
        background: transparent;
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 6px;
        transition: background 0.15s, color 0.15s, border-color 0.15s;
        white-space: nowrap;
    }

        .pl-btn-signout:hover {
            background: rgba(255,255,255,0.08);
            border-color: rgba(255,255,255,0.35);
            color: #fff;
        }
    /* ── Dashboard body ── */
    .pl-body {
        padding: 32px;
        flex: 1;
        max-width: 1200px;
        margin: 0 auto;
        width: 100%;
    }

    .dash-welcome {
        margin-bottom: 28px;
    }

        .dash-welcome h1 {
            font-size: 22px;
            font-weight: 700;
            color: var(--text);
            margin-bottom: 4px;
        }

        .dash-welcome p {
            font-size: 14px;
            color: var(--text-sm);
        }
    /* ── Summary bar ── */
    .summary-bar {
        display: flex;
        gap: 16px;
        margin-bottom: 28px;
        flex-wrap: wrap;
    }

    .summary-stat {
        background: var(--white);
        border: 1px solid var(--border-light);
        border-radius: 10px;
        padding: 16px 22px;
        flex: 1;
        min-width: 160px;
        box-shadow: var(--shadow);
    }

    .summary-stat-label {
        font-size: 11px;
        font-weight: 700;
        color: var(--text-xs);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 4px;
    }

    .summary-stat-value {
        font-size: 28px;
        font-weight: 800;
        color: var(--text);
    }

    .summary-stat-value--date {
        font-size: 18px;
        font-weight: 700;
        color: var(--text-md);
    }
    /* ── Pool section header ── */
    .pool-section-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 18px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .pool-section-title {
        font-size: 17px;
        font-weight: 700;
        color: var(--text);
    }

    .pool-search-input {
        border: 1.5px solid var(--border);
        border-radius: 8px;
        padding: 8px 14px 8px 34px;
        font-size: 13px;
        outline: none;
        background: var(--white);
        color: var(--text);
        min-width: 220px;
        transition: border-color 0.15s;
    }

        .pool-search-input:focus {
            border-color: var(--red);
        }
    /* ── Pool cards ── */
    .pools-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 20px;
    }

    .pool-card {
        background: var(--white);
        border: 1px solid var(--border-light);
        border-radius: 12px;
        padding: 22px 24px;
        box-shadow: var(--shadow);
        transition: box-shadow 0.2s, transform 0.2s;
    }

        .pool-card:hover {
            box-shadow: var(--shadow-md);
            transform: translateY(-2px);
        }

    .pool-card-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        margin-bottom: 16px;
    }

    .pool-card-id {
        font-size: 11px;
        font-weight: 700;
        color: var(--red);
        text-transform: uppercase;
        letter-spacing: 0.6px;
        margin-bottom: 3px;
    }

    .pool-card-name {
        font-size: 16px;
        font-weight: 700;
        color: var(--text);
        line-height: 1.3;
    }

    .pool-status-badge {
        font-size: 11px;
        font-weight: 600;
        padding: 3px 10px;
        border-radius: 20px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .status-active {
        background: #f0fdf4;
        color: #166534;
        border: 1px solid #86efac;
    }

    .status-pending {
        background: #fffbeb;
        color: #92400e;
        border: 1px solid #fde68a;
    }

    .status-closed {
        background: var(--bg);
        color: var(--text-sm);
        border: 1px solid var(--border);
    }

    .pool-meta {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin-bottom: 18px;
        padding: 14px;
        background: var(--bg);
        border-radius: 8px;
    }

    .pool-meta-label {
        font-size: 11px;
        font-weight: 600;
        color: var(--text-xs);
        text-transform: uppercase;
        letter-spacing: 0.4px;
        margin-bottom: 2px;
    }

    .pool-meta-value {
        font-size: 14px;
        font-weight: 600;
        color: var(--text-md);
    }

    .pool-card-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-top: 16px;
        border-top: 1px solid var(--border-light);
    }

    .pool-date {
        font-size: 12px;
        color: var(--text-sm);
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .btn-report {
        padding: 8px 18px;
        background: var(--red);
        color: #fff;
        border: none;
        border-radius: 7px;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 7px;
        transition: background 0.15s;
        text-decoration: none;
    }

        .btn-report:hover:not(:disabled) {
            background: var(--red-dark);
        }

    .btn-report--disabled {
        background: var(--text-xs) !important;
        cursor: not-allowed !important;
    }
    /* ══════════════════════════════════════════════════════════
   DARK FOOTER
   ══════════════════════════════════════════════════════════ */

    .pl-footer {
        background: var(--dark);
        color: #9ca3af;
        flex-shrink: 0;
    }
    /* Single-row footer */
    .pl-footer-inner {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 32px;
        height: 56px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        flex-wrap: wrap;
    }

    .pl-footer-copy {
        font-size: 12px;
        color: #d1d5db;
        flex: 1;
        white-space: nowrap;
    }

    .pl-footer-social {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }

    .pl-footer-social-label {
        font-size: 12px;
        color: #6b7280;
        margin-right: 4px;
        white-space: nowrap;
    }

    .pl-footer-social-link {
        width: 30px;
        height: 30px;
        background: rgba(255,255,255,0.07);
        border: 1px solid rgba(255,255,255,0.1);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        transition: background 0.15s, border-color 0.15s;
    }

        .pl-footer-social-link:hover {
            background: var(--red);
            border-color: var(--red);
        }
    /* SVG icons — invert to white on dark background */
    .pl-footer-social-icon {
        width: 13px;
        height: 13px;
        object-fit: contain;
        filter: brightness(0) invert(1);
        opacity: 0.7;
        display: block;
    }

    .pl-footer-social-link:hover .pl-footer-social-icon {
        opacity: 1;
    }
    /* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */

    @media (max-width: 768px) {
        .pl-nav {
            display: none;
        }

        .pl-user-info {
            display: none;
        }

        .pl-body {
            padding: 20px 16px;
        }

        .pl-footer-inner {
            padding: 0 16px;
            height: auto;
            min-height: 56px;
            gap: 12px;
        }

        .pl-footer-copy {
            text-align: left;
        }
    }

    @media (max-width: 600px) {
        .auth-card {
            padding: 28px 20px 24px;
        }

        .otp-box {
            width: 40px;
            height: 50px;
            font-size: 20px;
        }

        .pl-header {
            padding: 0 16px;
        }
    }
