/* ============================================================
   PlotDraw Portal — Main Stylesheet
   Mobile-first, custom CSS with CSS variables
   ============================================================ */

/* ---- Variables ---- */
:root {
  --primary:        #1e3a5f;
  --primary-dark:   #152b47;
  --primary-light:  #2c5282;
  --accent:         #e67e22;
  --accent-hover:   #d35400;
  --success:        #27ae60;
  --success-light:  #d4edda;
  --danger:         #e74c3c;
  --danger-light:   #f8d7da;
  --warning:        #f39c12;
  --warning-light:  #fff3cd;
  --info:           #3498db;
  --info-light:     #d1ecf1;
  --bg:             #f0f4f8;
  --bg-white:       #ffffff;
  --text:           #2c3e50;
  --text-muted:     #6c757d;
  --border:         #dee2e6;
  --border-radius:  8px;
  --border-radius-lg: 12px;
  --shadow:         0 2px 12px rgba(0,0,0,.08);
  --shadow-hover:   0 6px 24px rgba(0,0,0,.14);
  --transition:     0.2s ease;
  --font:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; font-size: 15px; }
img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: var(--font); }

/* ---- Container ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---- Portal Header ---- */
.portal-toolbar { background: #3b82f6; color: #fff; font-size: 12px; padding: 6px 0; }
.portal-toolbar .container { display: flex; justify-content: space-between; align-items: center; }
.portal-toolbar a { color: #fff; text-decoration: underline; }
.portal-header { background: #fff; border-bottom: 1px solid #e2e8f0; padding: 14px 0; }
.portal-header-inner { display: flex; justify-content: space-between; align-items: center; }
.portal-logo { display: flex; align-items: center; gap: 12px; }
.portal-logo-img { width: 70px; height: 70px; object-fit: contain; border-radius: 50%; }
.portal-logo-title { font-size: 18px; font-weight: 700; color: #1e3a8a; }
.portal-logo-subtitle { font-size: 12px; color: #64748b; }
.portal-nav { display: flex; gap: 24px; }
.portal-nav-link { font-size: 14px; color: #334155; font-weight: 500; text-decoration: none; }
.portal-nav-link:hover, .portal-nav-link.active { color: #2563eb; }

/* ---- Old Header (deprecated, kept for compatibility) ---- */
.site-header { display: none; }
.topbar { display: none; }

@media (max-width: 900px) {
    .portal-header-inner { flex-direction: column; gap: 14px; }
    .portal-nav { flex-wrap: wrap; justify-content: center; gap: 12px; }
}

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: var(--border-radius); font-weight: 600; font-size: 14px; border: 2px solid transparent; transition: var(--transition); cursor: pointer; text-decoration: none; justify-content: center; white-space: nowrap; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 13px 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #219a52; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #c0392b; color: #fff; }
.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-outline-primary { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-outline-secondary { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-outline-secondary:hover { background: var(--bg); color: var(--text); }
.btn-secondary { background: #6c757d; color: #fff; border-color: #6c757d; }
.btn[disabled], .btn:disabled { opacity: .55; pointer-events: none; }

/* ---- Alerts ---- */
.alert { padding: 12px 16px; border-radius: var(--border-radius); margin-bottom: 16px; font-size: 14px; border-left: 4px solid; }
.alert-success { background: var(--success-light); border-color: var(--success); color: #155724; }
.alert-error   { background: var(--danger-light);  border-color: var(--danger);  color: #721c24; }
.alert-warning { background: var(--warning-light); border-color: var(--warning); color: #856404; }
.alert-info    { background: var(--info-light);    border-color: var(--info);    color: #0c5460; }

/* ---- Badges ---- */
.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.badge-success  { background: var(--success-light); color: #155724; }
.badge-danger   { background: var(--danger-light);  color: #721c24; }
.badge-warning  { background: var(--warning-light); color: #856404; }
.badge-info     { background: var(--info-light);    color: #0c5460; }
.badge-primary  { background: #dbeafe; color: var(--primary); }
.badge-secondary{ background: #e2e8f0; color: #475569; }
.badge-open     { background: #d4edda; color: #155724; }
.badge-closed   { background: #f8d7da; color: #721c24; }
.badge-upcoming { background: #fff3cd; color: #856404; }

/* ---- Cards ---- */
.card { background: var(--bg-white); border-radius: var(--border-radius-lg); box-shadow: var(--shadow); overflow: hidden; transition: var(--transition); }
.card:hover { box-shadow: var(--shadow-hover); }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-header h3, .card-header h4 { margin: 0; font-size: 16px; color: var(--primary); }
.card-body { padding: 20px; }
.card-footer { padding: 14px 20px; background: #f8f9fa; border-top: 1px solid var(--border); }

/* ---- Forms ---- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 13px; color: var(--text); }
.form-group label .required { color: var(--danger); margin-left: 2px; }
.form-control { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--border-radius); font-size: 14px; font-family: var(--font); color: var(--text); background: #fff; transition: var(--transition); }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,58,95,.1); }
.form-control:disabled, .form-control[readonly] { background: #f4f4f4; color: var(--text-muted); }
textarea.form-control { min-height: 100px; resize: vertical; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-check { display: flex; align-items: flex-start; gap: 8px; }
.form-check input[type="checkbox"], .form-check input[type="radio"] { margin-top: 2px; flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--primary); }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }

/* ---- Tables ---- */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { background: #f1f5f9; padding: 12px 14px; text-align: left; font-weight: 600; font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; border-bottom: 2px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:hover td { background: #fafbfc; }
.table tr:last-child td { border-bottom: none; }

/* ---- Section ---- */
.section { padding: 60px 0; }
.section-sm { padding: 36px 0; }
.section-title { font-size: 28px; font-weight: 700; color: var(--primary); margin-bottom: 10px; }
.section-subtitle { color: var(--text-muted); font-size: 16px; margin-bottom: 36px; }
.section-title-center { text-align: center; }

/* ---- Hero ---- */
.hero { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, #3a6ea8 100%); color: #fff; padding: 70px 0; }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.15); padding: 5px 14px; border-radius: 20px; font-size: 13px; margin-bottom: 16px; }
.hero h1 { font-size: 38px; font-weight: 700; line-height: 1.2; margin-bottom: 16px; }
.hero p { font-size: 17px; opacity: .9; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-image { text-align: center; }
.hero-illustration { width: 100%; max-width: 420px; background: rgba(255,255,255,.1); border-radius: 16px; padding: 30px; margin: 0 auto; }
.hero-illustration-inner { background: rgba(255,255,255,.08); border-radius: 12px; padding: 40px 30px; display: flex; flex-direction: column; align-items: center; gap: 12px; color: rgba(255,255,255,.8); }
.hero-illustration-inner svg { opacity: .6; }

/* ---- Project Tabs ---- */
.project-tabs { margin-bottom: 30px; }
.tab-buttons { display: flex; gap: 4px; background: #fff; border-radius: 10px; padding: 5px; box-shadow: var(--shadow); display: inline-flex; }
.tab-btn { padding: 9px 24px; border-radius: 7px; border: none; background: transparent; font-weight: 600; font-size: 14px; cursor: pointer; transition: var(--transition); color: var(--text-muted); }
.tab-btn.active { background: var(--primary); color: #fff; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ---- Project Cards ---- */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.project-card { background: var(--bg-white); border-radius: var(--border-radius-lg); box-shadow: var(--shadow); overflow: hidden; transition: var(--transition); }
.project-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.project-card-img { height: 180px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.project-card-img img { width: 100%; height: 100%; object-fit: cover; }
.project-card-img-placeholder { color: rgba(255,255,255,.4); text-align: center; }
.project-card-status { position: absolute; top: 12px; right: 12px; }
.project-card-body { padding: 18px; }
.project-card-title { font-size: 17px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.project-card-location { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; display: flex; align-items: center; gap: 4px; }
.project-card-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.project-meta-item { background: #f8f9fa; border-radius: 6px; padding: 8px 10px; }
.project-meta-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.project-meta-value { font-size: 13px; font-weight: 600; color: var(--text); }
.project-card-rera { font-size: 11px; color: var(--text-muted); padding: 8px 0; border-top: 1px solid var(--border); margin-bottom: 12px; }
.project-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- FAQ ---- */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { background: var(--bg-white); border-radius: var(--border-radius); box-shadow: var(--shadow); margin-bottom: 10px; overflow: hidden; }
.faq-question { width: 100%; padding: 16px 20px; border: none; background: none; text-align: left; font-size: 15px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--text); transition: var(--transition); }
.faq-question:hover { background: #f8f9fa; }
.faq-question .faq-icon { flex-shrink: 0; transition: transform .2s; }
.faq-question.open .faq-icon { transform: rotate(180deg); }
.faq-answer { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; }
.faq-answer.open { max-height: 500px; padding: 0 20px 16px; }
.faq-answer p { color: var(--text-muted); font-size: 14px; line-height: 1.7; }

/* ---- Stats ---- */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; }
.stat-card { background: var(--bg-white); border-radius: var(--border-radius-lg); padding: 24px 20px; text-align: center; box-shadow: var(--shadow); }
.stat-value { font-size: 32px; font-weight: 700; color: var(--primary); line-height: 1; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

/* ---- Page Banner ---- */
.page-banner { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); color: #fff; padding: 40px 0; margin-bottom: 40px; }
.page-banner h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.page-banner p { opacity: .85; font-size: 15px; }
.breadcrumb { display: flex; gap: 8px; font-size: 13px; opacity: .8; margin-top: 8px; }
.breadcrumb a { color: rgba(255,255,255,.75); }
.breadcrumb a:hover { color: #fff; text-decoration: none; }
.breadcrumb-sep { opacity: .5; }

/* ---- Auth pages ---- */
.auth-wrapper { min-height: calc(100vh - 200px); display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-box { background: var(--bg-white); border-radius: var(--border-radius-lg); box-shadow: var(--shadow-hover); width: 100%; max-width: 460px; overflow: hidden; }
.auth-header { background: var(--primary); padding: 28px 32px; text-align: center; color: #fff; }
.auth-header h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.auth-header p { font-size: 14px; opacity: .85; }
.auth-body { padding: 32px; }
.auth-footer { text-align: center; font-size: 14px; padding-top: 16px; color: var(--text-muted); border-top: 1px solid var(--border); margin-top: 20px; }
.auth-footer a { color: var(--primary); font-weight: 600; }

/* ---- Dashboard ---- */
.dashboard-layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
.dashboard-sidebar { background: var(--bg-white); border-radius: var(--border-radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.sidebar-user { padding: 24px 20px; background: var(--primary); color: #fff; text-align: center; }
.sidebar-avatar { width: 64px; height: 64px; background: rgba(255,255,255,.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; margin: 0 auto 12px; }
.sidebar-username { font-weight: 600; font-size: 16px; }
.sidebar-email { font-size: 12px; opacity: .75; }
.sidebar-nav { padding: 8px 0; }
.sidebar-link { display: flex; align-items: center; gap: 10px; padding: 11px 20px; font-size: 14px; color: var(--text); transition: var(--transition); border-left: 3px solid transparent; }
.sidebar-link:hover, .sidebar-link.active { background: #f0f4f8; color: var(--primary); border-color: var(--primary); text-decoration: none; }
.dashboard-main { display: flex; flex-direction: column; gap: 24px; }

/* ---- Application receipt ---- */
.receipt-header { text-align: center; padding: 20px; background: var(--primary); color: #fff; border-radius: 8px 8px 0 0; }
.receipt-body { padding: 24px; }
.receipt-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.receipt-label { color: var(--text-muted); font-weight: 500; }
.receipt-value { font-weight: 600; }

/* ---- Lightbox ---- */
.lightbox-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,.9); z-index: 9999; display: none; align-items: center; justify-content: center; }
.lightbox-overlay.open { display: flex; }
.lightbox-img { max-width: 90vw; max-height: 90vh; border-radius: 4px; }
.lightbox-close { position: absolute; top: 20px; right: 24px; color: #fff; font-size: 36px; cursor: pointer; background: none; border: none; line-height: 1; }
.lightbox-prev, .lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.15); border: none; color: #fff; font-size: 28px; width: 48px; height: 64px; cursor: pointer; border-radius: 4px; display: flex; align-items: center; justify-content: center; }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.gallery-item { border-radius: 8px; overflow: hidden; cursor: pointer; aspect-ratio: 4/3; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.gallery-item:hover img { transform: scale(1.05); }

/* ---- Steps ---- */
.steps { display: flex; flex-direction: column; gap: 0; }
.step { display: flex; gap: 16px; padding: 16px 0; position: relative; }
.step:not(:last-child)::after { content: ''; position: absolute; left: 19px; top: 48px; bottom: 0; width: 2px; background: var(--border); }
.step-num { width: 38px; height: 38px; background: var(--primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex-shrink: 0; }
.step-content h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.step-content p { font-size: 14px; color: var(--text-muted); }

/* ---- Results page ---- */
.results-search { background: var(--bg-white); border-radius: var(--border-radius-lg); padding: 24px; box-shadow: var(--shadow); margin-bottom: 24px; }
.results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.result-highlight { background: #fffde7; border-left: 4px solid var(--warning); }

/* ---- Project detail ---- */
.project-detail-header { background: var(--bg-white); border-radius: var(--border-radius-lg); padding: 24px; box-shadow: var(--shadow); margin-bottom: 24px; }
.project-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.info-row { display: contents; }
.info-label { background: #f1f5f9; padding: 11px 16px; font-weight: 600; font-size: 13px; color: var(--text-muted); border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: .4px; }
.info-value { padding: 11px 16px; font-size: 14px; border-bottom: 1px solid var(--border); }
.sticky-apply { position: sticky; top: 80px; }

/* ---- Payment page ---- */
.payment-qr-section { text-align: center; padding: 24px; background: #f8f9fa; border-radius: 8px; }
.payment-qr-img { max-width: 200px; margin: 0 auto 12px; display: block; border: 4px solid #fff; border-radius: 8px; box-shadow: var(--shadow); }
.bank-details { background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.bank-row { display: flex; border-bottom: 1px solid var(--border); }
.bank-row:last-child { border-bottom: none; }
.bank-label { background: #f8f9fa; padding: 10px 14px; font-weight: 600; font-size: 13px; min-width: 160px; color: var(--text-muted); }
.bank-value { padding: 10px 14px; font-size: 14px; font-weight: 500; word-break: break-all; }

/* ---- Admin panels (used on admin pages too) ---- */
.stat-mini { background: var(--bg-white); border-radius: var(--border-radius); padding: 16px 20px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px; }
.stat-mini-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-mini-icon.blue   { background: #dbeafe; color: var(--primary); }
.stat-mini-icon.green  { background: var(--success-light); color: var(--success); }
.stat-mini-icon.red    { background: var(--danger-light); color: var(--danger); }
.stat-mini-icon.orange { background: #fef3c7; color: var(--accent); }
.stat-mini-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-mini-num  { font-size: 24px; font-weight: 700; color: var(--text); line-height: 1; }
.stat-mini-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---- Footer ---- */
.footer-marquee { background: #222; color: #f1f5f9; overflow: hidden; white-space: nowrap; padding: 10px 0; font-size: 13px; border-top: 1px solid rgba(255,255,255,.08); }
.footer-marquee-inner { display: inline-flex; animation: footerMarquee 20s linear infinite; }
.footer-marquee-text { padding: 0 60px; }
@keyframes footerMarquee { 0% { transform: translateX(0); } 100% { transform: translateX(-33.33%); } }

.site-footer { background: rgb(48, 48, 48); color: #a0aec0; padding: 50px 0 24px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 32px; margin-bottom: 36px; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: #fff; font-weight: 700; font-size: 16px; }
.footer-logo .logo-icon { background: rgba(255,255,255,.15); }
.footer-desc { font-size: 13px; line-height: 1.7; margin-bottom: 10px; }
.footer-disclaimer { font-size: 11px; color: #718096; border-top: 1px solid rgba(255,255,255,.08); padding-top: 10px; margin-top: 10px; }
.footer-col h4 { color: #fff; font-size: 14px; font-weight: 600; margin-bottom: 16px; text-transform: uppercase; letter-spacing: .5px; }
.footer-links { list-style: none; }
.footer-links li { padding: 5px 0; display: flex; align-items: center; gap: 6px; }
.footer-links a { color: #a0aec0; font-size: 13px; transition: var(--transition); }
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; font-size: 12px; color: #718096; text-align: center; }

/* ---- Utility ---- */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.text-success{ color: var(--success); }
.text-danger { color: var(--danger); }
.text-primary{ color: var(--primary); }
.text-warning{ color: var(--warning); }
.font-bold   { font-weight: 700; }
.font-semibold{ font-weight: 600; }
.mt-0  { margin-top: 0; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.p-0   { padding: 0; }
.gap-8 { gap: 8px; }
.gap-12{ gap: 12px; }
.d-flex{ display: flex; }
.d-flex-between { display: flex; align-items: center; justify-content: space-between; }
.align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }
.hidden { display: none !important; }
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.empty-state { text-align: center; padding: 50px 24px; color: var(--text-muted); }
.empty-state svg { opacity: .3; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }
.pagination { display: flex; gap: 4px; margin-top: 20px; justify-content: center; flex-wrap: wrap; }
.page-link { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; border-radius: 6px; font-size: 14px; border: 1px solid var(--border); background: #fff; color: var(--text); transition: var(--transition); }
.page-link:hover { background: var(--bg); text-decoration: none; }
.page-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.img-zoom { cursor: zoom-in; border: 2px solid var(--border); border-radius: 8px; transition: var(--transition); }
.img-zoom:hover { border-color: var(--primary); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-image { display: none; }
  .results-grid { grid-template-columns: 1fr; }
  .dashboard-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .main-nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%; background: #fff; box-shadow: var(--shadow); padding: 12px 16px; gap: 4px; z-index: 999; }
  .main-nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .site-header { position: relative; }
  .hero h1 { font-size: 28px; }
  .form-row { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-info-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr; }
  .tab-buttons { width: 100%; }
  .tab-btn { flex: 1; }
  .section { padding: 40px 0; }
  .stats-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 22px; }
  .hero-actions { flex-direction: column; }
  .auth-body { padding: 24px 20px; }
  .stats-row { grid-template-columns: 1fr; }
  .project-card-meta { grid-template-columns: 1fr; }
}

/* ============================================================
   Project Info Grid (detail page)
   ============================================================ */
.project-info-grid { display: grid; grid-template-columns: 180px 1fr; }
.project-info-grid .info-label { padding: 10px 16px; background: #f8fafc; font-size: 13px; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.project-info-grid .info-value { padding: 10px 16px; font-size: 14px; border-bottom: 1px solid var(--border); }
@media(max-width:600px){ .project-info-grid { grid-template-columns: 1fr; } .project-info-grid .info-label { padding-bottom: 2px; border-bottom: none; } }

/* Sticky apply sidebar */
.sticky-apply { position: sticky; top: 84px; }

/* Gallery grid */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 12px; }
.gallery-item { border-radius: 8px; overflow: hidden; cursor: pointer; aspect-ratio: 4/3; background: var(--bg); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.05); }

/* Lightbox */
.lightbox-overlay { position: fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,.92); z-index:9999; display:flex; align-items:center; justify-content:center; opacity:0; pointer-events:none; transition:opacity .2s; }
.lightbox-overlay.open { opacity:1; pointer-events:all; }
.lightbox-img { max-width:90vw; max-height:90vh; border-radius:6px; box-shadow:0 8px 40px rgba(0,0,0,.6); }
.lightbox-close { position:absolute; top:16px; right:24px; color:#fff; font-size:40px; background:none; border:none; cursor:pointer; line-height:1; }
.lightbox-prev, .lightbox-next { position:absolute; top:50%; transform:translateY(-50%); background:rgba(255,255,255,.15); border:none; color:#fff; font-size:40px; padding:8px 16px; cursor:pointer; border-radius:6px; }
.lightbox-prev { left:16px; } .lightbox-next { right:16px; }

/* Steps (How to Apply) */
.steps { display: flex; flex-direction: column; gap: 0; }
.step { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.step:last-child { border-bottom: none; }
.step-num { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-content h4 { margin-bottom: 4px; font-size: 15px; }
.step-content p { color: var(--text-muted); font-size: 14px; line-height: 1.7; margin: 0; }

/* FAQ */
.faq-list { max-width: 700px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: var(--border-radius); margin-bottom: 10px; overflow: hidden; }
.faq-question { width:100%; display:flex; justify-content:space-between; align-items:center; padding:16px 20px; background:#fff; border:none; font-size:15px; font-weight:600; cursor:pointer; text-align:left; transition:background .15s; }
.faq-question:hover, .faq-question.open { background: #f1f5f9; }
.faq-icon { flex-shrink:0; transition: transform .2s; }
.faq-question.open .faq-icon { transform: rotate(180deg); }
.faq-answer { display:none; padding:0 20px; font-size:14px; line-height:1.8; color:var(--text-muted); }
.faq-answer.open { display:block; padding: 8px 20px 16px; }
.faq-answer p { margin: 0; }

/* Auth wrapper */
.auth-wrapper { min-height: calc(100vh - 200px); display: flex; align-items: center; justify-content: center; padding: 40px 16px; background: var(--bg); }
.auth-box { width: 100%; max-width: 480px; background: #fff; border-radius: var(--border-radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.auth-header { background: var(--primary); color: #fff; padding: 28px 32px; text-align: center; }
.auth-header h2 { margin: 0 0 6px; font-size: 22px; }
.auth-header p  { margin: 0; opacity: .8; font-size: 14px; }
.auth-body { padding: 28px 32px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-muted); }
.form-check { display: flex; align-items: flex-start; gap: 10px; }
.form-check input[type="checkbox"] { margin-top: 3px; width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; }
.form-check label { font-size: 14px; cursor: pointer; }
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* Dashboard layout */
.dashboard-layout { display: grid; grid-template-columns: 230px 1fr; gap: 24px; align-items: start; }
.dashboard-sidebar { background: #fff; border-radius: var(--border-radius-lg); box-shadow: var(--shadow); overflow: hidden; position: sticky; top: 84px; }
.sidebar-user { padding: 24px 20px; background: var(--primary); color: #fff; text-align: center; }
.sidebar-avatar { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.2); font-size: 22px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
.sidebar-username { font-weight: 700; font-size: 15px; }
.sidebar-email { font-size: 12px; opacity: .7; }
.sidebar-nav { padding: 12px 0; }
.sidebar-link { display: flex; align-items: center; gap: 10px; padding: 10px 20px; font-size: 14px; font-weight: 500; color: var(--text-muted); text-decoration: none; transition: .15s; }
.sidebar-link:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.sidebar-link.active { background: var(--bg); color: var(--primary); font-weight: 700; border-left: 3px solid var(--primary); }
.dashboard-main { min-width: 0; }
@media(max-width:800px){ .dashboard-layout { grid-template-columns: 1fr; } .dashboard-sidebar { position: static; } }

/* Cards */
.card { background: #fff; border-radius: var(--border-radius-lg); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 24px; }
.card-header { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-header h3 { font-size: 15px; font-weight: 700; margin: 0; }
.card-body { padding: 20px; }
.card-body.p-0 { padding: 0; }

/* Receipt styles */
.receipt-body { padding: 0; }
.receipt-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--border); font-size: 14px; }
.receipt-label { color: var(--text-muted); font-weight: 500; }
.receipt-value { font-weight: 600; }

/* Payment page */
.payment-qr-img { max-width: 180px; display: block; border-radius: 8px; border: 2px solid var(--border); margin-bottom: 8px; }
.bank-details { background: #f8fafc; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.bank-row { display: flex; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.bank-row:last-child { border-bottom: none; }
.bank-label { color: var(--text-muted); font-weight: 500; }
.bank-value { font-weight: 600; }

/* Results page */
.results-search { background: #fff; border-radius: var(--border-radius-lg); padding: 20px; box-shadow: var(--shadow); margin-bottom: 24px; }
.results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.result-highlight { background: #fffbeb !important; }
@media(max-width:700px){ .results-grid { grid-template-columns: 1fr; } }

/* Stats / Stat cards */
.stat-card { background: #fff; border-radius: var(--border-radius); box-shadow: var(--shadow); padding: 16px; display: flex; align-items: center; gap: 14px; }
.stat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-content .stat-label { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.stat-content .stat-num { font-size: 24px; font-weight: 700; color: var(--text); }

/* Pagination */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; }
.page-link { padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; color: var(--text-muted); text-decoration: none; transition: .15s; }
.page-link:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Section spacing helpers */
.section-sm { padding: 40px 0; }
.section { padding: 60px 0; }
.text-center { text-align: center; }

/* Page banner */
.page-banner { background: linear-gradient(135deg, var(--primary) 0%, #2c5282 100%); color: #fff; padding: 40px 0; }
.page-banner h1 { margin-bottom: 8px; color: #fff; font-size: 28px; }
.page-banner p { color: rgba(255,255,255,.8); margin-bottom: 8px; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: rgba(255,255,255,.65); }
.breadcrumb a { color: rgba(255,255,255,.8); text-decoration: none; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb-sep { opacity: .5; }

/* Project card images */
.project-card-img { position: relative; height: 180px; background: #eef2f7; overflow: hidden; }
.project-card-img img { width: 100%; height: 100%; object-fit: cover; }
.project-card-img-placeholder { height: 100%; display: flex; align-items: center; justify-content: center; color: var(--border); }
.project-card-status { position: absolute; top: 12px; left: 12px; }
.project-card-rera { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }

/* Badges */
.badge-open { background: var(--success-light); color: var(--success); }
.badge-upcoming { background: #eff6ff; color: #1d4ed8; }
.badge-primary { background: #eff6ff; color: var(--primary); }
.badge-info { background: #e0f2fe; color: #0369a1; }
.badge-open, .badge-upcoming, .badge-closed, .badge-success, .badge-warning, .badge-danger, .badge-secondary, .badge-primary, .badge-info { display: inline-block; padding: 3px 9px; border-radius: 100px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.badge-closed, .badge-secondary { background: #f1f5f9; color: #64748b; }

/* Image zoom */
.img-zoom { cursor: zoom-in; }

/* Hero illustration */
.hero-illustration { background: rgba(255,255,255,.08); border-radius: 16px; padding: 32px; display: flex; align-items: center; justify-content: center; }
.hero-illustration-inner { text-align: center; color: rgba(255,255,255,.9); }
.hero-image { display: flex; align-items: center; justify-content: center; }

/* Topbar (public) */
.topbar { background: var(--primary-dark, #1a2744); color: rgba(255,255,255,.75); font-size: 12px; padding: 6px 0; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; }

/* Stat mini (plot summary) */
.stat-mini { display: flex; }
.stat-mini-label { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.stat-mini-num { font-size: 16px; font-weight: 700; }

/* form-row */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media(max-width:600px){ .form-row { grid-template-columns: 1fr; } }

/* required mark */
.required { color: var(--danger); }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }
