/* ---------- Design tokens (from Figma "Titan-edge" H5 design system) ---------- */
:root {
  --color-black: #000000;
  --color-card: #212120; /* neutral/1000 */
  --color-input-bg: #171717;
  --color-border-900: #3f3f3e; /* neutral/900 */
  --color-border-800: #61615f; /* neutral/800 */
  --color-text-700: #858582; /* neutral/700 */
  --color-text-600: #aaaaa7; /* neutral/600 */
  --color-text-400: #d2d2cd; /* neutral/400 */
  --color-text-muted: #d6d6d6;
  --color-white: #ffffff;

  --success-100: #ecffee;
  --success-200: #d3fed8;
  --success-500: #02f46a;
  --success-700: #018637;
  --success-800: #00541f;
  --success-card-border: #1b5b36;
  --success-card-bg-dark: #0a2417;
  --success-chip-bg: #03361b;

  --radius-sm: 10px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-pill: 24px;

  --font-primary: 'Be Vietnam Pro', 'Noto Sans SC', sans-serif;
  --font-secondary: 'Roboto', 'Noto Sans SC', sans-serif;
  --font-chinese: 'Noto Sans SC', sans-serif;
}

* {
  box-sizing: border-box;
}

.is-hidden {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--color-black);
  color: var(--color-white);
  font-family: var(--font-secondary);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

input {
  font-family: inherit;
  background: none;
  border: none;
  color: inherit;
  outline: none;
}

/* ---------- Shared page shell ---------- */
.h5-page {
  min-height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  background: var(--color-black);
}

.h5-shell {
  position: relative;
  width: 100%;
  max-width: 430px;
  display: flex;
  flex-direction: column;
  padding-bottom: 40px;
}

/* ---------- Top navbar ---------- */
.h5-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px;
}

.h5-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.h5-logo-full {
  width: 92px;
  height: 32px;
  flex-shrink: 0;
}

.h5-navbar-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.h5-invite-btn {
  background: var(--success-500);
  color: var(--color-card);
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.28px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
}

.h5-menu-icon {
  width: 22px;
  height: 16px;
  cursor: pointer;
}

/* ---------- Tabs ---------- */
.h5-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
}

.h5-tab {
  flex: 1;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 12px;
  font-size: 12px;
  color: var(--color-white);
  white-space: nowrap;
}

.h5-tab.active {
  background: var(--success-100);
  color: var(--color-card);
  font-weight: 700;
}

/* ---------- Generic card ---------- */
.h5-card {
  background: var(--color-card);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.h5-card-title {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 14px;
  color: var(--color-white);
}

/* ---------- Primary/secondary buttons ---------- */
.h5-btn-primary {
  height: 50px;
  width: 100%;
  background: var(--success-500);
  color: var(--color-card);
  font-family: var(--font-chinese);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.28px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
}

.h5-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.h5-btn-secondary {
  height: 50px;
  width: 100%;
  background: var(--success-100);
  color: var(--color-card);
  font-family: var(--font-chinese);
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ---------- Input field ---------- */
.h5-field {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.h5-field-label {
  font-family: var(--font-chinese);
  font-size: 13.33px;
  color: var(--color-text-muted);
}

.h5-field-box {
  background: var(--color-input-bg);
  border: 0.75px solid var(--color-border-800);
  border-radius: var(--radius-sm);
  padding: 17px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.h5-field-box:focus-within {
  border-color: var(--success-500);
}

.h5-field-box input {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--color-text-700);
}

.h5-field-box input::placeholder {
  color: var(--color-text-700);
}

.h5-field-box input.has-value {
  color: var(--color-white);
}

.h5-field-icon-btn {
  flex-shrink: 0;
  width: 14px;
  height: 12px;
  cursor: pointer;
}

/* ---------- Bottom sheet (calendar / modals) ---------- */
.h5-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 50;
  display: none;
}

.h5-sheet-overlay.open {
  display: block;
}

.h5-sheet {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: var(--color-card);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  padding: 24px 16px 62px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.h5-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.h5-sheet-title {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 14px;
  color: var(--color-white);
}

.h5-sheet-close {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

@media (min-width: 431px) {
  .h5-shell {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
  }
}
