/* ============================================
   Form Đăng Ký Bộ Công Cụ OPPM - Bootstrap 5
   HydrostructAI - hastruct.github.io
   ============================================ */

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

:root {
    --primary-color: #0D3B10;
    --secondary-color: #1B5E20;
    --accent-color: #2E7D32;
    --dark-gray: #334155;
    --light-gray: #f8fafc;
    --success-color: #4CAF50;
    --accent-orange: #FF6F00;
    --accent-orange-hover: #E65100;
    --bank-red: #C62828;
    --error-color: #D32F2F;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #334155;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    margin: 0;
    padding: 20px 0;
}

/* Bootstrap fallback base styles */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.5rem;
    margin-left: -0.5rem;
}

.row > * {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
}

.col-md-6 {
    flex: 0 0 auto;
    width: 100%;
}

@media (min-width: 768px) {
    .col-md-6 {
        flex: 0 0 auto;
        width: 50%;
    }
}

.g-3 {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}

.g-3 > * {
    margin-top: var(--bs-gutter-y);
}

.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.text-center { text-align: center !important; }
.text-danger { color: #dc3545 !important; }
.text-muted { color: #6c757d !important; }
.small { font-size: 0.875em !important; }

/* Spinner */
.spinner-border {
    display: inline-block;
    width: 3rem;
    height: 3rem;
    vertical-align: text-bottom;
    border: 0.3rem solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

/* --- Container --- */
.landing-container {
    max-width: 900px;
    margin: 0 auto;
}

/* --- Main Card --- */
.card-main {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* --- Hero Section --- */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.hero-section h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.hero-section h1 i {
    margin-right: 8px;
}

.hero-section > p {
    font-size: 1.05rem;
    opacity: 0.9;
    margin-bottom: 16px;
}

.price-tag {
    display: inline-block;
    margin-top: 4px;
    background: white;
    padding: 8px 24px;
    border-radius: 9999px;
}

.price-tag span {
    color: var(--secondary-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.header-note {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    margin-top: 10px;
    margin-bottom: 0;
}

/* --- Form Section --- */
.form-section {
    padding: 35px 30px;
}

/* --- Product Description --- */
.product-desc {
    background: var(--light-gray);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 25px;
}

.product-desc p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--dark-gray);
    line-height: 1.6;
}

.product-desc i {
    color: var(--secondary-color);
    margin-right: 6px;
}

/* --- Section Title --- */
.section-title {
    color: var(--secondary-color);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 18px;
    margin-top: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title:first-of-type {
    margin-top: 0;
}

.section-title i {
    font-size: 1.1rem;
}

/* --- Steps List --- */
.steps-list {
    position: relative;
    padding-left: 20px;
    margin-bottom: 25px;
}

.step-line {
    position: absolute;
    left: 19px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: #e2e8f0;
}

.step-item {
    display: flex;
    gap: 16px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.step-item:last-child {
    margin-bottom: 0;
}

.step-circle {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-orange);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(255, 111, 0, 0.3);
    transition: transform 0.2s ease;
}

.step-circle:hover {
    transform: scale(1.08);
}

.step-content {
    padding-top: 2px;
}

.step-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #212121;
    margin-bottom: 2px;
}

.step-desc {
    font-size: 0.9rem;
    color: var(--dark-gray);
    opacity: 0.85;
    line-height: 1.5;
    margin-bottom: 0;
}

.bank-highlight {
    color: var(--bank-red);
}

.invoice-highlight {
    color: var(--error-color);
    font-weight: 500;
}

.zalo-highlight {
    color: var(--accent-orange);
}

/* --- Form Controls --- */
.form-label {
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-control {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.1);
}

.form-control.is-invalid {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.form-control::placeholder {
    color: #9ca3af;
}

/* --- Confirm Box --- */
.confirm-box {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.confirm-box:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 2px 8px rgba(27, 94, 32, 0.1);
}

.confirm-box.confirmed {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.confirm-box.confirmed:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.confirm-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.confirm-box.confirmed .confirm-checkbox {
    background: rgba(255,255,255,0.3);
}

.confirm-checkbox i {
    font-size: 1rem;
    font-weight: bold;
    visibility: hidden;
}

.confirm-box.confirmed .confirm-checkbox i {
    visibility: visible !important;
}

.confirm-text {
    font-weight: 500;
    font-size: 0.95rem;
}

/* --- Radio Group --- */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.radio-card:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 2px 8px rgba(27, 94, 32, 0.08);
}

.radio-card.selected {
    border-color: var(--secondary-color);
    background: rgba(27, 94, 32, 0.03);
    box-shadow: 0 2px 8px rgba(27, 94, 32, 0.1);
}

.radio-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.radio-card:hover .radio-circle {
    border-color: var(--secondary-color);
}

.radio-circle.selected {
    border-color: var(--secondary-color);
    background: var(--secondary-color);
}

.radio-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.radio-circle.selected .radio-dot {
    opacity: 1;
}

.radio-content {
    flex: 1;
}

.radio-title {
    font-weight: 600;
    color: #212121;
    font-size: 0.95rem;
}

.radio-desc {
    font-size: 0.85rem;
    color: var(--dark-gray);
    opacity: 0.75;
    margin-top: 2px;
}

/* --- Error Messages --- */
.error-msg {
    font-size: 0.85rem;
    color: var(--error-color);
    margin-top: 6px;
    min-height: 0;
    font-weight: 500;
}

.error-msg:empty {
    display: none;
}

/* --- Submit Button --- */
.btn-submit {
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-orange-hover) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 14px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.5px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 111, 0, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-submit i {
    font-size: 1rem;
}

/* --- Loading Spinner --- */
.loading-spinner {
    display: none;
    text-align: center;
    padding: 20px;
}

.loading-spinner.active {
    display: block;
}

.loading-spinner .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
    color: var(--secondary-color) !important;
}

/* --- Success Screen --- */
.success-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 50px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--success-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 2.5rem;
}

.success-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 12px;
}

.success-text {
    color: var(--dark-gray);
    font-size: 1rem;
    margin-bottom: 8px;
}

.success-zalo {
    color: var(--accent-orange);
    font-weight: 600;
    font-size: 1rem;
}

.success-zalo i {
    margin-right: 6px;
}

/* --- Footer Note --- */
.form-note {
    color: #9ca3af;
    font-size: 0.85rem;
    margin-top: 10px;
}

.form-note i {
    margin-right: 4px;
}

/* --- Page Footer --- */
.page-footer {
    text-align: center;
    padding: 20px 0;
}

.page-footer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin: 0;
}

/* --- SVG Icons --- */
.icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    flex-shrink: 0;
}

.icon-inline {
    display: inline-block;
    vertical-align: text-bottom;
    margin-right: 4px;
}

.hero-section h1 .icon {
    margin-right: 8px;
    margin-top: -3px;
}

.step-circle svg {
    display: block;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    body {
        padding: 10px 0;
    }
    
    .hero-section {
        padding: 30px 20px;
    }
    
    .hero-section h1 {
        font-size: 1.3rem;
    }
    
    .hero-section > p {
        font-size: 0.95rem;
    }
    
    .price-tag span {
        font-size: 1.2rem;
    }
    
    .form-section {
        padding: 25px 18px;
    }
    
    .section-title {
        font-size: 1.05rem;
    }
    
    .step-circle {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .btn-submit {
        font-size: 1rem;
        padding: 12px 24px;
    }
    
    .success-icon {
        width: 64px;
        height: 64px;
        font-size: 2rem;
    }
    
    .success-title {
        font-size: 1.3rem;
    }
}

/* --- Print --- */
@media print {
    body {
        background: white;
    }
    
    .card-main {
        box-shadow: none;
    }
    
    .btn-submit,
    .confirm-box {
        display: none !important;
    }
}
