:root {
  /* font family */
  --font-primary: 'Roboto', sans-serif;
  --font-secondary: 'Oswald', sans-serif;

  /* color */
  --color-bg: #0b0b0b;
  --color-bg-light: rgba(255, 255, 255, 0.12);
  --color-text-primary: #ffffff;
  --color-text-secondary: #bdbdbd;
  --color-primary: #ff6a3d;
  --color-primary-rgb: 255, 106, 61;
  --color-primary-main: #ff6a3d;
  --color-primary-light: #ffb03b;
  --color-error: #ff4d4f;
  --color-error-rbg: 255, 77, 79;
  --color-success: #52c41a;
  --color-success-rgb: 82, 196, 26;

  /* background */
  --bg-linear: linear-gradient(135deg, rgba(20, 20, 20, 0.95), rgba(65, 65, 65, 0.95));
  
  /* border */
  --border-color: rgba(255, 255, 255, 0.514);
  --border-radius: 8px;
}

* { padding: 0; margin: 0; box-sizing: border-box; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { border-radius: 4px; background: transparent; transition: all 0.3s ease; background: rgba(255, 255, 255, 0.12); }
::-webkit-scrollbar-thumb { border-radius: 4px; background:#606060; transition: all 0.3s ease; }
::-webkit-scrollbar-thumb:hover { background: #878787; cursor: grab; }

html, body { height: 100vh; overflow: hidden; }

body {
  font-family: var(--font-primary); font-weight: 400; font-size: 16px;
  color: white; background: var(--color-bg);
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { list-style: none; }

p { line-height: 1.5; }

.logo { width: 140px; }
.logo-small { width: 84px; }

/* icon */
.app-icon { font-size: 1.5rem; width: 1em; height: 1em; display: flex; align-items: center; justify-content: center; }
.app-icon svg { width: 1em; height: 1em; }
.app-icon img { width: 1em; height: 1em; object-fit: cover; }
.app-icon.small { font-size: 1.25rem; }
.app-icon.large { font-size: 2.25rem; }
.app-icon.super-large { font-size: 6rem; }

/* buttons */
.btn-primary {
  width: 100%; padding: 12px; border-radius: 8px; border: 0; color: white; font-size: 0.875rem; font-weight: 600;
  background: linear-gradient(45deg, var(--color-primary-main) 0%, var(--color-primary-light) 70%, var(--color-primary-main) 100%);
  background-size: 200% auto; box-shadow: 0 2px 8px rgba(27, 25, 24, 0.2); text-decoration: none;
  cursor: pointer; position: relative; display: inline-flex; align-items: center; justify-content: center;
  transition: background-position 0.5s ease, box-shadow 0.3s ease, color 0.25s ease;
}
.btn-primary:hover { background-position: 100% 0; box-shadow: 0 4px 16px rgba(252, 228, 19, 0.23); text-decoration: none; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { background: var(--color-primary-main); opacity: 0.6; cursor: not-allowed; }
/* icon */
.btn-primary .icon-left, .btn-primary .icon-right { margin-top: -1em; margin-bottom: -1em; }
.btn-primary .icon-left {  margin-right: 0.5em; margin-left: -1.5em; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.btn-primary .icon-right { margin-left: 0.5em; margin-right: -1.5em; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }

/* outline */
.btn-primary.btn-outline { background: transparent; border: 1px solid var(--color-primary-main); color: var(--color-primary-main); }
.btn-primary:hover .icon-left { transform: translateX(-50%); }
.btn-primary:hover .icon-right { transform: translateX(50%); }

/* back link */
.btn-back-link {
  display: inline-flex; align-items: center; text-decoration: none;  padding: 4px 12px; border-radius: 16px;
  color: var(--color-text); background: rgba(255, 255, 255, 0.12); gap: 6px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); background-clip: padding-box;
}

/* link */
.links { align-items: flex-start; color: var(--color-text-secondary); }
.links a { color: var(--color-text-primary); transition: color 0.2s; }
.links a:hover { color: var(--color-primary); }
.links a.underline { text-decoration: underline; }
.link { color: var(--color-primary); text-decoration: none; cursor: pointer; transition: color 0.2s; }
.link:hover { color: var(--color-primary); text-decoration: underline; }
.link.underline { text-decoration: underline; }


/* input */
.input-group { position: relative; transition: all 0.2s ease; padding-bottom: 0.25rem; }
.input-group .input-group-content { display: flex; align-items: stretch; background: rgba(255, 255, 255, 0.12); border-radius: 8px; }
.input-group:focus-within .input-group-content { box-shadow: 0 0 0 1px rgba(var(--color-primary-rgb), 0.12), 0 3px 10px rgba(var(--color-primary-rgb), 0.4); }
.input-group .icon-left { margin-right: 8px }
.input-group input { flex: 1; background: transparent; border: 0; color: white; font-size: 15px; outline: none; min-width: 0; }
.input-group input, .input-group select {  height: 2.75rem; padding: 10px 12px; }
.input-group .help-text {
  display: block; font-size: 0.6rem; color: var(--color-error);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 24px); text-align: right;
  margin-left: auto; height: 0; opacity: 0; transition: all 0.2s ease;
}
.input-group .help-text:not(:empty) { height: auto; opacity: 1; margin-top: 4px; }

.input-group .label.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
/* .input-group.has-value { border: 1px solid var(--color-primary-main); } */
.input-group .label { 
  display: inline-block; pointer-events: none; transition: all 0.2s ease; padding: 2px 4px; border-radius: 2px;
  font-size: 0.625rem; font-weight: 600; color: var(--color-text-primary);
  opacity: 0; transform: translate(8px, 4px) scale(1.3);
}
.input-group.has-value .label, .input-group:focus-within .label, .input-group .label.away-top {
  opacity: 1; transform: translate(0, 0) scale(1);
}
.input-group:focus-within .label { color: var(--color-primary) }
.input-group input::placeholder { transition: color 0.2s ease; }
.input-group:focus-within input::placeholder { color: transparent; }


/* Autofill override — dark theme (Chrome / Edge / Safari) */
.input-group input:-webkit-autofill,
.input-group input:-webkit-autofill:hover,
.input-group input:-webkit-autofill:focus,
.input-group textarea:-webkit-autofill,
.input-group select:-webkit-autofill {
  box-shadow: 0 0 0 1000px rgba(255,255,255,0.12) inset !important; -webkit-box-shadow: 0 0 0 1000px rgba(255,255,255,0.12) inset !important;
  -webkit-text-fill-color: #ffffff !important; transition: background-color 5000s ease-in-out 0s;
}
/* Firefox autofill */
.input-group input:-moz-autofill,
.input-group textarea:-moz-autofill,
.input-group select:-moz-autofill { box-shadow: 0 0 0 1000px rgba(255,255,255,0.12) inset !important; color: #ffffff !important; }
/* input password */
.input-group .btn-toggle { 
  background: transparent; border: 0; color: var(--color-text-secondary); cursor: pointer;
  padding-left: 8px; padding-right: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.input-group .btn-toggle .icon-right { display: none; }
.input-group.is-password-off .icon-right.hide-icon { display: flex;}
.input-group:not(.is-password-off) .icon-right.show-icon { display: flex; }
/* input date */
.input-group:not(.input-filled) input[type="date"] { color: rgba(255,255,255,0.4); }
/* WebKit/Blink: invert native calendar picker icon to white */
.input-group input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1) brightness(2); opacity: 0.98; cursor: pointer; }
.input-group.has-value input[type="date"] { color: white; }
/* input select */
.input-group select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background: transparent; border: 0; color: rgba(255,255,255,0.9);
  font-size: 15px; outline: none; flex: 1;  min-width: 0; cursor: pointer;
}
/* "placeholder" look when first option is empty (use <option value="" selected hidden>) */
.input-group select:invalid { color: rgba(255,255,255,0.44); }
/* hide native IE/Edge dropdown arrow */
.input-group select::-ms-expand { display: none; }
/* custom white arrow as background image (works cross-browser) */
.input-group select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23ffffff' d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat; background-position: right 4px center; background-size: 18px 18px;
}
/* disabled state */
.input-group select:disabled { opacity: 0.6; cursor: not-allowed; }
/* if you want consistent option text color in browsers that support it */
.input-group select option { color: #ffffff; background-color: #121212; }
/* small helper: ensure select inherits the same vertical padding as inputs */
.input-group .icon + select,
.input-group input + select { padding-left: 10px; }


/* custom dark orange checkbox */
.checkbox { display: inline-flex; align-items: center; gap: 8px; user-select: none; }
.checkbox input[type="checkbox"] {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; min-width: 18px;
  border-radius: 6px; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  display: inline-grid; place-items: center;
  cursor: pointer; transition: background 150ms ease, border-color 150ms ease, box-shadow 120ms ease, transform 120ms ease;
}
/* checkmark (hidden by scale) */
.checkbox input[type="checkbox"]::after{
  display: block; content: ""; width: 12px; height: 12px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23ffffff' d='M20.3 6.3l-11 11c-.4.4-1 .4-1.4 0l-5-5c-.4-.4-.4-1 0-1.4s1-.4 1.4 0L9 15.6l10.6-10.6c.4-.4 1-.4 1.4 0s.4 1 0 1.4z'/></svg>");
  background-repeat: no-repeat; background-position: center; background-size: 100% 100%;
  transform: scale(0); transition: transform 140ms cubic-bezier(.2,.8,.2,1);
}
/* checked state: orange background + show checkmark */
.checkbox input[type="checkbox"]:checked {
  background: linear-gradient(180deg, rgba(var(--color-primary-rgb),0.95), var(--color-primary-main));
  border-color: rgba(var(--color-primary-rgb),0.95);
  box-shadow: 0 4px 12px rgba(var(--color-primary-rgb),0.14);
}
.checkbox input[type="checkbox"]:checked::after { transform: scale(1); }
/* focus / keyboard visible */
.checkbox input[type="checkbox"]:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb),0.12); transform: translateY(-1px); }
/* hover (desktop) */
.checkbox input[type="checkbox"]:hover { border-color: rgba(255,255,255,0.2); }
/* disabled */
.checkbox input[type="checkbox"]:disabled { opacity: 0.55; cursor: not-allowed; background: rgba(255,255,255,0.02); border-color: rgba(255,255,255,0.06); }
/* support smaller sizes if needed */
.checkbox.small input[type="checkbox"] { width: 14px; height: 14px; min-width: 14px; border-radius: 4px; }
.checkbox.small input[type="checkbox"]::after { width: 9px; height: 9px; }
/* ensure label text looks good on dark bg */
.checkbox label { color: var(--color-text-primary); cursor: pointer; }

/* notification panel */
.success-panel ul,
.error-panel ul {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px;
  font-size: 0.875rem; color: white; padding: 12px 16px; border-radius: 8px;
}
.success-panel ul { background: rgba(var(--color-success-rgb), 0.12); border: 1px solid var(--color-success); }
.success-panel li { color: var(--color-success); }
.error-panel ul { background: rgba(var(--color-error-rbg), 0.12); border: 1px solid var(--color-error); }
.error-panel li { color: var(--color-error); }
/* shake animation */
@keyframes error-shake {
  0%   { transform: translateX(0); } 10%  { transform: translateX(-6px); } 30%  { transform: translateX(6px); }
  50%  { transform: translateX(-4px); } 70%  { transform: translateX(6px); } 90%  { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}
.success-panel ul, .error-panel ul { animation: error-shake 400ms cubic-bezier(.36,.07,.19,.97) 1 both; }
/* respect user reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .success-panel ul, .error-panel ul { animation: none !important; transform: none !important; }
}
.error-panel ul:not(:has(li:not(:empty))), .success-panel ul:not(:has(li:not(:empty))) { display: none; }

/* typography */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-secondary); font-weight: 500; }

.typography-h1 { font-size: 2.5rem; font-weight: 700; line-height: 1.2; }
.typography-h2 { font-size: 2rem; font-weight: 600; line-height: 1.3; }
.typography-h3 { font-size: 1.5rem; font-weight: 500; line-height: 1.4; }
.typography-h4 { font-size: 1.25rem; font-weight: 500; line-height: 1.4; }
.typography-h5 { font-size: 1.125rem; font-weight: 500; line-height: 1.4; }
.typography-h6 { font-size: 1rem; font-weight: 500; line-height: 1.4; }
.typography-subtitle1 { font-size: 1rem; font-weight: 500; line-height: 1.5; }
.typography-subtitle2 { font-size: 0.875rem; font-weight: 500; line-height: 1.4; }
.typography-body1 { font-size: 1rem; line-height: 1.6; }
.typography-body2 { font-size: 0.875rem; line-height: 1.5; }
.typography-caption { font-size: 0.75rem; line-height: 1.4; color: var(--color-text-secondary); }

.text-nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media screen and (max-width: 768px) {
  .typography-h1 { font-size: 2rem; }
  .typography-h2 { font-size: 1.75rem; }
  .typography-h3 { font-size: 1.5rem; }
}

.text-danger { color: var(--color-error); }

/* Divider */
.divider { width: 100%; display: flex; gap: 4px; align-items: center; }
.divider span { font-size: 0.75rem; color: var(--color-text-secondary); }
.divider.middle { padding-left: 8px; padding-right: 8px; }
.divider::before, .divider::after { content: ""; flex: 1; border-bottom: 1px solid var(--border-color); opacity: 0.6; }

.divider-line { width: 100%; height: 1px; background: var(--border-color); opacity: 0.6; }
.divider-line.middle { margin-left: 8px; margin-right: 8px; }

/* spacing */
.m-1 { margin: 8px; }
.m-2 { margin: 16px; }
.m-3 { margin: 24px; }
.m-4 { margin: 32px; }
.m-5 { margin: 40px; }

/* Margin - directional */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 40px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 40px; }

.ml-1 { margin-left: 8px; }
.ml-2 { margin-left: 16px; }
.ml-3 { margin-left: 24px; }
.ml-4 { margin-left: 32px; }
.ml-5 { margin-left: 40px; }

.mr-1 { margin-right: 8px; }
.mr-2 { margin-right: 16px; }
.mr-3 { margin-right: 24px; }
.mr-4 { margin-right: 32px; }
.mr-5 { margin-right: 40px; }

/* Horizontal / Vertical margin shortcuts */
.mx-1 { margin-left: 8px; margin-right: 8px; }
.mx-2 { margin-left: 16px; margin-right: 16px; }
.mx-3 { margin-left: 24px; margin-right: 24px; }
.mx-4 { margin-left: 32px; margin-right: 32px; }
.mx-5 { margin-left: 40px; margin-right: 40px; }

.my-1 { margin-top: 8px; margin-bottom: 8px; }
.my-2 { margin-top: 16px; margin-bottom: 16px; }
.my-3 { margin-top: 24px; margin-bottom: 24px; }
.my-4 { margin-top: 32px; margin-bottom: 32px; }
.my-5 { margin-top: 40px; margin-bottom: 40px; }

/* Padding - all sides */
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }
.p-5 { padding: 40px; }

/* Padding - directional */
.pt-1 { padding-top: 8px; }
.pt-2 { padding-top: 16px; }
.pt-3 { padding-top: 24px; }
.pt-4 { padding-top: 32px; }
.pt-5 { padding-top: 40px; }

.pb-1 { padding-bottom: 8px; }
.pb-2 { padding-bottom: 16px; }
.pb-3 { padding-bottom: 24px; }
.pb-4 { padding-bottom: 32px; }
.pb-5 { padding-bottom: 40px; }

.pl-1 { padding-left: 8px; }
.pl-2 { padding-left: 16px; }
.pl-3 { padding-left: 24px; }
.pl-4 { padding-left: 32px; }
.pl-5 { padding-left: 40px; }

.pr-1 { padding-right: 8px; }
.pr-2 { padding-right: 16px; }
.pr-3 { padding-right: 24px; }
.pr-4 { padding-right: 32px; }
.pr-5 { padding-right: 40px; }

/* Padding shortcuts */
.px-1 { padding-left: 8px; padding-right: 8px; }
.px-2 { padding-left: 16px; padding-right: 16px; }
.px-3 { padding-left: 24px; padding-right: 24px; }
.px-4 { padding-left: 32px; padding-right: 32px; }
.px-5 { padding-left: 40px; padding-right: 40px; }

.py-1 { padding-top: 8px; padding-bottom: 8px; }
.py-2 { padding-top: 16px; padding-bottom: 16px; }
.py-3 { padding-top: 24px; padding-bottom: 24px; }
.py-4 { padding-top: 32px; padding-bottom: 32px; }
.py-5 { padding-top: 40px; padding-bottom: 40px; }

/* layout */
.w-10 { width: 10%; }
.w-20 { width: 20%; }
.w-25 { width: 25%; }
.w-30 { width: 30%; }
.w-40 { width: 40%; }
.w-50 { width: 50%; }
.w-60 { width: 60%; }
.w-70 { width: 70%; }
.w-75 { width: 75%; }
.w-80 { width: 80%; }
.w-90 { width: 90%; }
.w-100 { width: 100%; }
.w-auto { width: auto; }
.min-w-0 { min-width: 0; }

.h-25 { height: 25%; }
.h-50 { height: 50%; }
.h-75 { height: 75%; }
.h-100 { height: 100%; }
.h-auto { height: auto; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }
.align-stretch { align-items: stretch; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-start { justify-content: flex-start; }
.justify-space-between { justify-content: space-between; }
.flex-column { flex-direction: column; }
.flex-1 { flex: 1 1 auto; }
.flex-full { flex: 1 1 0; min-width: 0; }
.flex-grow { flex-grow: 1; }
.flex-shrink { flex-shrink: 1; }
.flex-no-shrink { flex-shrink: 0; }
.flex-wrap { flex-wrap: wrap; }

.gap-1 { gap: 8px; }
.gap-1-half { gap: 12px; }
.gap-2 { gap: 16px; }
.gap-2-half { gap: 20px; }
.gap-3 { gap: 24px; }
.gap-3-half { gap: 28px; }
.gap-4 { gap: 32px; }
.gap-4-half { gap: 36px; }
.gap-5 { gap: 40px; }


@media screen and (max-width: 768px) {
  .d-none-mobile { display: none; }
}