/**
 * RentPinoy Multi-Role Dashboard Layout & Components Stylesheet
 * Covers: Owner, Associate, Staff, and Admin Dashboards
 */

.rp-dash-wrapper {
  font-family: var(--rp-font);
  display: flex;
  min-height: 800px;
  background: #F9FAFB;
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius-lg);
  overflow: hidden;
  box-shadow: var(--rp-shadow);
  margin: 30px auto;
  max-width: 1400px;
}

/* Sidebar */
.rp-dash-sidebar {
  width: 260px;
  background: #FFFFFF;
  border-right: 1px solid var(--rp-border);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  flex-shrink: 0;
}

.rp-dash-brand {
  font-size: 20px;
  font-weight: 800;
  color: var(--rp-primary);
  margin-bottom: 28px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rp-dash-brand span {
  color: var(--rp-orange);
}

.rp-dash-role-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--rp-primary-light);
  color: var(--rp-primary);
  padding: 3px 8px;
  border-radius: var(--rp-radius-pill);
  margin-left: auto;
}

.rp-dash-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.rp-dash-nav-item a,
.rp-dash-nav-item button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--rp-radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: #4B5563;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: var(--rp-transition);
}

.rp-dash-nav-item.active a,
.rp-dash-nav-item.active button,
.rp-dash-nav-item a:hover,
.rp-dash-nav-item button:hover {
  background: var(--rp-primary-light);
  color: var(--rp-primary);
}

.rp-dash-user-card {
  margin-top: auto;
  padding: 16px 12px 0;
  border-top: 1px solid var(--rp-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.rp-dash-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--rp-radius-pill);
  background: var(--rp-primary);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rp-dash-user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rp-dash-user-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--rp-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rp-dash-user-role {
  font-size: 12px;
  color: var(--rp-text-muted);
}

/* Main Dashboard Content Area */
.rp-dash-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.rp-dash-header {
  background: #FFFFFF;
  border-bottom: 1px solid var(--rp-border);
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rp-dash-page-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: var(--rp-text-main);
}

.rp-dash-content {
  padding: 32px;
  flex: 1;
}

/* Metric / KPI Cards */
.rp-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.rp-metric-card {
  background: #FFFFFF;
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius);
  padding: 20px 24px;
  box-shadow: var(--rp-shadow-sm);
  display: flex;
  flex-direction: column;
}

.rp-metric-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--rp-text-muted);
  margin-bottom: 8px;
}

.rp-metric-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--rp-text-main);
  line-height: 1.1;
}

.rp-metric-subtext {
  font-size: 12px;
  color: var(--rp-green);
  margin-top: 8px;
  font-weight: 500;
}

/* Tables */
.rp-table-wrap {
  background: #FFFFFF;
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius);
  box-shadow: var(--rp-shadow-sm);
  overflow-x: auto;
  margin-bottom: 32px;
}

.rp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}

.rp-table th {
  background: #F9FAFB;
  font-weight: 600;
  color: #4B5563;
  padding: 14px 20px;
  border-bottom: 1px solid var(--rp-border);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rp-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--rp-border);
  color: var(--rp-text-main);
  vertical-align: middle;
}

.rp-table tr:last-child td {
  border-bottom: none;
}

.rp-table tr:hover td {
  background: #F9FAFB;
}

/* Status Badges */
.rp-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--rp-radius-pill);
}

.rp-status-active, .rp-status-approved, .rp-status-confirmed, .rp-status-paid {
  background: var(--rp-green-light);
  color: var(--rp-green);
}

.rp-status-pending, .rp-status-in_review, .rp-status-requested {
  background: var(--rp-yellow-light);
  color: #B45309;
}

.rp-status-draft, .rp-status-inactive {
  background: #F3F4F6;
  color: #6B7280;
}

.rp-status-rejected, .rp-status-cancelled, .rp-status-failed {
  background: var(--rp-red-light);
  color: var(--rp-red);
}

/* 5-Step Wizard Progress */
.rp-wizard-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  background: #FFFFFF;
  padding: 20px 24px;
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius);
}

.rp-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--rp-text-muted);
}

.rp-step.active {
  color: var(--rp-primary);
}

.rp-step-num {
  width: 28px;
  height: 28px;
  border-radius: var(--rp-radius-pill);
  background: #E5E7EB;
  color: #4B5563;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.rp-step.active .rp-step-num {
  background: var(--rp-primary);
  color: #FFFFFF;
}

.rp-step-divider {
  flex: 1;
  height: 2px;
  background: #E5E7EB;
  margin: 0 16px;
}

/* Tabs Bar */
.rp-tab-bar {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--rp-border);
  margin-bottom: 24px;
}

.rp-tab-btn {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--rp-text-muted);
  border: none;
  background: transparent;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: var(--rp-transition);
}

.rp-tab-btn.active {
  color: var(--rp-primary);
  border-bottom-color: var(--rp-primary);
}

@media (max-width: 900px) {
  .rp-dash-wrapper {
    flex-direction: column;
  }
  .rp-dash-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--rp-border);
  }
}

