/* CFMS 100% Pixel-Perfect Confluixms UI Theme for Task Frontend */

:root {
  --cfms-green: #111827;
  --cfms-green-active: #007035;
  --cfms-bg-input: #f4f6fa;
  --cfms-placeholder: #a0a5ba;
  --cfms-text-dark: #1f2738;
  --cfms-text-muted: #8c909e;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: #111827;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

#app {
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  background: #ffffff;
  overflow-x: hidden;
}

.cfms-login-wrapper {
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  background: #111827;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Custom Confluixms Top Header Bar */
.cfms-navbar {
  position: relative;
  width: 100%;
  height: 50px;
  background: #111827;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 10;
  box-sizing: border-box;
}

.cfms-navbar .nav-back {
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
}

.cfms-navbar .nav-back svg {
  width: 22px;
  height: 22px;
  stroke: #ffffff;
}

.cfms-navbar .nav-title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-weight: 600;
  font-size: 17px;
  color: #ffffff;
  text-align: center;
  letter-spacing: 0.2px;
  pointer-events: none;
  white-space: nowrap;
}

.cfms-navbar .nav-lang {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
  z-index: 2;
}

.cfms-navbar .nav-lang:hover {
  background: rgba(255, 255, 255, 0.32);
}

.cfms-navbar .nav-lang .lang-globe {
  margin-right: 5px;
  font-size: 13px;
}

/* Top Green Banner Area */
.cfms-top-banner {
  background: #111827;
  padding: 36px 24px 34px 24px;
  box-sizing: border-box;
}

.cfms-top-banner .banner-brand {
  font-weight: 800;
  font-size: 28px;
  font-family: DINPro-Bold, sans-serif;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: 0.5px;
}

.cfms-top-banner .banner-sub {
  font-weight: 400;
  font-size: 15px;
  color: #ffffff;
  margin-top: 14px;
  line-height: 1.4;
  opacity: 0.95;
}

/* Main White Curved Form Container */
.cfms-card-box {
  flex: 1;
  background: #ffffff;
  border-radius: 22px 22px 0 0;
  margin-top: -16px;
  padding: 28px 24px 36px 24px;
  position: relative;
  z-index: 5;
}

/* Form Item */
.cfms-form-group {
  margin-bottom: 20px;
}

.cfms-form-group .group-label {
  font-size: 15px;
  font-weight: 500;
  color: #1f2738;
  margin-bottom: 8px;
  display: block;
}

/* Input Rounded Box */
.cfms-input-pill {
  display: flex;
  align-items: center;
  height: 52px;
  background: #f4f6fa;
  border-radius: 10px;
  padding: 0 16px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.cfms-input-pill:focus-within {
  border-color: #111827;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.1);
}

.cfms-input-pill input {
  flex: 1;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14.5px;
  color: #1f2738;
  font-family: inherit;
}

.cfms-input-pill input::placeholder {
  color: #a0a5ba;
  font-size: 14px;
  font-weight: 400;
}

/* Country Selector Inside Input Pill */
.cfms-input-pill .country-select-btn {
  display: flex;
  align-items: center;
  font-size: 14.5px;
  font-weight: 500;
  color: #1f2738;
  margin-right: 12px;
  padding-right: 12px;
  border-right: 1px solid #e2e4ea;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

.cfms-input-pill .country-select-btn .caret {
  margin-left: 6px;
  font-size: 10px;
  color: #747580;
}

/* Password Eye Toggle */
.cfms-input-pill .eye-toggle {
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  user-select: none;
}

.cfms-input-pill .eye-toggle svg {
  width: 20px;
  height: 20px;
}

/* Remember Me Checkbox */
.cfms-remember-row {
  display: flex;
  align-items: center;
  margin: 18px 0 24px 0;
  cursor: pointer;
  user-select: none;
  width: fit-content;
}

.cfms-remember-row .chk-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e2e4ea;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.cfms-remember-row .chk-circle.checked {
  background: #111827;
  box-shadow: inset 0 0 0 2px #ffffff;
}

.cfms-remember-row .chk-label {
  font-size: 12px;
  color: #8c909e;
  margin-left: 8px;
  line-height: 1;
}

/* Big Green Action Button */
.cfms-btn-submit {
  width: 100%;
  height: 48px;
  background: #111827;
  border-radius: 10px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  outline: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  margin-top: 8px;
}

.cfms-btn-submit:active {
  background: #007035;
  transform: scale(0.99);
}

.cfms-btn-submit.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Bottom Link */
.cfms-bottom-link {
  text-align: center;
  margin-top: 28px;
  font-size: 13px;
  color: #8c909e;
}

.cfms-bottom-link .link-action {
  color: #111827 !important;
  font-weight: 500;
  margin-left: 4px;
  cursor: pointer;
  text-decoration: none;
}

.cfms-bottom-link .link-action:hover {
  text-decoration: underline;
}

/* Country Picker Modal/Sheet */
.cfms-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
}

.cfms-country-sheet {
  width: 100%;
  max-height: 60vh;
  background: #ffffff;
  border-radius: 16px 16px 0 0;
  overflow-y: auto;
  padding: 16px 0;
  box-sizing: border-box;
  animation: cfmsSlideUp 0.25s ease-out;
}

@keyframes cfmsSlideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.cfms-sheet-title {
  padding: 0 20px 12px 20px;
  font-weight: 600;
  font-size: 16px;
  color: #1f2738;
  border-bottom: 1px solid #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cfms-sheet-title .close-btn {
  font-size: 20px;
  color: #8c909e;
  cursor: pointer;
}

.cfms-country-item {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f5f7fa;
  font-size: 15px;
  color: #1f2738;
  cursor: pointer;
}

.cfms-country-item:active {
  background: #f4f6fa;
}

.cfms-country-item.active {
  color: #111827;
  font-weight: 600;
}

/* Footer override: NEVER show on login or register */
body.cfms-auth-page #footer,
#app:has(.cfms-login-wrapper) #footer,
.cfms-login-wrapper~#footer,
#footer.cfms-hidden {
  display: none !important;
}


/* Country Picker Modal/Sheet */
.cfms-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
}

.cfms-country-sheet {
  width: 100%;
  max-height: 60vh;
  background: #ffffff;
  border-radius: 16px 16px 0 0;
  overflow-y: auto;
  padding: 16px 0;
  box-sizing: border-box;
  animation: cfmsSlideUp 0.25s ease-out;
}

@keyframes cfmsSlideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.cfms-sheet-title {
  padding: 0 20px 12px 20px;
  font-weight: 600;
  font-size: 16px;
  color: #1f2738;
  border-bottom: 1px solid #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cfms-sheet-title .close-btn {
  font-size: 20px;
  color: #8c909e;
  cursor: pointer;
}

.cfms-country-item {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f5f7fa;
  font-size: 15px;
  color: #1f2738;
  cursor: pointer;
}

.cfms-country-item:active {
  background: #f4f6fa;
}

.cfms-country-item.active {
  color: #111827;
  font-weight: 600;
}

/* Footer override: NEVER show on login or register */
body.cfms-auth-page #footer,
#app:has(.cfms-login-wrapper) #footer,
.cfms-login-wrapper~#footer,
#footer.cfms-hidden {
  display: none !important;
}
/* CFMS Bottom Tabbar Navigation Styles */
#app #footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  background: #ffffff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1000;
  margin: 0 auto;
  max-width: 100%;
}

#app #footer .footer_item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-decoration: none;
  color: #999999;
  font-size: 11px;
}

#app #footer .footer_item .footer_icon {
  width: 24px;
  height: 24px;
  display: block;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  margin-bottom: 2px;
}

#app #footer .footer_item .footer_icon.footer_icon_home {
  background-image: url("../img/cfms/tab/home.png");
}

#app #footer .footer_item.footer_item_active .footer_icon.footer_icon_home {
  background-image: url("../img/cfms/tab/home_a.png");
}

#app #footer .footer_item .footer_icon.footer_icon_invest {
  background-image: url("../img/cfms/tab/task.png");
}

#app #footer .footer_item.footer_item_active .footer_icon.footer_icon_invest {
  background-image: url("../img/cfms/tab/task_a.png");
}

#app #footer .footer_item .footer_icon.footer_icon_serve {
  background-image: url("../img/cfms/tab/msg.png");
}

#app #footer .footer_item.footer_item_active .footer_icon.footer_icon_serve {
  background-image: url("../img/cfms/tab/msg_a.png");
}

#app #footer .footer_item .footer_icon.footer_icon_team {
  background-image: url("../img/cfms/tab/level.png");
}

#app #footer .footer_item.footer_item_active .footer_icon.footer_icon_team {
  background-image: url("../img/cfms/tab/level_a.png");
}

#app #footer .footer_item .footer_icon.footer_icon_user {
  background-image: url("../img/cfms/tab/mine.png");
}

#app #footer .footer_item.footer_item_active .footer_icon.footer_icon_user {
  background-image: url("../img/cfms/tab/mine_a.png");
}

#app #footer .footer_item .footer_info {
  margin: 0;
  font-size: 11px;
  line-height: 1.2;
}

#app #footer .footer_item.footer_item_active {
  color: #111827 !important;
  font-weight: 600;
}

.footer_icon_wrap {
  position: relative;
  display: inline-block;
}

.footer_badge {
  position: absolute;
  top: -2px;
  right: -6px;
  background: #ff3b30;
  color: #ffffff;
  border-radius: 10px;
  min-width: 14px;
  height: 14px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  font-weight: bold;
}

/* CFMS 100% Home Page CSS */
.cfms-home-page {
  background-color: #111827;
  min-height: 100vh;
  padding-bottom: 70px;
  box-sizing: border-box;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}

/* Marquee Notice Bar */
.cfms-notice-bar {
  display: flex;
  align-items: center;
  margin: 10px 14px 0 14px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  color: #ffffff;
  overflow: hidden;
}

.cfms-notice-icon {
  margin-right: 8px;
  display: flex;
  align-items: center;
  font-size: 15px;
}

.cfms-notice-content {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  opacity: 0.95;
}

/* Greeting Header */
.cfms-greeting-box {
  padding: 24px 20px 20px 20px;
  text-align: left;
}

.cfms-greeting-title {
  font-size: 26px;
  font-style: italic;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
  word-break: normal;
  overflow-wrap: break-word;
  font-family: "Georgia", "Times New Roman", serif, -apple-system;
}

.cfms-greeting-sub {
  font-size: 13px;
  font-style: italic;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.4;
  margin-top: 10px;
  font-family: "Georgia", "Times New Roman", serif, -apple-system;
}

/* Yellow Promotion Card */
.cfms-salary-card {
  position: relative;
  background: #fdef42;
  border-radius: 18px;
  margin: 0 14px 18px 14px;
  padding: 18px 16px 16px 16px;
  box-sizing: border-box;
  color: #1d2835;
}

.cfms-salary-top {
  display: flex;
  flex-direction: column;
}

.cfms-salary-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a2430;
  line-height: 1.2;
}

.cfms-salary-sub {
  font-size: 12px;
  color: #2b3a4a;
  margin-top: 12px;
  font-weight: 500;
}

.cfms-salary-wallet-img {
  position: absolute;
  top: -16px;
  right: 12px;
  width: 68px;
  height: 68px;
  pointer-events: none;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

.cfms-salary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111827;
  box-shadow: 0 4px 6px rgba(213, 202, 63, 0.6);
  border-radius: 24px;
  padding: 6px 16px;
  margin-top: 14px;
  cursor: pointer;
  color: #ffffff;
  font-size: 15px;
  font-style: italic;
  font-weight: 600;
  text-decoration: none;
  border: none;
  width: 100%;
}

.cfms-salary-btn-img {
  width: 38px;
  height: 38px;
  margin-right: 12px;
  transform: translateY(-2px);
}

.cfms-salary-btn-text {
  font-family: "Georgia", serif, -apple-system;
  font-size: 16px;
  letter-spacing: 0.5px;
}

/* White Curved Center Section */
.cfms-center-card {
  background-color: #ffffff;
  border-radius: 20px 20px 0 0;
  padding: 22px 14px 20px 14px;
  color: #1a2430;
  min-height: 480px;
}

/* 6 Grid Menu Items */
.cfms-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 8px;
  margin-bottom: 22px;
}

.cfms-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
}

.cfms-menu-icon-wrap {
  width: 52px;
  height: 52px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cfms-menu-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cfms-menu-text {
  font-size: 10.5px;
  color: #1a2430;
  line-height: 1.25;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Activity Center Banner */
.cfms-activity-box {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(10, 40, 100, 0.12);
}

.cfms-activity-img {
  width: 100%;
  display: block;
  border-radius: 12px;
}

.cfms-activity-content {
  position: absolute;
  top: 14px;
  left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cfms-activity-title {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  font-family: "Georgia", serif, -apple-system;
  text-shadow: 0 2px 4px rgba(2, 12, 43, 0.6);
}

.cfms-activity-sub {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 4px;
  text-shadow: 0 1px 3px rgba(2, 12, 43, 0.6);
}

/* Promotional Video Section */
.cfms-video-box {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background-color: #000000;
  margin-bottom: 24px;
  aspect-ratio: 16 / 9;
}

.cfms-video-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cfms-video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: transform 0.2s;
}

.cfms-video-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.08);
}

.cfms-video-play-btn svg {
  width: 28px;
  height: 28px;
  fill: #ffffff;
  margin-left: 3px;
}

.cfms-html-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background-color: #000;
}

.cfms-video-poster-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* Fix Marquee height & icon sizing */
.cfms-notice-bar {
  display: flex !important;
  align-items: center !important;
  height: 34px !important;
  padding: 0 12px !important;
  line-height: 34px !important;
}

.cfms-notice-icon {
  font-size: 16px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  margin-right: 8px !important;
}

.cfms-notice-content {
  line-height: 34px !important;
}

/* Ensure Post management item has exact same flex/sizing as other items */
.cfms-menu-item {
  width: 100% !important;
  box-sizing: border-box !important;
}

.cfms-menu-item-post .cfms-menu-icon {
  width: 52px !important;
  height: 52px !important;
  display: block !important;
}

/* Tab Bar Ensure 5 items equal width and correct icons */
#app #footer {
  display: flex !important;
  justify-content: space-around !important;
  align-items: center !important;
  width: 100% !important;
  height: 58px !important;
}

#app #footer .footer_item {
  flex: 1 1 0px !important;
  min-width: 0 !important;
  max-width: 20% !important;
}

#app #footer .footer_item .footer_icon.footer_icon_user {
  background-image: url("../img/cfms/tab/mine.png") !important;
}

#app #footer .footer_item.footer_item_active .footer_icon.footer_icon_user {
  background-image: url("../img/cfms/tab/mine_a.png") !important;
}

/* Force visible display of menu icons */
.cfms-menu-item .cfms-menu-icon {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 52px !important;
  height: 52px !important;
  object-fit: contain !important;
}

/* Fix width calculation in grid items */
.cfms-center-card {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

.cfms-menu-grid {
  width: 100% !important;
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px 4px !important;
  margin-bottom: 22px !important;
}

.cfms-menu-item {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.cfms-menu-icon-wrap {
  width: 50px !important;
  height: 50px !important;
  margin: 0 auto 6px auto !important;
}

.cfms-menu-text {
  font-size: 10.5px !important;
  line-height: 1.2 !important;
  height: 28px !important;
  text-align: center !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

/* Fix Chrome Headless viewport width on #app */
html,
body,
#app {
  max-width: 500px !important;
  margin: 0 auto !important;
}

.cfms-home-page {
  max-width: 500px !important;
  margin: 0 auto !important;
}

#app #footer {
  max-width: 500px !important;
  left: 0 !important;
  right: 0 !important;
  margin: 0 auto !important;
}

/* Clean footer item typography and icon sizing */
#app #footer .footer_item .footer_icon {
  width: 22px !important;
  height: 22px !important;
  background-size: contain !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  margin: 0 auto 3px auto !important;
}

#app #footer .footer_item .footer_info {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 11px !important;
  line-height: 1.1 !important;
  text-align: center !important;
}

/* CFMS Notice icon image styles */
.cfms-notice-icon-img {
  width: 18px !important;
  height: 16px !important;
  display: block !important;
  object-fit: contain !important;
  filter: brightness(0) invert(1) !important;
}

/* Additional Country Sheet Enhancements */
.cfms-country-list {
  max-height: 50vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.country-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.country-flag {
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.country-name {
  font-size: 14.5px;
  color: #1f2738;
}

.country-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.country-code {
  font-size: 14px;
  font-weight: 600;
  color: #555;
}

.country-check {
  color: #111827;
  font-weight: bold;
}
