/*

 */

/* ==========================================================================
   TEMPO 1.0 - UI/UX GLOBAL
   ÚNICO archivo CSS de la aplicación.
   Login, layout, menú, topbar, dashboard, formularios, tablas y responsive
   deben mantenerse aquí para evitar estilos dispersos.
   ========================================================================== */

:root{
  --tempo-bg:#f6f4ef;
  --tempo-surface:#ece9e1;
  --tempo-card:#fffefa;
  --tempo-sidebar:#151515;
  --tempo-text:#191919;
  --tempo-muted:#77746d;
  --tempo-line:#dfdbd0;
  --tempo-accent:#e5522b;
  --tempo-accent-text:#fff;
  --tempo-focus:#e5522b22;
  --tempo-soft:#f4eee9;
  --tempo-warn:#9b3b22;
  --tempo-warn-bg:#fee8df;
  --tempo-nav-text:#c5c5c5;
  --tempo-nav-active:#292929;
  --tempo-input:#fffefa;
  --tempo-hero:linear-gradient(135deg,#fffefa,#f3ece2);
  --tempo-glow:#e5522b1d;
  --tempo-shadow:0 25px 70px rgba(55,42,20,.08);
}

*{box-sizing:border-box}

html,body{
  margin:0;
  min-height:100%;
  background:var(--tempo-bg);
  color:var(--tempo-text);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
}

body{min-height:100vh}

button,input,select,textarea{font:inherit}

a{color:inherit;text-decoration:none}

.tempo-eyebrow{
  text-transform:uppercase;
  letter-spacing:.14em;
  font-size:11px;
  font-weight:800;
  color:var(--tempo-muted);
}

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

.tempo-login{
  min-height:100vh;
  display:grid;
  grid-template-columns:1.05fr .95fr;
}

.tempo-brand-side{
  padding:clamp(32px,7vw,96px);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  position:relative;
  overflow:hidden;
}

.tempo-brand-side::after{
  content:"";
  position:absolute;
  width:420px;
  height:420px;
  border-radius:50%;
  right:-180px;
  bottom:-180px;
  background:var(--tempo-glow);
  filter:blur(5px);
}

.tempo-brand{
  font-weight:900;
  letter-spacing:-.04em;
  font-size:28px;
}

.tempo-brand span,
.tempo-sidebar-brand span{
  font-size:12px;
  color:var(--tempo-muted);
  font-weight:700;
}

.tempo-brand-copy{
  max-width:560px;
  position:relative;
  z-index:1;
}

.tempo-brand-copy h1{
  font-size:clamp(42px,6vw,76px);
  line-height:.95;
  letter-spacing:-.055em;
  margin:18px 0;
}

.tempo-brand-copy h2{
  margin:0 0 16px;
  font-size:clamp(20px,2vw,28px);
  letter-spacing:-.025em;
}

.tempo-brand-copy p{
  font-size:18px;
  line-height:1.65;
  color:var(--tempo-muted);
  max-width:520px;
}

.tempo-brand-side small{
  display:block;
  color:var(--tempo-muted);
}

.tempo-login-side{
  display:grid;
  place-items:center;
  padding:32px;
  background:var(--tempo-surface);
}

.tempo-login-card{
  width:min(430px,100%);
  padding:38px;
  border-radius:28px;
  background:var(--tempo-card);
  border:1px solid var(--tempo-line);
  box-shadow:var(--tempo-shadow);
}

.tempo-login-card h2{
  font-size:32px;
  margin:8px 0;
}

.tempo-login-card>p{
  color:var(--tempo-muted);
  margin:0 0 28px;
}

.tempo-field{margin:16px 0}

.tempo-field label{
  display:block;
  font-size:13px;
  font-weight:750;
}

.tempo-field input,
.tempo-field select,
.tempo-field textarea{
  width:100%;
  margin-top:8px;
  padding:14px 15px;
  border:1px solid var(--tempo-line);
  border-radius:13px;
  background:var(--tempo-input);
  color:var(--tempo-text);
  outline:none;
}

.tempo-field input:focus,
.tempo-field select:focus,
.tempo-field textarea:focus{
  border-color:var(--tempo-accent);
  box-shadow:0 0 0 3px var(--tempo-focus);
}

.tempo-primary{
  width:100%;
  padding:14px;
  border:0;
  border-radius:13px;
  background:var(--tempo-accent);
  color:var(--tempo-accent-text);
  font-weight:800;
  margin-top:10px;
  cursor:pointer;
}

.tempo-primary:hover{filter:brightness(.97)}

.tempo-alert{
  border-radius:12px;
  padding:12px 14px;
  margin:16px 0;
  font-size:13px;
  font-weight:700;
}

.tempo-alert-error{
  color:var(--tempo-warn);
  background:var(--tempo-warn-bg);
  border:1px solid #f4c9b9;
}

.tempo-alert-success{
  color:#245b36;
  background:#eaf6ed;
  border:1px solid #c8e8d0;
}

.tempo-login-note{
  font-size:12px;
  text-align:center;
  color:var(--tempo-muted);
  margin-top:18px;
}

/* APP SHELL / MENÚ ======================================================== */

.tempo-app-shell{
  min-height:100vh;
  display:grid;
  grid-template-columns:252px 1fr;
}

.tempo-sidebar{
  background:var(--tempo-sidebar);
  padding:24px 16px;
  position:sticky;
  top:0;
  height:100vh;
  z-index:20;
}

.tempo-sidebar-brand{
  padding:8px 12px 26px;
  color:#fff;
  font-weight:900;
  letter-spacing:-.04em;
  font-size:28px;
}

.tempo-nav{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.tempo-nav-item{
  display:flex;
  gap:12px;
  align-items:center;
  padding:12px 13px;
  border-radius:12px;
  color:var(--tempo-nav-text);
  font-weight:700;
  transition:background .18s ease,color .18s ease;
}

.tempo-nav-item:hover,
.tempo-nav-item.active{
  background:var(--tempo-nav-active);
  color:#fff;
}

.tempo-nav-icon{
  width:22px;
  text-align:center;
  flex:0 0 22px;
}

.tempo-sidebar-foot{
  position:absolute;
  left:16px;
  right:16px;
  bottom:20px;
}

.tempo-sidebar-foot form{margin:0}

.tempo-sidebar-logout{
  width:100%;
  padding:11px;
  border-radius:12px;
  border:1px solid #3a3a3a;
  background:transparent;
  color:var(--tempo-nav-text);
  cursor:pointer;
}

.tempo-sidebar-logout:hover{
  background:var(--tempo-nav-active);
  color:#fff;
}

/* TOPBAR / CONTENIDO ====================================================== */

.tempo-main{
  padding:24px 30px 46px;
  max-width:1600px;
  width:100%;
  margin:0 auto;
}

.tempo-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:24px;
}

.tempo-topbar h1{
  margin:3px 0 0;
  font-size:24px;
}

.tempo-top-actions{
  display:flex;
  align-items:center;
  gap:12px;
}

.tempo-user-copy{
  text-align:right;
  font-size:13px;
}

.tempo-user-copy small{
  display:block;
  color:var(--tempo-muted);
  margin-top:2px;
}

.tempo-avatar{
  width:42px;
  height:42px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:var(--tempo-accent);
  color:var(--tempo-accent-text);
  font-weight:900;
}

.tempo-hero{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  padding:28px;
  border:1px solid var(--tempo-line);
  border-radius:24px;
  background:var(--tempo-hero);
  margin-bottom:18px;
  overflow:hidden;
}

.tempo-hero h2{
  font-size:clamp(28px,4vw,46px);
  letter-spacing:-.04em;
  margin:7px 0;
}

.tempo-hero p{
  margin:0;
  color:var(--tempo-muted);
}

.tempo-role-pill{
  white-space:nowrap;
  padding:10px 12px;
  border:1px solid var(--tempo-line);
  border-radius:999px;
  background:var(--tempo-card);
  font-weight:800;
  font-size:13px;
}

.tempo-dot{
  display:inline-block;
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--tempo-accent);
  margin-right:7px;
}

.tempo-panel{
  background:var(--tempo-card);
  border:1px solid var(--tempo-line);
  border-radius:18px;
  padding:20px;
}

.tempo-panel h3{
  margin:4px 0 14px;
  font-size:19px;
}

.tempo-panel p{
  color:var(--tempo-muted);
}

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

@media(max-width:820px){
  .tempo-login{grid-template-columns:1fr}
  .tempo-brand-side{min-height:36vh;padding:32px}
  .tempo-brand-copy h1{font-size:44px}
  .tempo-login-side{padding:24px}

  .tempo-app-shell{grid-template-columns:1fr}

  .tempo-sidebar{
    position:relative;
    width:100%;
    height:auto;
  }

  .tempo-sidebar-foot{
    position:static;
    margin-top:18px;
  }

  .tempo-main{padding:18px}
  .tempo-hero{align-items:flex-start;flex-direction:column}
}

@media(max-width:560px){
  .tempo-login-card{padding:26px}
  .tempo-topbar{align-items:flex-start}
  .tempo-user-copy{display:none}
  .tempo-hero{padding:22px}
}

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

.tempo-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin-bottom:14px;
}

.tempo-kpi{
  background:var(--tempo-card);
  border:1px solid var(--tempo-line);
  border-radius:18px;
  padding:20px;
  min-width:0;
}

.tempo-kpi>span{
  display:block;
  font-size:13px;
  color:var(--tempo-muted);
  font-weight:700;
}

.tempo-kpi strong{
  display:block;
  font-size:34px;
  letter-spacing:-.04em;
  margin-top:7px;
  line-height:1.05;
}

.tempo-kpi small{
  display:block;
  color:var(--tempo-muted);
  margin-top:5px;
  line-height:1.35;
}

.tempo-dashboard-grid{
  display:grid;
  grid-template-columns:minmax(0,1.4fr) minmax(320px,.8fr);
  gap:14px;
  margin-bottom:14px;
}

.tempo-panel-wide{
  grid-column:1 / -1;
}

.tempo-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px;
}

.tempo-panel-head h3{
  margin:4px 0 0;
}

.tempo-link{
  border:1px solid var(--tempo-line);
  background:var(--tempo-card);
  color:var(--tempo-text);
  padding:10px 13px;
  border-radius:11px;
  font-size:13px;
  font-weight:700;
}

.tempo-link-disabled{
  color:var(--tempo-muted);
  cursor:default;
}

.tempo-project-list,
.tempo-activity-list{
  display:flex;
  flex-direction:column;
}

.tempo-project-row{
  display:grid;
  grid-template-columns:minmax(180px,1.25fr) minmax(100px,1fr) 55px 92px;
  gap:14px;
  align-items:center;
  padding:13px 0;
  border-top:1px solid var(--tempo-line);
}

.tempo-project-row:first-child{
  border-top:0;
}

.tempo-project-copy{
  min-width:0;
}

.tempo-project-copy strong,
.tempo-activity-item strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
}

.tempo-project-copy small,
.tempo-activity-item small{
  display:block;
  color:var(--tempo-muted);
  margin-top:4px;
}

.tempo-project-progress progress{
  appearance:none;
  -webkit-appearance:none;
  width:100%;
  height:7px;
  display:block;
  border:0;
  border-radius:999px;
  overflow:hidden;
  background:var(--tempo-soft);
}

.tempo-project-progress progress::-webkit-progress-bar{
  background:var(--tempo-soft);
  border-radius:999px;
}

.tempo-project-progress progress::-webkit-progress-value{
  background:var(--tempo-accent);
  border-radius:999px;
}

.tempo-project-progress progress::-moz-progress-bar{
  background:var(--tempo-accent);
  border-radius:999px;
}

.tempo-project-percent{
  font-size:13px;
  font-weight:800;
  text-align:right;
}

.tempo-status-pill,
.tempo-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:800;
  padding:7px 9px;
  border-radius:999px;
  background:var(--tempo-soft);
  white-space:nowrap;
}

.tempo-status-pill.is-risk{
  color:var(--tempo-warn);
  background:var(--tempo-warn-bg);
}

.tempo-activity-item{
  display:grid;
  grid-template-columns:18px minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  padding:14px 0;
  border-top:1px solid var(--tempo-line);
}

.tempo-activity-item:first-child{
  border-top:0;
}

.tempo-activity-check{
  width:15px;
  height:15px;
  border-radius:4px;
  border:1.5px solid var(--tempo-line);
  background:var(--tempo-card);
}

.tempo-activity-item time{
  font-size:12px;
  font-weight:800;
  color:var(--tempo-muted);
  white-space:nowrap;
}

.tempo-empty{
  min-height:110px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:22px;
  border:1px dashed var(--tempo-line);
  border-radius:14px;
  background:var(--tempo-bg);
}

.tempo-empty strong{
  font-size:14px;
}

.tempo-empty span{
  margin-top:6px;
  color:var(--tempo-muted);
  font-size:13px;
  line-height:1.45;
}

.tempo-segmented{
  display:flex;
  border:1px solid var(--tempo-line);
  border-radius:10px;
  padding:3px;
}

.tempo-segmented span{
  color:var(--tempo-muted);
  padding:6px 10px;
  border-radius:7px;
  font-size:12px;
  font-weight:700;
}

.tempo-segmented .active{
  background:var(--tempo-accent);
  color:var(--tempo-accent-text);
}

.tempo-table-wrap{
  overflow:auto;
  border-radius:12px;
}

.tempo-timesheet-table{
  width:100%;
  border-collapse:collapse;
  min-width:760px;
}

.tempo-timesheet-table th,
.tempo-timesheet-table td{
  padding:13px 12px;
  border-top:1px solid var(--tempo-line);
  text-align:center;
  font-size:13px;
}

.tempo-timesheet-table th:first-child,
.tempo-timesheet-table td:first-child{
  text-align:left;
  min-width:260px;
}

.tempo-timesheet-table thead th{
  border-top:0;
  color:var(--tempo-muted);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.tempo-timesheet-table thead th small{
  display:block;
  margin-top:3px;
  font-size:10px;
  letter-spacing:0;
}

.tempo-timesheet-table tbody td:first-child strong{
  display:block;
}

.tempo-timesheet-table tbody td:first-child small{
  display:block;
  color:var(--tempo-muted);
  margin-top:4px;
}

.tempo-time-cell.has{
  font-weight:800;
  color:var(--tempo-accent);
}

.tempo-timesheet-table tfoot td{
  font-weight:900;
}

.tempo-timesheet-table tfoot td.is-warning{
  color:var(--tempo-warn);
}

.tempo-empty-table{
  min-height:90px;
}

.tempo-hint{
  font-size:12px;
  color:var(--tempo-muted);
  margin:14px 0 0;
}

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

@media(max-width:1100px){
  .tempo-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .tempo-dashboard-grid{
    grid-template-columns:1fr;
  }

  .tempo-project-row{
    grid-template-columns:minmax(180px,1.2fr) minmax(100px,.9fr) 50px 88px;
  }
}

@media(max-width:820px){
  .tempo-kpis{
    grid-template-columns:1fr 1fr;
  }
}

@media(max-width:560px){
  .tempo-kpis{
    grid-template-columns:1fr;
  }

  .tempo-project-row{
    grid-template-columns:minmax(0,1fr) 70px;
  }

  .tempo-project-progress{
    grid-column:1 / -1;
    grid-row:2;
  }

  .tempo-status-pill{
    display:none;
  }

  .tempo-project-percent{
    text-align:right;
  }

  .tempo-panel-head{
    align-items:flex-start;
  }
}

/* CLIENTES CRUD ============================================================ */

.tempo-page-hero,
.tempo-page-heading{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  padding:28px;
  border:1px solid var(--tempo-line);
  border-radius:24px;
  background:var(--tempo-hero);
  margin-bottom:18px;
}

.tempo-page-hero-compact{
  align-items:center;
}

.tempo-page-hero h2,
.tempo-page-heading h2{
  margin:5px 0 6px;
  font-size:clamp(28px,3vw,40px);
  letter-spacing:-.04em;
}

.tempo-page-hero p,
.tempo-page-heading p{
  margin:0;
  color:var(--tempo-muted);
  line-height:1.5;
}

.tempo-page-heading{
  background:transparent;
  border:0;
  border-bottom:1px solid var(--tempo-line);
  border-radius:0;
  padding:0 0 20px;
  margin-bottom:20px;
}

.tempo-back-link{
  display:inline-flex;
  margin-bottom:14px;
  color:var(--tempo-muted);
  font-size:13px;
  font-weight:750;
}

.tempo-back-link:hover{
  color:var(--tempo-accent);
}

.tempo-btn{
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 14px;
  border-radius:11px;
  border:1px solid transparent;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
  white-space:nowrap;
}

.tempo-btn-primary{
  background:var(--tempo-accent);
  color:var(--tempo-accent-text);
}

.tempo-btn-primary:hover{
  filter:brightness(.97);
}

.tempo-btn-secondary{
  background:var(--tempo-card);
  color:var(--tempo-text);
  border-color:var(--tempo-line);
}

.tempo-btn-secondary:hover,
.tempo-btn-ghost:hover{
  border-color:#cfc9bc;
  background:var(--tempo-soft);
}

.tempo-btn-ghost{
  background:transparent;
  color:var(--tempo-muted);
  border-color:var(--tempo-line);
}

.tempo-btn-danger-soft{
  color:var(--tempo-warn);
  background:var(--tempo-warn-bg);
  border-color:#f4c9b9;
}

.tempo-btn-success-soft{
  color:#245b36;
  background:#eaf6ed;
  border-color:#c8e8d0;
}

.tempo-btn-icon{
  font-size:18px;
  line-height:1;
}

.tempo-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}

.tempo-filter-form{
  flex:1;
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.tempo-search-wrap{
  position:relative;
  flex:1;
  min-width:240px;
  max-width:620px;
}

.tempo-search-icon{
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%);
  color:var(--tempo-muted);
  pointer-events:none;
}

.tempo-search-input,
.tempo-filter-select{
  height:42px;
  border:1px solid var(--tempo-line);
  border-radius:11px;
  background:var(--tempo-input);
  color:var(--tempo-text);
  outline:none;
}

.tempo-search-input{
  width:100%;
  padding:0 14px 0 38px;
}

.tempo-filter-select{
  min-width:130px;
  padding:0 34px 0 12px;
}

.tempo-search-input:focus,
.tempo-filter-select:focus{
  border-color:var(--tempo-accent);
  box-shadow:0 0 0 3px var(--tempo-focus);
}

.tempo-record-count{
  display:flex;
  align-items:baseline;
  gap:6px;
  color:var(--tempo-muted);
  white-space:nowrap;
  font-size:12px;
}

.tempo-record-count strong{
  color:var(--tempo-text);
  font-size:16px;
}

.tempo-data-table{
  width:100%;
  min-width:960px;
  border-collapse:collapse;
}

.tempo-data-table th,
.tempo-data-table td{
  padding:14px 12px;
  border-top:1px solid var(--tempo-line);
  text-align:left;
  vertical-align:middle;
  font-size:13px;
}

.tempo-data-table thead th{
  border-top:0;
  color:var(--tempo-muted);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.08em;
  white-space:nowrap;
}

.tempo-data-table tbody tr:hover{
  background:#faf8f3;
}

.tempo-data-table tbody tr.is-inactive{
  opacity:.68;
}

.tempo-table-actions-head{
  text-align:right!important;
}

.tempo-client-cell{
  display:flex;
  align-items:center;
  gap:11px;
  min-width:230px;
}

.tempo-client-avatar{
  width:38px;
  height:38px;
  border-radius:11px;
  display:grid;
  place-items:center;
  flex:0 0 38px;
  background:var(--tempo-soft);
  color:var(--tempo-accent);
  font-size:12px;
  font-weight:900;
}

.tempo-client-cell strong,
.tempo-client-cell small{
  display:block;
}

.tempo-client-cell small{
  margin-top:3px;
  color:var(--tempo-muted);
}

.tempo-inline-link{
  color:var(--tempo-text);
  text-decoration:underline;
  text-decoration-color:var(--tempo-line);
  text-underline-offset:3px;
}

.tempo-inline-link:hover{
  color:var(--tempo-accent);
}

.tempo-state-pill{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:7px 9px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.tempo-state-pill.is-active{
  color:#245b36;
  background:#eaf6ed;
}

.tempo-state-pill.is-inactive{
  color:var(--tempo-muted);
  background:var(--tempo-soft);
}

.tempo-state-dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:currentColor;
}

.tempo-table-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  white-space:nowrap;
}

.tempo-action-link,
.tempo-action-button{
  border:0;
  background:transparent;
  color:var(--tempo-muted);
  padding:6px 7px;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}

.tempo-action-link:hover{
  color:var(--tempo-text);
}

.tempo-action-button.is-danger:hover{
  color:var(--tempo-warn);
}

.tempo-action-button.is-success:hover{
  color:#245b36;
}

.tempo-inline-form{
  display:inline;
  margin:0;
}

.tempo-empty-large{
  min-height:260px;
}

.tempo-empty-action{
  margin-top:16px;
}

/* FORM CLIENTES ============================================================ */

.tempo-form{
  max-width:1100px;
}

.tempo-form-card{
  background:var(--tempo-card);
  border:1px solid var(--tempo-line);
  border-radius:18px;
  padding:24px;
}

.tempo-form-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}

.tempo-form-card-head h3{
  margin:4px 0 0;
  font-size:20px;
}

.tempo-required-note{
  color:var(--tempo-muted);
  font-size:11px;
}

.tempo-form-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:4px 16px;
}

.tempo-field-span-2{
  grid-column:span 2;
}

.tempo-field-full{
  grid-column:1 / -1;
}

.tempo-field small{
  display:block;
  color:var(--tempo-muted);
  margin-top:6px;
  font-size:11px;
  line-height:1.4;
}

.tempo-field textarea{
  resize:vertical;
  min-height:120px;
}

.tempo-form-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:16px;
}

.tempo-error-list{
  margin:8px 0 0 18px;
  padding:0;
}

/* DETALLE CLIENTE ========================================================== */

.tempo-detail-heading{
  align-items:center;
}

.tempo-heading-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.tempo-detail-grid{
  display:grid;
  grid-template-columns:1.25fr .75fr;
  gap:14px;
}

.tempo-detail-card-full{
  grid-column:1 / -1;
}

.tempo-detail-list{
  margin:0;
}

.tempo-detail-list>div{
  display:grid;
  grid-template-columns:180px 1fr;
  gap:16px;
  padding:13px 0;
  border-top:1px solid var(--tempo-line);
}

.tempo-detail-list>div:first-child{
  border-top:0;
}

.tempo-detail-list dt{
  color:var(--tempo-muted);
  font-size:12px;
  font-weight:800;
}

.tempo-detail-list dd{
  margin:0;
  font-size:13px;
  font-weight:650;
}

.tempo-notes-box{
  color:var(--tempo-muted);
  line-height:1.65;
  font-size:13px;
}

.tempo-notes-box p{
  margin:0 0 10px;
}

@media(max-width:1100px){
  .tempo-toolbar{
    align-items:flex-start;
    flex-direction:column;
  }

  .tempo-filter-form{
    width:100%;
  }

  .tempo-record-count{
    align-self:flex-end;
  }

  .tempo-form-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .tempo-field-span-2{
    grid-column:span 1;
  }
}

@media(max-width:820px){
  .tempo-page-hero,
  .tempo-page-heading{
    align-items:flex-start;
    flex-direction:column;
  }

  .tempo-heading-actions{
    width:100%;
    flex-wrap:wrap;
  }

  .tempo-filter-form{
    flex-wrap:wrap;
  }

  .tempo-search-wrap{
    width:100%;
    max-width:none;
    flex-basis:100%;
  }

  .tempo-detail-grid{
    grid-template-columns:1fr;
  }

  .tempo-detail-card-full{
    grid-column:auto;
  }
}

@media(max-width:560px){
  .tempo-form-grid{
    grid-template-columns:1fr;
  }

  .tempo-field-span-2,
  .tempo-field-full{
    grid-column:auto;
  }

  .tempo-form-actions{
    flex-direction:column-reverse;
  }

  .tempo-form-actions .tempo-btn{
    width:100%;
  }

  .tempo-detail-list>div{
    grid-template-columns:1fr;
    gap:5px;
  }

  .tempo-heading-actions .tempo-btn,
  .tempo-heading-actions form{
    flex:1 1 auto;
  }
}

/* PROYECTOS CRUD =========================================================== */

.tempo-toolbar-projects{
  align-items:flex-start;
}

.tempo-filter-form-projects{
  flex-wrap:wrap;
}

.tempo-filter-wide{
  min-width:190px;
}

.tempo-projects-table{
  min-width:1380px;
}

.tempo-project-main-cell{
  min-width:230px;
}

.tempo-project-main-cell strong,
.tempo-project-main-cell small,
.tempo-date-range strong,
.tempo-date-range small{
  display:block;
}

.tempo-project-main-cell small,
.tempo-date-range small{
  margin-top:4px;
  color:var(--tempo-muted);
}

.tempo-priority-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:64px;
  padding:7px 9px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
}

.tempo-priority-pill.is-1{
  color:var(--tempo-warn);
  background:var(--tempo-warn-bg);
}

.tempo-priority-pill.is-2{
  color:#705718;
  background:#fff5d6;
}

.tempo-priority-pill.is-3{
  color:var(--tempo-muted);
  background:var(--tempo-soft);
}

.tempo-project-progress-cell{
  display:grid;
  grid-template-columns:minmax(100px,1fr) 42px;
  align-items:center;
  gap:8px;
  min-width:150px;
}

.tempo-project-progress-cell progress{
  appearance:none;
  -webkit-appearance:none;
  width:100%;
  height:7px;
  border:0;
  border-radius:999px;
  overflow:hidden;
  background:var(--tempo-soft);
}

.tempo-project-progress-cell progress::-webkit-progress-bar{
  background:var(--tempo-soft);
  border-radius:999px;
}

.tempo-project-progress-cell progress::-webkit-progress-value{
  background:var(--tempo-accent);
  border-radius:999px;
}

.tempo-project-progress-cell progress::-moz-progress-bar{
  background:var(--tempo-accent);
  border-radius:999px;
}

.tempo-project-progress-cell span{
  text-align:right;
  font-weight:800;
  font-size:12px;
}

.tempo-project-form{
  max-width:1180px;
}

.tempo-project-form-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
}

.tempo-project-team-card{
  margin-top:14px;
}

.tempo-resource-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}

.tempo-resource-option{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  padding:12px;
  border:1px solid var(--tempo-line);
  border-radius:13px;
  background:var(--tempo-card);
  cursor:pointer;
  transition:border-color .18s ease,background .18s ease,box-shadow .18s ease;
}

.tempo-resource-option:hover{
  border-color:#cfc9bc;
  background:#faf8f3;
}

.tempo-resource-option:has(.tempo-resource-checkbox:checked){
  border-color:var(--tempo-accent);
  background:#fff8f4;
  box-shadow:0 0 0 2px var(--tempo-focus);
}

.tempo-resource-checkbox{
  width:16px;
  height:16px;
  margin:0;
  accent-color:var(--tempo-accent);
  flex:0 0 16px;
}

.tempo-resource-avatar{
  width:38px;
  height:38px;
  border-radius:11px;
  display:grid;
  place-items:center;
  flex:0 0 38px;
  background:var(--tempo-soft);
  color:var(--tempo-accent);
  font-size:12px;
  font-weight:900;
}

.tempo-resource-copy{
  min-width:0;
  flex:1;
}

.tempo-resource-copy strong,
.tempo-resource-copy small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.tempo-resource-copy small{
  margin-top:4px;
  color:var(--tempo-muted);
  font-size:11px;
}

.tempo-project-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin-bottom:14px;
}

.tempo-kpi-text{
  font-size:22px!important;
  letter-spacing:-.025em!important;
  margin-top:12px!important;
}

.tempo-project-detail-grid{
  grid-template-columns:1.1fr .9fr;
}

.tempo-team-list{
  display:flex;
  flex-direction:column;
}

.tempo-team-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 0;
  border-top:1px solid var(--tempo-line);
}

.tempo-team-item:first-child{
  border-top:0;
}

.tempo-team-item .tempo-status-pill{
  margin-left:auto;
}

@media(max-width:1200px){
  .tempo-project-form-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .tempo-resource-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:1100px){
  .tempo-project-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .tempo-project-detail-grid{
    grid-template-columns:1fr;
  }

  .tempo-project-form-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:820px){
  .tempo-filter-form-projects .tempo-filter-select,
  .tempo-filter-form-projects .tempo-filter-wide{
    flex:1 1 180px;
  }

  .tempo-resource-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:560px){
  .tempo-project-summary{
    grid-template-columns:1fr;
  }

  .tempo-project-form-grid{
    grid-template-columns:1fr;
  }
}

/* ACTIVIDADES CRUD / CAPTURA TIPO LAWSON ================================= */

.tempo-activities-table{
  min-width:1420px;
}

.tempo-work-capture-panel{
  margin-bottom:14px;
}

.tempo-work-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:4px 16px;
}

.tempo-work-form{
  width:100%;
}

.tempo-dropzone{
  position:relative;
  min-height:128px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:22px;
  border:1.5px dashed var(--tempo-line);
  border-radius:14px;
  background:var(--tempo-bg);
  text-align:center;
  cursor:pointer;
  transition:border-color .18s ease,background .18s ease,box-shadow .18s ease;
}

.tempo-dropzone:hover,
.tempo-dropzone:focus,
.tempo-dropzone.is-dragging{
  outline:none;
  border-color:var(--tempo-accent);
  background:#fff8f4;
  box-shadow:0 0 0 3px var(--tempo-focus);
}

.tempo-dropzone strong{
  font-size:13px;
}

.tempo-dropzone span{
  max-width:650px;
  color:var(--tempo-muted);
  font-size:11px;
  line-height:1.45;
}

.tempo-file-input{
  width:auto!important;
  max-width:100%;
  border:0!important;
  background:transparent!important;
  padding:8px!important;
  margin:6px 0 0!important;
  box-shadow:none!important;
}

.tempo-file-preview{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}

.tempo-file-chip{
  max-width:290px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border:1px solid var(--tempo-line);
  border-radius:11px;
  background:var(--tempo-card);
}

.tempo-file-chip>div{
  min-width:0;
}

.tempo-file-chip span,
.tempo-file-chip small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.tempo-file-chip span{
  font-size:12px;
  font-weight:750;
}

.tempo-file-chip small{
  margin-top:2px;
  color:var(--tempo-muted);
  font-size:10px;
}

.tempo-file-chip button{
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:50%;
  background:var(--tempo-soft);
  color:var(--tempo-muted);
  font-size:16px;
  cursor:pointer;
}

.tempo-file-chip button:hover{
  color:var(--tempo-warn);
  background:var(--tempo-warn-bg);
}

.tempo-activity-log-panel{
  margin-top:14px;
}

.tempo-timeline{
  position:relative;
}

.tempo-timeline-item{
  position:relative;
  display:grid;
  grid-template-columns:18px minmax(0,1fr);
  gap:12px;
  padding:0 0 20px;
}

.tempo-timeline-item:last-child{
  padding-bottom:0;
}

.tempo-timeline-item::before{
  content:"";
  position:absolute;
  left:7px;
  top:16px;
  bottom:0;
  width:1px;
  background:var(--tempo-line);
}

.tempo-timeline-item:last-child::before{
  display:none;
}

.tempo-timeline-marker{
  width:15px;
  height:15px;
  border-radius:50%;
  margin-top:4px;
  background:var(--tempo-accent);
  border:4px solid #fff5ef;
  position:relative;
  z-index:1;
}

.tempo-timeline-content{
  min-width:0;
  padding:14px 16px;
  border:1px solid var(--tempo-line);
  border-radius:14px;
  background:var(--tempo-card);
}

.tempo-timeline-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}

.tempo-timeline-head strong,
.tempo-timeline-head small{
  display:block;
}

.tempo-timeline-head small{
  margin-top:3px;
  color:var(--tempo-muted);
}

.tempo-timeline-meta{
  display:flex;
  align-items:center;
  gap:8px;
}

.tempo-hours-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:62px;
  padding:7px 9px;
  border-radius:999px;
  background:#fff1ea;
  color:var(--tempo-accent);
  font-size:12px;
  font-weight:900;
}

.tempo-timeline-comment{
  margin-top:12px;
  color:var(--tempo-text);
  font-size:13px;
  line-height:1.6;
}

.tempo-timeline-comment p{
  margin:0 0 8px;
}

.tempo-attachments{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin-top:12px;
}

.tempo-attachment{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  padding:9px;
  border:1px solid var(--tempo-line);
  border-radius:12px;
  background:var(--tempo-bg);
}

.tempo-attachment-image{
  width:52px;
  height:52px;
  object-fit:cover;
  flex:0 0 52px;
  border-radius:8px;
  border:1px solid var(--tempo-line);
  background:var(--tempo-card);
}

.tempo-attachment-icon{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  flex:0 0 42px;
  border-radius:9px;
  background:var(--tempo-soft);
  color:var(--tempo-accent);
  font-weight:900;
}

.tempo-attachment-copy{
  min-width:0;
  flex:1;
}

.tempo-attachment-copy a,
.tempo-attachment-copy small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.tempo-attachment-copy small{
  margin-top:4px;
  color:var(--tempo-muted);
  font-size:10px;
}

.tempo-project-activities-list{
  display:flex;
  flex-direction:column;
}

.tempo-project-activity-row{
  display:grid;
  grid-template-columns:minmax(220px,1.3fr) 110px minmax(160px,.8fr) 78px;
  gap:14px;
  align-items:center;
  padding:13px 0;
  border-top:1px solid var(--tempo-line);
}

.tempo-project-activity-row:first-child{
  border-top:0;
}

.tempo-project-activity-row:hover strong{
  color:var(--tempo-accent);
}

.tempo-project-activity-row strong,
.tempo-project-activity-row small{
  display:block;
}

.tempo-project-activity-row small{
  margin-top:4px;
  color:var(--tempo-muted);
}

@media(max-width:1100px){
  .tempo-work-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .tempo-project-activity-row{
    grid-template-columns:minmax(200px,1fr) 110px minmax(140px,.7fr);
  }

  .tempo-project-activity-row .tempo-priority-pill{
    display:none;
  }
}

@media(max-width:820px){
  .tempo-attachments{
    grid-template-columns:1fr;
  }

  .tempo-project-activity-row{
    grid-template-columns:1fr auto;
  }

  .tempo-project-activity-row .tempo-project-progress-cell{
    grid-column:1 / -1;
  }
}

@media(max-width:560px){
  .tempo-work-grid{
    grid-template-columns:1fr;
  }

  .tempo-timeline-head{
    flex-direction:column;
  }

  .tempo-timeline-meta{
    width:100%;
    justify-content:space-between;
  }
}

/* PLANEACIÓN / CAPACIDAD ================================================== */

.tempo-week-nav{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:14px;
  margin-bottom:14px;
}

.tempo-week-title{
  text-align:center;
  padding:10px 14px;
  border:1px solid var(--tempo-line);
  border-radius:13px;
  background:var(--tempo-card);
}

.tempo-week-title strong{
  display:block;
  margin-top:4px;
  font-size:16px;
}

.tempo-planning-kpis{
  margin-bottom:14px;
}

.tempo-capacity-board{
  margin-bottom:14px;
}

.tempo-planning-table{
  width:100%;
  min-width:1450px;
  border-collapse:collapse;
}

.tempo-planning-table th,
.tempo-planning-table td{
  padding:10px;
  border-top:1px solid var(--tempo-line);
  border-left:1px solid var(--tempo-line);
  vertical-align:top;
  font-size:12px;
}

.tempo-planning-table th:first-child,
.tempo-planning-table td:first-child{
  border-left:0;
  min-width:230px;
}

.tempo-planning-table thead th{
  border-top:0;
  color:var(--tempo-muted);
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.07em;
  text-align:center;
}

.tempo-planning-table thead th:first-child{
  text-align:left;
}

.tempo-planning-table thead small{
  display:block;
  margin-top:3px;
  font-size:10px;
  letter-spacing:0;
}

.tempo-capacity-resource{
  display:grid;
  grid-template-columns:38px minmax(0,1fr);
  gap:10px;
  align-items:center;
}

.tempo-capacity-resource strong,
.tempo-capacity-resource small{
  display:block;
}

.tempo-capacity-resource small{
  margin-top:3px;
  color:var(--tempo-muted);
  font-size:10px;
}

.tempo-capacity-meter{
  margin-top:7px;
}

.tempo-capacity-meter progress{
  appearance:none;
  -webkit-appearance:none;
  width:100%;
  height:6px;
  border:0;
  border-radius:999px;
  overflow:hidden;
  background:var(--tempo-soft);
}

.tempo-capacity-meter progress::-webkit-progress-bar{
  background:var(--tempo-soft);
}

.tempo-capacity-meter progress::-webkit-progress-value{
  background:var(--tempo-accent);
}

.tempo-capacity-meter progress::-moz-progress-bar{
  background:var(--tempo-accent);
}

.tempo-capacity-meter.is-over progress::-webkit-progress-value{
  background:var(--tempo-warn);
}

.tempo-capacity-meter.is-over progress::-moz-progress-bar{
  background:var(--tempo-warn);
}

.tempo-planning-day-cell{
  position:relative;
  min-width:148px;
  background:#fffefa;
}

.tempo-day-add{
  position:absolute;
  right:6px;
  top:5px;
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  border-radius:7px;
  color:var(--tempo-muted);
  font-weight:900;
}

.tempo-day-add:hover{
  background:var(--tempo-soft);
  color:var(--tempo-accent);
}

.tempo-planning-chip{
  display:block;
  margin:22px 0 5px;
  padding:8px;
  border:1px solid #f0d1c6;
  border-radius:9px;
  background:#fff7f3;
  min-width:0;
}

.tempo-planning-chip + .tempo-planning-chip{
  margin-top:5px;
}

.tempo-planning-chip strong,
.tempo-planning-chip span{
  display:block;
}

.tempo-planning-chip strong{
  color:var(--tempo-accent);
  font-size:11px;
}

.tempo-planning-chip span{
  margin-top:3px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--tempo-text);
  font-size:10px;
}

.tempo-day-total{
  display:block;
  margin-top:6px;
  text-align:right;
  color:var(--tempo-muted);
  font-size:10px;
  font-weight:800;
}

.tempo-capacity-total{
  display:block;
  font-size:14px;
  font-weight:900;
}

.tempo-capacity-total.is-over{
  color:var(--tempo-warn);
}

.tempo-planning-lower-grid{
  display:grid;
  grid-template-columns:1.35fr .65fr;
  gap:14px;
}

.tempo-mini-filter select{
  min-height:36px;
  padding:7px 30px 7px 10px;
  border:1px solid var(--tempo-line);
  border-radius:9px;
  background:var(--tempo-card);
  color:var(--tempo-text);
  font-size:12px;
}

.tempo-planning-list-table{
  min-width:900px;
}

.tempo-planning-list-table td strong,
.tempo-planning-list-table td small{
  display:block;
}

.tempo-planning-list-table td small{
  margin-top:3px;
  color:var(--tempo-muted);
}

.tempo-capacity-adjustments{
  display:flex;
  flex-direction:column;
}

.tempo-capacity-adjustment{
  display:grid;
  grid-template-columns:minmax(0,1fr) 70px auto;
  gap:10px;
  align-items:center;
  padding:12px 0;
  border-top:1px solid var(--tempo-line);
}

.tempo-capacity-adjustment:first-child{
  border-top:0;
}

.tempo-capacity-adjustment.is-inactive{
  opacity:.65;
}

.tempo-capacity-adjustment strong,
.tempo-capacity-adjustment small{
  display:block;
}

.tempo-capacity-adjustment small{
  margin-top:3px;
  color:var(--tempo-muted);
  font-size:10px;
}

.tempo-capacity-adjustment>span{
  text-align:right;
  font-weight:900;
}

@media(max-width:1200px){
  .tempo-planning-lower-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:820px){
  .tempo-week-nav{
    grid-template-columns:1fr;
  }

  .tempo-week-title{
    order:-1;
  }

  .tempo-week-nav .tempo-btn{
    width:100%;
  }

  .tempo-capacity-adjustment{
    grid-template-columns:1fr auto;
  }

  .tempo-capacity-adjustment .tempo-table-actions{
    grid-column:1 / -1;
    justify-content:flex-start;
  }
}

/* TIMESHEET / MIS HORAS =================================================== */

.tempo-timesheet-nav{
  display:grid;
  grid-template-columns:auto minmax(260px,1fr) auto;
  gap:14px;
  align-items:center;
  margin-bottom:14px;
}

.tempo-timesheet-week{
  text-align:center;
  padding:12px 16px;
  border:1px solid var(--tempo-line);
  border-radius:14px;
  background:var(--tempo-card);
}

.tempo-timesheet-week strong{
  display:block;
  margin-top:4px;
  font-size:16px;
}

.tempo-timesheet-week>small{
  display:flex;
  justify-content:center;
  margin-top:7px;
}

.tempo-state-pill.is-closed{
  color:#705718;
  background:#fff5d6;
}

.tempo-resource-selector-panel{
  margin-bottom:14px;
  padding-top:12px;
  padding-bottom:12px;
}

.tempo-timesheet-resource-form{
  max-width:500px;
}

.tempo-timesheet-resource-form .tempo-field{
  margin:0;
}

.tempo-timesheet-resource-head{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:14px;
  padding:15px 18px;
  border:1px solid var(--tempo-line);
  border-radius:16px;
  background:var(--tempo-card);
}

.tempo-timesheet-resource-head h3{
  margin:3px 0 0;
  font-size:18px;
}

.tempo-timesheet-resource-head small{
  display:block;
  margin-top:4px;
  color:var(--tempo-muted);
}

.tempo-timesheet-kpis{
  margin-bottom:14px;
}

.tempo-kpi-warning{
  color:var(--tempo-warn);
}

.tempo-timesheet-matrix-panel{
  margin-bottom:14px;
}

.tempo-timesheet-matrix{
  width:100%;
  min-width:1320px;
  border-collapse:collapse;
}

.tempo-timesheet-matrix th,
.tempo-timesheet-matrix td{
  padding:10px;
  border-top:1px solid var(--tempo-line);
  border-left:1px solid var(--tempo-line);
  text-align:center;
  vertical-align:middle;
  font-size:12px;
}

.tempo-timesheet-matrix th:first-child,
.tempo-timesheet-matrix td:first-child{
  border-left:0;
  min-width:250px;
  text-align:left;
}

.tempo-timesheet-matrix thead th{
  border-top:0;
  color:var(--tempo-muted);
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.07em;
}

.tempo-timesheet-matrix thead th small{
  display:block;
  margin-top:3px;
  font-size:10px;
  letter-spacing:0;
}

.tempo-timesheet-activity strong,
.tempo-timesheet-activity small{
  display:block;
}

.tempo-timesheet-activity small{
  margin-top:4px;
  color:var(--tempo-muted);
}

.tempo-timesheet-day{
  min-width:128px;
  background:var(--tempo-card);
}

.tempo-timesheet-day.has-real{
  background:#fff9f5;
}

.tempo-timesheet-cell-link,
.tempo-timesheet-cell-add{
  min-height:54px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  border-radius:9px;
}

.tempo-timesheet-cell-link:hover,
.tempo-timesheet-cell-add:hover{
  background:var(--tempo-soft);
}

.tempo-timesheet-cell-link strong{
  color:var(--tempo-accent);
  font-size:13px;
}

.tempo-timesheet-cell-link small,
.tempo-timesheet-cell-add small{
  color:var(--tempo-muted);
  font-size:10px;
}

.tempo-timesheet-cell-add span{
  font-size:18px;
  color:var(--tempo-muted);
  font-weight:900;
}

.tempo-timesheet-cell-add:hover span{
  color:var(--tempo-accent);
}

.tempo-plan-only{
  display:inline-flex;
  padding:6px 8px;
  border-radius:8px;
  background:var(--tempo-soft);
  color:var(--tempo-muted);
  font-size:10px;
  font-weight:750;
}

.tempo-timesheet-empty-cell{
  color:#c5c0b5;
}

.tempo-timesheet-row-total{
  min-width:90px;
}

.tempo-timesheet-matrix tfoot td{
  font-weight:900;
  background:#faf8f3;
}

.tempo-timesheet-matrix tfoot td.is-warning{
  color:var(--tempo-warn);
}

.tempo-timesheet-lower-grid{
  display:grid;
  grid-template-columns:1.35fr .65fr;
  gap:14px;
}

.tempo-timesheet-detail-table{
  min-width:820px;
}

.tempo-timesheet-detail-table td strong,
.tempo-timesheet-detail-table td small{
  display:block;
}

.tempo-timesheet-detail-table td small{
  margin-top:3px;
  color:var(--tempo-muted);
}

.tempo-timesheet-history{
  display:flex;
  flex-direction:column;
}

.tempo-timesheet-history-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 10px;
  border-top:1px solid var(--tempo-line);
  border-radius:10px;
}

.tempo-timesheet-history-row:first-child{
  border-top:0;
}

.tempo-timesheet-history-row:hover,
.tempo-timesheet-history-row.is-current{
  background:var(--tempo-soft);
}

.tempo-timesheet-history-row strong,
.tempo-timesheet-history-row small{
  display:block;
}

.tempo-timesheet-history-row small{
  margin-top:3px;
  color:var(--tempo-muted);
  font-size:10px;
}

.tempo-timesheet-history-row>span{
  font-weight:900;
}

@media(max-width:1100px){
  .tempo-timesheet-lower-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:820px){
  .tempo-timesheet-nav{
    grid-template-columns:1fr;
  }

  .tempo-timesheet-week{
    order:-1;
  }

  .tempo-timesheet-nav .tempo-btn{
    width:100%;
  }
}

/* ADMINISTRACIÓN / SEGURIDAD ============================================== */

.tempo-admin-kpis,
.tempo-admin-person-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin-bottom:14px;
}

.tempo-admin-modules{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

.tempo-admin-module-card{
  min-height:230px;
  display:flex;
  flex-direction:column;
  padding:24px;
  border:1px solid var(--tempo-line);
  border-radius:20px;
  background:var(--tempo-card);
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}

.tempo-admin-module-card:hover{
  transform:translateY(-2px);
  border-color:#cfc9bc;
  box-shadow:0 12px 34px rgba(34,25,15,.06);
}

.tempo-admin-module-icon{
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  margin-bottom:28px;
  border-radius:13px;
  background:var(--tempo-soft);
  color:var(--tempo-accent);
  font-size:18px;
  font-weight:900;
}

.tempo-admin-module-card h3{
  margin:5px 0 8px;
  font-size:22px;
  letter-spacing:-.03em;
}

.tempo-admin-module-card p{
  margin:0;
  color:var(--tempo-muted);
  line-height:1.55;
  font-size:13px;
}

.tempo-admin-module-arrow{
  margin-top:auto;
  padding-top:22px;
  color:var(--tempo-text);
  font-size:12px;
  font-weight:900;
}

.tempo-admin-table{
  min-width:1100px;
}

.tempo-admin-table td strong,
.tempo-admin-table td small,
.tempo-data-table td strong,
.tempo-data-table td small{
  display:block;
}

.tempo-admin-table td small,
.tempo-data-table td small{
  margin-top:3px;
  color:var(--tempo-muted);
  font-size:10px;
}

.tempo-role-tags{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
}

.tempo-admin-form-section{
  margin-top:14px;
}

.tempo-role-select-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}

.tempo-role-select-card{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:14px;
  border:1px solid var(--tempo-line);
  border-radius:13px;
  background:var(--tempo-card);
  cursor:pointer;
}

.tempo-role-select-card:has(input:checked){
  border-color:var(--tempo-accent);
  background:#fff8f4;
  box-shadow:0 0 0 2px var(--tempo-focus);
}

.tempo-role-select-card strong,
.tempo-role-select-card small{
  display:block;
}

.tempo-role-select-card small{
  margin-top:4px;
  color:var(--tempo-muted);
  line-height:1.4;
  font-size:10px;
}

.tempo-admin-person-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.tempo-admin-person-full{
  grid-column:1 / -1;
}

.tempo-admin-compact-list{
  display:flex;
  flex-direction:column;
}

.tempo-admin-compact-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 2px;
  border-top:1px solid var(--tempo-line);
}

.tempo-admin-compact-row:first-child{
  border-top:0;
}

.tempo-admin-compact-row:hover strong{
  color:var(--tempo-accent);
}

.tempo-admin-compact-row strong,
.tempo-admin-compact-row small{
  display:block;
}

.tempo-admin-compact-row small{
  margin-top:4px;
  color:var(--tempo-muted);
  font-size:10px;
}

.tempo-admin-compact-row>span{
  flex:0 0 auto;
  color:var(--tempo-muted);
  font-size:11px;
  font-weight:800;
}

.tempo-switch-row{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:13px;
  border:1px solid var(--tempo-line);
  border-radius:12px;
  background:var(--tempo-card);
}

.tempo-switch-row input{
  width:18px;
  height:18px;
  margin-top:2px;
  accent-color:var(--tempo-accent);
}

.tempo-switch-row strong,
.tempo-switch-row small{
  display:block;
}

.tempo-switch-row small{
  margin-top:3px;
  color:var(--tempo-muted);
  font-size:10px;
}

.tempo-permissions-table{
  width:100%;
  min-width:760px;
  border-collapse:collapse;
}

.tempo-permissions-table th,
.tempo-permissions-table td{
  padding:12px 14px;
  border-top:1px solid var(--tempo-line);
  text-align:center;
  font-size:12px;
}

.tempo-permissions-table th:first-child,
.tempo-permissions-table td:first-child{
  min-width:260px;
  text-align:left;
}

.tempo-permissions-table thead th{
  border-top:0;
  color:var(--tempo-muted);
  text-transform:uppercase;
  letter-spacing:.07em;
  font-size:10px;
}

.tempo-permissions-table td strong,
.tempo-permissions-table td small{
  display:block;
}

.tempo-permissions-table td small{
  margin-top:3px;
  color:var(--tempo-muted);
  font-size:9px;
}

.tempo-permissions-table input[type="checkbox"]{
  width:17px;
  height:17px;
  accent-color:var(--tempo-accent);
}

.tempo-permission-dot{
  width:28px;
  height:28px;
  display:inline-grid;
  place-items:center;
  border-radius:50%;
  background:var(--tempo-soft);
  color:var(--tempo-muted);
  font-weight:900;
}

.tempo-permission-dot.is-on{
  background:#eaf6ed;
  color:#245b36;
}

@media(max-width:1100px){
  .tempo-admin-modules{
    grid-template-columns:1fr;
  }

  .tempo-admin-module-card{
    min-height:190px;
  }

  .tempo-admin-kpis,
  .tempo-admin-person-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .tempo-role-select-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:820px){
  .tempo-admin-person-grid{
    grid-template-columns:1fr;
  }

  .tempo-admin-person-full{
    grid-column:auto;
  }
}

@media(max-width:560px){
  .tempo-admin-kpis,
  .tempo-admin-person-kpis,
  .tempo-role-select-grid{
    grid-template-columns:1fr;
  }
}

/* IDENTIDAD TEMPO TIMELINE ================================================ */

.tempo-brand-logo{
  width:min(100%,560px);
  position:relative;
  z-index:2;
}

.tempo-login-logo{
  display:block;
  width:clamp(250px,30vw,430px);
  max-width:100%;
  height:auto;
  object-fit:contain;
}

.tempo-sidebar-brand-logo{
  padding:4px 4px 25px;
  font-size:0;
  line-height:0;
}

.tempo-sidebar-logo-link{
  display:block;
  width:100%;
  border-radius:10px;
}

.tempo-sidebar-logo{
  display:block;
  width:100%;
  max-width:178px;
  height:auto;
  object-fit:contain;
  object-position:left center;
}

@media(max-width:900px){
  .tempo-sidebar-logo{
    max-width:190px;
  }
}

@media(max-width:560px){
  .tempo-login-logo{
    width:min(330px,100%);
  }
}

/* ==========================================================================
   TEMPO 1.0 - RESPONSIVE GLOBAL DEFINITIVO
   Tablet + móvil. Mantiene un solo archivo CSS para toda la aplicación.
   ========================================================================== */

html{
  -webkit-text-size-adjust:100%;
}

body{
  overflow-x:hidden;
}

img,
svg,
video,
canvas{
  max-width:100%;
}

.tempo-main,
.tempo-panel,
.tempo-form-card,
.tempo-page-hero,
.tempo-page-heading,
.tempo-hero,
.tempo-topbar>div,
.tempo-toolbar>*{
  min-width:0;
}

/* Navegación móvil sin JavaScript ----------------------------------------- */

.tempo-nav-toggle,
.tempo-mobile-menu-button,
.tempo-mobile-menu-close,
.tempo-mobile-menu-overlay{
  display:none;
}

.tempo-sidebar-mobile-head{
  display:block;
}

/* Tablet ------------------------------------------------------------------ */

@media(max-width:1024px){
  .tempo-app-shell{
    display:block;
    min-height:100vh;
  }

  .tempo-main{
    max-width:none;
    width:100%;
    padding:78px 20px 34px;
  }

  .tempo-nav-toggle{
    position:fixed;
    opacity:0;
    pointer-events:none;
  }

  .tempo-mobile-menu-button{
    position:fixed;
    left:18px;
    top:17px;
    z-index:61;
    width:44px;
    height:44px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:5px;
    border:1px solid var(--tempo-line);
    border-radius:12px;
    background:var(--tempo-card);
    box-shadow:0 8px 24px rgba(25,25,25,.10);
    cursor:pointer;
  }

  .tempo-mobile-menu-button span{
    display:block;
    width:19px;
    height:2px;
    border-radius:99px;
    background:var(--tempo-text);
    transition:transform .18s ease,opacity .18s ease;
  }

  .tempo-sidebar{
    position:fixed;
    z-index:70;
    top:0;
    left:0;
    bottom:0;
    width:min(330px,86vw);
    height:100dvh;
    padding:18px 16px 20px;
    overflow-y:auto;
    overscroll-behavior:contain;
    transform:translateX(-104%);
    transition:transform .22s ease;
    box-shadow:18px 0 45px rgba(0,0,0,.24);
  }

  #tempo-nav-toggle:checked ~ .tempo-sidebar{
    transform:translateX(0);
  }

  .tempo-mobile-menu-overlay{
    position:fixed;
    z-index:65;
    inset:0;
    display:block;
    background:rgba(15,15,16,.45);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .2s ease,visibility .2s ease;
  }

  #tempo-nav-toggle:checked ~ .tempo-mobile-menu-overlay{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
  }

  .tempo-sidebar-mobile-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
  }

  .tempo-sidebar-brand-logo{
    flex:1;
    padding:4px 4px 18px;
  }

  .tempo-sidebar-logo{
    max-width:180px;
  }

  .tempo-mobile-menu-close{
    display:grid;
    place-items:center;
    flex:0 0 38px;
    width:38px;
    height:38px;
    border:1px solid #3a3a3a;
    border-radius:10px;
    color:#fff;
    font-size:26px;
    line-height:1;
    cursor:pointer;
  }

  .tempo-nav{
    gap:5px;
  }

  .tempo-nav-item{
    min-height:46px;
    padding:11px 12px;
  }

  .tempo-sidebar-foot{
    position:static;
    margin-top:22px;
    padding-bottom:max(4px,env(safe-area-inset-bottom));
  }

  .tempo-topbar{
    min-height:48px;
    margin-bottom:18px;
    padding-left:54px;
  }

  .tempo-topbar h1{
    font-size:22px;
  }

  .tempo-top-actions{
    flex:0 0 auto;
  }

  .tempo-page-hero,
  .tempo-page-heading,
  .tempo-hero{
    padding:22px;
  }

  .tempo-page-hero h2,
  .tempo-page-heading h2{
    font-size:clamp(27px,4.2vw,36px);
  }

  .tempo-toolbar{
    align-items:stretch;
    flex-direction:column;
  }

  .tempo-filter-form,
  .tempo-filter-form-projects{
    width:100%;
    flex-wrap:wrap;
  }

  .tempo-search-wrap{
    flex:1 1 100%;
    max-width:none;
    min-width:0;
  }

  .tempo-filter-select,
  .tempo-filter-wide{
    min-width:0;
    flex:1 1 190px;
  }

  .tempo-record-count{
    align-self:flex-end;
  }

  .tempo-form-grid,
  .tempo-project-form-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .tempo-field-span-2{
    grid-column:auto;
  }

  .tempo-field-full{
    grid-column:1 / -1;
  }

  .tempo-panel{
    padding:18px;
  }

  .tempo-admin-modules{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .tempo-admin-module-card{
    min-height:190px;
  }

  .tempo-resource-grid,
  .tempo-role-select-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  /* Toda tabla mantiene funcionalidad y desplaza horizontalmente */
  .tempo-table-wrap{
    width:100%;
    max-width:100%;
    overflow-x:auto;
    overflow-y:hidden;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:thin;
  }

  .tempo-table-wrap table{
    margin:0;
  }

  .tempo-planning-table,
  .tempo-timesheet-matrix{
    min-width:1120px;
  }

  .tempo-data-table,
  .tempo-admin-table,
  .tempo-timesheet-detail-table,
  .tempo-planning-list-table,
  .tempo-permissions-table{
    min-width:820px;
  }
}

/* Móvil ------------------------------------------------------------------- */

@media(max-width:700px){
  .tempo-main{
    padding:72px 12px 28px;
  }

  .tempo-mobile-menu-button{
    left:12px;
    top:12px;
    width:42px;
    height:42px;
  }

  .tempo-topbar{
    min-height:48px;
    padding-left:50px;
    gap:8px;
  }

  .tempo-topbar .tempo-eyebrow{
    display:none;
  }

  .tempo-topbar h1{
    margin:0;
    font-size:19px;
    line-height:1.15;
  }

  .tempo-user-copy{
    display:none;
  }

  .tempo-avatar{
    width:38px;
    height:38px;
    font-size:12px;
  }

  .tempo-page-hero,
  .tempo-page-heading,
  .tempo-hero,
  .tempo-detail-heading{
    align-items:stretch;
    flex-direction:column;
    gap:15px;
    padding:18px;
    border-radius:18px;
  }

  .tempo-page-heading{
    padding:0 0 16px;
    border-radius:0;
  }

  .tempo-page-hero h2,
  .tempo-page-heading h2,
  .tempo-hero h2{
    font-size:28px;
    line-height:1.05;
  }

  .tempo-heading-actions{
    width:100%;
    display:flex;
    flex-wrap:wrap;
    gap:8px;
  }

  .tempo-heading-actions .tempo-btn,
  .tempo-page-hero>.tempo-btn,
  .tempo-page-heading>.tempo-btn{
    flex:1 1 auto;
  }

  .tempo-btn{
    min-height:44px;
  }

  .tempo-panel{
    padding:15px;
    border-radius:15px;
  }

  .tempo-panel-head{
    align-items:flex-start;
    flex-wrap:wrap;
    gap:9px;
    margin-bottom:14px;
  }

  .tempo-panel-head .tempo-btn{
    width:100%;
  }

  .tempo-kpis,
  .tempo-project-summary,
  .tempo-admin-kpis,
  .tempo-admin-person-kpis{
    grid-template-columns:1fr 1fr;
    gap:9px;
  }

  .tempo-kpi{
    padding:15px;
    border-radius:15px;
  }

  .tempo-kpi strong{
    font-size:28px;
  }

  .tempo-kpi small{
    font-size:11px;
  }

  .tempo-dashboard-grid,
  .tempo-detail-grid,
  .tempo-project-detail-grid,
  .tempo-admin-person-grid,
  .tempo-planning-lower-grid,
  .tempo-timesheet-lower-grid{
    grid-template-columns:1fr;
  }

  .tempo-admin-person-full,
  .tempo-detail-card-full,
  .tempo-panel-wide{
    grid-column:auto;
  }

  .tempo-admin-modules{
    grid-template-columns:1fr;
  }

  .tempo-admin-module-card{
    min-height:0;
    padding:18px;
  }

  .tempo-admin-module-icon{
    margin-bottom:15px;
  }

  .tempo-form-card{
    padding:16px;
  }

  .tempo-form-card-head{
    align-items:flex-start;
    flex-direction:column;
    gap:5px;
  }

  .tempo-form-grid,
  .tempo-project-form-grid,
  .tempo-work-grid{
    grid-template-columns:1fr;
  }

  .tempo-field-span-2,
  .tempo-field-full{
    grid-column:auto;
  }

  .tempo-field{
    margin:11px 0;
  }

  .tempo-field input,
  .tempo-field select,
  .tempo-field textarea{
    min-height:46px;
    padding:12px 13px;
    font-size:16px; /* evita zoom automático en iOS */
  }

  .tempo-form-actions{
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
  }

  .tempo-form-actions .tempo-btn,
  .tempo-form-actions input[type="submit"]{
    width:100%;
  }

  .tempo-filter-form,
  .tempo-filter-form-projects{
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
  }

  .tempo-filter-select,
  .tempo-filter-wide,
  .tempo-filter-form .tempo-btn{
    width:100%;
    min-width:0;
  }

  .tempo-record-count{
    align-self:flex-start;
  }

  .tempo-week-nav,
  .tempo-timesheet-nav{
    grid-template-columns:1fr 1fr;
    gap:8px;
  }

  .tempo-week-title,
  .tempo-timesheet-week{
    grid-column:1 / -1;
    grid-row:1;
    padding:10px;
  }

  .tempo-week-nav .tempo-btn,
  .tempo-timesheet-nav .tempo-btn{
    width:100%;
    padding-left:8px;
    padding-right:8px;
    white-space:normal;
  }

  .tempo-timesheet-resource-head{
    padding:13px;
  }

  .tempo-resource-grid,
  .tempo-role-select-grid,
  .tempo-attachments{
    grid-template-columns:1fr;
  }

  .tempo-capacity-adjustment{
    grid-template-columns:1fr auto;
  }

  .tempo-capacity-adjustment .tempo-table-actions{
    grid-column:1 / -1;
    justify-content:flex-start;
  }

  .tempo-table-actions{
    flex-wrap:wrap;
  }

  .tempo-timeline-head{
    flex-direction:column;
  }

  .tempo-timeline-meta{
    width:100%;
    justify-content:space-between;
  }

  .tempo-project-activity-row{
    grid-template-columns:1fr auto;
  }

  .tempo-project-activity-row .tempo-project-progress-cell{
    grid-column:1 / -1;
  }

  .tempo-project-activity-row .tempo-priority-pill{
    display:none;
  }

  .tempo-admin-compact-row{
    align-items:flex-start;
  }

  .tempo-login{
    display:block;
  }

  .tempo-brand-side{
    min-height:auto;
    padding:28px 22px 24px;
  }

  .tempo-brand-copy{
    margin-top:32px;
  }

  .tempo-brand-copy h1{
    font-size:40px;
  }

  .tempo-brand-copy h2{
    font-size:20px;
  }

  .tempo-brand-copy p{
    font-size:15px;
    line-height:1.55;
  }

  .tempo-login-logo{
    width:min(290px,92%);
  }

  .tempo-login-side{
    padding:20px 14px 28px;
  }

  .tempo-login-card{
    width:100%;
    padding:22px;
    border-radius:20px;
  }

  .tempo-login-card h2{
    font-size:28px;
  }
}

/* Teléfonos compactos ----------------------------------------------------- */

@media(max-width:480px){
  .tempo-main{
    padding-left:10px;
    padding-right:10px;
  }

  .tempo-topbar{
    margin-bottom:14px;
  }

  .tempo-page-hero,
  .tempo-hero{
    padding:16px;
  }

  .tempo-page-hero h2,
  .tempo-page-heading h2,
  .tempo-hero h2{
    font-size:25px;
  }

  .tempo-kpis,
  .tempo-project-summary,
  .tempo-admin-kpis,
  .tempo-admin-person-kpis{
    grid-template-columns:1fr;
  }

  .tempo-kpi{
    padding:14px;
  }

  .tempo-kpi strong{
    font-size:30px;
  }

  .tempo-week-nav,
  .tempo-timesheet-nav{
    grid-template-columns:1fr;
  }

  .tempo-week-title,
  .tempo-timesheet-week{
    grid-column:auto;
  }

  .tempo-role-pill,
  .tempo-badge{
    font-size:10px;
  }

  .tempo-sidebar{
    width:min(310px,90vw);
  }

  .tempo-sidebar-logo{
    max-width:166px;
  }

  .tempo-nav-item{
    font-size:14px;
  }

  .tempo-client-cell{
    min-width:200px;
  }

  .tempo-table-wrap{
    margin-left:-3px;
    margin-right:-3px;
  }
}

/* Landscape bajo: preserva contenido útil y menú desplazable ------------- */

@media(max-height:620px) and (max-width:1024px){
  .tempo-sidebar{
    padding-top:12px;
  }

  .tempo-sidebar-brand-logo{
    padding-bottom:10px;
  }

  .tempo-nav-item{
    min-height:40px;
    padding-top:8px;
    padding-bottom:8px;
  }

  .tempo-sidebar-foot{
    margin-top:12px;
  }
}
