/* NextWorld Client Portal styles */

.nwcp-dashboard, .nwcp-list, .nwcp-form {
    max-width: 900px;
    margin: 0 auto;
    font-family: inherit;
}

.nwcp-welcome {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.nwcp-subtitle {
    color: #6b7280;
    margin-bottom: 2rem;
}

/* Stat cards */
.nwcp-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.nwcp-stat-card {
    flex: 1 1 160px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.nwcp-stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: #b8860b;
}

.nwcp-stat-number a {
    color: #b8860b;
    text-decoration: none;
}

.nwcp-stat-label {
    display: block;
    margin-top: 0.35rem;
    color: #6b7280;
    font-size: 0.9rem;
}

/* Empty states */
.nwcp-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    color: #6b7280;
}

.nwcp-empty .nwcp-link {
    color: #b8860b;
    font-weight: 600;
    text-decoration: none;
}

/* Tables */
.nwcp-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.nwcp-table th, .nwcp-table td {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.nwcp-table th {
    color: #6b7280;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Status badges */
.nwcp-badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #f3f4f6;
    color: #374151;
}
.nwcp-badge-pending    { background: #fef3c7; color: #92400e; }
.nwcp-badge-in-review  { background: #dbeafe; color: #1e40af; }
.nwcp-badge-approved   { background: #d1fae5; color: #065f46; }
.nwcp-badge-scheduled  { background: #dbeafe; color: #1e40af; }
.nwcp-badge-completed  { background: #d1fae5; color: #065f46; }
.nwcp-badge-rejected   { background: #fee2e2; color: #991b1b; }
.nwcp-badge-cancelled  { background: #fee2e2; color: #991b1b; }

/* Forms */
.nwcp-field {
    margin-bottom: 1.25rem;
}

.nwcp-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.nwcp-field .req {
    color: #dc2626;
}

.nwcp-field input[type="text"],
.nwcp-field input[type="tel"],
.nwcp-field input[type="date"],
.nwcp-field input[type="time"],
.nwcp-field input[type="file"],
.nwcp-field select,
.nwcp-field textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
}

.nwcp-field-row {
    display: flex;
    gap: 1.25rem;
}
.nwcp-field-row > div { flex: 1; }

.nwcp-btn {
    background: #b8860b;
    color: #fff;
    border: none;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}
.nwcp-btn:hover { background: #9c7209; }

/* Banners */
.nwcp-banner {
    padding: 0.9rem 1.1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}
.nwcp-banner-success { background: #d1fae5; color: #065f46; }
.nwcp-banner-error   { background: #fee2e2; color: #991b1b; }
.nwcp-banner-error a { color: #991b1b; text-decoration: underline; }

/* Notifications list */
.nwcp-notifications {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
}
.nwcp-notifications li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #e5e7eb;
}
.nwcp-notif-title { flex: 1; }
.nwcp-notif-date { color: #9ca3af; font-size: 0.85rem; }

.nwcp-note {
    color: #6b7280;
    font-size: 0.9rem;
}

/* ---------------- Single-page portal app ---------------- */
.nwcp-app {
    display: flex;
    min-height: 600px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.nwcp-app-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #1f2937;
    color: #e5e7eb;
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
}

.nwcp-app-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid #374151;
    margin-bottom: 0.5rem;
}

.nwcp-app-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.nwcp-app-nav-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #d1d5db;
    text-decoration: none;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.nwcp-app-nav-link:hover {
    background: #374151;
    color: #fff;
}

.nwcp-app-nav-link.active {
    background: #374151;
    color: #fff;
    border-left-color: #b8860b;
}

.nwcp-app-signout {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #f87171;
    text-decoration: none;
    font-weight: 500;
    border-top: 1px solid #374151;
    margin-top: 0.5rem;
}
.nwcp-app-signout:hover { color: #fca5a5; }

.nwcp-app-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.nwcp-app-panel {
    display: none;
}
.nwcp-app-panel.active {
    display: block;
}

.nwcp-stat-clickable {
    cursor: pointer;
    transition: box-shadow 0.15s ease;
}
.nwcp-stat-clickable:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.nwcp-section-title {
    margin-top: 2rem;
}

.nwcp-inline-form {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1rem 0 1.5rem;
}

/* Mobile hamburger bar — hidden on desktop */
.nwcp-app-mobile-bar {
    display: none;
}

/* Overlay behind the off-canvas menu — hidden until opened */
.nwcp-app-overlay {
    display: none;
}

@media (max-width: 700px) {
    .nwcp-app {
        position: relative;
        flex-direction: column;
        min-height: 500px;
    }

    .nwcp-app-mobile-bar {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0.9rem 1.25rem;
        background: #1f2937;
        color: #fff;
    }

    .nwcp-menu-toggle {
        background: none;
        border: none;
        color: #fff;
        font-size: 1.4rem;
        line-height: 1;
        cursor: pointer;
        padding: 0.25rem 0.5rem;
    }

    .nwcp-app-mobile-brand {
        font-weight: 700;
        font-size: 1.1rem;
    }

    /* Off-canvas sidebar: fixed, slides in from the left over the content */
    .nwcp-app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 260px;
        max-width: 80vw;
        flex-direction: column;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 999;
        box-shadow: 2px 0 12px rgba(0,0,0,0.2);
    }

    .nwcp-app-sidebar.nwcp-open {
        transform: translateX(0);
    }

    .nwcp-app-brand { display: block; }

    .nwcp-app-nav-link {
        border-left: 3px solid transparent;
        border-bottom: none;
    }
    .nwcp-app-nav-link.active {
        border-left-color: #b8860b;
        border-bottom: none;
    }

    /* Overlay covers the content while the menu is open, tap it to close */
    .nwcp-app-overlay.nwcp-open {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 998;
    }

    .nwcp-app-content {
        padding: 1.25rem;
    }
}
