.hec-wrap {
    max-width: 1200px;
    margin: 80px auto;
    padding: 24px 14px 50px;
    color: var(--text, #231805);
}

.hec-page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.hec-page-header h1 {
    font-family: 'Syne', sans-serif;
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text, #231805);
    letter-spacing: -0.5px;
    margin: 0;
}

.hec-badge {
    background: var(--primary, #e3982d);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hec-card {
    background: rgba(255, 255, 255, 0.93);
    backdrop-filter: blur(12px);
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(35, 24, 5, 0.07);
    border: 1px solid rgba(227, 152, 45, 0.15);
    padding: 20px;
    margin-bottom: 14px;
}

.hec-card-title {
    font-family: 'Syne', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary, #e3982d);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(227, 152, 45, 0.18);
    display: flex;
    align-items: center;
    gap: 7px;
}

.hec-card-title svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.hec-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.hec-grid-4 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 12px;
}

.hec-col-full {
    grid-column: 1 / -1;
}

.hec-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hec-label {
    font-size: 0.71rem;
    font-weight: 600;
    color: var(--dark-slate-gray, #2f4858);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.hec-req {
    color: var(--red, #f00);
    margin-left: 2px;
}

.hec-input,
.hec-select,
.hec-textarea {
    width: 100%;
    padding: 8px 11px;
    border: 1.5px solid var(--gray-80, #ddd);
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    color: var(--text, #231805);
    background: #fff;
    outline: none;
    transition: border-color 0.22s ease, box-shadow 0.22s ease;
    box-sizing: border-box;
}

.hec-input:focus,
.hec-select:focus,
.hec-textarea:focus {
    border-color: var(--primary, #e3982d);
    box-shadow: 0 0 0 3px rgba(227, 152, 45, 0.13);
}

.hec-input[readonly],
.hec-input.hec-readonly {
    background: var(--white-smoke, #f2f2f2);
    color: var(--dark-gray, #555);
    cursor: default;
}

.hec-textarea {
    resize: vertical;
    min-height: 74px;
}

.hec-select {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23e3982d' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

/* Code input */
.hec-code-wrap {
    position: relative;
}

.hec-code-input {
    font-family: 'Syne', monospace !important;
    font-weight: 700 !important;
    font-size: 0.94rem !important;
    color: var(--accent, #00616c) !important;
    letter-spacing: 1.2px !important;
    padding-right: 36px !important;
}

.hec-code-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary, #e3982d);
    opacity: 0.6;
    pointer-events: none;
}

/* File Upload */
.hec-file-wrap {
    position: relative;
    border: 1.5px dashed var(--gray-80, #ddd);
    border-radius: 8px;
    background: var(--white-smoke, #f2f2f2);
    transition: border-color 0.22s ease, background 0.22s ease;
    cursor: pointer;
    overflow: hidden;
    min-height: 38px;
}

.hec-file-wrap:hover {
    border-color: var(--primary, #e3982d);
    background: rgba(227, 152, 45, 0.04);
}

.hec-file-wrap input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.hec-file-placeholder {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--dark-gray, #555);
    font-size: 0.83rem;
    pointer-events: none;
}

.hec-file-placeholder svg {
    flex-shrink: 0;
    opacity: 0.5;
}

.hec-file-name {
    font-size: 0.78rem;
    color: var(--secondary, #007968);
    font-weight: 600;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hec-img-preview {
    display: none;
    width: 100%;
    max-height: 110px;
    object-fit: cover;
    border-radius: 7px;
    border: 1.5px solid var(--gray-80, #ddd);
    margin-top: 6px;
}

.hec-img-preview.hec-show {
    display: block;
}

/* Toggles */
.hec-toggles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 8px;
}

.hec-toggle-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: var(--white-smoke, #f2f2f2);
    border-radius: 10px;
    padding: 10px 8px;
    border: 1.5px solid var(--gray-80, #ddd);
    transition: background 0.22s ease, border-color 0.22s ease;
    cursor: pointer;
    user-select: none;
}

.hec-toggle-item.hec-active {
    background: rgba(227, 152, 45, 0.08);
    border-color: var(--primary, #e3982d);
}

.hec-toggle-item.hec-green.hec-active {
    background: rgba(71, 141, 78, 0.08);
    border-color: var(--middle-green, #478d4e);
}

.hec-toggle-label {
    font-size: 0.67rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--dark-gray, #555);
    text-align: center;
    line-height: 1.3;
}

.hec-toggle-item.hec-active .hec-toggle-label {
    color: var(--primary, #e3982d);
}

.hec-toggle-item.hec-green.hec-active .hec-toggle-label {
    color: var(--middle-green, #478d4e);
}

.hec-switch {
    width: 40px;
    height: 20px;
    background: var(--chinese-silver, #ccc);
    border-radius: 10px;
    position: relative;
    transition: background 0.22s ease;
    flex-shrink: 0;
}

.hec-switch::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.22s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.hec-toggle-item.hec-active .hec-switch {
    background: var(--primary, #e3982d);
}

.hec-toggle-item.hec-active .hec-switch::after {
    transform: translateX(20px);
}

.hec-toggle-item.hec-green.hec-active .hec-switch {
    background: var(--middle-green, #478d4e);
}

/* Gift Section */
.hec-gift-section {
    display: none;
    margin-top: 12px;
}

.hec-gift-section.hec-show {
    display: block;
    animation: hecSlideDown 0.2s ease;
}

/* Reminders */
.hec-reminder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.hec-reminder-counter {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--dark-gray, #555);
    background: var(--white-smoke, #f2f2f2);
    padding: 2px 10px;
    border-radius: 10px;
    border: 1px solid var(--gray-80, #ddd);
}

.hec-reminder-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hec-reminder-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 8px;
    align-items: end;
    background: rgba(227, 152, 45, 0.04);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(227, 152, 45, 0.15);
    animation: hecSlideDown 0.18s ease;
}

@keyframes hecSlideDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.hec-btn-add {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--primary, #e3982d);
    color: #fff;
    border: none;
    padding: 7px 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 7px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    transition: background 0.22s ease;
}

.hec-btn-add:hover {
    background: var(--secondary, #007968);
}

.hec-btn-add:disabled {
    background: var(--gray-80, #ddd) !important;
    color: var(--dark-gray, #555) !important;
    cursor: not-allowed;
}

.hec-btn-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 0, 0, 0.07);
    color: var(--red, #f00);
    border: 1px solid rgba(255, 0, 0, 0.2);
    padding: 0 10px;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.22s ease;
    height: 36px;
    min-width: 36px;
}

.hec-btn-remove:hover {
    background: rgba(255, 0, 0, 0.16);
}

.hec-form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hec-btn-reset {
    background: transparent;
    color: var(--primary, #e3982d);
    border: 2px solid var(--primary, #e3982d);
    padding: 9px 22px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.22s ease;
}

.hec-btn-reset:hover {
    background: var(--primary, #e3982d);
    color: #fff;
}

.hec-btn-submit {
    background: var(--primary, #e3982d);
    color: #fff;
    border: none;
    padding: 10px 26px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    transition: background 0.22s ease;
}

.hec-btn-submit:hover {
    background: var(--secondary, #007968);
}

@media (max-width: 640px) {
    .hec-grid-2 {
        grid-template-columns: 1fr;
    }

    .hec-grid-4 {
        grid-template-columns: 1fr 1fr;
    }

    .hec-col-full {
        grid-column: 1;
    }

    .hec-toggles-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hec-reminder-row {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .hec-reminder-row .hec-btn-remove {
        grid-column: span 2;
        width: fit-content;
    }

    .hec-page-header h1 {
        font-size: 1.25rem;
    }

    .hec-card {
        padding: 14px;
    }
}

@media (max-width: 420px) {
    .hec-toggles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hec-grid-4 {
        grid-template-columns: 1fr;
    }
}
