/* HR Office Dashboard - Retro Office Style */
/* CSS Variables */
:root {
  --bg: #faf8f5;
  --bg-alt: #f5f2ed;
  --fg: #1a1a1a;
  --text-secondary: #666;
  --border: #d4c5a9;
  --gold: #b8860b;
  --gold-light: #f4e4bc;
  --gold-dark: #8b6914;
  --accent: #2563eb;
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
}

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

body {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
}

/* Login Screen */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.login-box {
  background: var(--bg);
  border: 4px solid var(--border);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 8px 8px 0 var(--gold);
}

.login-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-logo-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.login-logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-dark);
}

.login-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.login-title {
  font-size: 1rem;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--fg);
}

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

.login-input {
  padding: 0.75rem;
  border: 2px solid var(--border);
  background: var(--bg);
  font-family: inherit;
  font-size: 0.875rem;
}

.login-input:focus {
  outline: none;
  border-color: var(--gold);
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.login-btn {
  padding: 0.75rem;
  background: var(--gold);
  color: white;
  border: none;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.5rem;
}

.login-btn:hover {
  background: var(--gold-dark);
}

.login-error {
  color: var(--error);
  font-size: 0.75rem;
  text-align: center;
  min-height: 1rem;
}

.login-security {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.625rem;
  color: var(--text-secondary);
  text-align: center;
}

.login-security-icon {
  margin-right: 0.25rem;
}

/* Hidden */
.hidden {
  display: none !important;
}

/* App */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  font-size: 1.5rem;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
}

.agent-avatars {
  display: flex;
  gap: 0.5rem;
}

.agent-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 0;
  background: var(--bg);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.agent-avatar.idle {
  background: var(--bg);
}

.agent-avatar.busy {
  background: var(--warning);
}

.agent-avatar.offline {
  opacity: 0.5;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-name {
  font-weight: 700;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg);
  padding: 0.125rem 0.5rem;
  border: 1px solid var(--border);
}

.logout-btn {
  padding: 0.25rem 0.75rem;
  background: transparent;
  border: 2px solid var(--border);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
}

.logout-btn:hover {
  background: var(--bg);
}

/* Main */
.main {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-alt);
  min-height: calc(100vh - 60px);
}

.sprint-board {
  flex: 1;
  background: var(--bg);
  border: 2px solid var(--border);
  padding: 1rem;
  box-shadow: 4px 4px 0 var(--border);
  min-width: 0;
}

.sprint-board h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--gold-dark);
}

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

.column {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 0.5rem;
  min-height: 200px;
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.column-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.column-count {
  background: var(--border);
  padding: 0.125rem 0.375rem;
  font-size: 0.625rem;
}

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

.task {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
}

.task:hover {
  border-color: var(--gold);
}

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

.task-number {
  font-size: 0.7rem;
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
}

.task-number:hover {
  text-decoration: underline;
}

.task-assignee {
  font-size: 0.6rem;
  background: var(--gold-light);
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
}

.task-title {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.task-meta {
  font-size: 0.625rem;
  color: var(--text-secondary);
}

.task-actions {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.375rem;
}

.task-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.125rem 0.375rem;
  cursor: pointer;
  font-size: 0.65rem;
  border-radius: 3px;
}

.task-btn:hover {
  background: var(--gold-light);
  border-color: var(--gold);
}

.task-review {
  border-left: 3px solid #10b981;
}

.new-task {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
}

.new-task input {
  flex: 1;
  padding: 0.5rem;
  border: 2px solid var(--border);
  background: var(--bg);
  font-family: inherit;
}

.new-task button {
  padding: 0.5rem 1rem;
  background: var(--gold);
  color: white;
  border: none;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* Right Panel - Resizable */
.right-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 300px;
  max-width: 800px;
  position: relative;
}

.resize-handle {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  cursor: col-resize;
  background: transparent;
  z-index: 10;
  transition: background 0.2s;
}

.resize-handle:hover,
.resize-handle.active {
  background: var(--gold);
}

/* Chat - IMPROVED */
.chat-container {
  background: #ffffff;
  border: 2px solid #333333;
  padding: 1rem;
  box-shadow: 4px 4px 0 #333333;
  grid-row: span 2;
  position: relative;
}

.chat-container h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: #1a1a1a;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-container h3::before {
  content: '💬';
}

.chat-messages {
  height: 400px;
  min-height: 200px;
  max-height: 700px;
  overflow-y: auto;
  border: 2px solid #333333;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: #ffffff !important;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.chat-resize-handle {
  height: 8px;
  cursor: row-resize;
  background: transparent;
  margin-top: 0.5rem;
  transition: background 0.2s;
  border-radius: 4px;
}

.chat-resize-handle:hover,
.chat-resize-handle.active {
  background: #b8860b;
}

.message {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.5;
  word-wrap: break-word;
  max-width: 100%;
}

.message.from-user {
  background: #fef3c7 !important;
  border-left: 4px solid #f59e0b;
  color: #1a1a1a !important;
  margin-left: 2rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message.from-nova {
  background: #d1fae5 !important;
  border-left: 4px solid #10b981;
  color: #1a1a1a !important;
  margin-right: 2rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message.from-guido {
  background: #fee2e2 !important;
  border-left: 4px solid #ef4444;
  color: #1a1a1a !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message.from-fixer {
  background: #dbeafe !important;
  border-left: 4px solid #3b82f6;
  color: #1a1a1a !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message.from-discord {
  background: #f3f4f6 !important;
  border-left: 4px solid #6b7280;
  color: #1a1a1a !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message-from {
  font-weight: 700;
  margin-bottom: 0.25rem;
  opacity: 0.8;
}

.message-text {
  color: #1a1a1a !important;
  font-size: 0.9rem;
}

.message-text strong {
  font-weight: 700;
}

.message-text em {
  font-style: italic;
}

.message-text code {
  background: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
}

.message-text pre {
  background: #f3f4f6 !important;
  color: #1a1a1a !important;
  padding: 0.75rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 0.5rem 0;
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  border: 1px solid #333333;
}

.message-text ul, .message-text ol {
  margin-left: 1.5rem;
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

.message-text li {
  margin-bottom: 0.125rem;
}

.message-text a {
  color: #2563eb;
  text-decoration: underline;
}

.message-text a:hover {
  color: #1d4ed8;
}

.message-text table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0;
  background: #ffffff !important;
  border: 1px solid #333333;
}

.message-text th {
  background: #b8860b !important;
  color: #ffffff !important;
  font-weight: 700;
  padding: 0.5rem;
  text-align: left;
  border: 1px solid #333333;
}

.message-text td {
  padding: 0.5rem;
  border: 1px solid #333333;
  background: #ffffff !important;
  color: #1a1a1a !important;
}

.message-text tr:nth-child(even) td {
  background: #f9f9f9 !important;
}

.message-time {
  font-size: 0.7rem;
  color: #9ca3af;
  margin-top: 0.375rem;
  text-align: right;
}

.chat-input {
  display: flex;
  gap: 0.5rem;
}

.chat-input input {
  flex: 1;
  padding: 0.75rem;
  border: 2px solid #333333;
  background: #ffffff;
  font-family: inherit;
  font-size: 0.9rem;
  color: #1a1a1a;
}

.chat-input input::placeholder {
  color: #666666;
}

.chat-input input:focus {
  outline: none;
  border-color: #b8860b;
  background: #fffef5;
}

.chat-input button {
  padding: 0.75rem 1.5rem;
  background: #b8860b;
  color: white;
  border: none;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.chat-input button:hover {
  background: #8b6914;
}

/* Agent Overview */
.agent-overview {
  background: var(--bg);
  border: 2px solid var(--border);
  padding: 1rem;
  box-shadow: 4px 4px 0 var(--border);
}

.agent-overview h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--gold-dark);
}

.agent-cards {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.agent-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  background: var(--bg);
}

.agent-icon {
  font-size: 1.5rem;
}

.agent-info {
  flex: 1;
}

.agent-name {
  font-weight: 700;
  font-size: 0.875rem;
}

.agent-task {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.agent-status {
  font-size: 0.625rem;
  padding: 0.125rem 0.5rem;
  border: 1px solid var(--border);
}

.agent-status.idle {
  background: var(--bg);
  color: var(--text-secondary);
}

.agent-status.busy {
  background: var(--warning);
  color: white;
}

/* Status Dashboard */
.status-dashboard {
  background: var(--bg);
  border: 2px solid var(--border);
  padding: 1rem;
  box-shadow: 4px 4px 0 var(--border);
}

.status-dashboard h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--gold-dark);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.status-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  background: var(--bg);
}

.status-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
}

.status-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.status-ok {
  color: #10b981;
}

.status-warning {
  color: #f59e0b;
}

.status-error {
  color: #ef4444;
}
}

.status-value {
  font-size: 0.875rem;
  font-weight: 700;
}

.sync-buttons {
  margin-top: 0.75rem;
}

.sync-btn {
  width: 100%;
  padding: 0.5rem;
  background: var(--bg);
  border: 2px solid var(--border);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.sync-btn:hover {
  background: var(--gold-light);
}

/* Responsive */
@media (max-width: 900px) {
  .main {
    flex-direction: column;
  }
  
  .right-panel {
    max-width: 100%;
    width: 100%;
    resize: none;
  }
  
  .columns {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .columns {
    grid-template-columns: 1fr;
  }
}
/* Agent Cards */
.agent-card {
  background: var(--bg);
  border: 2px solid var(--border);
  padding: 0.75rem;
  box-shadow: 4px 4px 0 var(--border);
  transition: all 0.3s ease;
}

.agent-card.agent-active {
  border-color: #10b981;
  box-shadow: 4px 4px 0 #10b981;
}

.agent-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.agent-name {
  font-weight: 700;
  color: var(--text);
}

.agent-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.agent-current-task {
  font-size: 0.75rem;
  margin-top: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: var(--bg-alt);
  border-radius: 4px;
}

.agent-current-task.idle {
  color: var(--text-secondary);
  font-style: italic;
}

.agent-current-task a {
  color: var(--gold);
  text-decoration: none;
}

.agent-current-task a:hover {
  text-decoration: underline;
}

.agent-status {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.agent-status.working {
  background: #d1fae5;
  color: #065f46;
}

.agent-status.idle {
  background: #f3f4f6;
  color: #6b7280;
}

.agent-status.reviewing {
  background: #fef3c7;
  color: #92400e;
}
