/* ==========================================
   Reset & Base Variables (Mobile-First)
   ========================================== */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --input-border: #d1d5db;
    --success-color: #16a34a;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --nav-height: 68px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 480px;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: calc(var(--nav-height) + 20px);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
}

.hidden {
    display: none !important;
}

/* ==========================================
   1. Sticky Header
   ========================================== */
.setup-header {
    position: sticky;
    top: 0;
    z-index: 400;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-back {
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: #f3f4f6;
}

.header-title {
    font-size: 1.05rem;
    font-weight: 700;
}

.step-badge {
    font-size: 0.72rem;
    font-weight: 700;
    background-color: #dbeafe;
    color: var(--primary-dark);
    padding: 4px 10px;
    border-radius: 12px;
}

/* ==========================================
   2. Form & Password Controls
   ========================================== */
.setup-content {
    padding: 14px 12px;
}

.setup-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-color);
    padding: 0 6px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
}

.input-group:last-child {
    margin-bottom: 0;
}

.input-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
}

.req {
    color: var(--danger-color);
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
    padding: 10px 40px 10px 12px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 0.9rem;
    background-color: #fafafa;
    transition: border-color 0.2s;
}

.password-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #ffffff;
}

.btn-toggle-pw {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-muted);
    padding: 4px;
}

/* Strength Meter */
.strength-meter {
    width: 100%;
    height: 6px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}

.strength-bar {
    height: 100%;
    width: 0%;
    background-color: var(--danger-color);
    transition: width 0.25s ease, background-color 0.25s ease;
}

.strength-text {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Requirements Checklist */
.pw-checklist {
    list-style: none;
    background-color: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.req-item {
    font-size: 0.76rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.req-item::before {
    content: "○";
    font-weight: 700;
}

.req-item.valid {
    color: var(--success-color);
    font-weight: 600;
}

.req-item.valid::before {
    content: "✓";
}

.match-feedback {
    font-size: 0.76rem;
    font-weight: 600;
}

.match-feedback.match {
    color: var(--success-color);
}

.match-feedback.mismatch {
    color: var(--danger-color);
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    transition: background-color 0.2s;
}

.btn-submit:hover {
    background-color: var(--primary-dark);
}

/* ==========================================
   3. Fixed Bottom Navigation Bar
   ========================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 480px;
    height: var(--nav-height);
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 500;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    gap: 3px;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-icon {
    font-size: 1.25rem;
}

.nav-center {
    margin-top: -18px;
}

.nav-icon-circle {
    width: 48px;
    height: 48px;
    background-color: var(--primary-color);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
    border: 3px solid var(--card-bg);
}