/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.8rem;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.28s ease;
    border: none;
    gap: 0.5rem;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    opacity: 1 !important;
}

.btn-primary {
    background: var(--color-primary);
    color: #FFFFFF;
    box-shadow: var(--shadow-crimson);
    opacity: 1 !important;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    box-shadow: 0 16px 36px rgba(200, 16, 46, 0.38);
    opacity: 1 !important;
}

.btn-primary:active {
    background: #8e0b20 !important;
    opacity: 1 !important;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--color-text-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    opacity: 1 !important;
}

.btn-secondary:hover {
    background: #FAF8F4;
    border-color: var(--color-primary);
    box-shadow: 0 12px 28px rgba(28, 27, 25, 0.1);
    opacity: 1 !important;
}

.btn-secondary:active {
    background: #f0ede6 !important;
    opacity: 1 !important;
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    opacity: 1 !important;
}

.btn-outline:hover {
    background: rgba(200, 16, 46, 0.04);
    box-shadow: 0 12px 28px rgba(200, 16, 46, 0.12);
    opacity: 1 !important;
}

.btn-outline:active {
    background: rgba(200, 16, 46, 0.1) !important;
    opacity: 1 !important;
}

.btn:active {
    opacity: 1 !important;
}

.btn-admin-toggle {
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 0.8rem;
    border: 1px dashed var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-admin-toggle:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background: rgba(200, 16, 46, 0.02);
}

/* --- Organic Cards --- */
.organic-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
}

.organic-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--border-hover);
}

/* --- Badges --- */
.badge {
    background: rgba(200, 16, 46, 0.08);
    border: 1px solid rgba(200, 16, 46, 0.2);
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-gold {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.25);
    color: #B59023;
}

/* --- Form Fields --- */
.form-group {
    margin-bottom: 1.45rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151; /* gray-700 */
    display: flex;
    align-items: center;
    gap: 2px;
}

.required-star {
    color: #ff3c30;
    margin-left: 1px;
}

.form-control {
    width: 100%;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #d1d5db; /* gray-300 */
    border-radius: 8px;
    padding: 0.8rem 1rem;
    color: #111827; /* gray-900 */
    font-family: var(--font-body);
    font-size: 0.92rem;
    outline: none;
    transition: all 0.15s ease-in-out;
    line-height: 1.4;
}

.form-control:focus {
    border-color: #ff3c30;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 60, 48, 0.12);
}

.form-control[type="file"] {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
}

.form-control[type="file"]::file-selector-button {
    background: #111827;
    color: #ffffff;
    border: none;
    padding: 0.45rem 1rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
    margin-right: 10px;
}

.form-control[type="file"]::file-selector-button:hover {
    background: #1f2937;
}

.form-control[type="file"]::-webkit-file-upload-button {
    background: #111827;
    color: #ffffff;
    border: none;
    padding: 0.45rem 1rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
    margin-right: 10px;
}

.form-control[type="file"]::-webkit-file-upload-button:hover {
    background: #1f2937;
}


select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c5a56' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.1rem center;
    background-size: 1.1rem;
}

.form-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 2rem;
    cursor: pointer;
    user-select: none;
    text-align: center;
    width: 100%;
}

.form-checkbox input {
    accent-color: var(--color-primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
}

.form-checkbox-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    line-height: 1.4;
}


.form-submit-btn {
    width: 100%;
    margin-top: 2rem;
    padding: 0.95rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    background: #ff3c30;
    color: #ffffff;
    box-shadow: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.form-submit-btn:hover {
    background: #e02f24;
    box-shadow: 0 4px 12px rgba(255, 60, 48, 0.15);
}

.form-submit-btn:active {
    transform: scale(0.995);
}

/* --- Form Sections --- */
.form-section {
    border: 1px solid rgba(28, 27, 25, 0.05);
    background: rgba(255, 255, 255, 0.55);
    border-radius: 16px;
    padding: 1.4rem;
    margin-bottom: 1.5rem;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
    border-bottom: 1.5px solid rgba(28, 27, 25, 0.04);
    padding-bottom: 0.6rem;
}

.section-number {
    background: rgba(200, 16, 46, 0.08);
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 800;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-section-title h4 {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--color-text-primary);
}

/* --- Channel Cards Selector --- */
.channel-selector-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 1.2rem;
}

.channel-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 6px;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
    gap: 6px;
    user-select: none;
}

.channel-card:hover {
    border-color: rgba(200, 16, 46, 0.25);
    background: rgba(200, 16, 46, 0.02);
    transform: translateY(-2px);
}

.channel-card.active {
    border-color: var(--color-primary);
    background: rgba(200, 16, 46, 0.05);
    color: var(--color-primary);
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(200, 16, 46, 0.1);
}

.channel-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.25s ease;
}

.channel-card:hover .channel-icon {
    transform: scale(1.1);
}

.channel-card.active .channel-icon {
    transform: scale(1.1);
}

.channel-card span {
    font-size: 0.78rem;
    color: var(--color-text-secondary);
}

.channel-card.active span {
    color: var(--color-primary);
}

/* --- Interactive Digital Signature Area --- */
.signature-area {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1rem;
    align-items: flex-end;
}

.signature-display-box {
    border: 1.5px dashed rgba(200, 16, 46, 0.25);
    background: #FFFAF8;
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    position: relative;
    overflow: hidden;
    user-select: none;
}

.sig-stamp-text {
    font-family: 'Nanum Pen Script', 'Caveat', 'Brush Script MT', cursive;
    font-size: 26px;
    color: #c8102e;
    transform: rotate(-3deg);
    letter-spacing: 1px;
    line-height: 1;
}

.sig-stamp-seal {
    border: 1.5px solid rgba(200, 16, 46, 0.8);
    color: rgba(200, 16, 46, 0.8);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 900;
}

/* --- Modal Style --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 8, 8, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    width: 90%;
    max-width: 520px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12), 0 10px 20px rgba(0, 0, 0, 0.04);
    transform: translateY(20px) scale(0.98);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-overlay.active .modal-box {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(0, 0, 0, 0.04);
    border: none;
    color: #4b5563;
    font-size: 1.2rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    color: #000000;
    background: rgba(0, 0, 0, 0.08);
    transform: scale(1.05);
}

.modal-header-banner {
    display: none;
}

.modal-body {
    padding: 3.2rem 2.8rem 2.8rem 2.8rem;
    overflow-y: auto;
}

@media (max-width: 480px) {
    .modal-box {
        width: 98% !important;
        border-radius: 12px !important;
    }
    .modal-body {
        padding: 1.8rem 0.8rem 1.2rem 0.8rem !important;
    }
}

.modal-body::-webkit-scrollbar {
    width: 4px;
}
.modal-body::-webkit-scrollbar-track {
    background: transparent;
}
.modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    margin-bottom: 0.6rem;
    text-align: center;
    color: #111827;
}

.modal-subtitle {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 400;
    text-align: center;
    margin-bottom: 1.3rem;
    line-height: 1.55;
    letter-spacing: -0.01em;
}

/* --- Success Screen --- */
.success-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.8rem;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.success-screen.active {
    position: relative;
    height: auto;
    opacity: 1;
    pointer-events: auto;
}

.success-icon {
    width: 76px;
    height: 76px;
    background: rgba(255, 60, 48, 0.08);
    border: 2.5px solid #ff3c30;
    color: #ff3c30;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 15px rgba(255, 60, 48, 0.2);
    animation: success-pulse 2s infinite;
}

@keyframes success-pulse {
    0% { transform: scale(0.98); box-shadow: 0 0 5px rgba(255, 60, 48, 0.1); }
    50% { transform: scale(1.02); box-shadow: 0 0 20px rgba(255, 60, 48, 0.3); }
    100% { transform: scale(1); box-shadow: 0 0 15px rgba(255, 60, 48, 0.15); }
}

/* --- Scrollable Agreement Terms --- */
.terms-scroll-box {
    background: #fbfbf8;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    max-height: 110px;
    overflow-y: auto;
    font-size: 0.76rem;
    color: var(--color-text-secondary);
    line-height: 1.62;
    margin: 1.2rem 0;
    text-align: left;
}
.terms-scroll-box::-webkit-scrollbar {
    width: 4px;
}
.terms-scroll-box::-webkit-scrollbar-track {
    background: transparent;
}
.terms-scroll-box::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}
.terms-scroll-box p {
    margin: 0 0 8px 0;
}
.terms-scroll-box p:last-child {
    margin-bottom: 0;
}
.terms-scroll-box strong {
    color: var(--color-text-primary);
    font-weight: 700;
}
.terms-scroll-box .terms-title {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--color-text-primary);
    margin-bottom: 6px;
}

/* --- Channel Selector Chips --- */
.channel-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.chip-label {
    position: relative;
    cursor: pointer;
}

.chip-label input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.chip-label span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.95rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #4b5563;
    transition: all 0.15s ease-in-out;
    user-select: none;
}

.chip-label span svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.chip-label input:checked + span {
    background: #ff3c30;
    border-color: #ff3c30;
    color: #ffffff;
}

.chip-label:hover span {
    background: #e5e7eb;
}

.chip-label input:checked:hover span {
    background: #e02f24;
}

