/* ===========================================================
   ICSTCC 2026 registration - shared stylesheet
   Clean academic theme. Tweak the variables below to re-brand.
   =========================================================== */

:root {
    --accent:        #3f51b5;   /* indigo */
    --accent-dark:   #303f9f;
    --accent-light:  #e8eaf6;
    --ink:           #1f2933;
    --ink-soft:      #52606d;
    --ink-faint:     #9aa5b1;
    --bg:            #f0f2f7;
    --card:          #ffffff;
    --line:          #e4e7eb;
    --danger:        #d64545;
    --danger-bg:     #fdecec;
    --success:       #199473;
    --success-bg:    #e3f9f1;
    --radius:        14px;
    --radius-sm:     8px;
    --shadow:        0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .08);
    --font:          "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    background:
        radial-gradient(1100px 380px at 50% -120px, var(--accent-light), transparent 70%),
        var(--bg);
    -webkit-font-smoothing: antialiased;
}

.wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 32px 16px 80px;
}

/* ---------- Header ---------- */
.page-header { text-align: center; margin-bottom: 28px; }
.page-header .conf-badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    letter-spacing: .06em;
    font-size: 13px;
    padding: 5px 14px;
    border-radius: 999px;
    text-transform: uppercase;
}
.page-header h1 {
    margin: 14px 0 4px;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.01em;
}
.page-header .subtitle { color: var(--ink-soft); margin: 0; font-size: 15px; }

/* ---------- Progress steps ---------- */
.steps {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 26px 0 30px;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
}
.steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-faint);
    font-size: 13.5px;
    font-weight: 600;
}
.steps li .dot {
    width: 26px; height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid var(--line);
    font-size: 12.5px;
    color: var(--ink-faint);
}
.steps li.active { color: var(--accent-dark); }
.steps li.active .dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.steps li.done .dot { background: var(--success); border-color: var(--success); color: #fff; }
.steps li + li::before {
    content: "";
    width: 34px; height: 2px;
    background: var(--line);
    margin-right: 8px;
    border-radius: 2px;
}

/* ---------- Cards / sections ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px 28px;
    margin-bottom: 22px;
}
.card > h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
}
.card > h2 .sec-icon {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: var(--accent-light);
    color: var(--accent-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex: none;
}
.card .hint { color: var(--ink-soft); font-size: 13.5px; margin: -10px 0 16px; }

.notice {
    display: flex;
    gap: 12px;
    background: var(--accent-light);
    border: 1px solid #d4d9f0;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    color: #333c6e;
    font-size: 14px;
    margin-bottom: 22px;
}
.notice .ic { flex: none; font-size: 18px; }
.notice a { color: var(--accent-dark); font-weight: 600; }

/* ---------- Form grid & fields ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.grid .full { grid-column: 1 / -1; }

.field label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 6px;
}
.field label .req { color: var(--danger); }

.field input[type=text],
.field input[type=email],
.field select,
.field textarea {
    width: 100%;
    font-family: inherit;
    font-size: 15px;
    color: var(--ink);
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    transition: border-color .15s ease, box-shadow .15s ease;
    appearance: none;
}
.field select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2352606d' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
}
.field textarea { min-height: 90px; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(63, 81, 181, .18);
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(214, 69, 69, .12);
}

.err {
    display: none;
    color: var(--danger);
    font-size: 12.5px;
    font-weight: 600;
    margin-top: 5px;
}
.field.invalid .err { display: block; }

/* ---------- Choice cards (radio options) ---------- */
.choice-group { display: grid; gap: 10px; }

.choice {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 13px 15px;
    cursor: pointer;
    background: #fff;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.choice:hover { border-color: var(--accent); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .radio {
    width: 20px; height: 20px;
    border: 2px solid var(--ink-faint);
    border-radius: 50%;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s ease;
}
.choice .radio::after {
    content: "";
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--accent);
    transform: scale(0);
    transition: transform .15s ease;
}
.choice input:checked ~ .radio { border-color: var(--accent); }
.choice input:checked ~ .radio::after { transform: scale(1); }
.choice input:checked ~ .choice-body .choice-title { color: var(--accent-dark); }
.choice:has(input:checked) {
    border-color: var(--accent);
    background: #f7f8fe;
    box-shadow: 0 0 0 3px rgba(63, 81, 181, .12);
}
.choice input:focus-visible ~ .radio { box-shadow: 0 0 0 3px rgba(63, 81, 181, .25); border-radius: 50%; }

.choice-body { flex: 1; min-width: 0; }
.choice-title { font-weight: 600; font-size: 14.5px; }
.choice-sub { color: var(--ink-soft); font-size: 12.5px; }
.choice-price {
    font-weight: 700;
    font-size: 15px;
    color: var(--ink);
    white-space: nowrap;
}

/* collapsible rows (IEEE number, second paper ID, student proof) */
#ieee_row, #second_row, #proof_row {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height .25s ease, opacity .25s ease, margin .25s ease;
    margin-top: 0;
}
#ieee_row.open, #second_row.open, #proof_row.open { max-height: 130px; opacity: 1; margin-top: 14px; }

/* hidden sections (attendee mode) */
#paperCard[hidden], #authorFees[hidden] { display: none; }

/* file input */
.field input[type=file] {
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    border: 1.5px dashed var(--line);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    background: #fafbfc;
    cursor: pointer;
}
.field input[type=file]:focus { outline: none; border-color: var(--accent); }

/* disabled choice card (e.g. second paper for students) */
.choice.disabled {
    opacity: .45;
    pointer-events: none;
    background: #fafbfc;
}

.note {
    font-size: 13px;
    color: var(--ink-soft);
    background: #fafbfc;
    border: 1px dashed var(--line);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-top: 14px;
}

/* ---------- Sticky total bar ---------- */
.totalbar {
    position: sticky;
    bottom: 14px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(16, 24, 40, .35);
    padding: 14px 20px;
    margin-top: 26px;
    flex-wrap: wrap;
}
.totalbar .tot-label { font-size: 13px; color: #cbd2d9; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.totalbar .tot-value { font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.totalbar .tot-value small { font-size: 14px; font-weight: 600; color: #cbd2d9; margin-left: 4px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: 10px;
    padding: 12px 26px;
    cursor: pointer;
    transition: background .15s ease, transform .06s ease, box-shadow .15s ease;
    box-shadow: 0 2px 6px rgba(63, 81, 181, .35);
}
.btn:hover { background: var(--accent-dark); box-shadow: 0 4px 12px rgba(63, 81, 181, .4); }
.btn:active { transform: translateY(1px); }
.btn.secondary {
    background: #fff;
    color: var(--ink-soft);
    border: 1.5px solid var(--line);
    box-shadow: none;
}
.btn.secondary:hover { border-color: var(--ink-faint); color: var(--ink); }
.btn.success { background: var(--success); box-shadow: 0 2px 6px rgba(25, 148, 115, .35); }
.btn.success:hover { background: #157a5f; }

/* ---------- Summary page ---------- */
.summary-list { margin: 0; }
.summary-list .row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 9px 2px;
    border-bottom: 1px solid var(--line);
    font-size: 14.5px;
}
.summary-list .row:last-child { border-bottom: none; }
.summary-list dt { color: var(--ink-soft); font-weight: 600; flex: none; }
.summary-list dd { margin: 0; text-align: right; word-break: break-word; }

.price-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.price-table td { padding: 10px 2px; border-bottom: 1px solid var(--line); }
.price-table td:last-child { text-align: right; font-weight: 700; white-space: nowrap; }
.price-table tr.total-row td {
    border-bottom: none;
    font-size: 17px;
    font-weight: 800;
    color: var(--accent-dark);
    padding-top: 14px;
}

/* ---------- Status pages / error box ---------- */
.status-card { text-align: center; padding: 46px 30px; }
.status-icon {
    width: 74px; height: 74px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    margin-bottom: 16px;
}
.status-icon.ok { background: var(--success-bg); color: var(--success); }
.status-icon.fail { background: var(--danger-bg); color: var(--danger); }
.status-card h2 { margin: 0 0 8px; font-size: 24px; }
.status-card p { color: var(--ink-soft); max-width: 480px; margin: 6px auto; }
.status-card .btn { margin-top: 18px; }

.errbox {
    background: var(--danger-bg);
    border: 1px solid #f3c2c2;
    border-radius: var(--radius-sm);
    color: #8c2f2f;
    padding: 14px 18px 14px 34px;
    margin: 0 0 18px;
}
.errbox li { margin: 4px 0; }

/* ---------- Terms acceptance ---------- */
.accept-terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-top: 22px;
    font-size: 14px;
    cursor: pointer;
}
.accept-terms input[type=checkbox] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex: none;
    accent-color: var(--accent);
    cursor: pointer;
}
.accept-terms a { color: var(--accent-dark); font-weight: 600; }

/* ---------- Footer / misc ---------- */
.page-footer {
    text-align: center;
    color: var(--ink-faint);
    font-size: 12.5px;
    margin-top: 34px;
}
.captcha-row { display: flex; justify-content: center; margin-top: 4px; }

/* reveal-on-load animation */
.card, .totalbar { animation: rise .35s ease both; }
.card:nth-of-type(2) { animation-delay: .05s; }
.card:nth-of-type(3) { animation-delay: .1s; }
.card:nth-of-type(4) { animation-delay: .15s; }
@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .card, .totalbar { animation: none; }
    html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .grid { grid-template-columns: 1fr; }
    .card { padding: 20px 18px; }
    .page-header h1 { font-size: 24px; }
    .totalbar { padding: 12px 16px; }
    .totalbar .tot-value { font-size: 22px; }
    .steps li span.lbl { display: none; }
    .steps li.active span.lbl { display: inline; }
}
