:root{
  --green:#03994C;
  --green-dark:#02753b;
  --green-soft:#EAF7F0;
  --text:#20262b;
  --muted:#7a8792;
  --line:#dfe6e2;
  --card:#ffffff;
  --bg:#f7faf8;
  --shadow:0 22px 60px rgba(24,55,38,.10);
  --radius:24px;
  --cne-font:"Anuphan",sans-serif;
}


/* =========================================================
   RESET
   ========================================================= */

*{
  box-sizing:border-box;
}

html,
body{
  margin:0;
  min-height:100%;
  font-family:var(--cne-font);
  color:var(--text);
  background:var(--bg);
}

body{
  min-height:100vh;
  overflow-x:hidden;
}

button,
input,
select,
textarea{
  font-family:var(--cne-font);
}


/* =========================================================
   LOGIN PAGE
   ========================================================= */

.page{
  min-height:100vh;
  position:relative;

  display:grid;
  place-items:center;

  padding:48px 20px;

  background:
    radial-gradient(
      circle at 8% 18%,
      rgba(3,153,76,.09) 0 18%,
      transparent 18.2%
    ),
    radial-gradient(
      circle at 94% 92%,
      rgba(3,153,76,.07) 0 20%,
      transparent 20.2%
    ),
    linear-gradient(
      180deg,
      #fbfdfc 0%,
      #f5f9f7 100%
    );
}


/* =========================================================
   BRAND / CORNER NOTE
   ========================================================= */

.brand-note{
  position:absolute;
  left:4vw;
  bottom:4.5vh;

  font-size:14px;
  letter-spacing:.18em;
  text-transform:uppercase;

  color:#6f7c74;
}

.brand-note strong{
  display:block;

  color:var(--text);
  font-size:13px;

  margin-bottom:8px;
}

.corner-note{
  position:absolute;

  right:5vw;
  top:4.5vh;

  font-size:14px;
  line-height:1.6;
  letter-spacing:.18em;

  color:#94a19a;
}


/* =========================================================
   LOGIN CARD
   ========================================================= */

.card{
  width:min(100%,520px);

  background:rgba(255,255,255,.94);

  border:1px solid rgba(3,153,76,.08);
  border-radius:var(--radius);

  box-shadow:var(--shadow);

  padding:44px;

  backdrop-filter:blur(12px);
}


/* =========================================================
   LOGO
   ========================================================= */

.logo{
  width:54px;
  height:54px;

  margin:0 auto 20px;

  position:relative;
}

.logo img{
  display:block;

  width:54px;
  height:54px;

  object-fit:contain;
}


/* =========================================================
   TYPOGRAPHY
   ========================================================= */

h1{
  font-size:34px;
  line-height:1.1;
  text-align:center;

  margin:0 0 8px;

  color:var(--text);
}

.sub{
  margin:0 0 30px;

  text-align:center;

  color:var(--muted);
  font-size:15px;
}


/* =========================================================
   FORM FIELD
   ========================================================= */

.field{
  position:relative;

  width:100%;

  margin-bottom:16px;
}


/* =========================================================
   INPUT
   ========================================================= */

.field input{
  display:block;

  width:100%;
  height:56px;

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

  padding:0 48px;

  font-family:var(--cne-font);
  font-size:15px;

  outline:none;

  background:#fff;

  color:var(--text);

  transition:
    border .2s ease,
    box-shadow .2s ease,
    background .2s ease;
}

.field input::placeholder{
  color:#9aa59f;
}

.field input:focus{
  border-color:var(--green);

  box-shadow:
    0 0 0 4px rgba(3,153,76,.10);
}


/* =========================================================
   INPUT ICON
   ========================================================= */

.icon{
  position:absolute;

  left:16px;
  top:50%;

  transform:translateY(-50%);

  width:20px;
  height:20px;

  color:#839188;

  pointer-events:none;

  z-index:2;
}


/* =========================================================
   PASSWORD TOGGLE
   ========================================================= */

.toggle{
  position:absolute;

  right:15px;
  top:50%;

  transform:translateY(-50%);

  border:0;
  background:none;

  cursor:pointer;

  color:#839188;

  font-size:13px;

  padding:4px 0;

  z-index:3;
}

.toggle:hover{
  color:var(--green);
}


/* =========================================================
   SELECT2
   ========================================================= */

/* Container */

.field .select2-container{
  display:block;

  width:100% !important;

  box-sizing:border-box;
}


/* Select2 selection box */

.field
.select2-container
.select2-selection--single{

  width:100%;
  height:56px;

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

  background:#fff;

  display:flex;
  align-items:center;

  position:relative;

  padding:0;

  box-sizing:border-box;

  transition:
    border .2s ease,
    box-shadow .2s ease,
    background .2s ease;
}


/* Select2 rendered value */

.field
.select2-container
.select2-selection--single
.select2-selection__rendered{

  display:flex;
  align-items:center;

  width:100%;
  height:56px;

  line-height:normal;

  padding:0 15px;

  font-family:var(--cne-font);
  font-size:15px;

  color:var(--text);

  box-sizing:border-box;

  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}


/* Select2 arrow */

.field
.select2-container
.select2-selection--single
.select2-selection__arrow{

  position:absolute;

  top:50%;
  right:14px;

  width:20px;
  height:20px;

  transform:translateY(-50%);
}


/* Remove default Select2 arrow */

.field
.select2-container
.select2-selection--single
.select2-selection__arrow b{

  position:absolute;

  top:50%;
  left:50%;

  width:0;
  height:0;

  margin:0;

  transform:
    translate(-50%,-30%);

  border-style:solid;

  border-width:5px 4px 0 4px;

  border-color:
    #8b9490
    transparent
    transparent
    transparent;
}


/* =========================================================
   SELECT2 FOCUS / OPEN
   ========================================================= */

.field
.select2-container--focus
.select2-selection--single,

.field
.select2-container--open
.select2-selection--single{

  border-color:var(--green);

  box-shadow:
    0 0 0 4px rgba(3,153,76,.10);
}


/* =========================================================
   SELECT2 ICON
   ========================================================= */

.select-option{
  display:flex;

  align-items:center;

  gap:10px;

  width:100%;
}

.select-option i{
  width:20px;
  min-width:20px;

  text-align:center;

  font-size:17px;

  color:#839188;
}


/* =========================================================
   SELECT2 DROPDOWN
   ========================================================= */

.select2-container .select2-dropdown{

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

  border-radius:14px;

  overflow:hidden;

  background:#fff;

  box-shadow:
    0 12px 30px rgba(24,55,38,.10);

  font-family:var(--cne-font);
  font-size:15px;
}


/* Dropdown option */

.select2-container
.select2-results__option{

  padding:12px 16px;

  color:var(--text);
}


/* Highlight */

.select2-container
.select2-results__option--highlighted{

  background:var(--green-soft);

  color:var(--text);
}


/* Selected */

.select2-container
.select2-results__option--selected{

  background:#f5f8f6;

  color:var(--green-dark);
}


/* =========================================================
   NORMAL SELECT
   ========================================================= */

.field select{
  outline:none;
}

.field select:focus{
  border-color:var(--green);

  box-shadow:
    0 0 0 4px rgba(3,153,76,.10);
}


/* =========================================================
   VALIDATION ERROR
   ========================================================= */

.field input.error{

  border-color:#dc3545;

  box-shadow:
    0 0 0 4px rgba(220,53,69,.10);
}

.field input.error:focus{

  border-color:#dc3545;

  box-shadow:
    0 0 0 4px rgba(220,53,69,.10);
}


/* Select2 error */

.field.has-error
.select2-container
.select2-selection--single{

  border-color:#dc3545;

  box-shadow:
    0 0 0 4px rgba(220,53,69,.10);
}


/* Error message */

.field label.error{

  display:block;

  margin-top:6px;
  margin-left:4px;

  color:#dc3545;

  font-family:var(--cne-font);
  font-size:13px;
  line-height:1.4;
}


/* =========================================================
   BUTTON
   ========================================================= */

.btn{

  width:100%;
  height:58px;

  border:0;
  border-radius:14px;

  cursor:pointer;

  background:var(--green);
  color:#fff;

  font-family:var(--cne-font);
  font-size:16px;
  font-weight:700;

  box-shadow:
    0 10px 24px rgba(3,153,76,.20);

  transition:
    .2s transform,
    .2s background,
    .2s opacity,
    .2s box-shadow;
}

.btn:hover{
  background:var(--green-dark);

  transform:translateY(-1px);
}

.btn:active{
  transform:translateY(0);
}


/* Disabled */

.btn:disabled{

  cursor:not-allowed;

  opacity:.55;

  transform:none;

  box-shadow:none;
}


/* =========================================================
   ROW
   ========================================================= */

.row{

  display:flex;

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

  gap:16px;

  margin:8px 0 24px;

  font-size:14px;
}

.remember{

  display:flex;

  align-items:center;

  gap:9px;

  color:#4b5750;
}

.remember input{

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


/* =========================================================
   LINK
   ========================================================= */

a{
  color:var(--green-dark);

  text-decoration:none;
}

a:hover{
  text-decoration:underline;
}


/* =========================================================
   FOOTER
   ========================================================= */

.footer{

  margin-top:22px;

  text-align:center;

  color:#9aa59f;

  font-size:12px;
}


/* =========================================================
   RECAPTCHA
   ========================================================= */

.recaptcha-wrapper{

  display:flex;

  justify-content:center;

  align-items:center;

  width:100%;

  margin:15px 0 20px;
}


/* =========================================================
   PRELOADER
   ========================================================= */

#preloader{

  position:fixed;

  inset:0;

  background:#fff;

  display:flex;

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

  z-index:99999;

  transition:
    opacity .4s ease,
    visibility .4s ease;
}

#preloader.hide{

  opacity:0;

  visibility:hidden;
}


/* =========================================================
   CNE PRELOADER
   ========================================================= */

#preloader.preloader{

  position:fixed;

  inset:0;

  z-index:999999;

  display:flex;

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

  width:100%;
  height:100%;

  background:rgba(255,255,255,.98);

  opacity:1;

  visibility:visible;

  pointer-events:all;

  transition:
    opacity .35s ease,
    visibility .35s ease;
}


#preloader.preloader.hide{

  opacity:0;

  visibility:hidden;

  pointer-events:none;
}


/* =========================================================
   PRELOADER INNER
   ========================================================= */

.preloader-inner{

  text-align:center;

  animation:
    preloaderFadeIn .45s ease both;
}


/* =========================================================
   PRELOADER LOGO
   ========================================================= */

.preloader-logo{

  margin:0 auto 20px;

  display:flex;

  align-items:center;
  justify-content:center;
}

.preloader-logo img{

  display:block;

  object-fit:contain;

  animation:
    preloaderLogoPulse 1.6s ease-in-out infinite;
}


/* =========================================================
   PRELOADER SPINNER
   ========================================================= */

.preloader-spinner{

  width:34px;
  height:34px;

  margin:0 auto 14px;

  border:3px solid #e6eee9;

  border-top-color:#03994C;
  border-right-color:#03994C;

  border-radius:50%;

  animation:
    preloaderSpin .8s linear infinite;
}


/* =========================================================
   PRELOADER TEXT
   ========================================================= */

.preloader-text{

  color:#66736b;

  font-family:var(--cne-font);

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

  letter-spacing:.04em;
}


/* =========================================================
   PRELOADER ANIMATION
   ========================================================= */

@keyframes preloaderSpin{

  to{
    transform:rotate(360deg);
  }

}

@keyframes preloaderLogoPulse{

  0%,
  100%{
    transform:scale(1);
    opacity:1;
  }

  50%{
    transform:scale(.94);
    opacity:.78;
  }

}

@keyframes preloaderFadeIn{

  from{
    opacity:0;
    transform:translateY(5px);
  }

  to{
    opacity:1;
    transform:translateY(0);
  }

}


/* =========================================================
   LOGIN LOADING
   ========================================================= */

body.login-loading{
  overflow:hidden;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width:680px){

  .page{

    padding:24px 14px;

    align-items:center;
  }

  .card{

    padding:30px 22px;

    border-radius:20px;
  }

  h1{
    font-size:29px;
  }

  .brand-note,
  .corner-note{
    display:none;
  }

  .row{
    font-size:13px;
  }

}


@media (max-width:420px){

  .card{
    padding:26px 18px;
  }

  .row{
    align-items:flex-start;
  }

}


/* =========================================================
   VERY SMALL SCREEN
   ========================================================= */

@media (max-width:360px){

  .card{
    padding:24px 16px;
  }

  h1{
    font-size:27px;
  }

  .sub{
    font-size:14px;
    margin-bottom:24px;
  }

  .field input,
  .field .select2-container .select2-selection--single{
    height:54px;
  }

  .field
  .select2-container
  .select2-selection--single
  .select2-selection__rendered{

    height:54px;

    font-size:14px;
  }

}
