:root{--orange:#f45b13;--orange2:#ff8a16;--bg:#fff7f0;--text:#172033;--muted:#64748b;--line:#ead9cf;--green:#159447;--red:#e03131;--blue:#1264d8;--amber:#f59f00}*{box-sizing:border-box}body{margin:0;font-family:Arial,'Helvetica Neue',sans-serif;background:var(--bg);color:var(--text)}.top-bg{position:fixed;inset:0 0 auto 0;height:260px;background:linear-gradient(135deg,var(--orange),var(--orange2));z-index:-1}.wrap{max-width:1240px;margin:0 auto;padding:24px 16px}.header{display:flex;justify-content:space-between;align-items:center;gap:18px;background:rgba(255,255,255,.94);border-radius:28px;padding:14px 18px;box-shadow:0 18px 45px rgba(105,45,0,.12)}.logo{display:flex;align-items:center;gap:12px}.logo img{height:42px;width:auto}.nav{display:flex;gap:8px;flex-wrap:wrap}.nav a,.nav button{border:0;text-decoration:none;background:#fff1e8;color:#c94809;border-radius:18px;padding:11px 15px;font-weight:800;cursor:pointer}.nav a.active,.nav button.active{background:var(--orange);color:white;box-shadow:0 10px 22px rgba(244,91,19,.28)}.grid{display:grid;gap:18px}.grid2{grid-template-columns:390px 1fr}.card{background:white;border:1px solid #ffe2d3;border-radius:30px;box-shadow:0 18px 48px rgba(105,45,0,.1);overflow:hidden}.card-pad{padding:24px}.hero{background:linear-gradient(90deg,var(--orange),var(--orange2));padding:22px;color:white;text-align:center}.hero img{height:50px;filter:brightness(0) invert(1)}.hero h1{margin:16px 0 6px;font-size:24px}.hero p{margin:0;color:#fff5ee}.label{display:grid;gap:8px;font-size:14px;font-weight:700;color:#475569;margin-bottom:14px}.input,.select{height:44px;border:1px solid #ddd4ce;border-radius:14px;padding:0 14px;background:white;outline:none;width:100%}.input:focus,.select:focus{border-color:var(--orange);box-shadow:0 0 0 3px #ffe2d3}.btn{border:0;border-radius:16px;padding:13px 18px;font-weight:900;cursor:pointer;background:var(--orange);color:white}.btn:hover{background:#df4b08}.btn.green{background:#10a33f}.btn.blue{background:#1264d8}.btn.light{background:#fff1e8;color:#c94809}.btn.danger{background:#e03131}.check-btn{width:100%;height:56px;font-size:16px}.notice{border-radius:18px;padding:14px;margin-top:14px;font-weight:700}.notice.ok{background:#eaf8ef;color:#14783b}.notice.err{background:#fff0f0;color:#c92a2a}.info{border-radius:18px;padding:16px;margin-top:14px}.info.orange{background:#fff7ed;border:1px solid #ffe1c7}.info.blue{background:#eef6ff;border:1px solid #cfe4ff}.row{display:flex;justify-content:space-between;gap:14px;padding:12px;border-radius:15px;background:#f8fafc;margin:9px 0}.result{min-height:520px;display:grid;place-items:center;text-align:center}.circle{margin:auto;width:116px;height:116px;border-radius:50%;display:grid;place-items:center;color:white;font-size:60px;font-weight:900;box-shadow:0 20px 40px rgba(0,0,0,.15)}.circle.ok{background:var(--green)}.circle.late{background:var(--red)}.status-text{font-size:32px;font-weight:1000;margin:18px 0 6px}.status-text.ok{color:var(--green)}.status-text.late{color:var(--red)}.filters{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;background:#f8fafc;border-radius:22px;padding:16px;margin:18px 0}.table-wrap{overflow:auto;border:1px solid #e7e2df;border-radius:18px}table{width:100%;border-collapse:collapse;min-width:930px;font-size:14px}th{background:#fff3ea;text-align:left;padding:13px;border-bottom:1px solid #ead9cf;font-weight:900}td{padding:12px;border-bottom:1px solid #eee}tr:nth-child(even) td{background:#fafafa}.pill{display:inline-flex;border-radius:8px;padding:5px 9px;font-size:12px;font-weight:900}.pill.ok{background:#e8f8ee;color:var(--green)}.pill.late{background:#fff0f0;color:var(--red)}.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:16px 0}.stat{border-radius:18px;padding:17px}.stat b{font-size:32px;display:block;margin:8px 0}.stat.green{background:#e8f8ee;color:var(--green)}.stat.red{background:#fff0f0;color:var(--red)}.stat.amber{background:#fff8e5;color:var(--amber)}.stat.blue{background:#eef6ff;color:var(--blue)}.settings-grid{grid-template-columns:1fr 1fr}.employee-row{display:flex;justify-content:space-between;align-items:center;background:#f8fafc;border-radius:16px;padding:12px 14px;margin:8px 0}.small-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.three{grid-template-columns:repeat(3,1fr)}@media(max-width:900px){.header{align-items:flex-start;flex-direction:column}.grid2,.settings-grid{grid-template-columns:1fr}.filters,.stat-grid{grid-template-columns:1fr 1fr}.logo img{max-width:220px;height:auto}}@media(max-width:520px){.filters,.stat-grid,.small-grid,.three{grid-template-columns:1fr}.wrap{padding:12px}.card{border-radius:22px}.header{border-radius:22px}.hero h1{font-size:20px}}



/* Employee feature update */
.employee-nav { flex-wrap: wrap; }
.check-line { display:flex; align-items:center; gap:8px; margin:9px 0; color:#172033; font-weight:700; }
.check-line input { width:16px; height:16px; accent-color:#f45b13; }
.option-box { padding:14px; border:1px solid #fed7aa; border-radius:16px; background:#fff7ed; margin:12px 0; }
.schedule-table { display:flex; flex-direction:column; gap:10px; margin:14px 0; }
.reg-day { border:1px solid #e5e7eb; background:#fff; border-radius:16px; padding:12px; }
.reg-shifts { display:flex; flex-wrap:wrap; gap:14px; margin-top:8px; }
.evening-time-box { margin-top:10px; padding:10px; border-radius:12px; background:#fff7ed; border:1px solid #fed7aa; }
.approval-grid { display:grid; grid-template-columns:1fr; gap:14px; margin-top:16px; }
.approval-card { border:1px solid #e5e7eb; border-radius:18px; padding:14px; background:#fff; }
.approval-head { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.badge { display:inline-block; padding:4px 9px; border-radius:999px; font-weight:800; font-size:12px; }
.badge.pending { background:#fff7ed; color:#c2410c; }
.badge.approved { background:#dcfce7; color:#15803d; }
.badge.rejected { background:#fee2e2; color:#b91c1c; }
.action-buttons { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.btn.outline { background:#fff; color:#f45b13; border:1px solid #f45b13; }
@media(max-width: 640px){
  .reg-shifts { flex-direction:column; gap:4px; }
}



/* FIX EMPLOYEE INDEX SEARCH + PROFESSIONAL SCHEDULE */
.employee-header .logo img { max-width: 260px; height: auto; }
.employee-picker { margin-bottom: 16px; }
.employee-search-input { height: 54px; font-size: 16px; }
.employee-picker-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}
.employee-option {
  width: 100%;
  border: 1px solid #f0ded4;
  background: #fff;
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}
.employee-option:hover,
.employee-option.selected {
  border-color: #f45b13;
  background: #fff7ed;
}
.emp-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f45b13, #ff8a16);
  color: #fff;
  font-weight: 900;
  flex: 0 0 auto;
}
.emp-main {
  display: grid;
  gap: 2px;
}
.emp-main b { color: #172033; font-size: 15px; }
.emp-main small { color: #64748b; font-size: 12px; }
.employee-empty {
  padding: 14px;
  border-radius: 14px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-weight: 700;
}
.late-permission-card {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  border-radius: 18px;
  padding: 12px 14px;
  margin: 14px 0;
}
.late-check {
  font-size: 16px;
  margin: 0;
}
.late-check input {
  width: 22px;
  height: 22px;
}
.textarea {
  height: auto !important;
  padding-top: 12px;
  padding-bottom: 12px;
  resize: vertical;
}
.check-btn {
  margin-top: 12px;
  width: 100%;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.section-heading h1 { margin-bottom: 6px; }
.section-heading p { margin: 0; color: #64748b; }
.schedule-export-btn {
  width: 100%;
  height: 44px;
}
.schedule-register-wrap {
  border: 1px solid #ffe2d3;
  border-radius: 22px;
  overflow: hidden;
  margin: 16px 0;
  background: #fff;
}
.schedule-register-head {
  background: #fff7ed;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: #9a3412;
}
.schedule-register-head span {
  color: #64748b;
}
.pro-schedule {
  padding: 12px;
}
.pro-day {
  border: 1px solid #edf2f7;
  background: #fff;
  border-radius: 18px;
  padding: 12px;
  margin-bottom: 10px;
}
.pro-day-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #172033;
  margin-bottom: 10px;
}
.pro-day-title span {
  color: #64748b;
  font-size: 13px;
}
.pro-shifts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.shift-chip {
  border: 1px solid #e7e2df;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: #334155;
  background: #fafafa;
}
.shift-chip input { accent-color: #f45b13; }
.evening-time-box {
  margin-top: 10px;
  padding: 10px;
  border-radius: 14px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}
.leave-type-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px;
}
@media(max-width: 900px) {
  .employee-checkin-grid { grid-template-columns: 1fr; }
  .pro-shifts { grid-template-columns: 1fr; }
  .leave-type-box { grid-template-columns: 1fr; }
  .employee-nav {
    width: 100%;
    justify-content: center;
  }
  .employee-nav a {
    flex: 1 1 auto;
    text-align: center;
    padding: 12px 10px;
  }
}
@media(max-width: 520px) {
  .employee-picker-list { max-height: 240px; }
  .late-permission-card { padding: 12px; }
  .late-check { font-size: 15px; }
  .check-btn { height: 56px; }
}



/* FIX MOBILE EMPLOYEE LIST + REGISTER SCHEDULE LIKE PC */
.employee-picker-list {
  border: 1px solid #ffe2d3 !important;
  border-radius: 18px !important;
  background: #fff !important;
  padding: 8px !important;
  max-height: 214px !important; /* khoảng 3 nhân viên */
  overflow-y: auto !important;
  box-shadow: inset 0 0 0 1px rgba(255,226,211,.25);
}
.employee-option {
  min-height: 58px !important;
  border-radius: 14px !important;
  margin: 0 !important;
}
.employee-option + .employee-option {
  margin-top: 8px !important;
}
.employee-option .emp-avatar {
  width: 42px !important;
  height: 42px !important;
}
.employee-option .emp-main b {
  font-size: 15px !important;
  line-height: 1.2 !important;
}
.employee-option .emp-main small {
  font-size: 12px !important;
  line-height: 1.25 !important;
}

/* Mobile: lịch đăng ký giữ bố cục giống PC, không vỡ thành chữ lớn */
.pro-day {
  display: grid !important;
  grid-template-columns: 86px minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: center !important;
  padding: 12px !important;
}
.pro-day-title {
  display: block !important;
  margin: 0 !important;
}
.pro-day-title b {
  display: block !important;
  font-size: 15px !important;
}
.pro-day-title span {
  display: block !important;
  font-size: 11px !important;
  margin-top: 2px !important;
}
.pro-shifts {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
}
.shift-chip {
  min-height: 44px !important;
  justify-content: center !important;
  padding: 9px 6px !important;
  font-size: 14px !important;
  border-radius: 14px !important;
}
.shift-chip input {
  width: 16px !important;
  height: 16px !important;
  flex: 0 0 auto !important;
}
.schedule-register-head {
  align-items: center !important;
}
.schedule-register-head b {
  font-size: 16px !important;
}
.schedule-register-head span {
  font-size: 13px !important;
}

/* Ghi đè media cũ để điện thoại vẫn nhìn giống PC */
@media(max-width: 900px) {
  .employee-picker-list {
    max-height: 214px !important;
  }
  .pro-shifts {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .pro-day {
    grid-template-columns: 86px minmax(0, 1fr) !important;
  }
}
@media(max-width: 520px) {
  .employee-picker-list {
    max-height: 214px !important;
  }
  .employee-search-input {
    height: 50px !important;
    font-size: 15px !important;
  }
  .employee-option {
    min-height: 58px !important;
    padding: 8px 10px !important;
  }
  .emp-avatar {
    width: 38px !important;
    height: 38px !important;
    font-size: 15px !important;
  }
  .pro-day {
    grid-template-columns: 72px minmax(0, 1fr) !important;
    gap: 8px !important;
  }
  .pro-shifts {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  .shift-chip {
    font-size: 13px !important;
    padding: 8px 4px !important;
    gap: 4px !important;
  }
  .shift-chip input {
    width: 15px !important;
    height: 15px !important;
  }
  .schedule-register-wrap {
    border-radius: 18px !important;
  }
  .pro-schedule {
    padding: 8px !important;
  }
}
@media(max-width: 380px) {
  .pro-day {
    grid-template-columns: 1fr !important;
  }
  .pro-day-title {
    display: flex !important;
    justify-content: space-between !important;
  }
}



/* FIX WEEK SELECTOR REGISTER SCHEDULE */
.week-select-box {
  display: block;
}
.week-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.week-btn {
  border: 0;
  border-radius: 14px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 900;
  padding: 12px 14px;
  cursor: pointer;
}
.week-btn:hover {
  background: #ffedd5;
}
.week-display {
  min-height: 54px;
  border: 1px solid #f0ded4;
  border-radius: 16px;
  background: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 8px 12px;
}
.week-display b {
  color: #172033;
  font-size: 16px;
}
.week-display span {
  color: #64748b;
  font-size: 12px;
}
.week-note {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
}
@media(max-width: 640px) {
  .week-control {
    grid-template-columns: 1fr 1fr;
  }
  .week-display {
    grid-column: 1 / -1;
    order: -1;
  }
  .week-btn {
    padding: 11px 10px;
    font-size: 13px;
  }
}



/* FLOATING REGISTER NOTICE + WEEK INFO */
.schedule-banner {
  position: fixed !important;
  left: 50% !important;
  top: 18px !important;
  transform: translateX(-50%) !important;
  width: min(680px, calc(100% - 28px)) !important;
  z-index: 9999 !important;
  background: linear-gradient(135deg, #fff7ed, #ffedd5) !important;
  border: 1px solid #fed7aa !important;
  color: #7c2d12 !important;
  border-radius: 18px !important;
  box-shadow: 0 16px 40px rgba(124,45,18,.22) !important;
  padding: 14px 48px 14px 16px !important;
  line-height: 1.35 !important;
}
.schedule-banner-title { font-weight: 900; font-size: 15px; margin-bottom: 3px; }
.schedule-banner-text { font-size: 14px; }
.schedule-banner-close {
  position: absolute;
  right: 12px;
  top: 10px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: rgba(244,91,19,.14);
  color: #9a3412;
  font-weight: 900;
  font-size: 20px;
  cursor: pointer;
}
.selected-week-info {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 15px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-weight: 700;
}
@media(max-width: 640px) {
  .schedule-banner {
    top: 12px !important;
    width: calc(100% - 22px) !important;
    padding: 12px 44px 12px 14px !important;
  }
  .schedule-banner-title { font-size: 14px; }
  .schedule-banner-text { font-size: 13px; }
}



/* CLEAN WEEK DISPLAY MOBILE/PC */
.clean-week-display {
  min-height: 66px !important;
  border: 1px solid #fed7aa !important;
  border-radius: 18px !important;
  background: linear-gradient(135deg, #fff7ed, #fff) !important;
  display: grid !important;
  align-items: center !important;
  justify-items: start !important;
  text-align: left !important;
  padding: 14px 16px !important;
  box-shadow: 0 8px 20px rgba(124,45,18,.06) !important;
}
.clean-week-display span {
  color: #64748b !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}
.clean-week-display b {
  color: #172033 !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  margin-top: 4px !important;
}
.fixed-week-box .selected-week-info,
#selectedWeekInfo {
  display: none !important;
}
@media(max-width: 640px) {
  .clean-week-display {
    min-height: 60px !important;
    padding: 12px 14px !important;
  }
  .clean-week-display b {
    font-size: 17px !important;
  }
}

/* UPDATE: employee login + QR check-in */
.login-page {
  display: grid;
  place-items: center;
}
.login-card {
  width: 520px;
  max-width: 100%;
}
.compact-hero {
  padding-bottom: 14px;
}
.compact-hero img {
  max-width: 220px;
}
.employee-account-bar {
  margin-top: 18px;
  background: #fff;
  border: 1px solid #ffe2d3;
  border-radius: 20px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(105,45,0,.08);
}
.employee-account-bar b {
  display: block;
  color: #172033;
  font-size: 16px;
}
.employee-account-bar span {
  display: block;
  color: #64748b;
  margin-top: 3px;
  font-size: 13px;
}
.qr-status-box {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
  border-radius: 18px;
  padding: 14px 16px;
  line-height: 1.5;
  margin-bottom: 14px;
}
.qr-status-box.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}
.qr-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.scanner-box {
  border: 1px solid #ffe2d3;
  background: #fff;
  border-radius: 18px;
  padding: 12px;
  margin: 12px 0;
  text-align: center;
}
.scanner-box video {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 14px;
  background: #111827;
  margin-bottom: 10px;
}
.btn.light {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}
.btn.green {
  background: #16a34a;
}
.btn.green:hover {
  background: #15803d;
}
@media(max-width: 640px){
  .employee-account-bar {
    align-items: flex-start;
    flex-direction: column;
  }
  .qr-action-grid {
    grid-template-columns: 1fr;
  }
}
