/* PropXchain Portal CSS */
:root {
  --primary: #0066cc;
  --primary-light: #2684e6;
  --primary-dark: #004fa3;
  --secondary: #2c3e50;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  --sidebar-width: 280px;
  --topnav-height: 64px;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  color: var(--gray-900);
  background-color: var(--gray-50);
  font-size: 14px;
}

/* Login Screen */
.login-screen {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 1rem;
}

.login-container {
  background: white;
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 420px;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo {
  height: 48px;
  margin-bottom: 1rem;
}

.login-header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.login-header p {
  color: var(--gray-600);
  font-size: 0.875rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 500;
  color: var(--gray-700);
  font-size: 0.875rem;
}

.form-group input {
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(6 102 204 / 0.1);
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

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

.login-error {
  display: none;
  color: var(--error);
  font-size: 0.875rem;
  text-align: center;
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgb(239 68 68 / 0.1);
  border: 1px solid rgb(239 68 68 / 0.2);
  border-radius: var(--radius);
}

.demo-credentials {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
}

.demo-credentials h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 1rem;
}

.credential-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.8125rem;
}

.credential-option code {
  background: var(--gray-200);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.75rem;
}

/* Portal Layout */
.portal-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow-y: auto;
  overflow-x: hidden;
  position: fixed;
  top: 0;
  left: 0;
}

/* Top Navigation */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topnav-height);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: white;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-logo {
  height: 32px;
}

.nav-title {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--gray-900);
}

.nav-center {
  flex: 1;
  max-width: 600px;
  margin: 0 2rem;
}

.search-bar {
  position: relative;
  width: 100%;
}

.search-bar i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
}

.search-bar input {
  width: 100%;
  padding: 0.625rem 1rem 0.625rem 2.5rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  background: var(--gray-50);
  transition: var(--transition);
}

.search-bar input:focus {
  outline: none;
  background: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(6 102 204 / 0.1);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: var(--radius);
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
}

.nav-btn:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--error);
  color: white;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
  border-radius: 0.75rem;
  min-width: 1.125rem;
  text-align: center;
}

/* User Menu */
.user-menu {
  position: relative;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.user-avatar:hover {
  border-color: var(--primary);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
  min-width: 200px;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  z-index: 1000;
}

.user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-info {
  padding: 0.75rem;
  text-align: center;
}

.user-name {
  font-weight: 600;
  color: var(--gray-900);
}

.user-role {
  font-size: 0.8125rem;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  color: var(--gray-700);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  transition: var(--transition);
}

.dropdown-item:hover {
  background: var(--gray-50);
  color: var(--gray-900);
}

.dropdown-item i {
  width: 16px;
  text-align: center;
}

.user-dropdown hr {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 0.5rem 0;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: var(--topnav-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--topnav-height));
  background: var(--gray-900);
  color: white;
  overflow-y: auto;
  border-right: 1px solid var(--gray-200);
  z-index: 10;
}

.sidebar-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--gray-700);
}

.sidebar-header span {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gray-400);
}

.sidebar-nav {
  padding: 1rem 0;
}

.nav-section {
  margin-bottom: 1.5rem;
}

.nav-section-title {
  padding: 0.5rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-400);
}

.nav-item {
  margin: 0.125rem 0.75rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--gray-300);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover {
  background: var(--gray-800);
  color: white;
}

.nav-link.active {
  background: var(--primary);
  color: white;
}

.nav-link i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

/* Main Content */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--topnav-height);
  padding: 2rem;
  background: #f8fafc;
  min-height: calc(100vh - var(--topnav-height));
  width: calc(100% - var(--sidebar-width));
  overflow-y: auto;
  overflow-x: hidden;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.page-content {
  min-height: 0; /* Ensure content can scroll */
}

.dashboard-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.page-header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--gray-900);
  flex: 1;
}

.page-actions {
  display: flex;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

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

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border-color: var(--gray-300);
}

.btn-secondary:hover {
  background: var(--gray-200);
}

/* Cards */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
}

/* Grid System */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Statistics Cards */
.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: white;
}

.stat-icon.blue { background: var(--primary); }
.stat-icon.green { background: var(--success); }
.stat-icon.orange { background: var(--warning); }
.stat-icon.purple { background: #8b5cf6; }

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0.5rem 0;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.stat-change {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.stat-change.positive {
  color: var(--success);
  background: rgba(16, 185, 129, 0.1);
}

.stat-change.negative {
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

/* Property Cards */
.property-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.property-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.property-info {
  padding: 1.25rem;
}

.property-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.property-address {
  color: var(--gray-600);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.property-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
}

.property-status {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Property Overview for Buyer Dashboard */
.property-overview {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2rem;
}

.property-overview .property-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
}

.property-overview .property-info h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.property-overview .property-address {
  color: var(--gray-600);
  margin-bottom: 0.5rem;
}

.property-overview .property-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

/* Timeline Styles */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1rem 0;
}

.timeline-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: white;
  border: 1px solid var(--gray-200);
}

.timeline-item.completed {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.05);
}

.timeline-item.in_progress {
  border-color: var(--primary);
  background: rgba(0, 102, 204, 0.05);
}

.timeline-item.pending {
  border-color: var(--gray-300);
  background: var(--gray-50);
}

.timeline-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: white;
}

.timeline-item.completed .timeline-icon {
  background: var(--success);
}

.timeline-item.in_progress .timeline-icon {
  background: var(--primary);
}

.timeline-item.pending .timeline-icon {
  background: var(--gray-400);
}

.timeline-content h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.timeline-date {
  font-size: 0.875rem;
  color: var(--gray-600);
}

/* Documents Summary */
.documents-summary {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.document-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}

.document-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
}

.document-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.document-name {
  font-weight: 500;
}

.document-status.verified {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.document-status.pending {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.document-status.under_review {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.progress-container {
  margin-top: 1rem;
}

.progress-label {
  font-size: 0.875rem;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--gray-200);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  transition: width 0.3s ease;
}

/* Blockchain Page Styles */
.contracts-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contract-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--gray-50);
}

.contract-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.contract-header h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.contract-details {
  margin-bottom: 1rem;
}

.contract-details p {
  margin: 0.5rem 0;
  font-size: 0.875rem;
}

.contract-details code {
  background: var(--gray-100);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.75rem;
}

.function-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.function-tag {
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.contract-events {
  margin-top: 1rem;
}

.contract-events h5 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.event-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background: white;
  border-radius: var(--radius-sm);
  margin: 0.25rem 0;
  font-size: 0.75rem;
}

.event-name {
  font-weight: 600;
}

.event-block {
  color: var(--gray-600);
  font-family: 'Monaco', 'Menlo', monospace;
}

/* Transactions Table */
.transactions-table {
  display: grid;
  gap: 0.5rem;
}

.table-header {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr 1fr 1fr;
  gap: 1rem;
  padding: 1rem;
  background: var(--gray-100);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
}

.table-row {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr 1fr 1fr;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  align-items: center;
  font-size: 0.875rem;
}

.table-row code {
  background: var(--gray-100);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.75rem;
}

/* Verification Grid */
.verification-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.verification-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.verification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.verification-header h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.verification-details p {
  margin: 0.5rem 0;
  font-size: 0.875rem;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.active {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.status-badge.completed {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.status-badge.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.status-badge.warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.status-badge.pending {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

/* Tables */
.table-container {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

.table th {
  background: var(--gray-50);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--gray-900);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.table td {
  font-size: 0.875rem;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background: var(--gray-50);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  border-radius: 9999px;
}

.status-badge.success {
  background: rgb(16 185 129 / 0.1);
  color: var(--success);
}

.status-badge.warning {
  background: rgb(245 158 11 / 0.1);
  color: var(--warning);
}

.status-badge.error {
  background: rgb(239 68 68 / 0.1);
  color: var(--error);
}

.status-badge.info {
  background: rgb(6 102 204 / 0.1);
  color: var(--primary);
}

/* Progress Bars */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--gray-200);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.progress-fill.success { background: var(--success); }
.progress-fill.warning { background: var(--warning); }
.progress-fill.error { background: var(--error); }

/* Notification Panel */
.notification-panel {
  position: fixed;
  top: var(--topnav-height);
  right: 0;
  width: 380px;
  height: calc(100vh - var(--topnav-height));
  background: white;
  box-shadow: var(--shadow-xl);
  border-left: 1px solid var(--gray-200);
  transform: translateX(100%);
  transition: var(--transition);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.notification-panel.show {
  transform: translateX(0);
}

.notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.notification-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
}

.close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: var(--radius);
  color: var(--gray-400);
  cursor: pointer;
  transition: var(--transition);
}

.close-btn:hover {
  background: var(--gray-100);
  color: var(--gray-600);
}

.notification-list {
  flex: 1;
  overflow-y: auto;
}

.notification-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  transition: var(--transition);
}

.notification-item:hover {
  background: var(--gray-50);
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-title {
  font-weight: 500;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.notification-message {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.4;
}

.notification-time {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-top: 0.5rem;
}

.notification-item.unread {
  background: rgb(6 102 204 / 0.02);
  border-left: 3px solid var(--primary);
}

/* Chart Container */
.chart-container {
  position: relative;
  height: 300px;
  padding: 1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .portal-app {
    grid-template-columns: 240px 1fr;
  }
  
  :root {
    --sidebar-width: 240px;
  }
}

@media (max-width: 768px) {
  .portal-app {
    grid-template-areas: 
      "nav nav"
      "main main";
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: fixed;
    left: -100%;
    top: var(--topnav-height);
    width: var(--sidebar-width);
    height: calc(100vh - var(--topnav-height));
    z-index: 999;
    transition: var(--transition);
  }
  
  .sidebar.show {
    left: 0;
  }
  
  .nav-center {
    display: none;
  }
  
  .main-content {
    padding: 1rem;
  }
  
  .grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .grid-cols-3,
  .grid-cols-2 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .grid-cols-4,
  .grid-cols-3,
  .grid-cols-2 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
  
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .notification-panel {
    width: 100vw;
  }
}

/* Loading States */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-300);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Blocker Cards and Indicators */
.blocker-card {
  border-left: 4px solid var(--warning);
}

.blocker-info {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.blocker-info.warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.blocker-info.info {
  background: rgba(0, 102, 204, 0.1);
  border: 1px solid rgba(0, 102, 204, 0.2);
}

.blocker-info.primary {
  background: rgba(0, 102, 204, 0.1);
  border: 1px solid rgba(0, 102, 204, 0.2);
}

.blocker-info.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.blocker-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.blocker-info.warning .blocker-icon {
  background: var(--warning);
  color: white;
}

.blocker-info.info .blocker-icon {
  background: var(--primary);
  color: white;
}

.blocker-info.primary .blocker-icon {
  background: var(--primary);
  color: white;
}

.blocker-info.success .blocker-icon {
  background: var(--success);
  color: white;
}

.blocker-details {
  flex: 1;
}

.blocker-details h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

.blocker-details p {
  color: var(--gray-700);
  margin-bottom: 0.75rem;
}

.blocker-responsible,
.blocker-document,
.blocker-stage {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.blocker-responsible strong,
.blocker-document strong,
.blocker-stage strong {
  color: var(--gray-700);
}

.party-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.party-badge.warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.party-badge.info {
  background: rgba(0, 102, 204, 0.1);
  color: var(--primary);
}

.party-badge.primary {
  background: rgba(0, 102, 204, 0.1);
  color: var(--primary);
}

.party-badge.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.blocker-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.blocker-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.blocker-indicator.warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.blocker-indicator.info {
  background: rgba(0, 102, 204, 0.1);
  color: var(--primary);
}

.blocker-indicator.primary {
  background: rgba(0, 102, 204, 0.1);
  color: var(--primary);
}

.blocker-indicator.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.transparency-stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.transparency-item {
  padding: 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--gray-50);
}

.transparency-item h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--gray-900);
}

/* Utility Classes */
.hidden { display: none !important; }
.visible { display: block !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-mono { font-family: 'JetBrains Mono', 'Courier New', monospace; }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
/* ========================================
   MOBILE & TABLET RESPONSIVE DESIGN
======================================== */

/* Mobile First Approach - Define mobile breakpoints */
:root {
  /* Add mobile-specific variables */
  --mobile-padding: 1rem;
  --tablet-padding: 1.5rem;
  --mobile-header-height: 56px;
  --mobile-sidebar-width: 100%;
  --tablet-sidebar-width: 260px;
}

/* ========================================
   MOBILE LAYOUT (0px - 768px)
======================================== */

@media (max-width: 768px) {
  /* Portal Layout */
  .portal-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
  }

  /* Top Navigation - Mobile Header */
  .top-nav {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--mobile-header-height);
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--mobile-padding);
    box-shadow: var(--shadow-md);
  }

  .mobile-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: var(--radius);
    transition: var(--transition);
  }

  .mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .portal-logo {
    font-size: 1.1rem !important;
    font-weight: 600;
  }

  /* Sidebar - Mobile Drawer */
  .sidebar {
    position: fixed !important;
    top: 0;
    left: -100% !important;
    width: var(--mobile-sidebar-width) !important;
    height: 100vh;
    background: var(--gray-800);
    z-index: 1001;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding-top: var(--mobile-header-height);
  }

  .sidebar.mobile-open {
    left: 0 !important;
  }

  .mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .mobile-overlay.show {
    opacity: 1;
    visibility: visible;
  }

  /* Main Content */
  .main-content {
    margin-left: 0 !important;
    margin-top: var(--mobile-header-height);
    padding: var(--mobile-padding);
    overflow-y: auto;
    height: calc(100vh - var(--mobile-header-height));
  }

  /* Page Header */
  .page-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .page-title {
    font-size: 1.5rem !important;
  }

  .page-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .page-actions .btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }

  /* Grid System - Mobile Stacking */
  .grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
  }

  .grid-cols-2,
  .grid-cols-3, 
  .grid-cols-4 {
    display: flex !important;
    flex-direction: column !important;
  }

  /* Cards */
  .card {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
  }

  .card-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem;
  }

  .card-title {
    font-size: 1.1rem !important;
  }

  .card-body {
    padding: 1rem !important;
  }

  /* Stats Cards */
  .stat-card {
    padding: 1rem !important;
    text-align: center;
  }

  .stat-card .stat-icon {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.2rem !important;
    margin: 0 auto 0.75rem;
  }

  .stat-card .stat-value {
    font-size: 1.5rem !important;
  }

  .stat-card .stat-label {
    font-size: 0.875rem !important;
  }

  /* Property Cards */
  .property-card {
    margin-bottom: 1rem !important;
  }

  .property-card-image {
    height: 160px !important;
  }

  .property-card-content {
    padding: 1rem !important;
  }

  .property-card-title {
    font-size: 1rem !important;
  }

  .property-card-price {
    font-size: 1.25rem !important;
  }

  /* Property Overview (Buyer Dashboard) */
  .property-overview {
    flex-direction: column !important;
    gap: 1rem;
  }

  .property-image {
    width: 100% !important;
    height: 200px !important;
    border-radius: var(--radius-md);
  }

  .property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
  }

  .property-info {
    width: 100% !important;
  }

  .property-info h2 {
    font-size: 1.25rem !important;
    margin-bottom: 0.5rem;
  }

  .property-price {
    font-size: 1.5rem !important;
  }

  /* Timeline */
  .timeline {
    padding-left: 0 !important;
  }

  .timeline-item {
    flex-direction: column !important;
    padding: 1rem !important;
    margin-bottom: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--gray-300);
  }

  .timeline-item.completed {
    border-left-color: var(--success);
  }

  .timeline-item.in-progress {
    border-left-color: var(--primary);
  }

  .timeline-item.pending {
    border-left-color: var(--gray-300);
  }

  .timeline-icon {
    position: relative !important;
    left: auto !important;
    margin-bottom: 0.5rem !important;
    width: 32px !important;
    height: 32px !important;
    font-size: 0.875rem !important;
  }

  .timeline-content h4 {
    font-size: 1rem !important;
    margin-bottom: 0.25rem;
  }

  .timeline-date {
    font-size: 0.875rem !important;
  }

  /* Documents */
  .document-item {
    flex-direction: column !important;
    padding: 1rem !important;
    gap: 0.5rem;
    text-align: center;
  }

  .document-icon {
    margin-bottom: 0.5rem;
  }

  .document-name {
    font-size: 0.875rem !important;
  }

  /* Navigation */
  .nav-section {
    margin-bottom: 1rem;
  }

  .nav-section-title {
    font-size: 0.875rem !important;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
  }

  .nav-item {
    margin-bottom: 0;
  }

  .nav-link {
    padding: 0.75rem 1rem !important;
    font-size: 0.875rem !important;
    border-radius: 0 !important;
  }

  .nav-link.active {
    background: rgba(255, 255, 255, 0.1) !important;
  }

  /* Buttons */
  .btn {
    padding: 0.75rem 1rem !important;
    font-size: 0.875rem !important;
    border-radius: var(--radius-md);
    min-height: 44px; /* Touch-friendly */
  }

  .btn-sm {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.8125rem !important;
  }

  /* Forms */
  .form-group {
    margin-bottom: 1rem;
  }

  .form-control {
    padding: 0.75rem !important;
    font-size: 1rem !important;
    min-height: 44px;
    border-radius: var(--radius);
  }

  .form-label {
    font-size: 0.875rem !important;
    margin-bottom: 0.5rem;
  }

  /* Tables - Convert to cards on mobile */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table {
    min-width: 600px;
    font-size: 0.875rem;
  }

  .table th,
  .table td {
    padding: 0.5rem !important;
    white-space: nowrap;
  }

  /* User Menu */
  .user-menu {
    position: relative;
  }

  .user-avatar {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.875rem !important;
  }

  .user-dropdown {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    min-width: 200px !important;
    margin-top: 0.5rem;
  }

  /* Notifications */
  .notifications-btn {
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    border-radius: var(--radius) !important;
  }

  .notification-panel {
    position: fixed !important;
    top: var(--mobile-header-height) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    max-width: none !important;
    border-radius: 0 !important;
    z-index: 1002 !important;
  }

  .notification-header {
    padding: 1rem !important;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .notification-list {
    height: calc(100vh - var(--mobile-header-height) - 60px) !important;
    overflow-y: auto;
  }

  .notification-item {
    padding: 1rem !important;
    border-bottom: 1px solid var(--gray-100);
  }
}

/* ========================================
   TABLET LAYOUT (769px - 1024px)
======================================== */

@media (min-width: 769px) and (max-width: 1024px) {
  :root {
    --sidebar-width: var(--tablet-sidebar-width);
  }

  .main-content {
    padding: var(--tablet-padding);
  }

  /* Grid adjustments for tablet */
  .grid-cols-4 {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem;
  }

  .grid-cols-3 {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem;
  }

  /* Property cards - 2 per row on tablet */
  .properties-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem;
  }

  /* Cards */
  .card-body {
    padding: 1.25rem;
  }

  /* Timeline adjustments */
  .timeline-item {
    padding: 1rem;
  }

  /* Responsive text sizes */
  .page-title {
    font-size: 1.75rem;
  }

  .stat-card .stat-value {
    font-size: 1.75rem;
  }

  /* Navigation */
  .nav-link {
    padding: 0.625rem 1rem;
  }
}

/* ========================================
   TOUCH & INTERACTION IMPROVEMENTS
======================================== */

/* Touch-friendly interactive elements */
@media (hover: none) and (pointer: coarse) {
  .btn,
  .nav-link,
  .card,
  .property-card {
    transition: transform 0.1s ease;
  }

  .btn:active,
  .nav-link:active,
  .card:active,
  .property-card:active {
    transform: scale(0.98);
  }

  /* Remove hover effects on touch devices */
  .btn:hover,
  .nav-link:hover,
  .card:hover {
    transform: none;
  }
}

/* ========================================
   UTILITY CLASSES FOR RESPONSIVE
======================================== */

/* Hide/Show on mobile */
.mobile-only {
  display: none;
}

.desktop-only {
  display: block;
}

@media (max-width: 768px) {
  .mobile-only {
    display: block;
  }
  
  .desktop-only {
    display: none;
  }
  
  .mobile-hidden {
    display: none !important;
  }
  
  .mobile-visible {
    display: block !important;
  }
}

/* Text size utilities */
.text-responsive {
  font-size: clamp(0.875rem, 2.5vw, 1rem);
}

.title-responsive {
  font-size: clamp(1.25rem, 4vw, 2rem);
}

/* Spacing utilities */
.p-mobile {
  padding: var(--mobile-padding);
}

.m-mobile {
  margin: var(--mobile-padding);
}

/* Flex utilities for mobile */
.mobile-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Safe area for mobile devices with notches */
.safe-top {
  padding-top: env(safe-area-inset-top);
}

.safe-bottom {
  padding-bottom: env(safe-area-inset-bottom);
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
======================================== */

/* Improve scrolling performance */
.main-content,
.sidebar,
.notification-panel {
  -webkit-overflow-scrolling: touch;
  overflow-scrolling: touch;
}

/* Reduce repaints on animations */
.sidebar,
.mobile-overlay,
.notification-panel {
  will-change: transform, opacity;
}

/* Optimize font rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}