:root {
  --brand: #1a3c6e;
  --brand-light: #e8eef7;
  --accent: #e84040;
  --accent-light: #fff0f0;
  --surface: #f5f6f8;
  --border: #e2e4e9;
  --text: #1a1d23;
  --muted: #6b7280;
  --white: #ffffff;
  --gold: #f8c842;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

body { font-family: 'DM Sans', sans-serif; color: var(--text); background: #fff; }
h1, h2, h3, h4 { font-family: 'Sora', sans-serif; }

/* ── Breadcrumb ── */
.ms-breadcrumb {
  background: var(--brand); padding: 8px 20px;
  position: sticky; top: 64px; z-index: 20;
}
.ms-breadcrumb__inner {
  max-width: 1000px; margin: 0 auto;
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: #9db8d8;
}
.ms-breadcrumb a { color: #c8d8f0; text-decoration: none; }
.ms-breadcrumb a:hover { color: #fff; }

/* ── Hero ── */
.ms-hero-register {
  background: var(--brand); padding: 32px 0 36px;
  text-align: center; position: relative; overflow: hidden;
}
.ms-hero-register__content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; padding: 0 20px; }
.ms-hero-register__eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(248,200,66,0.15); color: var(--gold);
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 100px; margin-bottom: 14px;
  border: 1px solid rgba(248,200,66,0.25);
}
.ms-hero-register__title {
  font-size: clamp(22px, 4vw, 34px); font-weight: 700; color: #fff;
  line-height: 1.15; margin-bottom: 6px;
}
.ms-hero-register__sub { color: #9db8d8; font-size: 14px; }

.ms-hero-register__timer {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.1); backdrop-filter: blur(8px);
  color: #fff; font-size: 12px; font-weight: 500;
  padding: 6px 14px; border-radius: 100px; margin-top: 14px;
  border: 1px solid rgba(255,255,255,0.15);
}

/* ── Alert Cards ── */
.ms-alert { max-width: 800px; margin: 0 auto; padding: 0 20px; }
.ms-alert__card {
  border-radius: var(--radius-lg); padding: 20px 24px; text-align: center;
  margin-top: 16px; position: relative; z-index: 2; border: 1px solid;
}
.ms-alert__card--warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.ms-alert__card--error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.ms-alert__card--success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.ms-alert__card--info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

.ms-alert__icon {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px;
}
.ms-alert__card--warning .ms-alert__icon { background: #fef3c7; }
.ms-alert__card--error .ms-alert__icon { background: #fee2e2; }
.ms-alert__card--success .ms-alert__icon { background: #dcfce7; }
.ms-alert__card--info .ms-alert__icon { background: #dbeafe; }

.ms-alert__title { font-family: 'Sora', sans-serif; font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.ms-alert__text { font-size: 13px; line-height: 1.5; }

/* ── Registration Closed ── */
.ms-closed-details {
  max-width: 800px; margin: 20px auto 0; padding: 0 20px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.ms-closed-detail {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; text-align: center;
}
.ms-closed-detail__icon {
  width: 36px; height: 36px; border-radius: var(--radius-md);
  background: var(--brand-light); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px;
}
.ms-closed-detail h4 { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.ms-closed-detail p { font-size: 12px; color: var(--muted); line-height: 1.4; }

.ms-closed-cta {
  max-width: 800px; margin: 16px auto 24px; padding: 0 20px; text-align: center;
}

/* ── Layout ── */
.ms-layout { max-width: 800px; margin: 0 auto; padding: 28px 20px; }

/* ── Form Card ── */
.ms-form-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.ms-form-card__header {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  text-align: center; background: var(--surface);
}
.ms-form-card__body { padding: 20px 0; }

/* ── Progress Steps ── */
.ms-progress {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px; gap: 0;
}
.ms-progress__step {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--muted);
  transition: all 0.3s; flex-shrink: 0;
}
.ms-progress__step.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.ms-progress__step.completed { background: #166534; border-color: #166534; color: #fff; }
.ms-progress__line {
  width: 40px; height: 2px; background: var(--border); flex-shrink: 0;
}
.ms-progress__line.completed { background: #166534; }

/* ── Form Section ── */
.ms-form-section {
  background: var(--surface); border-radius:0;
  padding: 10px; margin-bottom: 16px;
}
.ms-form-section__title {
  font-size: 15px; font-weight: 600; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.ms-form-section__num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}

/* ── Form Elements ── */
.ms-form-group { margin-bottom: 14px; }
.ms-form-label {
  display: block; font-size: 13px; font-weight: 500; color: var(--text);
  margin-bottom: 5px;
}
.ms-form-label .required { color: var(--accent); }
.ms-form-input {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; color: var(--text);
  font-family: 'DM Sans', sans-serif; background: var(--white);
  transition: border-color 0.15s; outline: none; line-height: 1.5;
}
.ms-form-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26,60,110,0.1); }
.ms-form-input.error { border-color: var(--accent); }
.ms-form-error { font-size: 11px; color: var(--accent); margin-top: 4px; display: none; }
.ms-form-input.error + .ms-form-error { display: block; }

.ms-form-textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; color: var(--text);
  font-family: 'DM Sans', sans-serif; background: var(--white);
  resize: vertical; min-height: 120px; outline: none; line-height: 1.6;
  transition: border-color 0.15s;
}
.ms-form-textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26,60,110,0.1); }

.ms-form-select {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; color: var(--text);
  font-family: 'DM Sans', sans-serif; background: var(--white);
  appearance: none; outline: none; cursor: pointer; line-height: 1.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  transition: border-color 0.15s;
}
.ms-form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26,60,110,0.1); }

/* ── File Drop ── */
.ms-file-drop {
  border: 2px dashed var(--border); border-radius: var(--radius-md);
  padding: 24px 20px; text-align: center; cursor: pointer;
  transition: all 0.2s; background: var(--white);
}
.ms-file-drop:hover { border-color: var(--brand); background: var(--brand-light); }
.ms-file-drop.drag-over { border-color: var(--brand); background: var(--brand-light); }
.ms-file-drop__icon { margin-bottom: 10px; }
.ms-file-drop__text { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.ms-file-drop__hint { font-size: 11px; color: #9ca3af; }
.ms-file-drop input { display: none; }

.ms-preview-img {
  width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--brand); margin: 0 auto 6px; display: block;
}

/* ── Buttons ── */
.ms-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px; border-radius: 100px;
  font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 600;
  text-decoration: none; transition: all 0.2s; border: none; cursor: pointer;
  white-space: nowrap;
}
.ms-btn--brand { background: var(--brand); color: #fff; }
.ms-btn--brand:hover { background: #142f58; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(26,60,110,0.25); }
.ms-btn--brand:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }
.ms-btn--outline { 
  background: transparent; color: var(--brand); 
  border: 1.5px solid var(--brand); 
}
.ms-btn--outline:hover { background: var(--brand); color: #fff; }
.ms-btn--accent { background: var(--accent); color: #fff; }
.ms-btn--accent:hover { background: #c73030; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(232,64,64,0.25); }

/* Navigation buttons container */
.ms-form-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 18px; gap: 12px;
}
.ms-form-nav--right { justify-content: flex-end; }
.ms-form-nav .ms-btn { width: auto; min-width: 110px; }

.ms-loader {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3); border-radius: 50%;
  border-top-color: #fff; animation: ms-spin 0.6s linear infinite;
}
@keyframes ms-spin { to { transform: rotate(360deg); } }

/* ── Snackbar ── */
.ms-snackbar {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; padding: 12px 24px;
  border-radius: 100px; font-size: 13px; font-weight: 500; z-index: 1000;
  display: none; box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.ms-snackbar.show { display: block; animation: ms-slideUp 0.3s ease; }
@keyframes ms-slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Checkbox ── */
.ms-checkbox { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0; }
.ms-checkbox input[type="checkbox"] {
  width: 17px; height: 17px; margin-top: 2px; accent-color: var(--brand); cursor: pointer; flex-shrink: 0;
}
.ms-checkbox label { font-size: 13px; color: var(--muted); cursor: pointer; line-height: 1.5; }
.ms-checkbox label a { color: var(--brand); font-weight: 500; }
.ms-checkbox label a:hover { text-decoration: underline; }

/* ── Grids ── */
.ms-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ms-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* ── TinyMCE spacing ── */
.tox-tinymce { border-radius: var(--radius-sm) !important; margin-top: 2px; }

@media (max-width: 640px) {
  .ms-hero-register { padding: 24px 0 28px; }
  .ms-grid-2, .ms-grid-3 { grid-template-columns: 1fr; }
  .ms-form-section { padding: 10px; }
  .ms-form-card__body { padding: 0px; }
  .ms-form-card__header { padding: 16px; }
  .ms-closed-details { grid-template-columns: 1fr; }
  .ms-btn { padding: 10px 20px; font-size: 13px; min-width: 100px; }
  .ms-form-nav { gap: 10px; margin-top: 14px; }
  .ms-form-nav .ms-btn { min-width: 90px; }
}