/* ============================================================================
   MY Destination Tours & Travel — Timekeeping Portal
   Travel-agency theme: deep ocean navy, tropical teal, warm gold accents.
   ========================================================================= */

:root {
  --navy: #0a2a4a;
  --navy-dark: #071e37;
  --teal: #0f8a9c;
  --teal-dark: #0b6c7b;
  --gold: #efa940;
  --gold-dark: #d9912a;
  --ink: #1c2b3a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #eef3f8;
  --card: #ffffff;
  --success: #1c8a5b;
  --danger: #c0392b;
  --shadow: 0 10px 30px rgba(10, 42, 74, 0.10);
  --shadow-sm: 0 2px 8px rgba(10, 42, 74, 0.08);
  --radius: 14px;
  --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}

a { color: var(--teal-dark); }

/* ---- Top utility bar (contact strip like the MYD site) ------------------ */
.topbar {
  background: var(--navy-dark);
  color: #cfe3f2;
  font-size: 13px;
}
.topbar .wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 7px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar a { color: #cfe3f2; text-decoration: none; }
.topbar .contact span { margin-right: 16px; white-space: nowrap; }
.clock { font-weight: 600; color: #ffffff; letter-spacing: .2px; }

/* ---- Header / nav -------------------------------------------------------- */
header.site {
  background: var(--navy);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
header.site .wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand .brand-logo {
  height: 50px; width: 50px; object-fit: contain; display: block;
  background: #000; border-radius: 10px; padding: 3px;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.brand .name { line-height: 1.1; }
.brand .name strong { display: block; font-size: 18px; letter-spacing: .3px; }
.brand .name small { color: #9db8d0; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }

nav.site-nav { display: flex; gap: 8px; flex-wrap: wrap; }
nav.site-nav a {
  color: #dbe8f4; text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 8px 14px; border-radius: 8px; transition: .15s;
}
nav.site-nav a:hover { background: rgba(255,255,255,.10); color: #fff; }
nav.site-nav a.active { background: var(--teal); color: #fff; }
nav.site-nav a.cta { background: var(--gold); color: #3a2600; }
nav.site-nav a.cta:hover { background: var(--gold-dark); color: #3a2600; }
nav.site-nav a.cta.out { background: var(--danger); color: #fff; }
nav.site-nav a.cta.out:hover { background: #a93226; color: #fff; }
.nav-user {
  color: #cfe3f2; font-size: 14px; font-weight: 700;
  padding: 8px 10px; display: inline-flex; align-items: center; gap: 8px;
}
.nav-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover; flex: 0 0 auto;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
}
.nav-avatar.placeholder {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1;
}

/* ---- Big date & time clock card (Timekeeping Station) --------------------
   Uses .card.clock-card (higher specificity) so the dark gradient always wins
   over the base .card white background. */
.card.clock-card {
  background: linear-gradient(135deg, #0a2a4a 0%, #0b6c7b 60%, #0f8a9c 100%);
  border: none;
  color: #fff;
}
.card.clock-card .card-body {
  color: #fff; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 46px 20px;
  min-height: 260px;
}
.card.clock-card .clock-label {
  text-transform: uppercase; letter-spacing: 3px; font-size: 12px;
  color: #bcd6ea; margin-bottom: 14px;
}
.card.clock-card .big-date { font-size: 24px; font-weight: 600; color: #eaf3fb; margin-bottom: 6px; }
.card.clock-card .big-time {
  font-size: 66px; font-weight: 800; letter-spacing: 1px; line-height: 1.05; color: #ffffff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 18px rgba(0,0,0,.35);
}
@media (max-width: 640px) {
  .card.clock-card .big-time { font-size: 46px; }
  .card.clock-card .big-date { font-size: 19px; }
}

/* ---- Hero ---------------------------------------------------------------- */
.hero {
  background:
    linear-gradient(rgba(7, 30, 55, .72), rgba(11, 108, 123, .72)),
    url("../assets/hero.svg") center/cover no-repeat;
  color: #fff;
  padding: 46px 20px;
  text-align: center;
}
.hero h1 { margin: 0 0 8px; font-size: 30px; letter-spacing: .3px; }
.hero p { margin: 0; color: #dceaf5; font-size: 15px; }

/* ---- Layout -------------------------------------------------------------- */
.container { max-width: 1160px; margin: 0 auto; padding: 28px 20px 60px; }
.grid { display: grid; gap: 22px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.sidebar { grid-template-columns: 340px 1fr; }
@media (max-width: 900px) {
  .grid.two, .grid.sidebar { grid-template-columns: 1fr; }
}

/* ---- Cards --------------------------------------------------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card .card-head {
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--navy), var(--teal-dark));
  color: #fff;
  font-weight: 700;
  letter-spacing: .3px;
  display: flex; align-items: center; gap: 10px;
}
.card .card-body { padding: 20px; }
.card .card-head .ico { font-size: 18px; }

/* ---- Forms --------------------------------------------------------------- */
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
.field { margin-bottom: 16px; }
input, select, textarea {
  width: 100%; padding: 11px 13px; font-size: 15px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 138, 156, .15);
}
input:disabled { background: #f1f5f9; color: var(--muted); }
.checkline { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); }
.checkline input { width: auto; }

/* ---- Admin: tabs ---- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; border-bottom: 2px solid var(--line); }
.tab {
  border: none; background: transparent; cursor: pointer;
  padding: 12px 18px; font-size: 15px; font-weight: 700; color: var(--muted);
  border-bottom: 3px solid transparent; margin-bottom: -2px; border-radius: 8px 8px 0 0;
}
.tab:hover { color: var(--navy); background: #f2f7fb; }
.tab.active { color: var(--navy); border-bottom-color: var(--teal); }

/* ---- Admin: forms & rows ---- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 20px; margin-bottom: 8px; }
.form-grid .field.span2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.row-actions { display: flex; gap: 8px; margin-top: 10px; }
.edit-files { display: flex; flex-direction: column; gap: 8px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; font-size: 15px; font-weight: 700; cursor: pointer;
  border: none; border-radius: 10px; color: #fff; background: var(--teal);
  transition: transform .05s, filter .15s, box-shadow .15s;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.05); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.navy { background: var(--navy); }
.btn.gold { background: var(--gold); color: #3a2600; }
.btn.gold:hover { background: var(--gold-dark); }
.btn.green { background: var(--success); }
.btn.red { background: var(--danger); }
.btn.ghost { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn.sm { padding: 8px 12px; font-size: 13px; }

/* Punch action grid */
.punch-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.punch-actions .btn { padding: 16px 12px; font-size: 16px; }

/* ---- Station confirmation panel ----------------------------------------- */
.confirm-wrap { display: flex; gap: 16px; align-items: center; }
.confirm-photo {
  width: 120px; height: 120px; flex: 0 0 auto;
  object-fit: cover; border-radius: 12px; border: 2px solid var(--line);
}
.confirm-msg { flex: 1; min-width: 0; }
.confirm-msg .alert { margin-bottom: 0; }
@media (max-width: 560px) { .confirm-wrap { flex-direction: column; align-items: stretch; text-align: center; } .confirm-photo { align-self: center; } }

/* ---- Webcam -------------------------------------------------------------- */
.webcam-wrap {
  position: relative; border-radius: 12px; overflow: hidden;
  background: #0b1622; aspect-ratio: 4 / 3; display: grid; place-items: center;
  border: 1px solid var(--line);
}
.webcam-wrap video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.webcam-status {
  position: absolute; bottom: 8px; left: 8px; right: 8px;
  font-size: 12px; color: #cfe3f2; background: rgba(7,30,55,.6);
  padding: 5px 9px; border-radius: 7px; text-align: center;
}
.cam-dot { display:inline-block; width:8px; height:8px; border-radius:50%; background:#e74c3c; margin-right:6px; }
.cam-dot.live { background:#2ecc71; box-shadow:0 0 0 3px rgba(46,204,113,.25); }

/* ---- Alerts / toast ------------------------------------------------------ */
.alert { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 14px; display: none; }
.alert.show { display: block; }
.alert.ok { background: #e7f6ee; color: #146c43; border: 1px solid #b7e4c7; }
.alert.err { background: #fdecea; color: #a02617; border: 1px solid #f5c2c0; }
.alert.warn { background: #fff6e6; color: #8a5a00; border: 1px solid #ffe0a3; }

/* ---- Badges / pills ------------------------------------------------------ */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.pill.in { background: #e7f6ee; color: #146c43; }
.pill.out { background: #fdecea; color: #a02617; }
.pill.break_start { background: #fff6e6; color: #8a5a00; }
.pill.break_end { background: #e8f1fb; color: #1e5a9e; }

/* ---- Employee profile photo --------------------------------------------- */
.emp-profile { display: flex; gap: 20px; align-items: flex-start; }
@media (max-width: 560px) { .emp-profile { flex-direction: column; align-items: center; } }
.emp-photo-wrap { flex: 0 0 auto; }
.emp-photo {
  width: 110px; height: 110px; border-radius: 14px; object-fit: cover;
  border: 2px solid var(--line); background: #eef3f8;
  background-size: cover; background-position: center;
}
.emp-photo.placeholder {
  display: grid; place-items: center;
  font-size: 34px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  border: none;
}
.emp-photo.sm { width: 68px; height: 68px; border-radius: 12px; font-size: 22px; }
.emp-edit-photo { display: flex; align-items: center; gap: 14px; }
.emp-edit-photo input { flex: 1; }

/* ---- Info grid (Employee Information banner) ----------------------------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px 28px;
}
.info-item {
  display: flex; flex-direction: column; gap: 3px;
  padding-bottom: 11px; border-bottom: 1px solid var(--line);
}
.info-item .k {
  font-size: 11px; color: var(--muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
}
.info-item .v { font-size: 15px; color: var(--ink); word-break: break-word; }

/* ---- Info list ----------------------------------------------------------- */
.info-list { display: grid; gap: 0; }
.info-list .row {
  display: grid; grid-template-columns: 150px 1fr; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.info-list .row:last-child { border-bottom: none; }
.info-list .row .k { color: var(--muted); font-weight: 600; }
.info-list .row .v { color: var(--ink); }

/* ---- Announcement filter bar --------------------------------------------- */
.ann-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 16px; }
.ann-filter .field { margin: 0; }
.ann-filter .field input { padding: 8px 10px; font-size: 14px; }
.ann-filter .btn { align-self: flex-end; }

/* ---- Announcements ------------------------------------------------------- */
.ann { padding: 14px 0; border-bottom: 1px solid var(--line); }
.ann:last-child { border-bottom: none; }
.ann h4 { margin: 0 0 4px; color: var(--navy); font-size: 15px; }
.ann p { margin: 0 0 6px; font-size: 14px; color: #33455a; line-height: 1.5; white-space: pre-wrap; }
.ann .files { margin: 6px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ann .files a {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; text-decoration: none; color: var(--teal-dark);
  background: #eef6fb; border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px;
}
.ann .files a:hover { background: #e3f0f8; }
.ann .meta { font-size: 12px; color: var(--muted); }

/* ---- Table --------------------------------------------------------------- */
.table-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 16px; }
.table-tools .field { margin: 0; }
.table-tools .field.grow { flex: 1; min-width: 140px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
thead th {
  background: var(--navy); color: #fff; text-align: left; padding: 12px 14px;
  font-weight: 600; white-space: nowrap; font-size: 13px;
}
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr:nth-child(even) { background: #f7fafd; }
tbody tr:hover { background: #eef6fb; }
.thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; cursor: pointer; border: 1px solid var(--line); }
.empty { padding: 30px; text-align: center; color: var(--muted); }

/* ---- Timesheet ----------------------------------------------------------- */
.ts-table tbody .ts-row { cursor: pointer; }
.ts-table .ts-toggle { width: 34px; text-align: center; color: var(--muted); }
.ts-table .caret { display: inline-block; transition: transform .15s; font-size: 11px; }
.ts-table .caret.open { transform: rotate(90deg); }
.ts-table .ts-detail > td { background: #f7fafd; }
.ts-punches { display: flex; flex-wrap: wrap; gap: 10px; padding: 4px 0; }
.ts-punch {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-size: 13px;
}

/* ---- Auth screens -------------------------------------------------------- */
.auth-shell { max-width: 440px; margin: 46px auto; }
.auth-shell .card-body { padding: 26px; }
.muted { color: var(--muted); font-size: 13px; }
.center { text-align: center; }

/* ---- Modal --------------------------------------------------------------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(7,30,55,.65);
  display: none; align-items: center; justify-content: center; padding: 20px; z-index: 50;
}
.modal-backdrop.show { display: flex; }
.modal { background: #fff; border-radius: 14px; max-width: 460px; width: 100%; overflow: hidden; box-shadow: var(--shadow); }
.modal img { width: 100%; display: block; background: #0b1622; }
.modal .modal-body { padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* Login pop-up (reuses .modal-backdrop / .modal) */
.login-modal { max-width: 420px; }
.login-modal .modal-form { padding: 22px; }
.login-modal .field:last-of-type { margin-bottom: 18px; }

/* ---- Footer -------------------------------------------------------------- */
footer.site {
  background: var(--navy-dark); color: #9db8d0; text-align: center;
  padding: 22px; font-size: 13px; margin-top: 30px;
}
footer.site .accred { margin-top: 8px; color: #6f8dab; font-size: 12px; letter-spacing: 1px; }

.hidden { display: none !important; }
.stack > * + * { margin-top: 14px; }
