/* ===================================================================
   HỘI THÁNH NHÀ MUÔN DÂN - Registration System CSS
   Production-Ready Design System
   =================================================================== */

/* ==================== CSS VARIABLES ==================== */
:root {
    /* Color Palette */
    --primary: #1A5276;
    --accent: #D4AC0D;
    --bg: #F8F5F0;
    --card-bg: #FFFFFF;
    --text: #2C3E50;
    --muted: #7F8C8D;
    --success: #1E8449;
    --danger: #C0392B;
    --step-done: #1E8449;
    --step-active: #D4AC0D;
    --step-inactive: #BDC3C7;
    
    /* Gradients */
    --gradient-primary: linear-gradient(160deg, #1A5276, #154360);
    --gradient-gold: linear-gradient(135deg, #D4AC0D, #F39C12);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    
    /* Typography */
    --font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ==================== GLOBAL STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== LAYOUT ==================== */
.registration-container {
    min-height: 100vh;
    display: flex;
    overflow: hidden;
}

/* LEFT PANEL */
.registration-left-panel {
    width: 30%;
    background: var(--gradient-primary);
    color: white;
    padding: var(--spacing-xl) var(--spacing-lg);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-y: auto;
}

.church-logo-wrapper {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.church-logo {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-full);
    border: 4px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: var(--font-size-4xl);
}

.church-name {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-xs);
    letter-spacing: 0.5px;
}

.church-tagline {
    font-size: var(--font-size-sm);
    text-align: center;
    opacity: 0.9;
    margin-bottom: var(--spacing-xl);
    font-weight: 400;
}

/* STEP TRACKER */
.step-tracker {
    flex: 1;
    padding: var(--spacing-md) 0;
}

.step-item {
    display: flex;
    align-items: center;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    position: relative;
}

.step-item::before {
    content: '';
    position: absolute;
    left: 32px;
    top: 100%;
    width: 2px;
    height: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.2);
}

.step-item:last-child::before {
    display: none;
}

.step-item.active {
    background: rgba(212, 172, 13, 0.15);
}

.step-item.completed {
    background: rgba(30, 132, 73, 0.15);
}

.step-badge {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--font-size-lg);
    margin-right: var(--spacing-md);
    flex-shrink: 0;
    transition: all var(--transition-base);
}

.step-item.inactive .step-badge {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.6);
}

.step-item.active .step-badge {
    background: var(--accent);
    color: var(--primary);
    box-shadow: 0 0 20px rgba(212, 172, 13, 0.5);
}

.step-item.completed .step-badge {
    background: var(--success);
    color: white;
}

.step-icon {
    font-size: var(--font-size-xl);
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: 2px;
}

.step-item.inactive .step-title {
    opacity: 0.6;
}

.step-subtitle {
    font-size: var(--font-size-xs);
    opacity: 0.8;
}

/* SCRIPTURE QUOTE */
.scripture-quote {
    margin-top: auto;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-style: italic;
    opacity: 0.85;
    font-size: var(--font-size-sm);
    line-height: 1.8;
}

.scripture-reference {
    display: block;
    margin-top: var(--spacing-xs);
    text-align: right;
    font-size: var(--font-size-xs);
    opacity: 0.7;
}

/* RIGHT PANEL */
.registration-right-panel {
    flex: 1;
    width: 70%;
    /*padding: var(--spacing-xl);*/
    padding: var(--spacing-sm);
    overflow-y: auto;
    background: var(--bg);
}

.registration-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 24px; /* Reduced from 48px */
    max-width: 900px; /* Increased for better use of space */
    margin: 0 auto;
}

/* PROGRESS BAR */
.progress-bar-container {
    margin-bottom: 1rem; /* Reduced from 3rem */
}

.progress-bar {
    height: 4px; /* Reduced from 6px */
    background: #E5E7E9;
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
    box-shadow: 0 0 8px rgba(212, 172, 13, 0.4);
}

.progress-text {
    font-size: 0.75rem; /* 12px */
    color: var(--muted);
    margin-top: 0.25rem; /* Reduced */
    text-align: right;
    font-weight: 500;
}

/* STEP HEADER - COMPACT */
.step-header {
    margin-bottom: 1.25rem; /* Reduced from 3rem */
}

.step-number-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem; /* Reduced */
    background: var(--gradient-gold);
    color: white;
    padding: 4px 12px; /* Reduced from 6px 16px */
    border-radius: var(--radius-full);
    font-size: 0.75rem; /* 12px - reduced */
    font-weight: 600;
    margin-bottom: 0.5rem; /* Reduced from 1.5rem */
}

.step-main-title {
    font-size: 1.5rem; /* Reduced from 1.875rem */
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem; /* Reduced */
    line-height: 1.2;
}

.step-subtitle-text {
    font-size: 0.8125rem; /* 13px - reduced */
    color: var(--muted);
    font-weight: 400;
}

@media (min-width: 768px) {
    .registration-card {
        padding: 32px; /* Slightly more on desktop */
    }

    .step-main-title {
        font-size: 1.75rem; /* Larger on desktop */
    }
}

/* FORM ELEMENTS - OPTIMIZED FOR DENSITY */
.form-group {
    margin-bottom: 0.75rem; /* Reduced from 1.5rem */
}

.form-label {
    display: block;
    font-size: 1.1rem; /* 13px - reduced from 16px */
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem; /* Reduced from 0.5rem */
}

.form-label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 8px 12px; /* Reduced from 12px 16px */
    font-size: 0.875rem; /* 14px - slightly reduced */
    font-family: var(--font-family);
    border: 2px solid #E5E7E9;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    background: white;
    color: var(--text);
    height: 38px; /* Fixed height for consistency */
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(212, 172, 13, 0.1); /* Reduced shadow */
}

.form-control.error {
    border-color: var(--danger);
}

.form-helper {
    font-size: 0.75rem; /* 12px - reduced */
    color: var(--muted);
    margin-top: 0.25rem; /* Reduced from 0.5rem */
    display: block;
    line-height: 1.3;
}

.form-error {
    font-size: 0.75rem; /* 12px */
    color: var(--danger);
    margin-top: 0.25rem;
    display: none;
}

.form-error.active {
    display: block;
}

/* COMPACT FORM ROW - 2 COLUMNS ON DESKTOP */
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}

/* BUTTONS - COMPACT */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem; /* Reduced */
    padding: 10px 20px; /* Reduced from 14px 28px */
    font-size: 0.875rem; /* 14px */
    font-weight: 600;
    font-family: var(--font-family);
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    min-width: 120px; /* Reduced from 140px */
}

.btn:hover {
    transform: translateY(-1px); /* Reduced from -2px */
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: var(--gradient-gold);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 4px 16px rgba(212, 172, 13, 0.4); /* Reduced */
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #196F3D;
    box-shadow: 0 4px 16px rgba(30, 132, 73, 0.4); /* Reduced */
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 2px solid #E5E7E9;
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: rgba(26, 82, 118, 0.05);
}

.btn-lg {
    padding: 12px 24px; /* Reduced from 18px 36px */
    font-size: 1rem; /* Reduced */
    min-width: 160px; /* Reduced from 200px */
}

.btn-block {
    width: 100%;
}

/* NAVIGATION BUTTONS - COMPACT */
.step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.25rem; /* Reduced from 3rem */
    padding-top: 0.75rem; /* Reduced from 2rem */
    border-top: 1px solid #E5E7E9;
}

/* ENTRY CHOICE CARDS */
.entry-choice-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.entry-card {
    background: white;
    border: 3px solid #E5E7E9;
    border-radius: var(--radius-md);
    padding: var(--spacing-xl);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
}

.entry-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.entry-card-icon {
    font-size: 4rem;
    color: var(--accent);
    margin-bottom: var(--spacing-md);
}

.entry-card-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--spacing-sm);
}

.entry-card-description {
    font-size: var(--font-size-sm);
    color: var(--muted);
}

/* PILL TOGGLES - COMPACT */
.pill-group {
    display: flex;
    gap: 0.5rem; /* Reduced */
    flex-wrap: wrap;
}

.pill-option {
    flex: 1;
    min-width: 80px; /* Reduced from 120px */
}

.pill-option input[type="radio"],
.pill-option input[type="checkbox"] {
    display: none;
}

.pill-label {
    display: block;
    padding: 8px 14px; /* Reduced from 12px 20px */
    text-align: center;
    border: 2px solid #E5E7E9;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-weight: 500;
    background: white;
    font-size: 0.8125rem; /* 13px */
}

.pill-option input:checked + .pill-label {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.pill-label:hover {
    border-color: var(--accent);
}

/* NOTE CARDS - COMPACT */
.note-card {
    padding: 0.75rem; /* Reduced from 1.5rem */
    border-radius: var(--radius-sm);
    border-left: 3px solid; /* Reduced from 4px */
    margin-bottom: 0.75rem; /* Reduced from 1.5rem */
    display: flex;
    gap: 0.625rem; /* Reduced */
}

.note-card.info {
    background: #FEF9E7;
    border-color: #F39C12;
}

.note-card.warning {
    background: #FEF5E7;
    border-color: #E67E22;
}

.note-card-icon {
    font-size: 1.125rem; /* Reduced from 1.25rem */
    flex-shrink: 0;
}

.note-card-content {
    flex: 1;
    font-size: 0.8125rem; /* 13px */
    line-height: 1.4;
}

.note-card-content p {
    margin-bottom: 0;
}

/* ANIMATIONS */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in {
    animation: fadeIn var(--transition-base);
}

.animate-slide-in {
    animation: slideInRight var(--transition-base);
}

/* STEP CONTAINER */
.step-content-wrapper {
    display: none;
}

.step-content-wrapper.active {
    display: block;
    animation: fadeIn var(--transition-base);
}

/* UTILITY CLASSES */
.compact-section {
    margin-bottom: 0.75rem;
}

.compact-hr {
    margin: 0.75rem 0;
    border-color: #E5E7E9;
}

.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.8125rem;
}

/* MOBILE RESPONSIVE */
@media (max-width: 767px) {
    .registration-container {
        flex-direction: column;
    }

    .registration-left-panel {
        width: 100%;
        padding: 1rem;
        max-height: none;
    }

    .registration-right-panel {
        width: 100%;
        padding: 0.75rem;
    }

    .registration-card {
        padding: 1rem;
    }

    .entry-choice-container {
        grid-template-columns: 1fr;
    }

    .step-main-title {
        font-size: 1.375rem;
    }

    /* Single column on mobile */
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }

    /* Ensure touch targets are 44px minimum */
    .form-control,
    .pill-label,
    .btn {
        min-height: 44px;
    }

    .pill-label {
        padding: 10px 14px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .registration-card {
        max-width: 100%;
        padding: 24px;
    }
}

@media (min-width: 1025px) {
    .registration-card {
        max-width: 950px;
    }
}


