/* ============================================
   TZ-NA Business Forum — Global Styles
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #1e293b;
    background: #f8fafc;
}

/* ── Form Inputs (Custom, non-generic) ── */
.form-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-family: var(--font-family);
    background: #fff;
    color: #1e293b;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    -webkit-appearance: none;
}
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13,31,75,0.08);
}
.form-input::placeholder { color: #94a3b8; }
.form-input--sm { padding: 8px 12px 8px 36px; font-size: 13px; border-radius: 8px; }
.form-input--no-icon { padding-left: 16px; }

.form-select {
    padding: 8px 32px 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-family: var(--font-family);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E") right 10px center no-repeat;
    -webkit-appearance: none;
    outline: none;
    color: #475569;
    cursor: pointer;
    transition: border-color 0.2s;
}
.form-select:focus { border-color: var(--primary); }
.form-select--sm { padding: 6px 28px 6px 10px; font-size: 12px; }

.input-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.input-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 16px;
    pointer-events: none;
    z-index: 1;
}
.input-spinner {
    position: absolute;
    right: 14px;
    color: var(--primary);
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    z-index: 2;
}
.password-toggle:hover { color: #64748b; }

.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.required { color: var(--danger); }
.form-hint { font-size: 12px; color: #94a3b8; margin-top: 4px; display: block; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    line-height: 1.4;
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-light); color: #fff; }
.btn--secondary { background: var(--secondary); color: #1e293b; }
.btn--secondary:hover { background: var(--secondary-light); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { opacity: 0.9; }
.btn--warning { background: var(--warning); color: #fff; }
.btn--warning:hover { opacity: 0.9; }
.btn--ghost { background: transparent; color: #64748b; border: 2px solid #e2e8f0; }
.btn--ghost:hover { background: #f1f5f9; color: #1e293b; }
.btn--sm { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.link-btn {
    background: none;
    border: none;
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: inherit;
}

/* ── Alerts ── */
.alert-sm { font-size: 13px; padding: 10px 14px; border-radius: 8px; }

/* ── Check-in Page ── */
.checkin-body { background: #f0f4f8; min-height: 100vh; min-height: 100dvh; }

.checkin-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.checkin-hero {
    position: relative;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    padding: 48px 20px 60px;
    text-align: center;
    overflow: hidden;
}
.checkin-hero__bg {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.checkin-hero__content { position: relative; z-index: 1; }
.checkin-hero__icon { font-size: 48px; margin-bottom: 12px; }
.checkin-hero h1 { color: #fff; font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.checkin-hero p { color: rgba(255,255,255,0.8); font-size: 14px; font-weight: 500; }

.checkin-form-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 16px 24px;
    margin-top: -32px;
    position: relative;
    z-index: 2;
}

.checkin-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 20px;
    padding: 28px 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
}
.checkin-card__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 4px;
}
.checkin-card__subtitle {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 24px;
}

.form-floating-custom { position: relative; }

/* ── Auto-suggest ── */
.autosuggest-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    max-height: 260px;
    overflow-y: auto;
    z-index: 50;
    -webkit-overflow-scrolling: touch;
}
.suggest-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}
.suggest-item:last-child { border-bottom: none; }
.suggest-item:hover, .suggest-item.is-active { background: #f8fafc; }
.suggest-item__name {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    display: block;
}
.suggest-item__meta {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}
.suggest-empty {
    padding: 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

/* ── Delegate Info ── */
.delegate-info {
    margin-top: 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 12px 16px;
    animation: fadeIn 0.3s;
}
.delegate-info__badge {
    font-size: 12px;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.delegate-info__row {
    font-size: 13px;
    color: #475569;
    padding: 2px 0;
}
.delegate-info__row:empty { display: none; }

/* ── Check-in Button ── */
.btn-checkin {
    width: 100%;
    padding: 16px;
    margin-top: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-family);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(13,31,75,0.2);
}
.btn-checkin:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(13,31,75,0.3);
}
.btn-checkin:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Success State ── */
.checkin-success {
    width: 100%;
    max-width: 440px;
    text-align: center;
    padding: 40px 24px;
    animation: fadeIn 0.5s;
}
.success-animation { margin-bottom: 24px; }
.success-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--success) 0%, #22c55e 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 36px;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.checkin-success h2 { font-size: 24px; font-weight: 800; color: var(--primary-dark); margin-bottom: 4px; }
.success-name { font-size: 18px; font-weight: 700; color: var(--primary); margin-bottom: 2px; }
.success-org { font-size: 14px; color: #64748b; margin-bottom: 16px; }
.success-message { font-size: 14px; color: var(--success); font-weight: 600; margin-bottom: 28px; }

.btn-another {
    background: #fff;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.btn-another:hover { background: var(--primary); color: #fff; }

.checkin-footer {
    text-align: center;
    padding: 16px;
    color: #94a3b8;
    font-size: 12px;
}

/* ── Auth Page ── */
.auth-body {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    min-height: 100vh;
    min-height: 100dvh;
}
.auth-wrapper {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}
.auth-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 20px;
    padding: 32px 28px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.auth-header { text-align: center; margin-bottom: 24px; }
.auth-logo { font-size: 42px; margin-bottom: 12px; }
.auth-header h1 { font-size: 22px; font-weight: 800; color: var(--primary-dark); margin-bottom: 4px; }
.auth-header p { font-size: 13px; color: #94a3b8; }

.auth-field { margin-bottom: 18px; }
.auth-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.btn-auth {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font-family);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    margin-top: 8px;
}
.btn-auth:hover { box-shadow: 0 4px 16px rgba(13,31,75,0.25); }

.auth-footer { color: rgba(255,255,255,0.5); font-size: 12px; margin-top: 20px; text-align: center; }

/* ── Error Page ── */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
}
.error-page h1 { font-size: 72px; font-weight: 800; color: var(--primary); }
.error-page p { font-size: 18px; color: #64748b; margin-bottom: 24px; }

/* ── Toast ── */
.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s;
    max-width: 340px;
}
.toast--success { background: var(--success); }
.toast--error { background: var(--danger); }
.toast--info { background: var(--info); }

/* ── Animations ── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

/* ── Responsive ── */
@media (max-width: 480px) {
    .checkin-hero { padding: 36px 16px 52px; }
    .checkin-hero h1 { font-size: 22px; }
    .checkin-card { padding: 24px 18px; border-radius: 16px; }
    .form-input { padding: 12px 14px 12px 40px; font-size: 14px; }
    .form-row { grid-template-columns: 1fr; }
}
