* { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
body {
background: rgb(var(--canvas));
color: rgb(var(--body));
font-family: var(--app-font);
font-size: .82rem;
}
a { color: rgb(var(--accent)); }
button { font-family: inherit; }
/* --- Botones (apariencia configurable) --- */
.btn {
display: inline-flex; align-items: center; gap: 8px;
height: 32px; padding: 0 12px;
border-radius: var(--r-sm);
border: 1px solid transparent;
font-size: .82rem; font-weight: 600;
cursor: pointer; white-space: nowrap;
transition: background .12s ease, border-color .12s ease;
}
.btn-sm { height: 26px; padding: 0 10px; font-size: .76rem; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-accent { background: rgb(var(--accent)); color: #fff; }
.btn-accent:hover { filter: brightness(1.08); }
.btn-standard { background: rgb(var(--field)); border-color: rgb(var(--line)); color: rgb(var(--body)); }
.btn-standard:hover { background: rgb(var(--panel)); }
.btn-subtle { background: transparent; color: rgb(var(--body)); }
.btn-subtle:hover { background: rgb(var(--panel)); }
.btn-danger { background: transparent; border-color: rgb(var(--danger)); color: rgb(var(--danger)); }
.btn-danger:hover { background: rgb(var(--danger) / .12); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-icon-only .btn-label { display: none; }
:root[data-button-mode='icon'] .btn .btn-label { display: none; }
:root[data-button-mode='text'] .btn svg { display: none; }
/* --- Layout general --- */
.app-shell { display: flex; height: 100vh; overflow: hidden; }
.nav-view {
width: 260px; flex: none;
background: rgb(var(--panel));
border-right: 1px solid rgb(var(--line));
display: flex; flex-direction: column;
transition: width .15s ease;
}
.nav-view.compact { width: 80px; }
.nav-view.hidden { width: 0; overflow: hidden; border-right: none; }
.nav-items { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
display: flex; align-items: center; gap: 12px;
padding: 8px 10px; border-radius: var(--r-sm);
color: rgb(var(--muted)); text-decoration: none;
cursor: pointer; border: none; background: transparent; font-size: .82rem; text-align: left;
white-space: nowrap; overflow: hidden;
}
.nav-item svg { flex: none; width: 18px; height: 18px; }
.nav-item:hover { background: rgb(var(--field)); color: rgb(var(--body)); }
.nav-item.active { background: rgb(var(--accent) / .16); color: rgb(var(--accent)); font-weight: 600; }
.nav-footer {
display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
padding: 12px; border-top: 1px solid rgb(var(--line)); font-size: .68rem; color: rgb(var(--muted));
}
.nav-view.compact .nav-footer { align-items: center; }
.nav-logo-icon-footer { width: 20px; height: 20px; flex: none; object-fit: contain; }
.nav-logo-full-footer { height: 18px; width: auto; max-width: 100%; object-fit: contain; }
.nav-header {
display: flex; align-items: center; justify-content: flex-start;
padding: 14px 12px; border-bottom: 1px solid rgb(var(--line));
}
.nav-view.compact .nav-header { justify-content: center; padding: 14px 8px; }
.nav-logo-icon-header { width: 72px; height: 72px; flex: none; object-fit: contain; }
.nav-logo-full-header { height: 64px; width: auto; max-width: 100%; object-fit: contain; }
.content-column { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
height: 84px; flex: none; display: flex; align-items: center; justify-content: space-between;
padding: 0 16px; border-bottom: 1px solid rgb(var(--line)); background: rgb(var(--surface));
gap: 12px;
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.page-title { font-size: 1.05rem; font-weight: 700; }
.content-area { flex: 1; overflow-y: auto; padding: 20px; }
.icon-btn {
width: 32px; height: 32px; border-radius: var(--r-sm);
display: flex; align-items: center; justify-content: center;
background: transparent; border: none; color: rgb(var(--body)); cursor: pointer; position: relative;
}
.icon-btn:hover { background: rgb(var(--panel)); }
.icon-btn svg { width: 18px; height: 18px; }
/* --- Campos --- */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field-label { font-size: .72rem; font-weight: 600; color: rgb(var(--muted)); }
.input, .textarea, select.input {
background: rgb(var(--field)); border: 1px solid rgb(var(--line)); color: rgb(var(--body));
border-radius: var(--r-sm); padding: 6px 10px; font-size: .82rem; font-family: inherit; width: 100%;
}
.input:focus, .textarea:focus, select.input:focus { outline: 2px solid rgb(var(--accent)); outline-offset: -1px; }
.input:disabled, .textarea:disabled { opacity: .6; }
/* El icono nativo de fecha/hora se dibuja segun color-scheme; sin esto en tema oscuro sale negro
sobre fondo oscuro (invisible). Regla dura: cualquier input type=date/time/datetime-local va aqui. */
:root[data-theme="dark"] input[type="date"],
:root[data-theme="dark"] input[type="time"],
:root[data-theme="dark"] input[type="datetime-local"] { color-scheme: dark; }
.textarea { min-height: 70px; resize: vertical; }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row > .field { flex: 1; min-width: 180px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: .82rem; }
/* --- ComboBox ---
El panel es un portal a document.body posicionado con `position: fixed` (top/left/width en
linea, calculados desde el trigger) — NUNCA anidado ni con position:absolute dentro de .combobox,
para no quedar recortado por un ancestro con overflow:hidden/auto (Expander, DetailPopup, etc.). */
.combobox { position: relative; }
.combobox-panel {
position: fixed; z-index: 220;
background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: var(--r-lg);
box-shadow: 0 8px 24px rgb(0 0 0 / .35); max-height: 240px; overflow-y: auto; padding: 6px;
}
.combobox-search { padding: 4px 6px 8px; }
.combobox-option {
padding: 7px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: .82rem;
}
.combobox-option:hover, .combobox-option.active { background: rgb(var(--accent) / .14); }
.combobox-empty { padding: 10px; color: rgb(var(--muted)); font-size: .78rem; }
/* --- Listado / DataGrid --- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search-input { position: relative; width: 260px; max-width: 100%; }
.search-input input { padding-left: 32px; }
.search-input svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: rgb(var(--muted)); }
/* --- Password reveal toggle: input queda dentro para no romper el layout de .field --- */
.password-input { position: relative; width: 100%; }
.password-input input { padding-right: 34px; }
.password-input .password-toggle {
position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
width: 28px; height: 28px;
}
.password-input .password-toggle svg { width: 16px; height: 16px; }
.list-card { background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: var(--r-lg); overflow: hidden; }
table.list-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.list-table th {
text-align: left; padding: 10px 12px; font-size: .7rem; text-transform: uppercase; letter-spacing: .03em;
color: rgb(var(--muted)); border-bottom: 1px solid rgb(var(--line)); cursor: pointer;
-webkit-user-select: none; user-select: none;
white-space: nowrap;
}
.list-table th:hover { color: rgb(var(--body)); }
.list-table td { padding: 10px 12px; border-bottom: 1px solid rgb(var(--line) / .6); vertical-align: middle; }
.list-table tbody tr { cursor: pointer; }
.list-table tbody tr:hover { background: rgb(var(--panel)); }
.list-table tbody tr:last-child td { border-bottom: none; }
.list-empty { padding: 40px 16px; text-align: center; color: rgb(var(--muted)); }
.row-menu-btn { opacity: .6; }
.row-menu-btn:hover { opacity: 1; }
/* --- Arrastrar para reordenar (ListView con onReorder, listado de tareas de una actividad) --- */
.drag-handle-cell { width: 28px; padding: 10px 4px !important; color: rgb(var(--muted)); cursor: grab; }
.drag-handle-cell:active { cursor: grabbing; }
/* Area de agarre solida (no el icono suelto): un SVG con huecos entre sus formas no capta el
mousedown de forma confiable en todo su recuadro, y el arrastre dejaba de iniciar. */
.drag-handle-wrap {
display: inline-flex; align-items: center; justify-content: center;
width: 20px; height: 20px; flex: none; cursor: grab;
}
.drag-handle-wrap:active { cursor: grabbing; }
.list-table tbody tr.dragging, .drag-row.dragging { opacity: .4; }
/* --- Badges --- */
.badge {
display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px;
font-size: .7rem; font-weight: 700; white-space: nowrap;
}
.badge-accent { background: rgb(var(--accent) / .16); color: rgb(var(--accent)); }
.badge-success { background: rgb(var(--success) / .18); color: rgb(var(--success)); }
.badge-warning { background: rgb(var(--warning) / .2); color: rgb(var(--warning)); }
.badge-danger { background: rgb(var(--danger) / .18); color: rgb(var(--danger)); }
.badge-muted { background: rgb(var(--muted) / .18); color: rgb(var(--muted)); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
/* --- Pestañas reales --- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid rgb(var(--line)); margin-bottom: 16px; overflow-x: auto; }
.tab-item {
display: inline-flex; align-items: center; gap: 7px;
padding: 10px 14px; font-size: .82rem; font-weight: 600; color: rgb(var(--muted));
background: transparent; border: none; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap;
}
.tab-item:hover { color: rgb(var(--body)); }
.tab-item.active { color: rgb(var(--accent)); border-bottom-color: rgb(var(--accent)); }
.tab-badge {
display: inline-flex; align-items: center; justify-content: center;
min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
background: rgb(var(--danger) / .18); color: rgb(var(--danger));
font-size: .68rem; font-weight: 700; line-height: 1;
}
/* --- Cards / KPIs --- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi-card { background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: var(--r-lg); padding: 16px; }
.kpi-value { font-size: 1.6rem; font-weight: 700; }
.kpi-label { font-size: .72rem; color: rgb(var(--muted)); margin-top: 4px; }
.panel-card { background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: var(--r-lg); padding: 16px; margin-bottom: 16px; }
.panel-card h3 { margin: 0 0 12px; font-size: .95rem; }
.company-logo-preview {
width: 72px; height: 72px; flex: none; border-radius: var(--r-sm);
border: 1px dashed rgb(var(--line)); background: rgb(var(--field));
display: flex; align-items: center; justify-content: center; overflow: hidden; text-align: center; padding: 4px;
}
.company-logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
/* --- ContentDialog --- */
.dialog-overlay {
position: fixed; inset: 0; background: rgb(0 0 0 / .5);
display: flex; align-items: center; justify-content: center; z-index: 250; padding: 16px;
}
.dialog-surface {
width: 420px; max-width: 100%; background: rgb(var(--surface)); border-radius: var(--r-lg);
overflow: hidden; box-shadow: 0 20px 48px rgb(0 0 0 / .4);
}
.dialog-stripe { height: 4px; }
.dialog-body { padding: 20px; }
.dialog-title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.dialog-message { font-size: .84rem; color: rgb(var(--muted)); line-height: 1.5; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid rgb(var(--line)); }
/* --- InfoBar --- */
.infobar {
display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm);
border-left: 4px solid; margin-bottom: 14px; font-size: .8rem; background: rgb(var(--surface));
}
.infobar svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.infobar-close { margin-left: auto; cursor: pointer; background: none; border: none; color: rgb(var(--muted)); }
.infobar-info { border-color: rgb(var(--accent)); }
.infobar-success { border-color: rgb(var(--success)); }
.infobar-warning { border-color: rgb(var(--warning)); }
.infobar-error { border-color: rgb(var(--danger)); }
/* --- Toast --- */
.toast-stack { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 300; }
.toast {
background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-left: 4px solid rgb(var(--accent));
border-radius: var(--r-sm); padding: 10px 14px; font-size: .8rem; box-shadow: 0 8px 20px rgb(0 0 0 / .3);
min-width: 220px;
}
.toast-success { border-left-color: rgb(var(--success)); }
.toast-warning { border-left-color: rgb(var(--warning)); }
.toast-error { border-left-color: rgb(var(--danger)); }
/* --- Flyout / menú contextual --- */
.flyout-backdrop { position: fixed; inset: 0; z-index: 90; }
.flyout-panel {
position: fixed; z-index: 100; background: rgb(var(--surface)); border: 1px solid rgb(var(--line));
border-radius: var(--r-lg); box-shadow: 0 10px 28px rgb(0 0 0 / .35); padding: 6px; min-width: 180px;
}
.flyout-item {
display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm);
cursor: pointer; font-size: .8rem; background: none; border: none; width: 100%; text-align: left; color: rgb(var(--body));
}
.flyout-item:hover { background: rgb(var(--accent) / .14); }
.flyout-item.danger { color: rgb(var(--danger)); }
.flyout-item.danger:hover { background: rgb(var(--danger) / .14); }
.flyout-separator { height: 1px; background: rgb(var(--line)); margin: 4px 2px; }
/* --- Resultados de busqueda (Proyectos: global; Actividades: por proyecto) --- */
.search-results-dropdown {
position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 80;
background: rgb(var(--surface)); border: 1px solid rgb(var(--line));
border-radius: var(--r-lg); box-shadow: 0 10px 28px rgb(0 0 0 / .35);
padding: 6px; max-height: 320px; overflow-y: auto;
}
.search-results-item {
display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--r-sm);
background: none; border: none; cursor: pointer; font-size: .8rem; color: rgb(var(--body));
}
.search-results-item:hover { background: rgb(var(--accent) / .14); }
.search-results-sep { color: rgb(var(--muted)); }
.search-results-empty { padding: 10px; font-size: .78rem; color: rgb(var(--muted)); }
/* --- Treeview --- */
.tree-item-row { display: flex; align-items: center; gap: 6px; padding: 6px 6px; border-radius: var(--r-sm); cursor: pointer; }
.tree-item-row:hover { background: rgb(var(--panel)); }
.tree-toggle { width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; flex: none; background: none; border: none; color: rgb(var(--muted)); cursor: pointer; }
/* --- Calendario --- */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.calendar-dow { font-size: .68rem; color: rgb(var(--muted)); text-align: center; padding-bottom: 4px; }
.calendar-cell {
min-height: 84px; border: 1px solid rgb(var(--line)); border-radius: var(--r-sm); padding: 6px;
background: rgb(var(--surface)); font-size: .72rem; display: flex; flex-direction: column; gap: 4px;
}
.calendar-cell.today { border-color: rgb(var(--accent)); }
.calendar-cell.muted { opacity: .4; }
.calendar-day-num { font-weight: 700; }
.calendar-chip {
padding: 2px 6px; border-radius: 4px; background: rgb(var(--accent) / .16); color: rgb(var(--accent));
font-size: .66rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
/* --- Gantt --- */
.gantt-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgb(var(--line) / .5); }
.gantt-label { width: 220px; flex: none; font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gantt-track { position: relative; flex: 1; height: 18px; background: rgb(var(--field)); border-radius: var(--r-sm); }
.gantt-bar { position: absolute; top: 0; bottom: 0; border-radius: var(--r-sm); background: rgb(var(--accent) / .35); }
.gantt-bar-fill { position: absolute; top: 0; bottom: 0; left: 0; border-radius: var(--r-sm); background: rgb(var(--accent)); }
/* --- Login --- */
.login-shell { height: 100vh; display: flex; align-items: center; justify-content: center; background: rgb(var(--canvas)); }
.login-card { width: 340px; max-width: 92vw; background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: var(--r-lg); padding: 28px; }
.login-logo { display: flex; align-items: center; margin-bottom: 16px; }
.login-logo-img { height: 80px; width: auto; }
.login-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; }
.login-error { color: rgb(var(--danger)); font-size: .78rem; margin-bottom: 10px; }
.login-info { color: rgb(var(--success)); font-size: .82rem; margin-bottom: 10px; line-height: 1.5; }
.login-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: .76rem; flex-wrap: wrap; }
.login-links a { color: rgb(var(--muted)); text-decoration: none; }
.login-links a:hover { color: rgb(var(--accent)); text-decoration: underline; }
/* --- DetailPopup (ver DetailPopup.jsx) ---
Al elegir un item de un listado, la lista queda inactiva detras del overlay y el popup
presenta la pantalla de info/edicion completa. Regla dura: NUNCA se cierra con clic afuera
(a diferencia de Flyout); solo con el boton "Cerrar" o una accion explicita del formulario. */
.detail-popup-overlay {
position: fixed; inset: 0; background: rgb(0 0 0 / .55);
display: flex; align-items: center; justify-content: center; z-index: 200; padding: 24px;
}
.detail-popup {
width: 100%; background: rgb(var(--surface)); border-radius: var(--r-lg);
box-shadow: 0 24px 64px rgb(0 0 0 / .45);
max-height: 90vh; display: flex; flex-direction: column; overflow: hidden;
}
.detail-popup-header {
display: flex; align-items: center; justify-content: space-between; gap: 10px;
padding: 16px 20px; border-bottom: 1px solid rgb(var(--line)); flex: none;
}
.detail-popup-title { font-weight: 700; font-size: 1rem; }
.detail-popup-body { padding: 20px; overflow-y: auto; flex: 1; }
/* --- Expander (Configuracion) --- */
.expander { border: 1px solid rgb(var(--line)); border-radius: var(--r-lg); margin-bottom: 10px; overflow: hidden; }
.expander-header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; background: rgb(var(--surface)); }
.expander-header svg.chevron { margin-left: auto; transition: transform .15s ease; }
.expander.open .chevron { transform: rotate(90deg); }
.expander-title { font-weight: 600; font-size: .85rem; }
.expander-desc { font-size: .72rem; color: rgb(var(--muted)); }
.expander-body { padding: 14px; border-top: 1px solid rgb(var(--line)); }
.progress-bar { height: 6px; border-radius: 999px; background: rgb(var(--field)); overflow: hidden; }
.progress-bar-fill { height: 100%; background: rgb(var(--accent)); }
.text-muted { color: rgb(var(--muted)); }
.mt-0 { margin-top: 0; }
.empty-state { text-align: center; padding: 40px 16px; color: rgb(var(--muted)); }