/* AutoSchools V2.0.41 — premium lesson journal + schedule density pass.
   Presentation only. Lesson ownership, billing kind and payroll snapshots remain Backend-owned. */

/* Journal mode switch: one compact segmented control, not two unrelated buttons. */
.lesson-tabs{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:5px!important;
  width:100%;
  margin:14px 0 2px!important;
  padding:4px;
  border:1px solid rgba(111,164,229,.20);
  border-radius:16px;
  background:rgba(3,14,32,.58);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035)
}
.lesson-tabs .tiny-button{
  min-height:42px!important;
  margin:0!important;
  padding:8px 12px!important;
  border:1px solid transparent!important;
  border-radius:12px!important;
  background:transparent!important;
  color:rgba(203,220,243,.64)!important;
  box-shadow:none!important;
  font-size:13px!important;
  font-weight:720!important;
  line-height:1.15!important;
  transition:background .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease,transform .12s ease
}
.lesson-tabs .tiny-button:active{transform:scale(.98)}
.lesson-tabs .tiny-button.template-on{
  color:#f8fbff!important;
  border-color:rgba(71,160,255,.52)!important;
  background:linear-gradient(180deg,rgba(13,72,158,.30),rgba(4,31,76,.20))!important;
  box-shadow:0 0 16px rgba(0,116,255,.10),inset 0 1px 0 rgba(255,255,255,.05)!important
}

/* Journal is grouped by day. Each lesson stays compact and visually subordinate to the day. */
.lesson-history-day{gap:8px!important;padding-bottom:12px!important}
.lesson-history-day-head{padding:5px 4px 2px!important}
.lesson-history-day-head strong{font-size:13px!important;font-weight:760!important;color:rgba(228,239,255,.84)!important}
.lesson-history-day-head span{background:rgba(31,96,174,.18)!important;color:rgba(166,206,255,.82)!important}
.lesson-history-day-list{
  border-color:rgba(111,164,229,.16)!important;
  border-radius:17px!important;
  background:linear-gradient(160deg,rgba(7,23,50,.54),rgba(2,10,25,.42))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important
}
.lesson-history-compact-row,.lesson-action-compact-row{
  display:grid;
  grid-template-columns:58px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  min-height:62px;
  padding:9px 11px;
  border-bottom:1px solid rgba(111,164,229,.095)
}
.lesson-history-compact-row:last-child,.lesson-action-compact-row:last-child{border-bottom:0}
.lesson-history-time{
  min-height:36px!important;
  padding:0 6px;
  white-space:nowrap;
  border-radius:10px!important;
  background:rgba(17,72,144,.22)!important;
  color:#78c3ff!important;
  font-size:12px!important;
  font-weight:780!important;
  letter-spacing:-.15px
}
.lesson-history-copy>strong{font-size:13px!important;line-height:1.2}
.lesson-history-meta{margin-top:4px!important;gap:5px!important}
.lesson-history-meta .pill{padding:3px 7px!important;font-size:10px!important}
.lesson-history-actions{
  width:auto!important;
  max-width:190px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:6px!important;
  flex-wrap:wrap!important;
  padding:0!important
}
.lesson-history-actions .tiny-button,.lesson-history-actions .lesson-actions-menu>summary{
  min-height:32px!important;
  padding:6px 9px!important;
  border-radius:11px!important;
  font-size:11px!important
}
.lesson-history-actions .pill{font-size:10px!important;padding:4px 7px!important}

/* Period + export behaves as one tool row and survives narrow Telegram viewports. */
.lesson-tools{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px!important;
  align-items:end!important
}
.lesson-period-picker{min-width:0!important}
.lesson-period-picker select{width:100%!important;min-height:42px}
.lesson-tools [data-export-lessons]{min-height:42px;min-width:112px;white-space:normal;line-height:1.1}

/* Schedule time range never wraps outside the chip. */
.schedule-row-card{grid-template-columns:82px minmax(0,1fr) auto!important;gap:10px!important}
.schedule-time{
  width:82px!important;
  min-width:82px!important;
  height:48px!important;
  padding:0 5px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:clip!important;
  font-size:12px!important;
  line-height:1!important;
  letter-spacing:-.25px!important
}

/* Keep the approved shell geometry, but make the material a touch more transparent and darker. */
#role-bottom-nav.nav-inner{
  background:linear-gradient(155deg,rgba(4,14,34,.84),rgba(1,7,20,.78))!important;
  border-color:rgba(125,174,236,.22)!important;
  box-shadow:0 16px 44px rgba(0,0,0,.48),inset 0 1px 0 rgba(255,255,255,.05),inset 0 -1px 0 rgba(62,113,184,.045)!important;
  backdrop-filter:saturate(145%) contrast(112%) brightness(74%)!important;
  -webkit-backdrop-filter:saturate(145%) contrast(112%) brightness(74%)!important
}
#role-bottom-nav .nav-liquid-lens{
  border-radius:21px!important;
  background:linear-gradient(180deg,rgba(13,72,158,.28),rgba(4,31,76,.20))!important;
  box-shadow:0 0 0 1px rgba(78,166,255,.055),0 0 20px rgba(0,116,255,.15),inset 0 1px 0 rgba(255,255,255,.065),inset 0 -1px 0 rgba(53,136,235,.08)!important
}

@media(max-width:560px){
  .lesson-history-compact-row,.lesson-action-compact-row{grid-template-columns:52px minmax(0,1fr);gap:8px;min-height:58px;padding:8px 9px}
  .lesson-history-actions{grid-column:2;max-width:none!important;justify-content:flex-start!important;margin-top:3px}
  .lesson-history-copy>strong{white-space:normal!important}
  .lesson-tools{grid-template-columns:minmax(0,1fr) 108px}
  .lesson-tools [data-export-lessons]{min-width:0}
  .schedule-row-card{grid-template-columns:76px minmax(0,1fr) auto!important}
  .schedule-time{width:76px!important;min-width:76px!important;font-size:11.5px!important}
}
@media(max-width:380px){
  .schedule-row-card{grid-template-columns:70px minmax(0,1fr)!important}
  .schedule-time{width:70px!important;min-width:70px!important;font-size:11px!important}
  .schedule-row-secondary{grid-column:2;justify-self:start}
  .lesson-tools{grid-template-columns:1fr}
  .lesson-tools [data-export-lessons]{width:100%}
}
@media(prefers-reduced-motion:reduce){.lesson-tabs .tiny-button{transition:none!important}}
