/* EPIC Vault — Dark Theme */
/* Colors: #FF0050 (red), #4ECDC4 (teal), #FFE66D (yellow) */

:root {
  --bg: #0a0a0a;
  --bg-card: #111111;
  --bg-hover: #1a1a1a;
  --bg-input: #151515;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.5);
  --text-secondary: rgba(255, 255, 255, 0.7);
  --epic-red: #FF0050;
  --epic-teal: #4ECDC4;
  --epic-yellow: #FFE66D;
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--epic-red); text-decoration: none; }
a:hover { text-decoration: underline; }

.epic-red { color: var(--epic-red); }

/* ==================== LOGIN PAGE ==================== */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(ellipse at center, #111 0%, #0a0a0a 70%);
}

.login-container {
  text-align: center;
  max-width: 400px;
  padding: 60px 40px;
}

.vault-logo { margin-bottom: 40px; }

.vault-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: rgba(255, 0, 80, 0.1);
  border: 1px solid rgba(255, 0, 80, 0.2);
  color: var(--epic-red);
  margin-bottom: 20px;
}

.vault-logo h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 8px;
}

.google-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 32px;
  background: #fff;
  color: #333;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.google-btn:hover {
  background: #f5f5f5;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.error-msg {
  background: rgba(255, 0, 80, 0.1);
  border: 1px solid rgba(255, 0, 80, 0.3);
  color: var(--epic-red);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.login-footer {
  margin-top: 40px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.login-footer .powered { margin-top: 8px; opacity: 0.5; }

/* ==================== NAV ==================== */

.vault-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.nav-brand:hover { text-decoration: none; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-user {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--text); text-decoration: none; }

.nav-logout { color: var(--epic-red); }

/* ==================== DASHBOARD ==================== */

.dashboard-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px;
}

.dashboard-header {
  margin-bottom: 32px;
}

.dashboard-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dashboard-header p {
  color: var(--text-muted);
  margin-top: 4px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
}

.project-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}

.project-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.project-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(255, 0, 80, 0.1);
  border: 1px solid rgba(255, 0, 80, 0.2);
  color: var(--epic-red);
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.project-icon.large {
  width: 64px;
  height: 64px;
  font-size: 1.1rem;
}

.project-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.project-info p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.doc-count {
  color: var(--epic-teal);
  font-size: 0.8rem;
  font-weight: 500;
}

/* ==================== PROJECT PAGE ==================== */

.project-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 24px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb-sep { opacity: 0.3; }

.project-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.project-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
}

.project-header p {
  color: var(--text-muted);
  margin-top: 4px;
}

.doc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doc-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}

.doc-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  text-decoration: none;
}

.doc-icon {
  color: var(--epic-teal);
  flex-shrink: 0;
}

.doc-info h4 {
  font-size: 1rem;
  font-weight: 500;
}

.doc-info p {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 2px;
}

/* ==================== ADMIN ==================== */

.admin-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 24px;
}

.admin-content h1 {
  font-size: 1.6rem;
  margin-bottom: 24px;
}

.admin-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.admin-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

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

.section-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table th {
  text-align: left;
  padding: 8px 12px;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.admin-table tr:last-child td { border-bottom: none; }

.admin-table code {
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
}

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

.badge-admin { background: rgba(255, 0, 80, 0.15); color: var(--epic-red); }
.badge-viewer { background: rgba(78, 205, 196, 0.15); color: var(--epic-teal); }
.badge-action { background: rgba(255, 255, 255, 0.05); color: var(--text-secondary); }

.project-icon-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 0, 80, 0.1);
  color: var(--epic-red);
  font-size: 0.7rem;
  font-weight: 700;
}

.access-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==================== BUTTONS & INPUTS ==================== */

.btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

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

.btn-primary {
  background: var(--epic-red);
  border-color: var(--epic-red);
  color: #fff;
}
.btn-primary:hover { background: #e00046; }

.btn-danger {
  background: transparent;
  border-color: var(--epic-red);
  color: var(--epic-red);
}
.btn-danger:hover { background: rgba(255, 0, 80, 0.1); }

.btn-sm { padding: 4px 10px; font-size: 0.75rem; }

.admin-input, .admin-select {
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  min-width: 200px;
}

.admin-input:focus, .admin-select:focus {
  outline: none;
  border-color: var(--epic-red);
}

/* ==================== MODAL ==================== */

.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  min-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-content h3 {
  margin-bottom: 8px;
}

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

/* ==================== RESPONSIVE ==================== */

@media (max-width: 640px) {
  .project-grid { grid-template-columns: 1fr; }
  .access-controls { flex-direction: column; align-items: stretch; }
  .admin-input, .admin-select { min-width: unset; }
  .vault-nav { padding: 12px 16px; }
  .dashboard-content, .project-content, .admin-content { padding: 24px 16px; }
}
