:root {
  --bg1: #000000;
  --bg2: #0a0e14;
  --card: rgba(255, 255, 255, 0.03);
  --muted: #8aa0aa;
  --accent: #3ee8c8;
  --accent-2: #60a5fa;
  --glass: rgba(255, 255, 255, 0.02);
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --sidebar-width: 380px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial;
  background: #000000;
  color: #e6eef6;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.55;
}

.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* Sidebar Styles */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg2);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.sidebar-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.nav-tab {
  padding: 12px 20px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: right;
}

.nav-tab:hover {
  background: rgba(255, 255, 255, 0.03);
  color: #ffffff;
}

.nav-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(62, 232, 200, 0.05);
}

/* Filters Section */
.filters-section {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.filter-group {
  margin-bottom: 12px;
}

.filter-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted);
}

.filter-select,
.filter-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: #ffffff;
  font-size: 0.9rem;
  font-family: inherit;
}

.filter-select:focus,
.filter-input:focus {
  outline: 2px solid rgba(96, 165, 250, 0.14);
  border-color: rgba(96, 165, 250, 0.28);
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg1);
  height: 100vh;
  overflow-y: auto;
}

/* Empty State */
.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
  padding: 40px;
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.empty-state-subtext {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Posts List */
.posts-list {
  padding: 24px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.post-card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(62, 232, 200, 0.1);
}

.post-cover {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.post-cover-placeholder {
  width: 100%;
  height: 200px;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--muted);
}

.post-content {
  padding: 16px;
}

.post-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #ffffff;
}

.post-description {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.post-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.post-status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 8px;
  background: rgba(62, 232, 200, 0.1);
  color: var(--accent);
}

.post-price {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-2);
  margin-bottom: 12px;
}

.post-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* Repost Info Styles */
.post-repost-info {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255, 152, 0, 0.1);
  border-right: 3px solid #ff9800;
  border-radius: 6px;
  font-size: 0.875rem;
  line-height: 1.5;
}

.post-repost-info strong {
  color: #ffb74d;
  font-weight: 600;
}

.post-reposters {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(74, 158, 255, 0.1);
  border-radius: 6px;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Post Details */
.post-details {
  padding: 24px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.post-details-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.post-details-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.post-details-content {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 24px;
}

.post-detail-card {
  display: flex;
  flex-direction: column;
}

.post-detail-cover {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 24px;
}

.post-detail-info h2 {
  margin: 0 0 12px 0;
  font-size: 1.8rem;
  font-weight: 700;
}

.post-detail-status {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
  background: rgba(62, 232, 200, 0.1);
  color: var(--accent);
}

.post-detail-description {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 24px;
}

.post-detail-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.post-detail-section:last-child {
  border-bottom: none;
}

.post-detail-section h3 {
  margin: 0 0 16px 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.info-value {
  font-size: 0.95rem;
  color: #ffffff;
}

.post-link {
  color: var(--accent-2);
  text-decoration: none;
  word-break: break-all;
}

.post-link:hover {
  text-decoration: underline;
}

.teams-list,
.personnel-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.team-item,
.personnel-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.team-image {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.post-detail-stats {
  display: flex;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

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

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

/* Repost Section in Details */
.post-detail-repost-section {
  padding: 16px;
  background: rgba(255, 152, 0, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 152, 0, 0.2);
}

.post-detail-repost-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-detail-repost-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 152, 0, 0.3);
}

.post-detail-repost-user-info {
  flex: 1;
}

.post-detail-repost-user-name {
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 4px;
}

.post-detail-repost-date {
  font-size: 0.875rem;
  color: var(--muted);
}

.post-detail-actions {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}

/* Dialog/Modal Styles */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.dialog-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.dialog {
  background: var(--bg2);
  border-radius: 16px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s;
}

.dialog-overlay.active .dialog {
  transform: scale(1);
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.dialog-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
}

.dialog-close {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s;
}

.dialog-close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.dialog-body {
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #ffffff;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: #ffffff;
  font-size: 0.95rem;
  font-family: inherit;
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: 2px solid rgba(96, 165, 250, 0.14);
  border-color: rgba(96, 165, 250, 0.28);
}

.form-help {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}

.dialog-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn {
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  border: 0;
  font-size: 0.9rem;
  transition:
    transform 0.2s,
    opacity 0.2s;
}

.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #051017;
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--error);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  opacity: 0.9;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-icon {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent);
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Settings Panel */
.settings-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.settings-panel.active {
  opacity: 1;
  pointer-events: all;
}

.settings-content {
  background: var(--bg2);
  border-radius: 16px;
  padding: 32px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Team and Assignment Form Items */
.team-form-item,
.assignment-form-item {
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 12px;
}

/* Badge */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(62, 232, 200, 0.1);
  color: var(--accent);
  border: 1px solid rgba(62, 232, 200, 0.3);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.pagination button {
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
  background: rgba(62, 232, 200, 0.1);
  border-color: var(--accent);
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* User Info */
.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    width: 100%;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}
