/* ── INDEX-ONLY STYLES ── */

/* PAGE WIDTH CONSTRAINT */
.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  box-shadow: 0 0 40px rgba(0,0,0,.08);
  overflow: hidden;
}

.page-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 200;
  background: var(--c-head-grad);
  color: #fff;
  height: 64px;
  box-shadow: 0 2px 16px rgba(139,62,16,.35);
}
.nav .page-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 100%;
}
.nav-brand { display: flex; align-items: center; gap: 14px; }
.nav-logo {
  width: 42px; height: 42px;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.25);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.nav-logo img {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
}
.nav-title { font-size: 16px; font-weight: 700; letter-spacing: .04em; }
.nav-sub   { font-size: 10px; opacity: .6; letter-spacing: .06em; margin-top: 2px; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,.82);
  text-decoration: none;
  transition: all var(--transition);
}
.nav-link:hover,
.nav-link.active { background: rgba(255,255,255,.18); color: #fff; }
.nav-link .nav-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #fff; opacity: 0; margin-left: 2px;
  transition: opacity var(--transition);
}
.nav-link.active .nav-dot { opacity: 1; }

/* NAV LOGO as link */
a.nav-logo {
  text-decoration: none;
  cursor: pointer;
}
a.nav-logo:hover { background: rgba(255,255,255,.28); }

/* HAMBURGER BUTTON — hidden on desktop */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px; height: 38px;
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.25);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.nav-hamburger span {
  display: block;
  width: 18px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
/* X state */
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* OVERLAY */
.nav-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 190;
}
.nav-overlay--show { display: block; }

/* HERO BANNER */
.hero-banner {
  width: 100%;
  line-height: 0;
}
.hero-banner img {
  width: 100%;
  height: auto;
  display: block;
}


/* MAIN CONTENT */
.idx-main { max-width: 1000px; margin: 0 auto; padding: 36px 24px 72px; }

/* SECTION HEADER */
.sec-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px;
}
.sec-head-icon {
  width: 34px; height: 34px;
  background: var(--c-blue-light); border: 1.5px solid var(--c-blue-pale);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}
.sec-head h2 { font-size: 17px; font-weight: 700; color: var(--c-navy); }
.sec-head p  { font-size: 12px; color: var(--c-muted); margin-top: 1px; }

/* FORM CARDS GRID */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.form-card {
  background: var(--c-card);
  border: 1.5px solid var(--c-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.form-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(139,62,16,.15);
  border-color: var(--c-border-md);
}
.form-card.coming-soon {
  opacity: .62; pointer-events: none; cursor: default;
}

.fc-head {
  background: var(--c-head-grad); padding: 18px 20px 16px;
  display: flex; align-items: center; gap: 14px;
}
.fc-icon {
  width: 44px; height: 44px;
  background: rgba(255,255,255,.18);
  border: 1.5px solid rgba(255,255,255,.28);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.fc-head-text { color: #fff; }
.fc-title { font-size: 16px; font-weight: 700; letter-spacing: .02em; }
.fc-en    { font-size: 10.5px; opacity: .65; margin-top: 2px; letter-spacing: .04em; }

.fc-coming-head {
  background: #f1f5f9; padding: 18px 20px 16px;
  display: flex; align-items: center; gap: 14px;
  border-bottom: 1.5px solid var(--c-border);
}
.fc-coming-icon {
  width: 44px; height: 44px;
  background: #e2e8f0; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.fc-coming-title { font-size: 16px; font-weight: 700; color: #94a3b8; }
.fc-coming-en    { font-size: 10.5px; color: #b8c4d0; margin-top: 2px; }

.fc-body { padding: 16px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.fc-preview {
  background: var(--c-bg);
  border: 1.5px solid var(--c-border);
  border-radius: 8px; padding: 10px 12px;
  margin-bottom: 14px;
  display: flex; flex-direction: column; gap: 5px;
}
.fc-preview-bar {
  height: 6px; background: var(--c-border-md); border-radius: 3px;
}
.fc-preview-bar.dark { background: var(--c-blue-pale); width: 70%; }
.fc-preview-bar.short { width: 55%; }
.fc-preview-bar.shorter { width: 40%; }

.fc-desc { font-size: 12.5px; color: var(--c-muted); line-height: 1.6; margin-bottom: 12px; flex: 1; }
.fc-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.fc-tag {
  font-size: 11px; font-weight: 600; letter-spacing: .03em;
  background: var(--c-blue-light); color: var(--c-blue-mid);
  border: 1px solid var(--c-blue-pale); border-radius: 12px; padding: 2px 9px;
}

.fc-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: 8px;
  font-size: 14px; font-weight: 700; font-family: inherit;
  cursor: pointer; border: none; text-decoration: none;
  background: var(--c-head-grad); color: #fff;
  transition: all var(--transition); letter-spacing: .03em;
  width: 100%;
}
.fc-btn:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(139,62,16,.3); }

.fc-coming-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: 8px;
  font-size: 14px; font-weight: 700; font-family: inherit;
  cursor: not-allowed; border: 1.5px dashed #cbd5e1;
  background: #f8fafc; color: #94a3b8;
  width: 100%;
}

/* FLOW SECTION */
.flow-section {
  background: var(--c-card);
  border: 1.5px solid var(--c-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 24px 28px 28px;
  margin-bottom: 48px;
}
.flow-title {
  font-size: 15px; font-weight: 700; color: var(--c-navy);
  margin-bottom: 24px;
}
.flow-steps {
  display: flex; align-items: flex-start; gap: 0;
  overflow-x: auto; padding-bottom: 4px;
}
.flow-step {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; flex: 1; min-width: 90px;
  position: relative;
}
.flow-step::after {
  content: '→';
  position: absolute; top: 17px; right: -10px;
  font-size: 14px; color: var(--c-border-md);
  transform: translateY(-50%);
}
.flow-step:last-child::after { display: none; }
.flow-num {
  width: 36px; height: 36px;
  background: var(--c-head-grad);
  border-radius: 50%; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; flex-shrink: 0;
  margin-bottom: 10px; box-shadow: 0 3px 10px rgba(139,62,16,.25);
}
.flow-icon { font-size: 22px; margin-bottom: 8px; }
.flow-label { font-size: 12.5px; font-weight: 700; color: var(--c-navy); margin-bottom: 4px; }
.flow-desc  { font-size: 11px; color: var(--c-muted); line-height: 1.5; }

/* FOOTER */
.idx-footer {
  background: #fff; border-top: 1.5px solid var(--c-border);
}
.idx-footer .page-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
  padding: 14px 32px;
}
.footer-brand-name { font-size: 13px; font-weight: 700; color: var(--c-navy); }
.footer-brand-copy { font-size: 11.5px; color: var(--c-muted); }
.footer-links { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.footer-guide-link {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  color: var(--c-blue-mid);
  background: var(--c-blue-light);
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
}
.footer-guide-link:hover {
  border-color: var(--c-accent);
  background: #fff;
}

/* PROFILE MANAGER */
.pm-wrap {
  background: var(--c-card);
  border: 1.5px solid var(--c-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 48px;
}

.pm-empty {
  font-size: 13px; color: var(--c-muted);
  padding: 8px 0 16px;
}

.pm-list {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 16px;
}

.pm-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-bg);
  flex-wrap: wrap;
}
.pm-card--default {
  border-color: var(--c-accent);
  background: var(--c-blue-light);
}

.pm-card-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.pm-card-name { font-size: 14px; font-weight: 700; color: var(--c-navy); }
.pm-card-meta { font-size: 12px; color: var(--c-muted); }

.pm-card-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

.pm-btn {
  display: inline-flex; align-items: center;
  padding: 5px 11px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600; font-family: inherit;
  cursor: pointer; border: 1.5px solid transparent;
  transition: all var(--transition);
}
.pm-btn--default {
  border-color: var(--c-border-md); background: #fff; color: var(--c-muted);
}
.pm-btn--default:hover { border-color: var(--c-accent); color: var(--c-blue); background: var(--c-blue-light); }
.pm-btn--edit {
  border-color: var(--c-border-md); background: #fff; color: var(--c-muted);
}
.pm-btn--edit:hover { border-color: var(--c-blue-mid); color: var(--c-blue-mid); }
.pm-btn--del {
  border-color: transparent; background: transparent; color: var(--c-muted);
}
.pm-btn--del:hover { color: var(--c-red); background: var(--c-red-bg); border-color: var(--c-red); }

.pm-default-badge {
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  color: var(--c-blue-mid);
  background: var(--c-blue-pale); border: 1px solid var(--c-blue-pale);
  border-radius: 12px; padding: 3px 10px;
}

.pm-form {
  border-top: 1.5px dashed var(--c-border);
  padding-top: 16px;
  display: flex; flex-direction: column; gap: 12px;
}

.pm-form-fields {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.pm-form-fields .fg { flex: 1; min-width: 140px; }

.fi--error {
  border-color: var(--c-red) !important;
  box-shadow: 0 0 0 3px rgba(220,38,38,.15) !important;
}

.pm-form-actions { display: flex; gap: 8px; }

.pm-save-btn {
  background: var(--c-head-grad); color: #fff; border: none;
  padding: 8px 20px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700; font-family: inherit;
  cursor: pointer; transition: all var(--transition);
}
.pm-save-btn:hover { filter: brightness(1.08); }

.pm-cancel-btn {
  background: #fff; color: var(--c-muted);
  border: 1.5px solid var(--c-border-md);
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all var(--transition);
}
.pm-cancel-btn:hover { border-color: var(--c-muted); color: var(--c-text); }

@media (max-width: 600px) {
  .nav .page-inner { padding: 0 16px; }
  .idx-main { padding: 24px 16px 48px; }
  .idx-footer .page-inner { padding: 12px 16px; flex-direction: column; align-items: flex-start; }
  .flow-steps { flex-direction: column; align-items: flex-start; gap: 12px; }
  .flow-step { flex-direction: row; text-align: left; gap: 12px; min-width: auto; }
  .flow-step::after { display: none; }
  .flow-num { margin-bottom: 0; flex-shrink: 0; }
}

@media (max-width: 480px) {
  /* Nav */
  .nav-sub { display: none; }
  .nav .page-inner { padding: 0 12px; }
  .nav-logo { width: 34px; height: 34px; font-size: 18px; }
  .nav-logo img { width: 24px; height: 24px; }
  .nav-title { font-size: 14px; }

  /* Show hamburger, hide desktop nav links */
  .nav-hamburger { display: flex; }
  .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; right: 0;
    width: 220px; height: 100dvh;
    background: var(--c-head-grad);
    z-index: 200;
    padding: 80px 16px 32px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    box-shadow: -4px 0 24px rgba(0,0,0,.2);
  }
  .nav-links--open { transform: translateX(0); }
  .nav-link {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: rgba(255,255,255,.88);
  }
  .nav-link:hover,
  .nav-link.active { background: rgba(255,255,255,.18); color: #fff; }

  /* Profile manager form stacks to single column */
  .pm-form-fields .fg { flex: 1 1 100%; }

  /* Flow section tighter padding */
  .flow-section { padding: 16px; }
}
