:root {
    --primary: #206e1b;
    --text: #111827;
    --muted: #6b7280;
    --border: #d1d5db;
    --line: #e5e7eb;
    --ring: #bbe7b8;
    --bg-soft: #f9fafb;
    --danger: #ef4444;
    --bg: #ffffff;
    --card: #ffffff;
    --pill: #f4f6f8;
    --shadow: 0 8px 24px rgba(16, 24, 40, 0.08),
        0 2px 8px rgba(16, 24, 40, 0.06);
    --radius: 14px;
    --font-be-vietnam-pro: "Be Vietnam Pro", ui-sans-serif, system-ui,
        -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans",
        "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
        "Noto Color Emoji";
}
html,
body {
    height: 100%;
    overflow: hidden;
    font-family: var(--font-be-vietnam-pro);
}

body {
    background: #fff;
    color: var(--text);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial,
        sans-serif;
    line-height: 1.45;
}
.brand {
    color: var(--primary);
}
.heading {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    margin: 0 0 20px;
}

.reg-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 24px;
    min-height: 100vh;
}
@media (min-width: 768px) {
    .reg-grid {
        flex-direction: row;
        gap: 32px;
        padding: 40px;
    }
}

.reg-banner {
    display: flex;
    justify-content: center;
    width: 100%;
}
.banner-card {
    position: relative;
    overflow: hidden;
    height: calc(100vh - 80px);
}
@media (max-width: 768px) {
    .banner-card {
        height: 429px;
        width: 100%;
    }
}
.banner-card > img {
    width: 100%;
    height: 100%;
    /* object-fit: cover; */
}
.banner-gradient {
    position: absolute;
    inset: 0;
    top: 66%;
    background: linear-gradient(
        to top,
        rgba(255, 255, 255, 1),
        rgba(255, 255, 255, 0)
    );
}
.banner-text {
    position: absolute;
    left: 0;
    bottom: 40px;
    font-size: 24px;
    line-height: 1.3;
    font-weight: 600;
    color: var(--primary);
    padding: 0 16px;
}

.reg-form {
    width: 100%;
    display: flex;
    flex-direction: column;
}
.form-scroll {
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    padding-right: 6px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.form-scroll::-webkit-scrollbar {
    width: 8px;
}
.form-scroll::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 8px;
}

.grid-3 {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.grid-2 {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
@media (min-width: 768px) {
    .grid-3 {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
    .grid-2 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}
.col {
    min-width: 0;
}
.span-2 {
    grid-column: span 2;
}
.gap-8 {
    gap: 16px;
}
.grid-3 .col:first-child .preview-card {
    width: 249px;
    height: 305px;
}
/* Ensure avatar preview image/video fills the box */
.grid-3 .col:first-child .preview-card .preview-img,
.grid-3 .col:first-child .preview-card > img,
.grid-3 .col:first-child .preview-card .preview-video{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px){
    .grid-3 .col:first-child .preview-card{
        width: 100%;
        height: 467px;
    }
}

/* Avatar dropzone fixed size (desktop column width is fixed below) */
.avatar-dropzone {
    width: 249px;
    height: 332px;
}

/* Desktop: fix first column width to align with avatar dropzone */
@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: 249px 1fr 1fr;
    }
}
.stack-16 {
    display: grid;
    gap: 16px;
}

.field {
    border: none;
    padding: 0;
    background: transparent;
    position: relative;
}
.label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #065f46;
    margin: 0 0 6px;
}
.req {
    color: var(--danger);
}
.err {
    color: var(--danger);
    font-size: 12px;
    margin-top: 6px;
}
.ok {
    color: #065f46;
    font-weight: 600;
    margin-top: 12px;
}

/* Soft input wrap (outer border only) */
.control-wrap {
    display: flex;
    align-items: center;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    transition: box-shadow 0.15s, border-color 0.15s, background 0.15s;
}
.control-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--ring);
    background: #fff;
}

/* Remove all inner borders/appearance from inputs */
.control,
.control:focus,
input.control,
textarea.control {
    width: 100%;
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
    color: var(--text);
    font-size: 15px;
    line-height: 22px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
}
.control::placeholder {
    color: #9ca3af;
}

/* Inputs height 50px (textarea excluded) */
input.control:not([type="checkbox"]):not([type="radio"]) {
    height: 50px;
    padding: 0 20px;
}
.textarea {
    min-height: 96px;
    resize: vertical;
}

/* number spinners off */
input[type="number"].control {
    -moz-appearance: textfield;
    height: 50px;
    padding-left: 20px;
}
input[type="number"].control::-webkit-outer-spin-button,
input[type="number"].control::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* autofill chrome */
input.control:-webkit-autofill,
textarea.control:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    -webkit-text-fill-color: inherit !important;
    transition: background-color 99999s ease-in-out 0s;
}

.card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 20px;
    background: #fff;
    position: relative;
}
.card-title {
    font-weight: 700;
    color: var(--primary);
    font-size: 14px;
}

/* Highlight line at left when any input inside is active (focus within) */
.card::before { content: ""; display: none; }
.card:focus-within::before { display: none; }
.card.card--active::before { display: none; }

/* ----- Clinic/Hospital card tweaks ----- */
.card--work .label {
    display: none; /* hide inline labels inside this card to match Figma */
}
@media (min-width: 768px) {
    .card--work .grid-2 {
        grid-template-columns: 0.3fr 0.7fr; /* Date 30% - Role 70% */
        gap: 12px;
    }
}
.card--work .wp-item {
    position: relative;
    padding-left: 12px; /* room for the left indicator */
}
.card--work .wp-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 4px;
    border-radius: 4px;
    background: #16a34a; /* always active bar for each item */
}
.card--work .wp-item.is-active::before {
    background: #16a34a;
}
/* spacing between wp-items */
.card--work .stack-16 {
    gap: 16px;
}

.dropzone {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 1px dashed #cfcfcf;
    border-radius: 8px;
    background: #fafafa;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    text-align: center;
}
.dropzone:hover {
    background: #f5f5f5;
    border-color: #a3a3a3;
}
.avatar-dropzone {
    height: 100%;
}
.h-180 {
    height: 180px;
}
.dz-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
}
.dz-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
}
.dz-text .hint {
    color: var(--muted);
    font-weight: 400;
    font-size: 12px;
}
.dz-text .accent {
    color: var(--primary);
    font-weight: 600;
}
.dz-text .block {
    display: block;
    margin-top: 6px;
}
.dz-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.btn-chip {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 6px 10px;
    cursor: pointer;
    font-weight: 600;
}
.btn-chip--add {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    border: none;
    color: #cccccc;
}
.btn-chip--danger {
    border-color: #fecaca;
    color: #b91c1c;
}

.terms {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 16px 6px;
    cursor: pointer;
}
.checkbox {
    width: 16px;
    height: 16px;
}
.terms-text {
    font-size: 14px;
    font-weight: 500;
}
.link {
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
}

.btn-primary {
    display: inline-block;
    width: 100%;
    border: none;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    padding: 14px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.2s;
}
.btn-primary:hover {
    opacity: 0.9;
}
/* disabled submit */
.btn-primary:disabled,
.btn-primary[disabled]{
    opacity: 0.5;
    cursor: not-allowed;
}

/* Bootstrap toast: no overrides to avoid conflicts */
/* ===== Custom select ===== */
.custom-select {
    position: relative;
    overflow: visible; /* ensure box-shadow is not clipped */
}
.select-ui { overflow: visible; }
.select-box {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 20px;
    height: 50px;
    cursor: pointer;
    transition: box-shadow 0.15s, border-color 0.15s, background 0.15s;
}
.select-box[aria-expanded="true"] {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--ring);
    background: #fff;
}
.selected {
    font-size: 15px;
    color: #9ca3af;
}
.select-box.active .selected {
    color: var(--text);
}
.chev {
    margin-left: 8px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.chev svg { display: block; width: 24px; height: 24px; }
.custom-select.open .chev,
.select-box[aria-expanded="true"] .chev {
    transform: rotate(180deg);
    transition: transform 0.15s ease;
}
.options {
    list-style: none;
    margin: 6px 0 0;
    padding: 6px 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    position: absolute;
    left: 0;
    top: calc(100% + 4px);
    width: 100%;
    max-height: 260px;
    overflow: auto;
    display: none;
    z-index: 50;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}
.custom-select.open .options {
    display: block;
}
.options li {
    padding: 10px 14px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.12s;
}
.options li:hover {
    background: #f3f4f6;
}
.options li.active {
    background: #e8f6ea;
    color: var(--primary);
    font-weight: 600;
}

/* ===== Month Range Picker ===== */
.dp-month {
    position: absolute;
    z-index: 60;
    width: 340px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    padding: 8px;
}
.dp-month__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    font-weight: 700;
}
.dp-month__nav {
    display: flex;
    gap: 8px;
}
.dp-month__btn {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
}
.dp-month__title {
    font-weight: 700;
}
.dp-month__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 8px;
}
.dp-month__cell {
    text-align: center;
    padding: 10px 0;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid transparent;
    font-weight: 600;
}
.dp-month__cell.is-selected {
    background: var(--primary);
    color: #fff;
}
.dp-month__cell.is-range-start,
.dp-month__cell.is-range-end {
    background: var(--primary);
    color: #fff;
}
.dp-month__cell.is-inrange {
    background: #e8f6ea;
}
.dp-month__cell.is-disabled{
    opacity: 0.4;
    cursor: not-allowed;
    border-color: transparent;
}
.dp-month__foot {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 8px;
}
.dp-month__present {
    background: var(--primary);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
    cursor: pointer;
}

.preview-card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}
.preview-img {
    max-width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-radius: 10px;
}
.preview-video {
    width: 100%;
    max-height: 320px;
    border-radius: 10px;
    outline: none;
}
.preview-actions {
    position: absolute;
    right: 10px;
    top: 10px;
    display: flex;
    gap: 8px;
}

/* ========== Certificate grid & preview ========== */
.cert-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}
@media (min-width: 768px) {
    .cert-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
}
.cert-item {
    min-height: 160px;
}

/* Khung preview dùng lại phong cách card mềm */
.preview-card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}
.preview-img {
    max-width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: 10px;
}
.preview-video {
    width: 100%;
    max-height: 320px;
    border-radius: 10px;
    outline: none;
}
.preview-actions {
    position: absolute;
    right: 10px;
    top: 10px;
    display: flex;
    gap: 8px;
}

/* PDF hiển thị dạng pill */
.pdf-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px;
    border: 1px dashed var(--line);
    border-radius: 10px;
    background: #fafafa;
    width: 100%;
}
.pdf-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 24px;
    border-radius: 6px;
    background: #ef4444;
    color: #fff;
    font-weight: 800;
    font-size: 12px;
}
.pdf-name {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    text-align: center;
}
.pdf-size {
    font-size: 12px;
    color: #6b7280;
}

.btn-loading .spin {
    animation: rotate 0.8s linear infinite;
    transform-origin: 50% 50%;
}
@keyframes rotate {
    to {
        transform: rotate(360deg);
    }
}

* {
    box-sizing: border-box;
}
html,
body {
    height: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI,
        Roboto, Helvetica, Arial;
}
.wrapper {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
}
.container {
    width: 100%;
    max-width: 960px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
}

/* HERO */
.hero-icon {
    width: 400px;
    height: 356.76px;
    margin-top: 16px;
    opacity: 0.95;
}
@media (max-width: 768px){
    .hero-icon{
        width: 280px;
        height: 250px;
    }
}
.title {
    margin: 0;
    font-weight: 500;
    font-size: 40px;
    line-height: 1.15;
    letter-spacing: 0.2px;
}
@media (max-width: 768px){
    .title{
        font-size: 24px;
        line-height: 1;
    }
}
.title .primary {
    color: var(--primary);
    display: block;
}
.subtitle {
    margin: 6px 0 0;
    color: #000000;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 400;
}

@media (max-width: 768px){
    .heading-success{
        width: 302px;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
    .heading-success .subtitle{
        color: #000000;
        font-size: 16px;
        line-height: 1.6;
    }
}
/* CARDS ROW */
.cards-success{
  display:grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.15fr);
  gap:24px;
  justify-content:center;
}
.card-success{
  display:grid;
  grid-template-columns: 96px 1fr;
  align-items:center;
  border-radius:14px;
  box-shadow: var(--shadow);
  background: var(--card);
  min-height:120px;
}
.pill{
  width:96px;
  height:96px;
  display:grid;
  place-items:center;              /* căn giữa icon */
}
.pill img{
  display:block;                   /* quan trọng: loại bỏ khoảng trắng baseline */
  width:auto;
  height:72px;                     /* hoặc 64/68 tùy ý */
  object-fit:contain;
}
.card-success .card-text p{
  margin:0;
  font-size:20px;
  line-height:1.5;
  text-align:left;  
}
@media (max-width: 768px){
  .card-success .card-text p{
    font-size:16px;
  }
}
.card-success .emph {
    color: var(--primary);
    font-weight: 700;
}

/* FOOT NOTE */
.foot {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    color: #4b5563;
    font-size: 16px;
    font-weight: 400;
}
.foot a {
    color: var(--primary);
    text-decoration: underline;
}

/* small screens */
@media (max-width: 768px){
  .cards-success{ grid-template-columns: 1fr; }
  .card-success{ grid-template-columns: 72px 1fr; min-height: unset; padding:18px; }
  .pill{ width:72px; height:72px; }
  .pill img{ height:56px; }
  /* Avatar dropzone height on mobile */
  .avatar-dropzone{
      width: 100%;
      height: 467px;
  }
  /* Foot text align left on mobile */
  .foot{
    justify-content: flex-start;
    text-align: left;
  }
  .foot span{
    text-align: left;
    white-space: normal; /* allow wrapping on mobile */
  }
  .foot-text--desktop{ display: none; }
  .foot-text--mobile{ display: inline; }
}

/* Desktop variant visibility */
@media (min-width: 769px){
  .foot-text--desktop{ display: inline; }
  .foot-text--mobile{ display: none; }
}
/* ===== Mobile: use full-page scroll, disable inner scrolling in form ===== */
@media (max-width: 768px){
    html, body {
        overflow: auto;
    }
    .form-scroll{
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }
}

/* ===== Desktop: hide inner scrollbar visuals but keep scrolling ===== */
@media (min-width: 769px){
    .form-scroll{
        scrollbar-width: none; /* Firefox */
    }
    .form-scroll::-webkit-scrollbar{
        width: 0;
        height: 0;
        background: transparent;
    }
    .form-scroll::-webkit-scrollbar-thumb{
        background: transparent;
    }
}

