/* ============================================================
   POTHIK — Nirbhoy Dashboard Stylesheet
   Scoped to .nd-dashboard wrapper only.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Manrope:wght@400;500;600;700;800;900&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
.nd-dashboard {
    --primary:        #0F5D4A;
    --primary-hover:  #0D4F3F;
    --secondary:      #2E8B57;
    --bg-page:        #FFFFFF;
    --bg-surface:     #F9FAFB;
    --bg-surface-2:   #F3F4F6;
    --border:         #E5E7EB;
    --border-hover:   #D1D5DB;
    --text-head:      #111827;
    --text-body:      #374151;
    --text-muted:     #6B7280;
    --green-light:    #ECFDF5;
    --green-mid:      #D1FAE5;
    --amber:          #F59E0B;
    --amber-light:    #FEF3C7;
    --red-light:      #FEE2E2;
    --shadow-sm:      0 1px 3px rgba(0,0,0,0.08);
    --shadow-md:      0 4px 6px -1px rgba(0,0,0,0.07);
    --radius-sm:      10px;
    --radius-md:      14px;
    --radius-lg:      20px;
    --radius-pill:    999px;
    --transition:     0.18s ease;
    --font-head:      'Manrope', 'Inter', sans-serif;
    --font-body:      'Inter', sans-serif;
    --max-w:          1280px;
}

/* ── Hard Reset for page ───────────────────────────────────── */
.nd-dashboard *,
.nd-dashboard *::before,
.nd-dashboard *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body:has(.nd-dashboard),
html:has(.nd-dashboard) {
    background: #fff !important;
    color: #111827 !important;
}

body:has(.nd-dashboard)::before,
body:has(.nd-dashboard)::after {
    display: none !important;
}

.nd-dashboard {
    font-family: var(--font-body);
    background: var(--bg-page);
    color: var(--text-body);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Navbar ────────────────────────────────────────────────── */
.nd-navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nd-navbar__inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 40px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nd-navbar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
}

.nd-navbar__logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--green-light);
    padding: 4px;
}

.nd-navbar__name {
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 800;
    color: var(--primary) !important;
}

.nd-navbar__links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nd-navbar__links a {
    padding: 7px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted) !important;
    text-decoration: none !important;
    border-radius: var(--radius-pill);
    transition: var(--transition);
}

.nd-navbar__links a:hover {
    color: var(--primary) !important;
    background: var(--green-light);
}

/* ── Page Wrapper ─────────────────────────────────────────── */
.nd-page {
    flex: 1;
}

.nd-container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 40px;
}

/* ── Hero Section (Immersive) ─────────────────────────────── */
.nd-hero {
    position: relative;
    width: 100%;
    min-height: 560px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #f9f7f3;
}

.nd-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.nd-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
}

.nd-hero__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 80px 40px;
}

.nd-hero__content {
    max-width: 430px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.nd-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    background: rgba(255,255,255,0.9);
    border: 1px solid var(--green-mid);
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
}

.nd-hero__headline {
    width: 100%;
    font-family: var(--font-head);
    font-size: 52px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -1.5px;
    color: var(--text-head);
    margin-bottom: 20px;
    text-align: left;
    background: none;
    background-image: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: var(--text-head);
}

.nd-hero__headline span {
    display: block;
    color: var(--primary);
    -webkit-text-fill-color: var(--primary);
}

.nd-hero__sub {
    font-size: 16px;
    color: var(--text-body);
    line-height: 1.6;
    margin-bottom: 30px;
}

.nd-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    font-size: 14px;
    font-weight: 700;
    border-radius: var(--radius-md);
    text-decoration: none !important;
    transition: var(--transition);
}

.nd-btn-primary {
    background: var(--primary);
    color: #fff !important;
    border: 1px solid var(--primary);
}

.nd-btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ── Section Header ─────────────────────────────────────────── */
.nd-section {
    padding: 64px 0;
}

.nd-section__header {
    margin-bottom: 32px;
}

.nd-section__title {
    font-family: var(--font-head);
    font-size: 28px;
    font-weight: 800;
    color: var(--text-head);
    letter-spacing: -0.5px;
}

/* ── Statistics Grid ────────────────────────────────────────── */
.nd-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.nd-stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition);
}

.nd-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nd-stat-card--hero {
    grid-column: span 1;
    background: var(--green-light);
    border-color: var(--green-mid);
}

.nd-stat-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nd-stat-icon {
    font-size: 20px;
}

.nd-stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.nd-stat-card--hero .nd-stat-label {
    color: var(--primary);
}

.nd-stat-value {
    font-family: var(--font-head);
    font-size: 32px;
    font-weight: 800;
    color: var(--text-head);
    line-height: 1;
}

.nd-stat-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.nd-stat-pct {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 36px;
}

.nd-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-surface-2);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.nd-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-pill);
}

/* Admin Status Cards */
.nd-status-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.nd-status-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nd-status-card__info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nd-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.nd-status-dot--active { background: var(--secondary); }
.nd-status-dot--spam { background: var(--amber); }

.nd-status-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-body);
}

.nd-status-value {
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 800;
}

/* ── Complaints List ────────────────────────────────────────── */
.nd-complaint-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.nd-complaint-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition);
}

.nd-complaint-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nd-complaint-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.nd-badge {
    display: inline-flex;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nd-badge--category {
    background: var(--bg-surface-2);
    color: var(--text-body);
}

.nd-badge--active { background: var(--green-light); color: var(--secondary); }
.nd-badge--spam { background: var(--amber-light); color: #B45309; }

.nd-complaint-date {
    font-size: 12px;
    color: var(--text-muted);
}

.nd-complaint-meta {
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nd-complaint-meta strong {
    color: var(--text-head);
}

.nd-complaint-desc {
    font-size: 14px;
    color: var(--text-body);
    line-height: 1.6;
    background: var(--bg-surface);
    padding: 12px;
    border-radius: var(--radius-md);
    flex: 1;
}

/* Admin Actions */
.nd-complaint-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.nd-btn-action {
    flex: 1;
    padding: 8px;
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: #fff;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.nd-btn-action:hover {
    background: var(--bg-surface-2);
}

.nd-btn-action.spam:hover {
    background: var(--amber-light);
    color: #B45309;
    border-color: #FCD34D;
}

.nd-btn-action.active:hover {
    background: var(--green-light);
    color: var(--secondary);
    border-color: var(--green-mid);
}

/* ── Pagination ─────────────────────────────────────────────── */
.nd-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.nd-page-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-body) !important;
    text-decoration: none !important;
    background: #fff;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.nd-page-link:hover {
    background: var(--bg-surface-2);
}

.nd-page-link.active {
    background: var(--primary);
    color: #fff !important;
    border-color: var(--primary);
}

/* ── Empty State ────────────────────────────────────────────── */
.nd-empty-state {
    grid-column: 1 / -1;
    padding: 64px 20px;
    text-align: center;
    background: var(--bg-surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}

.nd-empty-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.nd-empty-text {
    font-size: 16px;
    color: var(--text-muted);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .nd-stats-grid { grid-template-columns: repeat(3, 1fr); }
    .nd-stat-card--hero { grid-column: span 3; }
}

@media (max-width: 768px) {
    .nd-navbar__inner, .nd-container, .nd-hero__inner { padding-left: 20px; padding-right: 20px; }
    .nd-hero { min-height: 480px; }
    .nd-hero__headline { font-size: 40px; }
    .nd-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .nd-stat-card--hero { grid-column: span 2; }
    .nd-status-row { grid-template-columns: 1fr; }
    .nd-complaint-list { grid-template-columns: 1fr; }
}
