* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1e293b; background: #f1f5f9; font-size: 14px;
}

/* AUTH PAGE */
.auth-page {
  display: flex; justify-content: center; align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  position: relative; overflow: hidden;
}
.auth-page::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(139,92,246,0.1) 0%, transparent 60%);
}
.auth-card {
  background: rgba(255,255,255,0.97); border-radius: 20px; padding: 2.5rem;
  max-width: 420px; width: 92%;
  box-shadow: 0 25px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1);
  position: relative;
}
.auth-header { text-align: center; margin-bottom: 1.5rem; }
.auth-header h1 {
  font-size: 28px; font-weight: 800;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-header p { font-size: 13px; color: #94a3b8; margin-top: 4px; }

.tabs {
  display: flex; gap: 4px; margin-bottom: 1.2rem;
  background: #f1f5f9; border-radius: 12px; padding: 4px;
}
.tab {
  flex: 1; padding: 10px; border: none; border-radius: 9px;
  background: transparent; font-size: 13px; font-weight: 600;
  color: #64748b; cursor: pointer; transition: all 0.2s;
}
.tab.active { background: white; color: #1e293b; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }

.auth-form { display: none; flex-direction: column; gap: 12px; }
.auth-form.visible { display: flex; }
.auth-form input {
  padding: 12px 14px; border: 1.5px solid #e2e8f0; border-radius: 10px;
  font-size: 14px; font-family: inherit; transition: border-color 0.2s;
}
.auth-form input:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }

.btn {
  border: none; border-radius: 10px; cursor: pointer; font-weight: 600;
  font-size: 14px; padding: 10px 20px; transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white; box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,0.4); }
.btn-primary:active { transform: translateY(0); }
.btn-small {
  padding: 7px 14px; font-size: 12px; background: #e2e8f0; color: #475569; border-radius: 8px;
}
.btn-small:hover { background: #cbd5e1; }
.btn-danger { background: #fef2f2; color: #dc2626; }
.btn-danger:hover { background: #fee2e2; }
.btn-tiny {
  padding: 4px 8px; font-size: 12px; border-radius: 6px;
  background: #f1f5f9; border: 1px solid #e2e8f0; cursor: pointer;
  transition: all 0.15s;
}
.btn-tiny:hover { background: #e2e8f0; }

.link { display: block; text-align: center; font-size: 12px; color: #6366f1; text-decoration: none; margin-top: 4px; }
.link:hover { text-decoration: underline; }

.alert { padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 12px; }
.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.alert-ok { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }

/* TOPBAR */
.topbar {
  display: flex; align-items: center; gap: 12px;
  background: rgba(15,23,42,0.95); backdrop-filter: blur(12px);
  color: white; padding: 10px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky; top: 0; z-index: 100;
}
.topbar .logo-img { height: 28px; }
.topbar .user-badge { flex: 1; font-size: 13px; color: #94a3b8; text-align: right; }
.topbar .btn {
  color: #e2e8f0; background: rgba(255,255,255,0.08); border-radius: 8px;
  padding: 7px 14px; font-size: 12px;
}
.topbar .btn:hover { background: rgba(255,255,255,0.15); }

/* LAYOUT */
.layout { display: flex; min-height: calc(100vh - 50px); }
.sidebar {
  width: 220px; background: white;
  border-right: 1px solid #e2e8f0; padding: 16px 0; flex-shrink: 0;
}
.side-link {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 20px; color: #475569; text-decoration: none;
  font-size: 13px; font-weight: 500; transition: all 0.15s;
  border-left: 3px solid transparent;
}
.side-link:hover { background: #f8fafc; color: #1e293b; }
.side-link.active {
  background: linear-gradient(90deg, rgba(99,102,241,0.08), transparent);
  color: #6366f1; font-weight: 600; border-left-color: #6366f1;
}

.content { flex: 1; padding: 28px 32px; max-width: 1000px; }
.section { display: none; animation: fadeIn 0.25s ease; }
.section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px; color: #0f172a; }
h3 { font-size: 16px; font-weight: 600; margin: 0 0 10px; color: #1e293b; }
.sub { font-size: 13px; color: #64748b; margin-bottom: 16px; line-height: 1.5; }

.card {
  background: white; border: 1px solid #e2e8f0; border-radius: 14px;
  padding: 20px; margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.card p { margin-bottom: 6px; font-size: 13px; }
.card input, .card textarea, .card select {
  width: 100%; padding: 10px 12px; border: 1.5px solid #e2e8f0;
  border-radius: 9px; font-size: 13px; font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card input:focus, .card textarea:focus, .card select:focus {
  outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.card label { font-size: 13px; font-weight: 500; display: block; margin-bottom: 4px; color: #334155; }
.card .btn { margin-top: 4px; }

.text-input {
  width: 100%; padding: 10px 12px; border: 1.5px solid #e2e8f0;
  border-radius: 9px; font-size: 13px; font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.text-input:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
select.text-input { background: white; cursor: pointer; }

.key-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  margin-bottom: 8px; transition: all 0.2s;
}
.key-row:hover { border-color: #cbd5e1; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }

/* STATS CARDS */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card {
  background: white; border: 1px solid #e2e8f0; border-radius: 14px;
  padding: 20px; text-align: center; transition: all 0.2s;
}
.stat-card:hover { border-color: #cbd5e1; box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.stat-num { display: block; font-size: 28px; font-weight: 700; background: linear-gradient(135deg, #6366f1, #8b5cf6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { font-size: 11px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }

.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.bar-label { width: 80px; font-weight: 600; font-size: 12px; color: #475569; }
.bar-track {
  flex: 1; height: 24px; background: #f1f5f9; border-radius: 12px; overflow: hidden;
}
.bar-fill {
  height: 100%; border-radius: 12px; transition: width 0.6s ease;
  background: linear-gradient(90deg, #6366f1, #a78bfa);
}
.bar-val { width: auto; text-align: right; font-size: 12px; color: #64748b; min-width: 80px; }

table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  background: white; border-radius: 12px; overflow: hidden;
  border: 1px solid #e2e8f0;
}
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #f1f5f9; }
th { background: #f8fafc; font-weight: 600; font-size: 11px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
tr:last-child td { border-bottom: none; }
.trunc { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* PERSONALITIES */
.personality-row {
  padding: 14px 0; border-bottom: 1px solid #f1f5f9;
}
.personality-row:last-child { border-bottom: none; }
.personality-row.editing {
  background: #f8fafc; border-radius: 12px; padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
  border: 1px solid #e2e8f0; margin: 10px 0;
}
.personality-row.editing input[type="text"],
.personality-row.editing textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid #e2e8f0;
  border-radius: 9px; font-size: 13px; font-family: inherit;
  transition: border-color 0.2s;
}
.personality-row.editing input:focus,
.personality-row.editing textarea:focus { outline: none; border-color: #6366f1; }
.p-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.p-meta { font-size: 11px; color: #94a3b8; }
.p-preview { font-size: 12px; color: #64748b; margin-bottom: 6px; line-height: 1.5; }
.p-actions { display: flex; gap: 4px; margin-top: 4px; }
.badge {
  font-size: 10px; padding: 3px 8px; border-radius: 6px;
  background: #eef2ff; color: #6366f1; font-weight: 600;
  letter-spacing: 0.3px;
}

/* TRANSCRIPTIONS */
.search-bar { margin-bottom: 12px; }
.search-bar input {
  width: 100%; padding: 12px 16px; border: 1.5px solid #e2e8f0;
  border-radius: 10px; font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-bar input:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }

.trans-row {
  background: white; border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 16px; margin-bottom: 8px; cursor: pointer;
  transition: all 0.2s;
}
.trans-row:hover { border-color: #6366f1; box-shadow: 0 4px 16px rgba(99,102,241,0.1); transform: translateY(-1px); }
.trans-row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.trans-row-head strong { font-size: 15px; }
.trans-date { font-size: 11px; color: #94a3b8; }
.trans-row-preview { font-size: 13px; color: #64748b; margin-bottom: 4px; line-height: 1.5; }
.trans-row-preview em { font-style: italic; color: #334155; }
.trans-row-meta { display: flex; gap: 8px; font-size: 11px; color: #6366f1; }

.pager { display: flex; gap: 4px; justify-content: center; margin-top: 12px; }

.trans-viewer {
  background: white; border: 1px solid #e2e8f0; border-radius: 14px;
  padding: 24px; margin-top: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.trans-viewer-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.trans-viewer-header h3 { margin: 0; }
.trans-viewer audio { margin-bottom: 16px; width: 100%; border-radius: 8px; }
.trans-viewer h4 { font-size: 14px; font-weight: 600; margin: 16px 0 8px; color: #334155; }
.trans-viewer pre {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 16px; font-size: 13px; line-height: 1.7;
  white-space: pre-wrap; max-height: 400px; overflow-y: auto;
}
.trans-viewer #transViewerMinuta ul { padding-left: 20px; margin: 8px 0; }
.trans-viewer #transViewerMinuta li { font-size: 14px; margin-bottom: 4px; line-height: 1.5; }
.trans-viewer #transViewerMinuta p { font-size: 14px; margin-bottom: 8px; line-height: 1.6; }
.trans-viewer #transViewerMinuta h1, .trans-viewer #transViewerMinuta h2, .trans-viewer #transViewerMinuta h3 { margin-top: 16px; }

/* PROJECTS */
.card-clickable {
  cursor: pointer; transition: all 0.2s;
  border: 1px solid #e2e8f0;
}
.card-clickable:hover {
  border-color: #6366f1; box-shadow: 0 4px 16px rgba(99,102,241,0.1);
  transform: translateY(-2px);
}
.proj-meta { display: flex; gap: 12px; font-size: 11px; color: #94a3b8; margin-top: 6px; }
.proj-date { color: #94a3b8; }

.proj-panel { background: white; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; }
.proj-panel-tree { width: 320px; flex-shrink: 0; }
.proj-panel-entities { flex: 1; min-width: 0; }
.proj-panel-header {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0; background: #f8fafc; font-size: 13px;
}
.proj-tree-container { padding: 6px 0; overflow-y: auto; max-height: 600px; }
.proj-tree { list-style: none; padding: 0; margin: 0; }
.proj-tree ul { list-style: none; padding-left: 20px; margin: 0; }
.tree-node {
  display: flex; align-items: center; gap: 4px; padding: 7px 12px;
  cursor: pointer; border-radius: 6px; margin: 2px 6px; font-size: 13px;
  transition: background 0.15s;
}
.tree-node:hover { background: #f1f5f9; }
.tree-node.tree-selected { background: #eef2ff; color: #6366f1; font-weight: 600; }
.tree-toggle { display: inline-block; width: 14px; text-align: center; font-size: 10px; color: #94a3b8; cursor: pointer; flex-shrink: 0; }
.tree-toggle-empty { width: 14px; flex-shrink: 0; }
.tree-icon { font-size: 14px; flex-shrink: 0; }
.tree-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-type {
  font-size: 10px; color: #64748b; background: #f1f5f9;
  padding: 2px 8px; border-radius: 6px; flex-shrink: 0;
  font-weight: 500;
}
.proj-empty { padding: 40px 20px; text-align: center; color: #94a3b8; font-size: 14px; }
.proj-entity { padding: 12px 16px; margin-bottom: 6px; }
.proj-entity p { margin-bottom: 0; }
.proj-task-card { cursor: pointer; transition: all 0.2s; }
.proj-task-card:hover { border-color: #6366f1; }
.proj-task-detail { min-width: 400px; max-width: 600px; }
.proj-entity-list { margin-bottom: 10px; }
.badge-pending { background: #fef3c7; color: #d97706; }
.badge-in_progress { background: #dbeafe; color: #2563eb; }
.badge-completed { background: #d1fae5; color: #059669; }

/* MODAL */
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1000; animation: fadeIn 0.2s ease; }
.modal-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15,23,42,0.5); backdrop-filter: blur(4px); }
.modal-content {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: white; border-radius: 16px; padding: 24px;
  min-width: 360px; max-width: 90vw;
  box-shadow: 0 25px 60px rgba(0,0,0,0.2);
  animation: modalIn 0.2s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translate(-50%, -48%) scale(0.96); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.modal-content h3 { margin-top: 0; font-size: 18px; }
.modal-content .text-input {
  width: 100%; padding: 10px 12px; border: 1.5px solid #e2e8f0;
  border-radius: 9px; font-size: 13px; font-family: inherit; margin-bottom: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.modal-content .text-input:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.modal-content select.text-input { background: white; }

/* TOAST */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #1e293b; color: white; padding: 10px 24px;
  border-radius: 10px; font-size: 13px; font-weight: 500;
  opacity: 0; transition: all 0.3s; pointer-events: none;
  z-index: 2000; box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.proj-propose-loading { padding: 20px; text-align: center; color: #64748b; }
.proj-propose-item {
  display: flex; gap: 8px; padding: 10px 8px;
  border-bottom: 1px solid #f1f5f9; cursor: pointer; align-items: flex-start;
}
.proj-propose-item:hover { background: #f8fafc; }
.proj-propose-item input[type="checkbox"] { margin-top: 3px; }

/* PROJECT DASHBOARD */
.dash-card {
  background: white; border-radius: 14px; padding: 16px 18px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
}
.dash-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
  border-color: #cbd5e1;
}
.dash-card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.dash-card-body { flex: 1; }
.dash-card-number { font-size: 26px; font-weight: 800; line-height: 1.1; color: #0f172a; }
.dash-card-label { font-size: 12px; color: #64748b; margin-top: 2px; }

.chart-bar-container {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.chart-bar-label {
  width: 100px; font-size: 13px; color: #475569;
  text-align: right; font-weight: 500;
}
.chart-bar {
  flex: 1; height: 24px; background: #f1f5f9; border-radius: 8px;
  overflow: hidden;
}
.chart-bar-fill {
  height: 100%; border-radius: 8px; display: flex; align-items: center;
  padding-left: 8px; font-size: 11px; font-weight: 700; color: #fff;
  transition: width 0.6s ease;
}
.chart-bar-count {
  width: 36px; font-size: 13px; font-weight: 700;
  color: #334155; text-align: right;
}

.deadline-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid #f1f5f9;
}
.deadline-item:last-child { border-bottom: none; }
.deadline-date {
  font-size: 12px; color: #64748b; white-space: nowrap;
  background: #f1f5f9; padding: 3px 10px; border-radius: 6px;
  font-weight: 500;
}
.deadline-info { flex: 1; }
.deadline-info strong { display: block; font-size: 14px; color: #1e293b; }
.deadline-info .sub { font-size: 12px; color: #94a3b8; }
.badge-success { background: #d1fae5; color: #059669; }
.badge-warning { background: #fef3c7; color: #d97706; }
.badge-secondary { background: #f1f5f9; color: #64748b; }

.calendar-table { width: 100%; border-collapse: separate; border-spacing: 2px; }
.calendar-table th {
  font-size: 11px; color: #64748b; font-weight: 600;
  padding: 8px 4px; text-align: center;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.cal-day {
  vertical-align: top; padding: 6px; border-radius: 10px;
  width: 14.28%; height: 90px; cursor: default;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.cal-day:hover { background: #f8fafc; }
.cal-today {
  background: #eef2ff; border-color: #6366f1;
}
.cal-empty { border: none; background: transparent; }
.cal-day-num { font-size: 14px; font-weight: 600; margin-bottom: 3px; padding: 2px; }
.cal-today .cal-day-num {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
}
.cal-events { display: flex; flex-direction: column; gap: 3px; }
.cal-event {
  font-size: 10px; padding: 2px 6px; border-radius: 5px;
  background: #eef2ff; color: #6366f1; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; cursor: help;
  font-weight: 500; line-height: 1.4;
}
.cal-event:nth-child(2n) { background: #fef3c7; color: #d97706; }
.cal-event-more { font-size: 10px; color: #94a3b8; font-style: italic; }

.tab-btn { padding: 8px 20px; border: none; background: none; cursor: pointer; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -2px; color: #6c757d; }
.tab-btn.active { border-bottom-color: #6366f1 !important; color: #6366f1 !important; font-weight: 600 !important; }

/* Planificacion */
.plan-date-group { margin-bottom: 16px; }
.plan-date-label {
  font-size: 13px; font-weight: 600; color: #1e293b;
  padding: 6px 0 8px; border-bottom: 1px solid #e2e8f0; margin-bottom: 8px;
  text-transform: capitalize;
}
.plan-item {
  display: flex; gap: 10px; padding: 10px 12px;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
  margin-bottom: 6px; transition: all 0.15s;
}
.plan-item:hover { border-color: #c7d2fe; background: #f1f4f9; }
.plan-item-icon { font-size: 18px; flex-shrink: 0; padding-top: 2px; }
.plan-item-body { flex: 1; min-width: 0; }
.plan-item-title { font-size: 14px; font-weight: 600; color: #1e293b; }
.plan-item-meta { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.plan-item-desc { font-size: 12px; color: #64748b; margin-top: 4px; }
.plan-calendar { display: flex; flex-direction: column; gap: 16px; }
.plan-cal-month { }
.plan-cal-month-label { font-size: 13px; font-weight: 600; color: #1e293b; margin-bottom: 6px; text-transform: capitalize; }
.plan-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.plan-cal-day-name { font-size: 10px; color: #94a3b8; text-align: center; padding: 2px 0; font-weight: 600; }
.plan-cal-day {
  background: #f8fafc; border-radius: 4px; padding: 3px;
  min-height: 44px; border: 1px solid transparent;
}
.plan-cal-day.has-events { background: #eef2ff; border-color: #c7d2fe; }
.plan-cal-day.out-range { opacity: 0.3; }
.plan-cal-day-num { font-size: 11px; font-weight: 600; color: #475569; margin-bottom: 2px; }
.plan-cal-events { display: flex; gap: 1px; flex-wrap: wrap; align-items: center; }
.plan-cal-events span { font-size: 8px; cursor: default; }
.plan-cal-more { font-size: 9px; color: #6366f1; font-weight: 600; }
.tab-btn:hover { color: #1e293b !important; }

/* Personas task bar */
.person-tasks { margin-top: 4px; }
.person-task-bar { display: flex; height: 6px; border-radius: 4px; overflow: hidden; margin-bottom: 3px; max-width: 260px; }
.pbar-pending { background: #f97316; }
.pbar-progress { background: #3b82f6; }
.pbar-done { background: #22c55e; }
.person-task-label { font-size: 11px; color: #64748b; }

/* Project mini cards */
.proj-mini-card {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 14px; cursor: pointer; transition: all 0.2s;
}
.proj-mini-card:hover {
  border-color: #6366f1; box-shadow: 0 2px 12px rgba(99,102,241,0.1);
  transform: translateY(-1px);
}
.proj-mini-name { font-size: 14px; font-weight: 600; color: #1e293b; margin-bottom: 2px; }
.proj-mini-meta { font-size: 11px; color: #94a3b8; margin-bottom: 8px; }
.proj-mini-bar {
  height: 6px; background: #e2e8f0; border-radius: 4px; overflow: hidden;
  margin-bottom: 6px;
}
.proj-mini-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, #6366f1, #a78bfa);
  transition: width 0.6s ease;
}
.proj-mini-pct { font-size: 11px; font-weight: 600; color: #6366f1; text-align: right; }

/* Chart.js container */
.chart-container { position: relative; max-width: 100%; }

@media (max-width: 700px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%; display: flex; gap: 0; padding: 0;
    border-right: none; border-bottom: 1px solid #e2e8f0; overflow-x: auto;
  }
  .side-link { white-space: nowrap; padding: 10px 16px; font-size: 12px; border-left: none; border-bottom: 3px solid transparent; }
  .side-link.active { border-left-color: transparent; border-bottom-color: #6366f1; }
  .bar-val { width: auto; }
  .content { padding: 16px; }
  .proj-panel-tree { width: 100%; }
  .proj-panel-entities { width: 100%; }
  [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
}

/* Usage detail modal */
.detail-row {
  display: flex; gap: 8px; padding: 8px 0;
  border-bottom: 1px solid #e9ecef; font-size: 13px;
}
.detail-row:last-child { border-bottom: none; }
.detail-label {
  font-weight: 600; color: #495057; flex: 0 0 120px;
}

/* Usage log table */
.table { border-collapse: collapse; }
.table th, .table td { padding: 6px 8px; text-align: left; border-bottom: 1px solid #e9ecef; }
.table th { background: #f8f9fa; font-weight: 600; position: sticky; top: 0; }
.table tbody tr:hover { background: #f0f4ff; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
