/* =====================================================
   KONKAN PROPERTIES — Premium Dashboard v3
   Glassmorphism Admin & Broker Panels
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&family=Poppins:wght@300;400;500;600&display=swap');

:root {
  /* Structure */
  --sidebar-w:      264px;
  --topbar-h:       68px;

  /* Dark sidebar palette */
  --sidebar-bg:     #080F06;
  --sidebar-border: rgba(255,255,255,.05);
  --sidebar-hover:  rgba(255,255,255,.06);
  --sidebar-active: rgba(46,102,64,.35);
  --sidebar-text:   rgba(255,255,255,.5);
  --sidebar-text-hi:rgba(255,255,255,.9);
  --sidebar-accent: #6B9E7A;

  /* Body */
  --body-bg:        #F0EDE8;
  --card-bg:        rgba(255,255,255,.92);
  --topbar-bg:      rgba(254,252,249,.96);

  /* Colors */
  --forest:         #1A3A0E;
  --forest-mid:     #234F15;
  --coconut:        #2E6640;
  --sage:           #6B9E7A;
  --sage-light:     #A8C9B2;
  --gold:           #B8920C;
  --gold-mid:       #D4AB2E;
  --sand:           #C8A87A;
  --sand-pale:      #FAF5EE;

  /* Text */
  --text:           #1E2A1A;
  --text-light:     #526050;
  --text-muted:     #8A9E84;
  --border:         #DDD8D0;
  --border-light:   #EDE8DF;

  /* Status */
  --success:        #166534;
  --success-bg:     #dcfce7;
  --warning:        #92400e;
  --warning-bg:     #fef3c7;
  --danger:         #7f1d1d;
  --danger-bg:      #fee2e2;
  --info:           #1e3a8a;
  --info-bg:        #dbeafe;

  /* Shadows */
  --shadow-xs: 0 1px 4px rgba(6,13,4,.06);
  --shadow-sm: 0 2px 16px rgba(6,13,4,.08);
  --shadow-md: 0 8px 40px rgba(6,13,4,.12);
  --shadow-lg: 0 24px 80px rgba(6,13,4,.16);
  --glow-g:    0 0 32px rgba(46,102,64,.25);

  /* Radius */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-full: 100px;

  /* Transition */
  --ease: cubic-bezier(.23,1,.32,1);
  --t: all .35s var(--ease);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Poppins', -apple-system, sans-serif; background: var(--body-bg); color: var(--text); font-size: 14px; font-weight: 300; }
a { color: inherit; text-decoration: none; transition: var(--t); }
img { max-width: 100%; display: block; }
button { font-family: 'Poppins', sans-serif; }

/* =====================================================
   LAYOUT
   ===================================================== */
.dash-layout { display: flex; min-height: 100vh; }

/* =====================================================
   SIDEBAR
   ===================================================== */
.sidebar {
  width: var(--sidebar-w); background: var(--sidebar-bg);
  min-height: 100vh; position: fixed; top: 0; left: 0;
  display: flex; flex-direction: column; z-index: 200;
  overflow-y: auto; overflow-x: hidden;
  border-right: 1px solid var(--sidebar-border);
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-brand {
  padding: 28px 22px 22px;
  border-bottom: 1px solid var(--sidebar-border);
}
.sidebar-brand h1 {
  font-family: 'Playfair Display', serif; font-size: 1.35rem;
  color: var(--white, #fff); font-weight: 600; line-height: 1.2; letter-spacing: .01em;
}
.sidebar-brand h1 span { color: var(--sidebar-accent); }
.sidebar-brand small { font-size: .6rem; color: rgba(255,255,255,.25); text-transform: uppercase; letter-spacing: .2em; display: block; margin-top: 4px; }

.sidebar-nav { flex: 1; padding: 12px 0; }
.sidebar-section-label {
  font-size: .56rem; font-weight: 600; color: rgba(255,255,255,.2);
  text-transform: uppercase; letter-spacing: .24em;
  padding: 20px 22px 8px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 22px; color: var(--sidebar-text);
  font-size: .78rem; font-weight: 400; letter-spacing: .02em;
  position: relative; transition: var(--t);
}
.sidebar-link i { width: 18px; text-align: center; font-size: .9rem; flex-shrink: 0; transition: var(--t); }
.sidebar-link::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 2px; height: 0; background: var(--sage); border-radius: 0 2px 2px 0;
  transition: height .3s var(--ease);
}
.sidebar-link:hover {
  color: var(--sidebar-text-hi); background: var(--sidebar-hover);
}
.sidebar-link:hover::before { height: 70%; }
.sidebar-link.active {
  color: #fff; background: var(--sidebar-active);
}
.sidebar-link.active::before { height: 80%; }
.sidebar-link.active i { color: var(--sidebar-accent); }

.sidebar-badge {
  margin-left: auto; background: var(--gold); color: var(--dark, #111);
  font-size: .6rem; font-weight: 700; padding: 2px 8px; border-radius: var(--r-full);
  min-width: 20px; text-align: center;
}

.sidebar-footer {
  padding: 18px 22px; border-top: 1px solid var(--sidebar-border);
}
.sidebar-user { display: flex; align-items: center; gap: 12px; }
.sidebar-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(107,158,122,.2); border: 1px solid rgba(107,158,122,.3);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif; font-size: 1rem; color: var(--sage); flex-shrink: 0;
}
.sidebar-user-info strong { display: block; font-size: .78rem; color: rgba(255,255,255,.85); font-weight: 500; }
.sidebar-user-info small { font-size: .62rem; color: rgba(255,255,255,.3); }
.sidebar-logout {
  display: flex; align-items: center; gap: 8px; margin-top: 14px;
  font-size: .7rem; color: rgba(255,255,255,.3); padding: 6px 0; transition: var(--t);
}
.sidebar-logout:hover { color: rgba(255,255,255,.7); }

/* =====================================================
   MAIN CONTENT
   ===================================================== */
.dash-main {
  flex: 1; margin-left: var(--sidebar-w);
  display: flex; flex-direction: column; min-height: 100vh;
}

/* =====================================================
   TOPBAR
   ===================================================== */
.topbar {
  height: var(--topbar-h); background: var(--topbar-bg);
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-xs);
}
.topbar-title {
  font-family: 'Playfair Display', serif; font-size: 1.25rem; font-weight: 600;
  color: var(--forest); letter-spacing: -.01em;
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: var(--r-xs); font-size: .72rem;
  font-weight: 600; letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
  border: 1.5px solid transparent; transition: var(--t);
}
.topbar-btn.primary { background: var(--forest-mid); color: #fff; border-color: var(--forest-mid); }
.topbar-btn.primary:hover { background: var(--forest); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.topbar-btn.outline { background: transparent; color: var(--text); border-color: var(--border); }
.topbar-btn.outline:hover { border-color: var(--coconut); color: var(--coconut); }

/* =====================================================
   DASH CONTENT AREA
   ===================================================== */
.dash-content { padding: 28px 32px; flex: 1; }

/* =====================================================
   ALERT BANNERS
   ===================================================== */
.alert-d {
  padding: 14px 18px; border-radius: var(--r-sm); font-size: .82rem;
  display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
  font-weight: 400;
}
.alert-d i { flex-shrink: 0; }
.alert-d-success { background: var(--success-bg); color: var(--success); border: 1px solid #86efac; }
.alert-d-error   { background: var(--danger-bg);  color: var(--danger);  border: 1px solid #fca5a5; }
.alert-d-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid #fcd34d; }
.alert-d-info    { background: var(--info-bg);    color: var(--info);    border: 1px solid #93c5fd; }
.mb-4 { margin-bottom: 20px !important; }

/* =====================================================
   DASHBOARD CARDS
   ===================================================== */
.dash-card {
  background: var(--card-bg); border-radius: var(--r-md);
  box-shadow: var(--shadow-xs); border: 1px solid var(--border-light);
  overflow: hidden; transition: var(--t); backdrop-filter: blur(12px);
}
.dash-card:hover { box-shadow: var(--shadow-sm); }
.dash-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--border-light); flex-wrap: wrap; gap: 12px;
}
.dash-card-header h5 {
  font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 600;
  color: var(--forest); letter-spacing: -.01em;
}
.dash-card-body { padding: 24px; }

/* =====================================================
   STAT CARDS — Gradient Glass
   ===================================================== */
.stat-card {
  background: var(--card-bg); border-radius: var(--r-md); padding: 24px;
  display: flex; align-items: center; gap: 18px; border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs); transition: var(--t); position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(to right, var(--sage), var(--gold-mid));
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.stat-card:hover::before { transform: scaleX(1); }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.stat-icon {
  width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
  transition: var(--t);
}
.stat-icon.forest { background: rgba(26,58,14,.1); color: var(--forest); }
.stat-icon.green  { background: rgba(22,101,52,.1); color: var(--coconut); }
.stat-icon.orange { background: rgba(217,119,6,.1);  color: #b45309; }
.stat-icon.gold   { background: rgba(184,146,12,.1); color: var(--gold); }
.stat-icon.ocean  { background: rgba(13,74,107,.1);  color: #0e4d6e; }
.stat-icon.danger { background: rgba(220,38,38,.08); color: #dc2626; }
.stat-card:hover .stat-icon { transform: scale(1.1) rotate(-5deg); }

.stat-num { font-family: 'Playfair Display', serif; font-size: 1.9rem; font-weight: 600; color: var(--forest); line-height: 1; display: block; }
.stat-label { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .1em; display: block; margin-top: 4px; }

/* =====================================================
   TABLE
   ===================================================== */
.dash-table { width: 100%; border-collapse: collapse; font-size: .78rem; }
.dash-table thead tr { border-bottom: 2px solid var(--border-light); }
.dash-table th {
  font-size: .64rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .12em; padding: 12px 16px; text-align: left;
}
.dash-table td { padding: 14px 16px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.dash-table tbody tr { transition: background .2s; }
.dash-table tbody tr:hover { background: rgba(107,158,122,.04); }
.dash-table tbody tr:last-child td { border-bottom: none; }
.prop-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: var(--r-sm); }

/* =====================================================
   BADGES
   ===================================================== */
.badge-kp {
  display: inline-flex; align-items: center; padding: 4px 12px;
  border-radius: var(--r-full); font-size: .6rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
.badge-pending  { background: #fef3c7; color: #92400e; }
.badge-verified { background: var(--success-bg); color: var(--success); }
.badge-rejected { background: var(--danger-bg);  color: var(--danger); }
.badge-active   { background: rgba(107,158,122,.15); color: var(--coconut); }
.badge-inactive { background: var(--danger-bg); color: var(--danger); }
.badge-new      { background: var(--info-bg); color: var(--info); }
.badge-read     { background: var(--border-light); color: var(--text-muted); }
.badge-replied  { background: var(--success-bg); color: var(--success); }
.badge-closed   { background: var(--border-light); color: var(--text-muted); }

/* =====================================================
   BUTTONS (dashboard)
   ===================================================== */
.btn-d {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--r-xs);
  font-family: 'Poppins', sans-serif; font-size: .72rem; font-weight: 600;
  letter-spacing: .04em; cursor: pointer; border: 1.5px solid transparent;
  transition: var(--t); white-space: nowrap;
}
.btn-d-primary  { background: var(--forest-mid); color: #fff; border-color: var(--forest-mid); }
.btn-d-primary:hover  { background: var(--forest); transform: translateY(-1px); box-shadow: var(--shadow-sm); color: #fff; }
.btn-d-outline  { background: transparent; color: var(--text); border-color: var(--border); }
.btn-d-outline:hover  { border-color: var(--coconut); color: var(--coconut); }
.btn-d-danger   { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.btn-d-danger:hover   { background: #fca5a5; }
.btn-d-warning  { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.btn-d-warning:hover  { background: #fcd34d; }
.btn-d-success  { background: var(--success-bg); color: var(--success); border-color: #86efac; }
.btn-d-success:hover  { background: #86efac; }
.btn-d-sm  { padding: 6px 12px; font-size: .66rem; }
.btn-d-lg  { padding: 12px 22px; font-size: .8rem; }

/* =====================================================
   FORMS (dashboard)
   ===================================================== */
.form-d { display: flex; flex-direction: column; gap: 0; }
.form-d label {
  font-size: .68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-muted); margin-bottom: 7px; margin-top: 14px; display: block;
}
.form-d label:first-child { margin-top: 0; }
.form-d input, .form-d select, .form-d textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border);
  border-radius: var(--r-xs); font-family: 'Poppins', sans-serif;
  font-size: .82rem; color: var(--text); background: var(--body-bg);
  outline: none; transition: var(--t); margin-bottom: 4px;
}
.form-d input:focus, .form-d select:focus, .form-d textarea:focus {
  border-color: var(--coconut); background: #fff; box-shadow: 0 0 0 3px rgba(46,102,64,.1);
}
.form-d textarea { resize: vertical; min-height: 110px; }
.form-d input[type="file"] { padding: 8px 12px; cursor: pointer; }
.form-d input[type="checkbox"] { width: auto; accent-color: var(--forest-mid); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Checkbox group */
.check-group { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.check-group input { width: 16px; height: 16px; }
.check-group label { font-size: .82rem; color: var(--text); text-transform: none; letter-spacing: 0; margin: 0; font-weight: 400; }

/* =====================================================
   UPLOAD ZONE
   ===================================================== */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--r-md); padding: 36px 24px;
  text-align: center; cursor: pointer; transition: var(--t); background: var(--body-bg);
  margin-bottom: 12px;
}
.upload-zone:hover { border-color: var(--coconut); background: rgba(107,158,122,.04); }
.upload-zone i { font-size: 2rem; color: var(--sage); margin-bottom: 12px; display: block; }
.upload-zone p { font-size: .8rem; color: var(--text-muted); }
.upload-preview { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.upload-preview img { height: 72px; width: 100px; object-fit: cover; border-radius: var(--r-sm); border: 2px solid var(--border-light); }

/* =====================================================
   LOGIN PAGE
   ===================================================== */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--forest-dark,#12250C) 0%, var(--forest-black,#080F06) 100%);
  padding: 24px;
}
.login-box {
  width: 100%; max-width: 420px;
  background: rgba(254,252,249,.96); backdrop-filter: blur(24px);
  border-radius: var(--r-lg); padding: 48px 44px;
  box-shadow: 0 48px 120px rgba(6,13,4,.5), 0 0 0 1px rgba(255,255,255,.1);
}
.login-brand {
  font-family: 'Playfair Display', serif; font-size: 1.8rem; font-weight: 700;
  color: var(--forest); text-align: center; margin-bottom: 6px; letter-spacing: .01em;
}
.login-brand span { color: var(--coconut); }
.login-role { text-align: center; font-size: .68rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .18em; margin-bottom: 32px; }

/* =====================================================
   MODAL (reject reason)
   ===================================================== */
.modal-backdrop { position: fixed; inset: 0; background: rgba(6,13,4,.6); z-index: 1000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.modal-backdrop.open { display: flex; }
.modal-box { background: #fff; border-radius: var(--r-lg); padding: 36px; width: 100%; max-width: 480px; box-shadow: var(--shadow-xl, 0 40px 120px rgba(0,0,0,.3)); }
.modal-box h5 { font-family: 'Playfair Display', serif; font-size: 1.1rem; margin-bottom: 20px; color: var(--forest); }

/* =====================================================
   PENDING REVIEW CARD
   ===================================================== */
.review-card {
  background: var(--card-bg); border-radius: var(--r-md); overflow: hidden;
  box-shadow: var(--shadow-xs); border: 1px solid var(--border-light);
  display: flex; flex-direction: column; height: 100%; transition: var(--t);
}
.review-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.review-card img { width: 100%; height: 200px; object-fit: cover; }
.review-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.review-card-title { font-family: 'Playfair Display', serif; font-size: 1rem; color: var(--forest); margin-bottom: 8px; }
.review-card-meta { font-size: .72rem; color: var(--text-muted); margin-bottom: 16px; display: flex; flex-direction: column; gap: 4px; }
.review-card-actions { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
  .dash-main { margin-left: 0; }
  .sidebar { transform: translateX(-100%); transition: transform .35s var(--ease); }
  .sidebar.open { transform: translateX(0); }
  .topbar { padding: 0 20px; }
  .dash-content { padding: 20px; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .login-box { padding: 32px 24px; }
  .dash-card-header { flex-direction: column; align-items: flex-start; }
}
