:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --bg-dark: #050505;
  --bg-sidebar: #0a0a0a;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.08);
  --success: #10b981;
  --danger: #ef4444;
  --sidebar-width: 280px;
  --dynamic-sidebar-width: 280px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow: hidden;
}

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

.sidebar {
  position: sticky;
  left: 0;
  top: 0;
  height: 100vh;
  display: flex;
  z-index: 1000;
  border-right: 1px solid var(--border);
  width: calc(64px + var(--dynamic-sidebar-width, 280px));
}

.resizer {
  width: 4px;
  cursor: col-resize;
  background: transparent;
  transition: background 0.2s;
  z-index: 1001;
}

.resizer:hover, .resizer:active {
  background: var(--primary);
}

.activity-bar {
  width: 64px;
  background: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0;
  gap: 1.5rem;
  border-right: 1px solid var(--border);
}

.logo-mini img {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

.activity-item {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.activity-item .icon {
  width: 24px;
  height: 24px;
  opacity: 0.6;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-muted);
}

.activity-item:hover .icon {
  opacity: 1;
  color: var(--text-main);
  transform: scale(1.1);
}

.activity-item.active .icon {
  opacity: 1;
  color: var(--primary);
  filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.5));
}

.activity-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.activity-item.active {
  background: rgba(99, 102, 241, 0.1);
}

/* Side Panel (Details) */
.side-panel {
  width: var(--dynamic-sidebar-width, 280px);
  background: rgba(10, 10, 10, 0.98);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
}

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

.panel-header h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 700;
}

.panel-nav {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.panel-label {
  padding: 0.5rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 1rem;
}

.panel-item {
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  text-align: left;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.panel-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
}

.panel-item.active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-weight: 600;
}

.sidebar-footer {
  margin-top: auto;
  padding: 1.5rem;
  font-size: 0.75rem;
  color: #475569;
  border-top: 1px solid var(--border);
}

.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-dark);
  min-width: 0;
}

.main-header {
  height: 70px;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.3);
}

.main-header h1 {
  font-size: 1.25rem;
  font-weight: 500;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
}

.content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 70px);
  width: 100%;
}

/* Split View (Master-Detail) */
.split-view {
  display: flex;
  height: 100%;
  overflow: hidden;
}

.master-list {
  width: var(--dynamic-master-width, 320px);
  background: rgba(0, 0, 0, 0.2);
  overflow-y: auto;
}

.resizer-v {
  width: 1px;
  cursor: col-resize;
  background: var(--border);
  position: relative;
  transition: all 0.2s;
  z-index: 10;
}

.resizer-v::after {
  content: '';
  position: absolute;
  left: -4px;
  right: -4px;
  top: 0;
  bottom: 0;
}

.resizer-v:hover, .resizer-v:active {
  background: var(--primary);
  width: 2px;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.detail-pane {
  flex: 1; /* Take remaining space */
  overflow-y: auto;
  background: var(--bg-dark);
  min-width: 0;
}

.empty-list-message {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  opacity: 0.5;
}

.list-item {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.list-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.list-item.active {
  background: rgba(99, 102, 241, 0.1);
  border-left-color: var(--primary);
}

.item-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.item-target {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.9rem;
}

.item-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.item-snippet {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Detail Pane Contents */
.preview-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.preview-header {
  padding: 1.5rem 2.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  position: sticky;
  top: 0;
  z-index: 10;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.header-info h2 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
  color: var(--text-main);
}

.full-timestamp {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  gap: 1rem;
}

.preview-body {
  padding: 2.5rem;
  overflow-y: auto;
}

.full-content {
  background: #000000;
  padding: 2.5rem;
  border-radius: 1rem;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 1rem;
  line-height: 1.7;
  color: #e2e8f0;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-metadata {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.detail-metadata h4 {
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-metadata code {
  display: block;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.75rem;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.no-selection {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-style: italic;
}

/* Settings View */
.settings-view {
  padding: 2.5rem;
  max-width: 900px;
}

.settings-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
}

.settings-card h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.code-block {
  background: #000000;
  padding: 1.5rem;
  border-radius: 0.75rem;
  position: relative;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
}

.code-block pre {
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  color: #94a3b8;
  overflow-x: auto;
}

.copy-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s;
}

.copy-btn:hover {
  background: var(--primary-hover);
}

.info-box {
  padding: 1rem;
  background: rgba(99, 102, 241, 0.05);
  border-left: 4px solid var(--primary);
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.select-wrapper {
  position: relative;
  max-width: 240px;
  margin-top: 1rem;
}

.lang-select {
  width: 100%;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text-main);
  font-size: 0.95rem;
  cursor: pointer;
  appearance: none;
  transition: all 0.2s;
  outline: none;
}

.lang-select:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.lang-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.select-wrapper::after {
  content: '▼';
  font-size: 0.7rem;
  color: var(--text-muted);
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.lang-select option {
  background: #1a1a1a;
  color: var(--text-main);
  padding: 1rem;
}

.empty-state {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-align: center;
  padding: 4rem;
}

.empty-icon {
  margin-bottom: 1.5rem;
  opacity: 0.3;
  color: var(--text-muted);
}

.empty-icon svg {
  display: block;
  margin: 0 auto;
}

/* Common Buttons */
.btn-approve {
  background: var(--success);
  color: white;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-approve:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.btn-reject {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: 0.6rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-reject:hover {
  background: rgba(239, 68, 68, 0.1);
}
