/* ============================================
   HOSPITALITY9JA — DASHBOARD STYLES
   ============================================ */

:root {
  --dash-color: #0369a1;
  --sidebar-width: 260px;
}

.dashboard-body { background: #f1f5f9; overflow-x: hidden; }

/* ============================================
   LAYOUT
   ============================================ */
.dash-layout { display: flex; min-height: 100vh; }
.dash-sidebar {
  width: var(--sidebar-width); background: #0f172a;
  display: flex; flex-direction: column; position: fixed;
  top: 0; left: 0; bottom: 0; z-index: 200;
  transition: transform .3s ease;
  overflow-y: auto;
}
.dash-main { margin-left: var(--sidebar-width); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.dash-sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.dash-logo { display: flex; align-items: center; gap: 10px; color: #fff; font-size: .95rem; font-weight: 700; }
.sidebar-close { color: rgba(255,255,255,.5); width: 32px; height: 32px; display: none; align-items: center; justify-content: center; border-radius: 8px; }
.sidebar-close:hover { color: #fff; background: rgba(255,255,255,.08); }

/* ============================================
   NAVIGATION
   ============================================ */
.dash-nav { padding: 16px 12px; flex: 1; }
.dash-nav-section { margin-bottom: 24px; }
.dash-nav-label {
  font-size: .65rem; font-weight: 700; letter-spacing: 1.5px;
  color: rgba(255,255,255,.35); text-transform: uppercase;
  padding: 0 12px; margin-bottom: 8px; display: block;
}
.dash-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  color: rgba(255,255,255,.65); font-size: .875rem; font-weight: 500;
  margin-bottom: 2px; transition: all .2s; position: relative;
}
.dash-nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.dash-nav-link.active { background: var(--dash-color); color: #fff; }
.dash-nav-link i { width: 18px; text-align: center; font-size: .9rem; }
.nav-badge {
  margin-left: auto; background: #ef4444; color: #fff;
  font-size: .65rem; font-weight: 700; padding: 2px 7px;
  border-radius: 20px; line-height: 1.4;
}

/* ============================================
   HEADER
   ============================================ */
.dash-header {
  height: 64px; background: #fff; border-bottom: 1px solid #e2e8f0;
  display: flex; align-items: center; padding: 0 24px;
  position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.sidebar-toggle {
  width: 36px; height: 36px; border-radius: 8px;
  color: #64748b; display: flex; align-items: center; justify-content: center;
  font-size: 1rem; margin-right: 16px; transition: all .2s;
}
.sidebar-toggle:hover { background: #f1f5f9; color: #1e293b; }
.dash-header-title { font-size: 1rem; font-weight: 600; color: #1e293b; flex: 1; }
.dash-header-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.dash-notif {
  width: 36px; height: 36px; border-radius: 8px; background: #f1f5f9;
  display: flex; align-items: center; justify-content: center;
  color: #64748b; font-size: .9rem; position: relative; transition: all .2s;
}
.dash-notif:hover { background: #e2e8f0; }
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  width: 18px; height: 18px; background: #ef4444; color: #fff;
  border-radius: 50%; font-size: .6rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}
.dash-user-menu {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px; border-radius: 10px; cursor: pointer;
  transition: all .2s; border: 1px solid transparent;
}
.dash-user-menu:hover { background: #f1f5f9; border-color: #e2e8f0; }
.dash-avatar {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--dash-color); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700;
}
.dash-user-name { font-size: .85rem; font-weight: 600; color: #1e293b; }

/* ============================================
   CONTENT
   ============================================ */
.dash-content { flex: 1; padding: 28px 28px 40px; overflow-y: auto; }
.dash-page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.dash-page-header h1 { font-size: 1.4rem; font-weight: 700; color: #0f172a; }
.dash-page-header p { font-size: .85rem; color: #64748b; margin-top: 2px; }

/* ============================================
   STAT CARDS
   ============================================ */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: #fff; border-radius: 14px; padding: 20px;
  display: flex; align-items: center; gap: 16px;
  border: 1px solid #e2e8f0; box-shadow: 0 1px 4px rgba(0,0,0,.04);
  transition: all .2s;
}
.stat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); transform: translateY(-2px); }
.stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.stat-blue .stat-icon { background: #dbeafe; color: #1d4ed8; }
.stat-green .stat-icon { background: #d1fae5; color: #065f46; }
.stat-gold .stat-icon { background: #fef3c7; color: #92400e; }
.stat-purple .stat-icon { background: #ede9fe; color: #5b21b6; }
.stat-red .stat-icon { background: #fee2e2; color: #991b1b; }
.stat-info { display: flex; flex-direction: column; min-width: 0; }
.stat-value { font-size: 1.6rem; font-weight: 800; color: #0f172a; line-height: 1; }
.stat-label { font-size: .78rem; color: #64748b; margin-top: 4px; }
.stat-change { font-size: .72rem; margin-top: 4px; }
.stat-change.up { color: #059669; }
.stat-change.down { color: #dc2626; }
.stats-grid-sm { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 20px; }
.mini-stat { background: #fff; border-radius: 10px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; border: 1px solid #e2e8f0; }
.mini-stat i { font-size: 1.1rem; }
.mini-stat strong { font-size: 1.1rem; font-weight: 700; color: #0f172a; display: block; }
.mini-stat small { font-size: .72rem; color: #64748b; }

/* ============================================
   DASHBOARD CARDS
   ============================================ */
.dash-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.dash-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.dash-card {
  background: #fff; border-radius: 14px; padding: 20px;
  border: 1px solid #e2e8f0; box-shadow: 0 1px 4px rgba(0,0,0,.04);
  margin-bottom: 20px;
}
.dash-card:last-child { margin-bottom: 0; }
.dash-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.dash-card-header h3 { font-size: .95rem; font-weight: 700; color: #0f172a; }
.dash-card-link { font-size: .78rem; color: var(--dash-color); font-weight: 600; }
.dash-card-link:hover { text-decoration: underline; }

/* ============================================
   TABLE
   ============================================ */
.dash-table-wrap { overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.dash-table th { padding: 10px 14px; text-align: left; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: #94a3b8; background: #f8fafc; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.dash-table td { padding: 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.dash-table tr:last-child td { border-bottom: none; }
.dash-table tr:hover td { background: #f8fafc; }
.t-avatar { width: 36px; height: 36px; border-radius: 8px; background: var(--dash-color); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; flex-shrink: 0; }
.t-name { font-weight: 600; color: #1e293b; }
.t-sub { font-size: .75rem; color: #94a3b8; }
.t-actions { display: flex; gap: 6px; }

/* ============================================
   PARTNER-SPECIFIC
   ============================================ */
.partner-prop-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
.partner-prop-row:last-child { border-bottom: none; }
.ppr-img { width: 56px; height: 56px; border-radius: 10px; background-size: cover; background-position: center; flex-shrink: 0; }
.ppr-info { flex: 1; min-width: 0; }
.ppr-info h4 { font-size: .9rem; font-weight: 700; color: #1e293b; margin-bottom: 2px; }
.ppr-info p { font-size: .78rem; color: #64748b; }
.ppr-stats { display: flex; gap: 12px; font-size: .75rem; color: #64748b; margin-top: 4px; flex-wrap: wrap; }
.ppr-actions { display: flex; gap: 6px; }
.upcoming-booking { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
.upcoming-booking:last-child { border-bottom: none; }
.ub-info { flex: 1; min-width: 0; }
.ub-info strong { font-size: .88rem; color: #1e293b; display: block; }
.ub-info p { font-size: .75rem; color: #64748b; }
.ub-amount { font-size: .9rem; font-weight: 700; color: #1e293b; text-align: right; }
.listings-partner-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(340px,1fr)); gap: 20px; }
.partner-listing-card { background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid #e2e8f0; transition: all .2s; }
.partner-listing-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.plc-images { height: 180px; display: grid; grid-template-columns: 2fr 1fr; gap: 2px; overflow: hidden; }
.plc-img { background-size: cover; background-position: center; }
.plc-main { grid-row: span 2; }
.plc-body { padding: 16px; }
.plc-status { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.plc-body h3 { font-size: .95rem; font-weight: 700; color: #1e293b; margin-bottom: 4px; }
.plc-body p { font-size: .8rem; color: #64748b; display: flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.plc-stats { display: flex; gap: 12px; font-size: .78rem; color: #64748b; margin-bottom: 14px; flex-wrap: wrap; }
.plc-stat { display: flex; align-items: center; gap: 4px; }
.plc-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================
   CALENDAR / AVAILABILITY
   ============================================ */
.calendar-section { margin-bottom: 20px; }
.availability-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: #64748b; }
.legend-dot { width: 12px; height: 12px; border-radius: 3px; }
.legend-dot.available { background: #d1fae5; border: 1px solid #6ee7b7; }
.legend-dot.booked { background: #fee2e2; border: 1px solid #fca5a5; }
.legend-dot.blocked { background: #f1f5f9; border: 1px solid #cbd5e1; }
.mini-calendar { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.cal-day-header { font-size: .7rem; font-weight: 700; text-transform: uppercase; color: #94a3b8; text-align: center; padding: 8px 0; }
.cal-day {
  aspect-ratio: 1; border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-size: .8rem; cursor: pointer; transition: all .15s;
  position: relative; font-weight: 500;
}
.cal-day.empty { cursor: default; }
.cal-day.available { background: #d1fae5; color: #065f46; }
.cal-day.booked { background: #fee2e2; color: #991b1b; }
.cal-day.blocked { background: #f1f5f9; color: #94a3b8; }
.cal-day.today { border: 2px solid var(--dash-color); font-weight: 700; }
.cal-day:not(.empty):hover { transform: scale(1.1); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.cal-month-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-month-nav h4 { font-weight: 700; color: #1e293b; }
.cal-nav-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid #e2e8f0; display: flex; align-items: center; justify-content: center; color: #64748b; transition: all .2s; }
.cal-nav-btn:hover { background: #f1f5f9; }

/* ============================================
   EARNINGS
   ============================================ */
.earnings-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; }
.earn-summary { display: flex; flex-direction: column; gap: 0; }
.earn-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f1f5f9; font-size: .88rem; }
.earn-item strong { font-weight: 700; color: #1e293b; }
.earn-item.earn-total { border-bottom: none; }
.earn-total strong { color: #059669; font-size: 1.1rem; }
.fee-amount { color: #dc2626; }
.earn-chart-placeholder { background: #f8fafc; border-radius: 10px; padding: 40px; text-align: center; color: #94a3b8; }
.earn-chart-placeholder i { font-size: 2rem; margin-bottom: 8px; display: block; }
.earnings-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 20px; }
.earn-card { background: #fff; border-radius: 14px; padding: 20px; border: 1px solid #e2e8f0; text-align: center; }
.earn-card .earn-amount { font-size: 1.8rem; font-weight: 800; color: #0f172a; margin: 8px 0 4px; }
.earn-card .earn-period { font-size: .75rem; color: #94a3b8; }
.earn-card .earn-label { font-size: .82rem; color: #64748b; }
.payout-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid #f1f5f9; }
.payout-row:last-child { border-bottom: none; }

/* ============================================
   MESSAGES
   ============================================ */
.messages-layout { display: grid; grid-template-columns: 320px 1fr; gap: 0; background: #fff; border-radius: 14px; border: 1px solid #e2e8f0; overflow: hidden; min-height: 600px; }
.messages-list { border-right: 1px solid #e2e8f0; overflow-y: auto; }
.messages-list-header { padding: 16px; border-bottom: 1px solid #e2e8f0; }
.messages-list-header h3 { font-size: .95rem; font-weight: 700; }
.message-item { display: flex; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #f8fafc; cursor: pointer; transition: all .15s; }
.message-item:hover, .message-item.active { background: #f8fafc; }
.message-item.unread { background: #eff6ff; }
.message-item.unread:hover { background: #dbeafe; }
.msg-avatar { width: 40px; height: 40px; border-radius: 10px; background: var(--dash-color); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; flex-shrink: 0; }
.msg-preview { flex: 1; min-width: 0; }
.msg-preview-name { font-size: .85rem; font-weight: 700; color: #1e293b; display: flex; justify-content: space-between; margin-bottom: 2px; }
.msg-preview-text { font-size: .78rem; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-preview-time { font-size: .7rem; color: #94a3b8; white-space: nowrap; }
.messages-unread-dot { width: 8px; height: 8px; background: #1d4ed8; border-radius: 50%; flex-shrink: 0; margin-top: 6px; }
.messages-chat { display: flex; flex-direction: column; }
.chat-header { padding: 16px 20px; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; gap: 12px; }
.chat-messages { flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.chat-bubble { max-width: 70%; padding: 10px 14px; border-radius: 14px; font-size: .875rem; line-height: 1.5; }
.chat-bubble.received { background: #f1f5f9; color: #334155; border-radius: 4px 14px 14px 14px; align-self: flex-start; }
.chat-bubble.sent { background: var(--dash-color); color: #fff; border-radius: 14px 14px 4px 14px; align-self: flex-end; }
.chat-time { font-size: .65rem; opacity: .6; margin-top: 4px; text-align: right; }
.chat-input-area { padding: 12px 16px; border-top: 1px solid #e2e8f0; display: flex; gap: 10px; }
.chat-input { flex: 1; padding: 10px 14px; border: 1.5px solid #e2e8f0; border-radius: 24px; font-size: .88rem; outline: none; font-family: inherit; }
.chat-input:focus { border-color: var(--dash-color); }
.chat-send-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--dash-color); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; }
.chat-send-btn:hover { opacity: .85; }

/* ============================================
   ADMIN-SPECIFIC
   ============================================ */
.admin-header { background: linear-gradient(135deg,#7f1d1d,#dc2626); color: #fff; padding: 20px; margin: -28px -28px 24px; border-radius: 0 0 20px 20px; }
.admin-page-title { font-size: 1.3rem; font-weight: 700; }
.admin-page-sub { font-size: .82rem; opacity: .8; margin-top: 4px; }
.blog-posts-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(320px,1fr)); gap: 20px; }
.blog-admin-card { background: #fff; border-radius: 12px; border: 1px solid #e2e8f0; overflow: hidden; }
.blog-admin-img { height: 160px; background-size: cover; background-position: center; }
.blog-admin-body { padding: 16px; }
.blog-admin-body h4 { font-size: .9rem; font-weight: 700; color: #1e293b; margin-bottom: 6px; }
.blog-admin-body p { font-size: .78rem; color: #64748b; margin-bottom: 10px; }
.blog-admin-actions { display: flex; gap: 8px; }
.property-admin-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(360px,1fr)); gap: 20px; }
.property-admin-card { background: #fff; border-radius: 12px; border: 1px solid #e2e8f0; overflow: hidden; }
.property-admin-img { height: 140px; background-size: cover; background-position: center; position: relative; }
.property-admin-body { padding: 14px; }
.property-admin-body h4 { font-size: .9rem; font-weight: 700; margin-bottom: 4px; }
.property-admin-body p { font-size: .78rem; color: #64748b; margin-bottom: 10px; }
.user-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
.user-row:last-child { border-bottom: none; }
.admin-blog-editor { background: #fff; border-radius: 14px; border: 1px solid #e2e8f0; padding: 28px; }
.admin-blog-editor h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; }
.blog-editor-grid { display: grid; gap: 16px; }
.editor-textarea { width: 100%; padding: 14px; border: 1.5px solid #e2e8f0; border-radius: 10px; font-size: .9rem; font-family: inherit; resize: vertical; min-height: 200px; outline: none; line-height: 1.7; }
.editor-textarea:focus { border-color: var(--dash-color); box-shadow: 0 0 0 3px rgba(220,38,38,.08); }
.admin-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.settings-section { background: #fff; border-radius: 14px; border: 1px solid #e2e8f0; padding: 24px; }
.settings-section h3 { font-size: 1rem; font-weight: 700; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid #f1f5f9; }
.settings-form { display: flex; flex-direction: column; gap: 14px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #f8fafc; }
.setting-row:last-child { border-bottom: none; }
.setting-info h4 { font-size: .88rem; font-weight: 600; color: #1e293b; }
.setting-info p { font-size: .78rem; color: #94a3b8; }
.toggle-switch { width: 44px; height: 24px; border-radius: 12px; background: #e2e8f0; position: relative; cursor: pointer; transition: all .2s; }
.toggle-switch.on { background: #059669; }
.toggle-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: all .2s; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.toggle-switch.on::after { left: calc(100% - 22px); }

/* ============================================
   GUEST DASHBOARD
   ============================================ */
.guest-bookings { display: flex; flex-direction: column; gap: 14px; }
.guest-booking-card { background: #fff; border-radius: 14px; border: 1px solid #e2e8f0; padding: 20px; display: grid; grid-template-columns: 80px 1fr auto; gap: 16px; align-items: center; transition: all .2s; }
.guest-booking-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.gb-img { width: 80px; height: 80px; border-radius: 10px; background-size: cover; background-position: center; }
.gb-info h4 { font-size: .95rem; font-weight: 700; color: #1e293b; margin-bottom: 4px; }
.gb-info p { font-size: .8rem; color: #64748b; margin-bottom: 6px; }
.gb-dates { display: flex; gap: 12px; flex-wrap: wrap; font-size: .78rem; color: #94a3b8; }
.gb-dates span { display: flex; align-items: center; gap: 4px; }
.gb-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.gb-amount { font-size: 1.1rem; font-weight: 800; color: #1e293b; }
.wishlist-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 16px; }
.profile-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ============================================
   RESPONSIVE DASHBOARD
   ============================================ */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .stats-grid-sm { grid-template-columns: repeat(2,1fr); }
  .dash-grid-2 { grid-template-columns: 1fr; }
  .earnings-grid { grid-template-columns: 1fr; }
  .admin-settings-grid { grid-template-columns: 1fr; }
  .profile-form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .dash-sidebar { transform: translateX(-100%); }
  .dash-sidebar.open { transform: translateX(0); }
  .dash-main { margin-left: 0; }
  .sidebar-close { display: flex; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .messages-layout { grid-template-columns: 1fr; }
  .messages-list { border-right: none; border-bottom: 1px solid #e2e8f0; max-height: 280px; }
  .dash-content { padding: 16px; }
  .blog-posts-grid { grid-template-columns: 1fr; }
  .property-admin-grid { grid-template-columns: 1fr; }
  .listings-partner-grid { grid-template-columns: 1fr; }
  .guest-booking-card { grid-template-columns: 1fr; }
  .gb-img { width: 100%; height: 140px; }
  .earnings-mini { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stats-grid-sm { grid-template-columns: 1fr 1fr; }
}
