/* DAIFER Portal — minimal, brand-consistent styling */
:root {
  --p-navy: #1e3a8a;
  --p-navy-2: #2563eb;
  --p-amber: #f59e0b;
  --p-amber-dark: #ea580c;
  --p-bg: #f8fafc;
  --p-card: #ffffff;
  --p-border: #e2e8f0;
  --p-text: #0f172a;
  --p-muted: #64748b;
  --p-error: #dc2626;
  --p-success: #059669;
}
.portal {
  min-height: 100vh;
  background: var(--p-bg);
  color: var(--p-text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.portal a { color: var(--p-navy-2); text-decoration: none; }
.portal a:hover { color: var(--p-amber-dark); }
.portal-header {
  background: linear-gradient(120deg, var(--p-navy) 0%, var(--p-navy-2) 100%);
  color: white; padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.portal-header .wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.portal-brand { display: flex; align-items: center; gap: 14px; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.1rem; color: white; }
.portal-brand img { height: 36px; }
.portal-nav { display: flex; gap: 24px; align-items: center; }
.portal-nav a { color: rgba(255,255,255,0.85); font-size: 0.9rem; font-weight: 500; }
.portal-nav a:hover, .portal-nav a.active { color: var(--p-amber); }
.portal-user { display: flex; align-items: center; gap: 12px; font-size: 0.85rem; color: rgba(255,255,255,0.8); }
.portal-user .badge { background: var(--p-amber); color: var(--p-navy); padding: 2px 8px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; border-radius: 2px; }

.portal-main { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }

.p-card { background: var(--p-card); border: 1px solid var(--p-border); border-radius: 4px; padding: 28px; }
.p-card + .p-card { margin-top: 16px; }
.p-card h2 { font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem; margin: 0 0 16px; color: var(--p-text); }
.p-card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; margin: 0 0 12px; color: var(--p-text); }

.p-grid { display: grid; gap: 12px; }
.p-grid-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .p-grid-2 { grid-template-columns: 1fr; } }

.p-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.p-field label { font-size: 0.78rem; font-weight: 600; color: var(--p-muted); text-transform: uppercase; letter-spacing: 0.05em; font-family: 'JetBrains Mono', monospace; }
.p-field input, .p-field textarea, .p-field select {
  padding: 10px 12px; border: 1px solid var(--p-border); border-radius: 3px;
  background: white; color: var(--p-text); font-size: 0.95rem; font-family: inherit;
  transition: all 200ms;
}
.p-field input:focus, .p-field textarea:focus, .p-field select:focus {
  outline: none; border-color: var(--p-navy); box-shadow: 0 0 0 3px rgba(30,58,138,0.1);
}
.p-field textarea { min-height: 88px; resize: vertical; }

.p-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border: 1.5px solid transparent; border-radius: 3px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 200ms; font-family: inherit; }
.p-btn-primary { background: var(--p-navy-2); color: white; }
.p-btn-primary:hover { background: var(--p-navy); }
.p-btn-accent { background: var(--p-amber); color: var(--p-navy); }
.p-btn-accent:hover { background: var(--p-amber-dark); color: white; }
.p-btn-outline { background: transparent; color: var(--p-navy); border-color: var(--p-navy); }
.p-btn-outline:hover { background: var(--p-navy); color: white; }
.p-btn-danger { background: transparent; color: var(--p-error); border-color: var(--p-error); }
.p-btn-danger:hover { background: var(--p-error); color: white; }
.p-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.p-error { color: var(--p-error); font-size: 0.85rem; padding: 10px 12px; background: #fef2f2; border-left: 3px solid var(--p-error); margin: 12px 0; }
.p-success { color: var(--p-success); font-size: 0.85rem; padding: 10px 12px; background: #ecfdf5; border-left: 3px solid var(--p-success); margin: 12px 0; }
.p-muted { color: var(--p-muted); font-size: 0.85rem; }

.p-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 100px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; font-family: 'JetBrains Mono', monospace; }
.p-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.p-status-pending { background: #fef3c7; color: #92400e; }
.p-status-pending::before { background: #d97706; }
.p-status-in_progress { background: #dbeafe; color: #1e40af; }
.p-status-in_progress::before { background: #2563eb; }
.p-status-completed { background: #d1fae5; color: #065f46; }
.p-status-completed::before { background: #059669; }

.p-project-list { display: grid; gap: 12px; }
.p-project-card { background: var(--p-card); border: 1px solid var(--p-border); padding: 20px; border-radius: 4px; cursor: pointer; transition: all 200ms; }
.p-project-card:hover { border-color: var(--p-navy); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(30,58,138,0.08); }
.p-project-card .row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.p-project-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.p-project-card .meta { font-size: 0.78rem; color: var(--p-muted); font-family: 'JetBrains Mono', monospace; }

.p-file-list { display: grid; gap: 8px; }
.p-file { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--p-bg); border: 1px solid var(--p-border); border-radius: 3px; }
.p-file .name { flex: 1; font-weight: 500; font-size: 0.9rem; }
.p-file .size { font-size: 0.78rem; color: var(--p-muted); font-family: 'JetBrains Mono', monospace; }
.p-file a { color: var(--p-navy-2); font-size: 0.85rem; font-weight: 600; }

.p-comment-list { display: grid; gap: 12px; }
.p-comment { background: #f0f9ff; border-left: 3px solid var(--p-navy-2); padding: 12px 16px; border-radius: 3px; }
.p-comment .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.p-comment .author { font-weight: 600; font-size: 0.85rem; color: var(--p-navy); }
.p-comment .ts { font-size: 0.75rem; color: var(--p-muted); font-family: 'JetBrains Mono', monospace; }
.p-comment .text { font-size: 0.9rem; line-height: 1.5; white-space: pre-wrap; }

.p-auth-wrap { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 80px); padding: 24px; }
.p-auth-card { width: 100%; max-width: 440px; background: white; border: 1px solid var(--p-border); padding: 36px; }
.p-auth-card .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.p-auth-card .brand img { height: 48px; }
.p-auth-card h1 { font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem; margin: 0 0 6px; }
.p-auth-card .sub { color: var(--p-muted); font-size: 0.9rem; margin-bottom: 24px; }
.p-auth-card .alt { margin-top: 20px; text-align: center; font-size: 0.85rem; color: var(--p-muted); }

.p-empty { text-align: center; padding: 64px 24px; color: var(--p-muted); }
.p-empty h3 { margin: 0 0 8px; color: var(--p-text); }

.p-status-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.p-status-actions .p-btn { padding: 6px 12px; font-size: 0.78rem; }
