/* timesheet-employee.css — mobile-first (base styles ARE the phone styles, unlike the main app's
   styles.css which shrinks a desktop layout down). Reuses styles.css's CSS variables (--brand,
   --ink, --line, --soft, --green, --red, --amber, --radius, --shadow) rather than redefining
   colors, so this page stays visually in the same family as the rest of the app. */

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--soft, #EAF1F8);
  color: var(--ink, #1e293b);
  -webkit-tap-highlight-color: transparent;
}
#emp-app { max-width: 480px; margin: 0 auto; padding: 16px 16px 60px; min-height: 100vh; }

.emp-loading { padding: 60px 0; text-align: center; color: var(--muted, #64748b); }

/* ---- login ---- */
.emp-login {
  max-width: 340px; margin: 15vh auto 0; background: var(--panel, #fff);
  border: 1px solid var(--line, #e2e8f0); border-radius: var(--radius, 12px);
  box-shadow: var(--shadow, 0 1px 3px rgba(15,23,42,.08)); padding: 24px 20px; text-align: center;
}
.emp-login h1 { font-size: 20px; margin: 0 0 4px; }
.emp-sub { color: var(--muted, #64748b); font-size: 13px; margin: 0 0 18px; }
.emp-sub-small { color: rgba(255,255,255,.75); font-size: 12px; }
.emp-error {
  background: #fee2e2; color: #b91c1c; border-radius: 8px; padding: 8px 12px;
  font-size: 13px; margin-bottom: 14px; text-align: left;
}

/* ---- shared field/button styles (own, not app.js's — this page never loads app.js) ---- */
.emp-field { display: block; text-align: left; margin-bottom: 12px; }
.emp-field span { display: block; font-size: 12px; font-weight: 600; color: var(--muted, #64748b); margin-bottom: 4px; }
.emp-field input, .emp-field textarea {
  width: 100%; padding: 12px; border: 1px solid var(--line, #e2e8f0); border-radius: 8px;
  font-size: 16px; font-family: inherit; background: #fff;
}
.emp-btn {
  border: none; border-radius: 10px; padding: 14px 18px; font-size: 15px; font-weight: 700;
  cursor: pointer; width: 100%; transition: .15s;
}
.emp-btn-primary { background: var(--brand, #64748b); color: #fff; margin-top: 4px; }
.emp-btn-primary:active { opacity: .85; }
.emp-btn-link {
  background: none; border: none; color: var(--brand-d, #334155); font-size: 13px; font-weight: 600;
  padding: 6px 0; cursor: pointer; margin-right: 16px;
}
.emp-btn-link.emp-danger { color: var(--red, #dc2626); }

/* ---- header ---- */
.emp-header {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg, #0f1729); color: #fff; border-radius: var(--radius, 12px);
  padding: 16px 18px; margin-bottom: 14px;
}
.emp-name { font-size: 17px; font-weight: 700; }
.emp-logout { color: rgba(255,255,255,.8); font-size: 13px; text-decoration: underline; cursor: pointer; }

/* ---- clock card — the single biggest tap target on the page, on purpose ---- */
.emp-clock-card {
  background: var(--panel, #fff); border: 1px solid var(--line, #e2e8f0); border-radius: var(--radius, 12px);
  box-shadow: var(--shadow, 0 1px 3px rgba(15,23,42,.08)); padding: 20px; text-align: center; margin-bottom: 16px;
}
.emp-clock-status { font-size: 14px; color: var(--muted, #64748b); margin-bottom: 12px; }
.emp-clock-card.is-clocked .emp-clock-status { color: var(--green, #047857); font-weight: 600; }
.emp-btn-clock { font-size: 18px; padding: 22px; border-radius: 14px; }
.emp-btn-in { background: var(--green, #047857); color: #fff; }
.emp-btn-out { background: var(--red, #dc2626); color: #fff; }

/* ---- sections ---- */
.emp-section {
  background: var(--panel, #fff); border: 1px solid var(--line, #e2e8f0); border-radius: var(--radius, 12px);
  box-shadow: var(--shadow, 0 1px 3px rgba(15,23,42,.08)); padding: 18px; margin-bottom: 16px;
}
.emp-section-h { font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.emp-empty { color: var(--muted, #64748b); font-size: 13px; padding: 8px 0; }

/* ---- entry list ---- */
.emp-entry { border-top: 1px solid var(--line, #e2e8f0); padding: 12px 0; }
.emp-entry:first-child { border-top: none; padding-top: 0; }
.emp-entry-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.emp-entry-date { font-weight: 600; font-size: 14px; }
.emp-entry-mid { font-size: 14px; color: var(--ink, #1e293b); }
.emp-entry-notes { font-size: 12px; color: var(--muted, #64748b); margin-top: 2px; }
.emp-entry-actions { margin-top: 6px; }

.emp-badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700;
}
.emp-badge-submitted { background: #fef3c7; color: #b45309; }
.emp-badge-approved { background: #d1fae5; color: #047857; }
.emp-badge-rejected { background: #fee2e2; color: #b91c1c; }

/* ---- toast ---- */
.emp-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px);
  background: var(--ink, #1e293b); color: #fff; padding: 10px 18px; border-radius: 20px;
  font-size: 13px; opacity: 0; transition: .25s; pointer-events: none; z-index: 999;
}
.emp-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- widen up for tablet/desktop, rather than the main app's "shrink down" convention ---- */
@media (min-width: 600px) {
  #emp-app { max-width: 560px; padding-top: 32px; }
}
