@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');



:root {
  --orange: #ea6a24;
  --orange-dark: #c85216;
  --orange-soft: #fff0e6;

  --green: #2d8253;
  --green-soft: #e8f5ed;

  --red: #b84640;
  --red-soft: #f8e9e7;

  --blue: #3979b7;
  --blue-soft: #e8f1fa;

  --bg: #f8f7f4;
  --surface: #ffffff;

  --text: #282721;
  --muted: #837e77;
  --line: #e5e1db;

  --sidebar-width: 240px;
}


/* 
   DARK MODE
 */

body.dark {
  --bg: #151514;
  --surface: #201f1d;

  --text: #f3f1ed;
  --muted: #aaa49c;
  --line: #3b3834;

  --orange-soft: #39281f;
  --green-soft: #21382a;
  --red-soft: #3c2523;
  --blue-soft: #223446;
}


* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  background: var(--bg);
  color: var(--text);

  font-family: 'DM Sans', sans-serif;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

input,
textarea,
select {
  color: var(--text);
}

body.dark input,
body.dark textarea,
body.dark select {
  background: #292825;
  border-color: #44413d;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: 'Manrope', sans-serif;
}

h1 {
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -1.5px;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 17px;
}

svg {
  width: 17px;
  height: 17px;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.muted {
  color: var(--muted);

  font-size: 13px;

  line-height: 1.6;
}

.accent,
.eyebrow {
  color: var(--orange);
}

.eyebrow {
  margin-bottom: 8px;

  font-size: 10px;
  font-weight: 800;

  letter-spacing: 1.5px;
}

.small-note {
  color: var(--muted);

  font-size: 10px;
  line-height: 1.5;
}

.error {
  min-height: 16px;

  color: var(--red);

  font-size: 11px;
  line-height: 1.4;
}


/* 
   BUTTONS
 */

.button {
  min-height: 42px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 7px;

  padding: 11px 16px;

  border: 0;
  border-radius: 8px;

  font-size: 13px;
  font-weight: 700;

  transition:
    background .15s ease,
    transform .1s ease;
}

.button:active {
  transform: translateY(1px);
}

.button.primary {
  background: var(--orange);
  color: white;
}

.button.primary:hover {
  background: var(--orange-dark);
}

.button.secondary {
  background: #efede9;
  color: #282721;
}

body.dark .button.secondary {
  background: #34322f;
  color: var(--text);
}

.danger-button {
  background: var(--red-soft);
  color: var(--red);
}

.text-button {
  padding: 4px;

  border: 0;

  background: transparent;
  color: var(--orange-dark);

  font-size: 11px;
  font-weight: 700;
}


/* 
   AUTH
 */

.auth-screen {
  min-height: 100vh;

  display: grid;
  place-items: center;

  padding: 24px;

  background:
    radial-gradient(circle at top right,
      rgba(234, 106, 36, .10),
      transparent 35%),
    var(--bg);
}

.auth-card {
  width: min(100%, 420px);

  padding: 32px;

  background: var(--surface);

  border: 1px solid var(--line);
  border-radius: 14px;

  box-shadow:
    0 20px 60px rgba(30, 22, 16, .08);
}

.auth-brand {
  margin-bottom: 31px;
}

.auth-card h1 {
  margin-bottom: 7px;
}

.auth-description {
  margin-bottom: 23px;
}

.auth-button {
  width: 100%;

  margin-top: 6px;
}

.auth-switch {
  margin:
    20px 0 0;

  color: var(--muted);

  text-align: center;

  font-size: 11px;
}

.auth-switch button {
  padding: 0;

  border: 0;

  background: transparent;
  color: var(--orange);

  font-weight: 700;
}


/* 
   FORMS
 */

.form-label {
  display: grid;

  gap: 7px;

  margin-bottom: 15px;

  font-size: 10px;
  font-weight: 700;
}

.form-label input,
.form-label textarea,
.form-label select {
  width: 100%;

  padding: 10px 11px;

  border: 1px solid var(--line);
  border-radius: 8px;

  background: var(--surface);
}

.form-label input:focus,
.form-label textarea:focus,
.form-label select:focus {
  outline: none;

  border-color: var(--orange);

  box-shadow:
    0 0 0 3px rgba(234, 106, 36, .11);
}


/* 
   BRAND
 */

.brand {
  display: flex;
  align-items: center;

  gap: 8px;

  font-family: 'Manrope', sans-serif;

  font-size: 23px;
  font-weight: 800;

  letter-spacing: -1px;
}

.brand-mark {
  width: 36px;
  height: 36px;

  display: grid;
  place-items: center;

  flex-shrink: 0;

  border-radius: 9px;

  background: var(--orange);
  color: white;

  font-size: 13px;
}

.brand-name span {
  color: var(--orange);
}


/* 
   SIDEBAR
 */

.sidebar {
  position: fixed;

  z-index: 20;

  inset:
    0 auto 0 0;

  width: var(--sidebar-width);

  padding: 30px 18px;

  display: flex;
  flex-direction: column;

  background: var(--surface);

  border-right: 1px solid var(--line);
}

.sidebar .brand {
  margin:
    0 8px 48px;
}

.nav-label {
  padding:
    0 14px;

  color: #a49e94;

  font-size: 9px;
  font-weight: 700;

  letter-spacing: 1.4px;
}

.sidebar nav {
  display: grid;

  gap: 5px;
}

.nav-link {
  width: 100%;

  display: flex;
  align-items: center;

  gap: 11px;

  padding: 12px 13px;

  border: 0;
  border-radius: 8px;

  background: transparent;

  color: var(--muted);

  text-align: left;

  font-size: 13px;
  font-weight: 600;
}

.nav-link:hover {
  background: #f6f3ef;
  color: var(--text);
}

body.dark .nav-link:hover {
  background: #292723;
}

.nav-link.active {
  background: var(--orange-soft);
  color: var(--orange-dark);
}

.sidebar-bottom {
  margin-top: 0;

  padding:
    18px 5px 0;

  display: flex;
  align-items: center;

  gap: 10px;

  border-top: 1px solid var(--line);
}

.profile-avatar {
  width: 36px;
  height: 36px;

  display: grid;
  place-items: center;

  flex-shrink: 0;

  border-radius: 50%;

  background: #f6d2b8;
  color: #925027;

  font-size: 11px;
  font-weight: 800;
}

.profile-text {
  min-width: 0;
}

.profile-text strong,
.profile-text small {
  display: block;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;
}

.profile-text strong {
  font-size: 12px;
}

.profile-text small {
  margin-top: 2px;

  color: var(--muted);

  font-size: 9px;
}


/* 
   TOPBAR / LAYOUT
 */

.content-shell {
  min-height: 100vh;

  margin-left: var(--sidebar-width);

  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 70px;

  padding:
    0 40px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 18px;

  background: var(--surface);

  border-bottom: 1px solid var(--line);

  color: var(--muted);

  font-size: 12px;
}

.topbar strong {
  color: var(--text);
}

.topbar-actions {
  display: flex;
  align-items: center;

  gap: 14px;
}

.menu-button {
  display: none;

  padding: 3px;

  border: 0;

  background: transparent;
  color: var(--text);

  font-size: 23px;
}

.install-button {
  min-height: 34px;

  display: inline-flex;
  align-items: center;

  gap: 5px;

  padding: 7px 10px;

  border: 0;
  border-radius: 7px;

  background: var(--orange-soft);
  color: var(--orange-dark);

  font-size: 10px;
  font-weight: 700;
}

.connection-status {
  display: flex;
  align-items: center;

  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: #36a56c;
}

.connection-status.offline .status-dot {
  background: var(--red);
}

.content-shell main {
  width: min(1150px, 100%);

  margin:
    0 auto;

  padding:
    36px 40px 60px;

  flex: 1;
}

.page {
  display: none;
}

.page.active {
  display: block;
}


/* 
   DASHBOARD
 */

.dashboard-header {
  margin-bottom: 28px;

  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  gap: 30px;
}

.dashboard-header h1 {
  margin-bottom: 9px;
}

.dashboard-description {
  max-width: 560px;

  margin-bottom: 0;

  color: var(--muted);

  font-size: 14px;
  line-height: 1.65;
}

.dashboard-add-button {
  min-width: 170px;

  flex-shrink: 0;
}


/* ATTENDANCE */

.attendance-panel {
  margin-bottom: 28px;

  padding: 23px 25px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 25px;

  background: var(--surface);

  border: 1px solid var(--line);
  border-left: 4px solid var(--orange);

  border-radius: 10px;
}

.attendance-label {
  margin-bottom: 5px;

  color: var(--orange);

  font-size: 9px;
  font-weight: 800;

  letter-spacing: 1.2px;
}

.attendance-panel h2 {
  margin-bottom: 5px;

  font-size: 20px;
}

.attendance-times {
  margin-top: 10px;

  display: flex;
  flex-wrap: wrap;

  gap:
    8px 16px;

  font-size: 11px;
}

.attendance-actions {
  display: flex;

  gap: 9px;

  flex-shrink: 0;
}

.time-in-button {
  background: var(--green);
  color: white;
}

.time-out-button {
  background: var(--red);
  color: white;
}

.attendance-warning {
  margin-bottom: 20px;

  padding: 12px 14px;

  display: flex;
  align-items: center;

  gap: 9px;

  background: #fff7e5;

  border: 1px solid #ead6a5;
  border-radius: 8px;

  color: #7f5911;

  font-size: 11px;
}

body.dark .attendance-warning {
  background: #392f1c;

  border-color: #5d4a28;

  color: #e2bd67;
}


/* 
   HEADINGS
 */

.section-heading,
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  gap: 18px;
}

.section-heading {
  margin:
    34px 0 18px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.page-heading {
  margin:
    4px 0 25px;
}

.page-heading h1 {
  margin-bottom: 7px;
}


/* 
   DASHBOARD CARDS
 */

.stats {
  display: grid;

  grid-template-columns:
    repeat(3,
      minmax(0, 1fr));

  gap: 14px;
}

.card,
.panel,
.entry-card,
.calendar-panel {
  padding: 21px;

  background: var(--surface);

  border: 1px solid var(--line);

  border-radius: 10px;
}

.card p {
  margin:
    12px 0;

  color: var(--muted);

  font-size: 11px;
}

.card h3 {
  margin:
    0 0 5px;

  font-size: 28px;
}

.card h3 small {
  font-size: 12px;
}

.stat-icon {
  width: 34px;
  height: 34px;

  display: grid;
  place-items: center;

  border-radius: 8px;

  background: var(--orange-soft);

  color: var(--orange);
}


/* MONTH */

.month-summary {
  margin-top: 14px;

  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 10px;
}

.month-summary>div {
  padding: 14px 16px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;

  background: var(--surface);

  border: 1px solid var(--line);

  border-radius: 9px;
}

.month-summary span {
  color: var(--muted);

  font-size: 10px;
}

.month-summary strong {
  color: var(--orange);

  font-size: 18px;
}


/* OVERVIEW */

.overview-grid {
  margin-top: 14px;

  display: grid;

  grid-template-columns:
    1fr 1fr;

  gap: 14px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;
}

.panel-heading h3 {
  margin-bottom: 0;
}

.panel-heading strong {
  color: var(--orange);
}

progress {
  width: 100%;
  height: 11px;

  margin:
    16px 0 12px;

  accent-color: var(--orange);
}

.progress-labels {
  display: flex;
  justify-content: space-between;

  gap: 10px;

  color: var(--muted);

  font-size: 11px;
}

.recent-item {
  padding:
    13px 0;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  border-top: 1px solid var(--line);
}

.recent-item:first-child {
  margin-top: 9px;
}

.recent-item strong,
.recent-item small {
  display: block;
}

.recent-item strong {
  font-size: 12px;
}

.recent-item small {
  margin-top: 4px;

  color: var(--muted);

  font-size: 10px;
}

.recent-item b {
  color: var(--orange);

  font-size: 11px;
}


/* 
   CALENDAR
 */

.calendar-panel {
  padding: 24px;
}

.calendar-header {
  margin-bottom: 20px;

  display: grid;

  grid-template-columns:
    45px 1fr 45px;

  align-items: center;
}

.calendar-header>div {
  text-align: center;
}

.calendar-header h2 {
  margin-bottom: 3px;
}

.calendar-nav-button {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  border: 1px solid var(--line);
  border-radius: 8px;

  background: var(--surface);
  color: var(--text);
}

.calendar-today-button {
  padding: 3px;

  border: 0;

  background: transparent;
  color: var(--orange);

  font-size: 10px;
  font-weight: 700;
}

.calendar-legend {
  margin-bottom: 18px;

  display: flex;
  justify-content: center;
  flex-wrap: wrap;

  gap: 14px;

  color: var(--muted);

  font-size: 9px;
}

.calendar-legend span {
  display: flex;
  align-items: center;

  gap: 5px;
}

.legend-dot {
  width: 8px;
  height: 8px;

  border-radius: 50%;
}

.legend-dot.complete {
  background: var(--green);
}

.legend-dot.attendance-only {
  background: var(--blue);
}

.legend-dot.log-only {
  background: var(--orange);
}

.legend-dot.incomplete {
  background: var(--red);
}

.calendar-weekdays,
.calendar-grid {
  display: grid;

  grid-template-columns:
    repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  margin-bottom: 6px;

  color: var(--muted);

  text-align: center;

  font-size: 9px;
  font-weight: 700;
}

.calendar-day {
  min-height: 112px;

  padding: 9px;

  border: 1px solid var(--line);
  border-radius: 7px;

  background: var(--surface);
  color: var(--text);

  text-align: left;
}

.calendar-day:hover {
  background: var(--orange-soft);
}

.calendar-day.outside {
  opacity: .35;
}

.calendar-day.today {
  border: 2px solid var(--orange);
}

.calendar-date-number {
  width: 26px;
  height: 26px;

  display: inline-grid;
  place-items: center;

  border-radius: 50%;

  font-size: 10px;
  font-weight: 700;
}

.calendar-day.today .calendar-date-number {
  background: var(--orange);
  color: white;
}

.calendar-day-status {
  margin-top: 10px;

  display: grid;

  gap: 4px;
}

.calendar-status-item {
  padding: 4px 6px;

  overflow: hidden;

  border-radius: 5px;

  font-size: 8px;

  text-overflow: ellipsis;

  white-space: nowrap;
}

.calendar-status-item.complete {
  background: var(--green-soft);
  color: #246942;
}

.calendar-status-item.attendance-only {
  background: var(--blue-soft);
  color: #275f96;
}

.calendar-status-item.log-only {
  background: var(--orange-soft);
  color: var(--orange-dark);
}

.calendar-status-item.incomplete {
  background: var(--red-soft);
  color: #a43833;
}


/* CALENDAR DETAIL */

.calendar-log-detail {
  padding:
    15px 0;

  border-bottom: 1px solid var(--line);
}

.calendar-log-detail strong {
  display: block;

  margin-bottom: 5px;
}

.calendar-log-detail p {
  white-space: pre-wrap;

  font-size: 12px;
  line-height: 1.6;
}

.calendar-log-detail small {
  color: var(--muted);
}


/* 
   ATTENDANCE HISTORY
 */

.attendance-filter {
  margin-bottom: 15px;

  display: flex;

  gap: 9px;
}

.attendance-filter input {
  max-width: 220px;

  padding: 10px 11px;

  border: 1px solid var(--line);
  border-radius: 8px;

  background: var(--surface);
}

.attendance-history {
  display: grid;

  gap: 11px;
}

.attendance-record {
  padding: 17px 19px;

  display: grid;

  grid-template-columns:
    minmax(130px, 1.4fr) 1fr 1fr;

  align-items: center;

  gap: 15px;

  background: var(--surface);

  border: 1px solid var(--line);

  border-radius: 9px;
}

.attendance-record.incomplete {
  border-left: 4px solid var(--red);
}

.attendance-record strong {
  display: block;

  font-size: 12px;
}

.attendance-record small {
  color: var(--muted);

  font-size: 9px;
}

.attendance-time-value {
  font-size: 11px;
}

.attendance-time-value span {
  display: block;

  margin-bottom: 3px;

  color: var(--muted);

  font-size: 8px;
  font-weight: 700;
}


/* 
   FILTERS
 */

.log-tools {
  margin-bottom: 18px;

  padding: 18px;

  background: var(--surface);

  border: 1px solid var(--line);

  border-radius: 11px;
}

.filter-title {
  margin-bottom: 17px;

  display: flex;
  align-items: center;

  gap: 10px;
}

.filter-icon {
  width: 34px;
  height: 34px;

  display: grid;
  place-items: center;

  border-radius: 8px;

  background: var(--orange-soft);
  color: var(--orange);
}

.filter-title strong,
.filter-title small {
  display: block;
}

.filter-title strong {
  font-size: 12px;
}

.filter-title small {
  margin-top: 2px;

  color: var(--muted);

  font-size: 10px;
}

.filter-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 13px;
}

.filter-field {
  display: grid;

  gap: 7px;

  font-size: 10px;
  font-weight: 700;
}

.filter-wide {
  grid-column:
    1 / -1;
}

.filter-field input,
.filter-field select {
  width: 100%;

  padding: 10px 11px;

  border: 1px solid var(--line);
  border-radius: 8px;

  background: var(--surface);
}

.filter-footer {
  margin-top: 14px;

  padding-top: 13px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  border-top: 1px solid var(--line);

  color: var(--muted);

  font-size: 10px;
}


/* 
   ENTRIES
 */

.entry-list {
  display: grid;

  gap: 13px;
}

.entry-card {
  padding: 20px;
}

.entry-top {
  display: flex;
  justify-content: space-between;

  gap: 14px;
}

.entry-top h3 {
  margin-bottom: 5px;
}

.entry-meta {
  color: var(--muted);

  font-size: 11px;
  line-height: 1.6;
}

.entry-description {
  margin:
    14px 0;

  font-size: 12px;
  line-height: 1.65;

  white-space: pre-wrap;
}

.entry-evidence {
  margin:
    10px 0;

  width: 120px;
  height: 90px;

  overflow: hidden;

  border-radius: 7px;

  background: var(--bg);
}

.entry-evidence img {
  width: 100%;
  height: 100%;

  object-fit: cover;
}

.entry-actions {
  display: flex;
  flex-wrap: wrap;

  gap: 14px;
}

.entry-actions button {
  padding: 3px 0;

  border: 0;

  background: transparent;
  color: var(--orange-dark);

  font-size: 11px;
  font-weight: 700;
}

.entry-actions .danger {
  color: var(--red);
}


/* 
   EMPTY / PAGINATION
 */

.empty {
  padding: 31px;

  border: 1px dashed #d7cec5;
  border-radius: 10px;

  color: var(--muted);

  text-align: center;

  font-size: 12px;
}

.pagination {
  margin-top: 21px;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;

  gap: 5px;
}

.pagination button {
  min-width: 36px;
  height: 36px;

  padding: 0 10px;

  border: 1px solid var(--line);
  border-radius: 7px;

  background: var(--surface);
  color: var(--text);

  font-size: 10px;
  font-weight: 700;
}

.pagination button.active {
  background: var(--orange);

  border-color: var(--orange);

  color: white;
}


/* 
   REPORTS
 */

.report-tabs {
  margin-bottom: 14px;

  display: flex;

  gap: 6px;
}

.report-tab {
  padding: 9px 14px;

  border: 1px solid var(--line);
  border-radius: 7px;

  background: var(--surface);
  color: var(--muted);

  font-size: 10px;
  font-weight: 700;
}

.report-tab.active {
  background: var(--orange);

  border-color: var(--orange);

  color: white;
}

.report-section {
  display: none;
}

.report-section.active {
  display: block;
}

.report-panel {
  max-width: 800px;
}

.report-controls {
  padding-bottom: 20px;

  display: grid;

  grid-template-columns:
    1fr 1fr;

  align-items: end;

  gap: 24px;

  border-bottom: 1px solid var(--line);
}

.report-controls label {
  display: grid;

  gap: 7px;

  font-size: 10px;
  font-weight: 700;
}

.report-controls input {
  padding: 10px 11px;

  border: 1px solid var(--line);
  border-radius: 8px;

  background: var(--surface);
}

.report-controls strong {
  display: block;

  margin-top: 5px;

  font-size: 12px;
}

.report-preview {
  margin-top: 18px;
}

.report-preview-item {
  padding: 14px 0;

  border-bottom: 1px solid var(--line);
}

.report-preview-item strong {
  display: block;

  margin-bottom: 5px;

  font-size: 11px;
}

.report-preview-item span {
  display: block;

  color: var(--muted);

  font-size: 10px;
  line-height: 1.6;
}

.report-preview-item img {
  width: 110px;
  height: 82px;

  margin-top: 8px;

  border-radius: 7px;

  object-fit: cover;
}

.report-export-buttons {
  margin-top: 18px;

  display: flex;
  flex-wrap: wrap;

  gap: 8px;
}


/* 
   SETTINGS
 */

.settings-panel {
  max-width: 700px;
}

.settings-panel hr {
  margin:
    23px 0;

  border: 0;

  border-top: 1px solid var(--line);
}

.toggle-setting {
  margin-bottom: 16px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;
}

.toggle-setting strong,
.toggle-setting small {
  display: block;
}

.toggle-setting small {
  margin-top: 3px;

  color: var(--muted);

  font-size: 10px;
  line-height: 1.45;
}

.toggle-setting input {
  width: 19px;
  height: 19px;
}

.settings-grid {
  display: grid;

  grid-template-columns:
    1fr 1fr;

  gap: 13px;
}

.account-panel {
  margin-top: 15px;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;

  gap: 9px;
}


/* 
   DIALOG
 */

dialog {
  width: min(94vw, 660px);

  max-height: 92vh;

  padding: 0;

  border: 0;
  border-radius: 12px;

  background: var(--surface);
  color: var(--text);

  box-shadow:
    0 20px 70px rgba(0, 0, 0, .25);
}

dialog::backdrop {
  background:
    rgba(18, 16, 14, .76);
}

.dialog-header {
  padding: 20px 24px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  border-bottom: 1px solid var(--line);
}

.dialog-header h2 {
  margin: 0;
}

.icon-button {
  padding: 4px;

  border: 0;

  background: transparent;
  color: var(--muted);

  font-size: 25px;
}

.form-body {
  max-height: 65vh;

  overflow-y: auto;

  padding:
    15px 24px 20px;
}

.form-row {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 14px;
}

.form-row.three {
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
}

.time-input-group {
  display: grid;

  gap: 6px;
}

.time-now-button {
  width: 100%;

  padding: 8px;

  border: 1px solid var(--line);
  border-radius: 7px;

  background: var(--orange-soft);
  color: var(--orange-dark);

  font-size: 9px;
  font-weight: 700;
}

.hours-preview {
  margin-bottom: 14px;

  padding: 11px 12px;

  border-radius: 7px;

  background: var(--orange-soft);
  color: var(--orange-dark);

  font-size: 12px;
  font-weight: 700;
}

.auto-break-note {
  min-height: 14px;

  color: var(--muted);

  font-size: 9px;
}

.evidence-preview {
  margin-bottom: 12px;

  max-width: 230px;
}

.evidence-preview img {
  width: 100%;

  border-radius: 8px;
}

.dialog-actions {
  padding: 16px 24px;

  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;

  gap: 8px;

  border-top: 1px solid var(--line);
}

.detail-photo {
  width: 100%;

  max-height: 420px;

  margin-top: 12px;

  border-radius: 9px;

  object-fit: contain;
}


/* 
   TOAST
 */

.toast {
  position: fixed;

  z-index: 100;

  right: 20px;
  bottom: 20px;

  max-width:
    calc(100vw - 40px);

  padding: 12px 16px;

  border-radius: 8px;

  background: #292721;
  color: white;

  font-size: 11px;

  opacity: 0;

  pointer-events: none;

  transform:
    translateY(5px);

  transition:
    opacity .18s ease,
    transform .18s ease;
}

.toast.show {
  opacity: 1;

  transform:
    translateY(0);
}


/* 
   FOOTER
 */

footer {
  padding: 25px;

  color: var(--muted);

  text-align: center;

  font-size: 10px;
}


/* 
   TABLET
 */

@media (max-width: 850px) {

  .sidebar {
    transform:
      translateX(-100%);

    transition:
      transform .2s ease;
  }

  .sidebar.open {
    transform:
      translateX(0);
  }

  .backdrop {
    position: fixed;

    z-index: 15;

    inset: 0;

    background:
      rgba(0, 0, 0, .48);
  }

  .content-shell {
    margin-left: 0;
  }

  .menu-button {
    display: block;
  }

  .topbar {
    justify-content: flex-start;

    padding:
      0 22px;
  }

  .topbar-actions {
    margin-left: auto;
  }
}


/* 
   MOBILE
 */

@media (max-width: 650px) {

  .auth-screen {
    padding: 14px;
  }

  .auth-card {
    padding: 24px 20px;
  }

  .content-shell main {
    padding:
      26px 16px 45px;
  }

  .topbar {
    min-height: 64px;

    padding:
      0 17px;
  }

  #today {
    display: none;
  }

  .connection-status {
    font-size: 10px;
  }

  .dashboard-header {
    flex-direction: column;

    align-items: stretch;

    gap: 18px;
  }

  .dashboard-add-button {
    width: 100%;
  }

  .attendance-panel {
    padding: 20px 21px;

    flex-direction: column;

    align-items: stretch;

    gap: 20px;
  }

  .attendance-actions {
    width: 100%;
  }

  .attendance-actions .button {
    flex: 1;
  }

  .stats {
    grid-template-columns:
      1fr 1fr;

    gap: 10px;
  }

  .stats .card:last-child {
    grid-column:
      1 / -1;
  }

  .card {
    padding: 16px;
  }

  .month-summary {
    grid-template-columns:
      1fr;
  }

  .overview-grid {
    grid-template-columns:
      1fr;
  }

  .page-heading {
    flex-direction: column;

    align-items: stretch;
  }

  .page-heading>.button {
    width: 100%;
  }

  .filter-grid {
    grid-template-columns:
      1fr;
  }

  .filter-wide {
    grid-column: auto;
  }

  .calendar-panel {
    padding: 13px;
  }

  .calendar-day {
    min-height: 73px;

    padding: 5px;
  }

  .calendar-date-number {
    width: 22px;
    height: 22px;

    font-size: 9px;
  }

  .calendar-status-item {
    padding: 3px;

    font-size: 6.5px;
  }

  .attendance-filter {
    flex-direction: column;
  }

  .attendance-filter input {
    max-width: none;
  }

  .attendance-record {
    grid-template-columns:
      1fr 1fr;
  }

  .attendance-record>div:first-child {
    grid-column:
      1 / -1;
  }

  .report-controls {
    grid-template-columns:
      1fr;
  }

  .report-export-buttons {
    display: grid;

    grid-template-columns:
      1fr;
  }

  .form-row,
  .form-row.three {
    grid-template-columns:
      1fr;
  }

  .settings-grid {
    grid-template-columns:
      1fr;
  }

  .dialog-header,
  .form-body,
  .dialog-actions {
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* 
   IMPROVED REPORTS
 */

.report-tabs {
  width: fit-content;

  margin-bottom: 18px;

  display: flex;
  gap: 5px;

  padding: 4px;

  background: var(--surface);

  border: 1px solid var(--line);
  border-radius: 9px;
}


.report-tab {
  min-height: 36px;

  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 8px 14px;

  border: 0;
  border-radius: 6px;

  background: transparent;
  color: var(--muted);

  font-size: 11px;
  font-weight: 700;
}


.report-tab.active {
  background: var(--orange-soft);
  color: var(--orange-dark);
}


.report-tab svg {
  width: 14px;
  height: 14px;
}


.report-section {
  display: none;
}


.report-section.active {
  display: block;
}


/* FILTER */

.report-filter-card {
  padding: 18px 20px;

  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  gap: 20px;

  background: var(--surface);

  border: 1px solid var(--line);
  border-radius: 10px;
}


.report-filter-card h3 {
  margin-bottom: 0;

  font-size: 16px;
}


.report-filter-label {
  margin-bottom: 5px;

  color: var(--orange);

  font-size: 9px;
  font-weight: 800;

  letter-spacing: 1.2px;
}


.report-date-field {
  width: min(260px, 100%);

  display: grid;

  gap: 6px;

  color: var(--muted);

  font-size: 9px;
  font-weight: 700;
}


.report-date-field input {
  width: 100%;

  padding: 10px 11px;

  border: 1px solid var(--line);
  border-radius: 7px;

  background: var(--surface);
  color: var(--text);
}


/* PERIOD */

.report-period {
  margin:
    13px 0;

  padding:
    11px 15px;

  background: var(--orange-soft);

  border-radius: 8px;
}


.report-period span,
.report-period strong {
  display: block;
}


.report-period span {
  margin-bottom: 3px;

  color: var(--orange-dark);

  font-size: 8px;
  font-weight: 800;

  letter-spacing: 1px;
}


.report-period strong {
  font-size: 11px;
}


/* SUMMARY */

.report-summary-grid {
  margin-bottom: 14px;

  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 10px;
}


.report-summary-card {
  padding: 16px;

  background: var(--surface);

  border: 1px solid var(--line);
  border-radius: 9px;
}


.report-summary-icon {
  width: 31px;
  height: 31px;

  margin-bottom: 14px;

  display: grid;
  place-items: center;

  background: var(--orange-soft);

  border-radius: 7px;

  color: var(--orange);
}


.report-summary-icon svg {
  width: 15px;
  height: 15px;
}


.report-summary-card>span {
  display: block;

  margin-bottom: 5px;

  color: var(--muted);

  font-size: 9px;
}


.report-summary-card>strong {
  display: block;

  margin-bottom: 2px;

  font-family: 'Manrope', sans-serif;

  font-size: 23px;
}


.report-summary-card>small {
  color: var(--muted);

  font-size: 8px;
}


/* PROGRESS */

.report-progress-card {
  margin-bottom: 14px;

  padding: 17px 20px;

  background: var(--surface);

  border: 1px solid var(--line);
  border-radius: 9px;
}


.report-progress-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  gap: 20px;
}


.report-progress-heading span,
.report-progress-heading strong {
  display: block;
}


.report-progress-heading span {
  margin-bottom: 4px;

  color: var(--muted);

  font-size: 8px;
  font-weight: 800;

  letter-spacing: 1px;
}


.report-progress-heading strong {
  font-size: 11px;
}


.report-progress-heading>strong {
  color: var(--orange);

  font-size: 18px;
}


.report-progress-card progress {
  margin:
    12px 0 0;
}


/* REPORT PAPER */

.report-document {
  overflow: hidden;

  background: var(--surface);

  border: 1px solid var(--line);
  border-radius: 10px;
}


.report-document-header {
  padding: 22px;

  display: flex;
  justify-content: space-between;
  align-items: flex-start;

  gap: 25px;

  border-bottom: 1px solid var(--line);
}


.report-document-brand {
  margin-bottom: 5px;

  color: var(--orange);

  font-size: 9px;
  font-weight: 800;

  letter-spacing: 1.4px;
}


.report-document-header h2 {
  margin-bottom: 0;

  font-size: 17px;
}


.report-student-info {
  min-width: 130px;

  text-align: right;
}


.report-student-info span,
.report-student-info strong {
  display: block;
}


.report-student-info span {
  margin-bottom: 3px;

  color: var(--muted);

  font-size: 8px;
  font-weight: 700;

  text-transform: uppercase;
}


.report-student-info strong {
  font-size: 11px;
}


/* TABLE */

.report-table {
  overflow-x: auto;
}


.report-table-row {
  min-width: 750px;

  display: grid;

  grid-template-columns:
    105px 1.3fr 85px 85px 65px 75px 80px;

  align-items: center;
}


.report-table-row.header {
  background: var(--bg);

  color: var(--muted);

  font-size: 8px;
  font-weight: 800;

  letter-spacing: .5px;

  text-transform: uppercase;
}


.report-table-row:not(.header) {
  border-top: 1px solid var(--line);
}


.report-table-cell {
  min-width: 0;

  padding: 12px 10px;

  font-size: 10px;

  line-height: 1.45;
}


.report-table-cell:first-child {
  padding-left: 20px;
}


.report-table-cell:last-child {
  padding-right: 20px;
}


.report-task-title {
  display: block;

  margin-bottom: 3px;

  font-weight: 700;
}


.report-task-description {
  display: block;

  overflow: hidden;

  color: var(--muted);

  font-size: 8px;

  text-overflow: ellipsis;

  white-space: nowrap;
}


.report-proof-thumbnail {
  width: 42px;
  height: 34px;

  display: block;

  overflow: hidden;

  border-radius: 5px;

  background: var(--bg);
}


.report-proof-thumbnail img {
  width: 100%;
  height: 100%;

  object-fit: cover;
}


.report-no-proof {
  color: var(--muted);

  font-size: 8px;
}


/* EMPTY REPORT */

.report-empty {
  padding: 50px 20px;

  display: grid;
  place-items: center;

  text-align: center;
}


.report-empty svg {
  width: 28px;
  height: 28px;

  margin-bottom: 12px;

  color: var(--muted);
}


.report-empty strong {
  margin-bottom: 5px;

  font-size: 12px;
}


.report-empty span {
  color: var(--muted);

  font-size: 10px;
}


/* EXPORT */

.report-export-bar {
  margin-top: 13px;

  padding: 16px 18px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  background: var(--surface);

  border: 1px solid var(--line);
  border-radius: 9px;
}


.report-export-bar>div:first-child strong,
.report-export-bar>div:first-child small {
  display: block;
}


.report-export-bar>div:first-child strong {
  margin-bottom: 3px;

  font-size: 11px;
}


.report-export-bar>div:first-child small {
  color: var(--muted);

  font-size: 9px;
}


.report-export-buttons {
  display: flex;
  flex-wrap: wrap;

  gap: 7px;
}


/* REPORT MOBILE */

@media (max-width: 800px) {

  .report-summary-grid {
    grid-template-columns:
      1fr 1fr;
  }

}


@media (max-width: 650px) {

  .report-tabs {
    width: 100%;
  }

  .report-tab {
    flex: 1;

    justify-content: center;
  }


  .report-filter-card {
    flex-direction: column;

    align-items: stretch;
  }


  .report-date-field {
    width: 100%;
  }


  .report-summary-grid {
    grid-template-columns:
      1fr 1fr;
  }


  .report-document-header {
    flex-direction: column;
  }


  .report-student-info {
    text-align: left;
  }


  .report-export-bar {
    flex-direction: column;

    align-items: stretch;
  }


  .report-export-buttons {
    display: grid;

    grid-template-columns:
      1fr;
  }


  .report-export-buttons .button {
    width: 100%;
  }

}


@media (max-width: 390px) {

  .report-summary-grid {
    grid-template-columns:
      1fr;
  }

}

.auth-brand {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 10px;

  margin-bottom: 8px;
}

.auth-brand img {
  width: 38px;
  height: 38px;

  object-fit: contain;

  border-radius: 9px;
}

.auth-brand span {
  font-size: 18px;
  font-weight: 800;
}

/* =====================================================
   CUSTOM LOGOUT DIALOG
===================================================== */

.confirm-dialog {
  width: min(420px, calc(100% - 32px));

  padding: 0;

  border: none;
  border-radius: 18px;

  background: transparent;

  overflow: visible;
}


.confirm-dialog::backdrop {
  background: rgba(15, 15, 15, 0.45);

  backdrop-filter: blur(5px);
}


.confirm-dialog-card {
  padding: 26px;

  background: var(--surface);

  border: 1px solid var(--line);
  border-radius: 18px;

  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.18);
}


.confirm-dialog-icon {
  width: 46px;
  height: 46px;

  display: grid;
  place-items: center;

  margin-bottom: 18px;

  border-radius: 13px;

  background: #fff0eb;

  color: var(--orange);
}


.confirm-dialog-icon svg {
  width: 21px;
  height: 21px;
}


.confirm-dialog-content .eyebrow {
  margin-bottom: 6px;
}


.confirm-dialog-content h2 {
  margin:
    0 0 8px;

  font-size: 24px;
  line-height: 1.15;
}


.confirm-dialog-content p:last-child {
  margin: 0;

  color: var(--muted);

  font-size: 13px;
  line-height: 1.6;
}


.confirm-dialog-actions {
  margin-top: 24px;

  display: grid;

  grid-template-columns:
    1fr 1fr;

  gap: 10px;
}


.confirm-dialog-actions .button {
  width: 100%;

  justify-content: center;
}


.danger-button {
  background: #ef4444;

  color: #fff;

  border: 1px solid #ef4444;
}


.danger-button:hover {
  background: #dc2626;

  border-color: #dc2626;
}


@media (max-width: 480px) {

  .confirm-dialog-card {
    padding: 22px;
  }


  .confirm-dialog-actions {
    grid-template-columns:
      1fr;
  }

}

.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;

  margin-top: 10px;
  margin-bottom: 14px;

  font-size: 12px;
  line-height: 1.5;

  color: var(--muted);
}

.terms-check input {
  margin-top: 3px;
}

.terms-check a {
  color: var(--orange);
  font-weight: 600;
  text-decoration: none;
}

.terms-check a:hover {
  text-decoration: underline;
}

.forgot-password-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.forgot-password-link {
  padding: 0;
  border: none;
  outline: none;
  background: transparent;

  color: #ea6a24;

  font-family: inherit;
  font-size: 13px;
  font-weight: 600;

  cursor: pointer;
}

.forgot-password-link:hover {
  text-decoration: underline;
}

.forgot-password-link:focus {
  outline: none;
}

.forgot-dialog {
  width: min(92vw, 430px);

  padding: 0;

  border: none;

  border-radius: 22px;

  background: transparent;
}

.forgot-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);

  backdrop-filter: blur(5px);
}


.forgot-card {
  padding: 30px;

  background: #ffffff;

  border: 1px solid #ececec;

  border-radius: 22px;

  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.18);
}


.forgot-icon {
  width: 48px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 18px;

  border-radius: 14px;

  background: #fff1e8;

  font-size: 22px;
}


.forgot-header h2 {
  margin: 0 0 8px;

  font-size: 24px;
  font-weight: 800;

  color: #181818;
}


.forgot-header p {
  margin: 0 0 24px;

  color: #777;

  font-size: 14px;
  line-height: 1.6;
}


.forgot-field {
  display: grid;

  gap: 7px;
}


.forgot-field label {
  font-size: 13px;
  font-weight: 700;

  color: #333;
}


.forgot-field input {
  width: 100%;

  padding: 13px 14px;

  border: 1px solid #dddddd;

  border-radius: 11px;

  background: #ffffff;

  font: inherit;

  outline: none;

  transition: 0.2s ease;
}


.forgot-field input:focus {
  border-color: #ea6a24;

  box-shadow:
    0 0 0 3px rgba(234, 106, 36, 0.12);
}


.forgot-message {
  min-height: 18px;

  margin: 10px 0 0;

  color: #d9534f;

  font-size: 12px;
}


.forgot-actions {
  display: grid;

  grid-template-columns:
    1fr 1fr;

  gap: 10px;

  margin-top: 18px;
}


.forgot-button {
  min-height: 44px;

  border: none;

  border-radius: 11px;

  font-size: 14px;
  font-weight: 700;

  cursor: pointer;

  transition: 0.2s ease;
}


.forgot-button.secondary {
  background: #f3f3f3;

  color: #333;
}


.forgot-button.secondary:hover {
  background: #e9e9e9;
}


.forgot-button.primary {
  background: #ea6a24;

  color: #ffffff;
}


.forgot-button.primary:hover {
  background: #d95d1b;
}


.forgot-button:disabled {
  opacity: 0.65;

  cursor: not-allowed;
}


@media (max-width: 480px) {

  .forgot-card {
    padding: 24px;
  }


  .forgot-actions {
    grid-template-columns: 1fr;
  }

}

.reset-password-page {
  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 24px;

  background:
    linear-gradient(180deg,
      #fafafa 0%,
      #f4f4f4 100%);
}


.reset-password-card {
  width: min(100%, 420px);

  padding: 34px;

  background: #ffffff;

  border: 1px solid #e9e9e9;
  border-radius: 22px;

  box-shadow:
    0 18px 55px rgba(0, 0, 0, 0.08);
}


.reset-logo {
  width: 52px;
  height: 52px;

  display: block;

  margin: 0 auto 22px;

  border-radius: 12px;

  object-fit: cover;
}


.reset-password-card h1 {
  margin: 0 0 14px;

  font-size: 42px;
  line-height: 1.05;
  font-weight: 800;

  letter-spacing: -0.035em;

  color: #171717;
}


.reset-password-card>p {
  margin: 0 0 26px;

  color: #777;

  font-size: 15px;
  line-height: 1.6;
}


.reset-field {
  display: flex;
  flex-direction: column;

  gap: 8px;

  margin-bottom: 18px;
}


.reset-field label {
  font-size: 13px;
  font-weight: 700;

  color: #333;
}


.reset-field input {
  width: 100%;

  padding: 13px 14px;

  border: 1px solid #dddddd;
  border-radius: 11px;

  background: #ffffff;

  color: #222;

  font-family: inherit;
  font-size: 14px;

  outline: none;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}


.reset-field input::placeholder {
  color: #aaaaaa;
}


.reset-field input:focus {
  border-color: #ea6a24;

  box-shadow:
    0 0 0 3px rgba(234, 106, 36, 0.12);
}


#resetMessage {
  min-height: 18px;

  margin: 4px 0 10px;

  font-size: 12px;
}


#updatePasswordButton {
  width: 100%;

  min-height: 46px;

  margin-top: 4px;

  border: none;
  border-radius: 11px;

  background: #ea6a24;

  color: #ffffff;

  font-family: inherit;
  font-size: 14px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}


#updatePasswordButton:hover {
  background: #d95d1b;

  transform: translateY(-1px);
}


#updatePasswordButton:disabled {
  opacity: 0.65;

  cursor: not-allowed;

  transform: none;
}


@media (max-width: 520px) {

  .reset-password-page {
    padding: 16px;
  }


  .reset-password-card {
    padding: 26px 22px;
  }


  .reset-password-card h1 {
    font-size: 34px;
  }

}

.sidebar-support {
  margin-top: auto;
  padding: 14px 5px;
}

.support-link {
  display: flex;
  align-items: center;
  gap: 11px;

  width: 100%;
  padding: 11px 12px;

  border-radius: 9px;

  color: var(--muted);
  text-decoration: none;

  font-size: 13px;
  font-weight: 600;

  transition:
    background-color .2s ease,
    color .2s ease;
}

.support-link svg {
  width: 17px;
  height: 17px;
}

.support-link:hover {
  background: var(--pale);
  color: var(--orange);
}

.auth-support {
  margin-top: 22px;
  padding-top: 18px;

  border-top: 1px solid var(--line);

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;

  color: var(--muted);

  font-size: 12px;
}

.auth-support a {
  color: var(--orange);
  font-weight: 700;
  text-decoration: none;
}

.auth-support a:hover {
  text-decoration: underline;
}

.auth-support {
  margin-top: 24px;
  padding-top: 18px;

  border-top: 1px solid var(--line);

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;

  color: #7a746d;

  font-size: 12px;
}

.auth-support a {
  color: var(--orange);
  font-weight: 700;
  text-decoration: none;
}

.auth-support a:hover {
  text-decoration: underline;
}

.auth-help {
  margin-top: 18px;
  display: flex;
  justify-content: center;
}

.auth-help-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;

  color: var(--muted);
  text-decoration: none;

  font-size: 12px;
  font-weight: 500;

  transition:
    color .2s ease,
    background-color .2s ease;
}

.auth-help-link:hover {
  color: var(--orange);
}

.auth-help-icon {
  width: 18px;
  height: 18px;

  display: inline-grid;
  place-items: center;

  border: 1px solid var(--line);
  border-radius: 50%;

  font-size: 11px;
  font-weight: 700;
}