/* Seller Marketplace Dashboard Application Stylesheet - Ridian Theme */

.dash-app-layout {
  display: flex;
  min-height: 100vh;
  background-color: var(--paper);
}

/* Sidebar Navigation */
.dash-sidebar-nav {
  width: 260px;
  background: var(--ink);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1100;
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.dash-sidebar-header {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dash-sidebar-menu {
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dash-nav-group-title {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.08em;
  padding: 0.75rem 0.75rem 0.35rem 0.75rem;
}

.dash-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-xs);
  font-family: var(--body);
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.dash-nav-link:hover, .dash-nav-link.active {
  background: rgba(44, 195, 107, 0.15);
  color: #ffffff;
}

.dash-nav-link.active {
  background: var(--brass-deep);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(24, 150, 82, 0.3);
}

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

.dash-nav-link svg {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.6);
}

.dash-nav-link.active svg {
  color: #ffffff;
}

.dash-badge-count {
  font-family: var(--mono);
  font-size: 0.725rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--brass);
  color: #ffffff;
}

.dash-sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dash-seller-profile-mini {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.04);
}

.dash-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brass);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

/* Main Content Wrapper */
.dash-main-area {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar Header */
.dash-top-header {
  height: var(--header-height);
  background: var(--paper-card);
  border-bottom: 1px solid var(--line);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.dash-page-title-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dash-page-title {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--ink);
}

.dash-search-input-wrap {
  position: relative;
  width: 300px;
}

.dash-search-input {
  width: 100%;
  padding: 0.55rem 0.85rem 0.55rem 2.25rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  color: var(--ink);
}

.dash-search-input:focus {
  border-color: var(--brass-deep);
  background: #ffffff;
}

.dash-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-soft);
  width: 16px;
  height: 16px;
}

.dash-header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.dash-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  position: relative;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dash-icon-btn:hover {
  background: #ffffff;
  border-color: var(--ink-soft);
}

.dash-notify-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--void);
  border: 2px solid var(--paper-card);
}

/* Dashboard Views Container */
.dash-content-body {
  padding: 2rem;
  flex: 1;
}

.dash-view-pane {
  display: none;
  animation: fadeIn 0.35s ease forwards;
}

.dash-view-pane.active {
  display: block;
}

/* Overview Stat Cards Grid */
.stat-card-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.seller-stat-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.stat-card-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.stat-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  background: var(--green-soft);
  color: var(--brass-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card-val {
  font-family: var(--display);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.stat-card-trend {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
}

.stat-card-trend.up { color: var(--brass-deep); }
.stat-card-trend.down { color: var(--void); }

/* Quick Action Banner */
.quick-action-strip {
  background: linear-gradient(135deg, var(--ink) 0%, #152a4a 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-hover);
}

/* Tables */
.seller-table-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  overflow-x: auto;
}

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

.seller-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.seller-table th {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  text-align: left;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.seller-table td {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: middle;
}

.seller-table tr:hover td {
  background: var(--paper);
}

/* Status Pill Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
}

.status-active, .status-completed, .status-paid {
  background: var(--green-soft);
  color: var(--brass-deep);
  border: 1px solid rgba(44, 195, 107, 0.3);
}

.status-pending, .status-processing {
  background: #fef3c7;
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-rejected, .status-cancelled, .status-failed {
  background: var(--void-soft);
  color: var(--void);
  border: 1px solid rgba(178, 59, 46, 0.3);
}

/* Chat Layout */
.chat-container-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 320px 1fr;
  height: 650px;
  overflow: hidden;
  box-shadow: var(--shadow-hover);
}

.chat-sidebar {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

.chat-search-header {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
}

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

.chat-user-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.chat-user-item:hover, .chat-user-item.active {
  background: var(--paper-card);
}

.chat-user-item.active {
  border-left: 4px solid var(--brass);
}

.chat-main-stream {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
}

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

.chat-messages-body {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-bubble {
  max-width: 65%;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.925rem;
  line-height: 1.5;
}

.chat-bubble.inbound {
  background: var(--paper);
  color: var(--ink);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.chat-bubble.outbound {
  background: var(--brass-deep);
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.chat-input-bar {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--paper-card);
}

/* Modals - Clean Spacious & Professional Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 27, 51, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden; /* Prevent horizontal scrollbar */
  box-shadow: 0 25px 60px rgba(11, 27, 51, 0.35);
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-box {
  transform: translateY(0);
}

.modal-header {
  padding: 1.75rem 2rem 1.25rem 2rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--ink);
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  background: var(--paper);
}

/* Form Controls Inside Modals */
.modal-body .form-group {
  margin-bottom: 1.5rem;
}

.modal-body .form-label {
  display: block;
  font-family: var(--body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.modal-body .form-input {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--body);
  font-size: 0.95rem;
  background: var(--paper);
  color: var(--ink);
  box-sizing: border-box;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.modal-body .form-input:focus {
  border-color: var(--brass-deep);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(44, 195, 107, 0.2);
}

/* Modal Grid Layouts */
.modal-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.modal-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* Responsive Mobile Rules */
@media (max-width: 1024px) {
  .dash-sidebar-nav {
    transform: translateX(-100%);
  }
  .dash-sidebar-nav.mobile-open {
    transform: translateX(0);
  }
  .dash-main-area {
    margin-left: 0;
  }
  .stat-card-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .chat-container-card {
    grid-template-columns: 1fr;
  }
  .chat-sidebar {
    display: none;
  }
}

@media (max-width: 640px) {
  .stat-card-grid-4, .stat-card-grid-3 {
    grid-template-columns: 1fr;
  }
  .dash-top-header {
    padding: 0 1rem;
  }
  .dash-content-body {
    padding: 1rem;
  }
  .quick-action-strip {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  .modal-grid-2, .modal-grid-3 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .modal-body {
    padding: 1.25rem;
  }
}
