* {
    box-sizing: border-box;
}

body {
    margin: 0;

    font-family:
        Arial,
        sans-serif;

    background:
        linear-gradient(
            135deg,
            #fff5f7,
            #f7f2ff
        );

    color: #292929;
}


.form-container {

    width: 100%;

    max-width: 1000px;

    margin: auto;

    padding: 30px 20px 80px;
}


.form-header {

    text-align: center;

    margin-bottom: 30px;
}


.form-header a {

    display: inline-block;

    margin-bottom: 20px;

    color: #8b1e3f;

    text-decoration: none;

    font-weight: 600;
}


.form-header h1 {

    font-size: 32px;

    margin: 0 0 10px;
}


.form-header p {

    color: #777;
}


/* =====================================================
   CARD
===================================================== */

.form-card {

    background: white;

    padding: 30px;

    margin-bottom: 25px;

    border-radius: 22px;

    box-shadow:
        0 10px 35px
        rgba(0,0,0,.07);
}


.section-title {

    display: flex;

    align-items: center;

    gap: 15px;

    margin-bottom: 25px;
}


.section-title > span {

    width: 45px;

    height: 45px;

    border-radius: 14px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #8b1e3f;

    color: white;

    font-weight: bold;
}


.section-title h2 {

    margin: 0 0 4px;

    font-size: 21px;
}


.section-title p {

    margin: 0;

    color: #888;

    font-size: 13px;
}


/* =====================================================
   FORM
===================================================== */

.form-grid {

    display: grid;

    grid-template-columns:
        repeat(2,1fr);

    gap: 20px;
}


.input-group {

    margin-bottom: 20px;
}


.input-group label {

    display: block;

    font-weight: 600;

    margin-bottom: 8px;

    font-size: 14px;
}


.input-group input,
.input-group textarea,
.function-fields input {

    width: 100%;

    padding: 13px 15px;

    border: 1px solid #ddd;

    border-radius: 11px;

    outline: none;

    font-size: 14px;

    font-family: inherit;
}


.input-group input:focus,
.input-group textarea:focus,
.function-fields input:focus {

    border-color: #8b1e3f;

    box-shadow:
        0 0 0 3px
        rgba(139,30,63,.08);
}


.input-group textarea {

    resize: vertical;
}


.input-group small {

    display: block;

    color: #999;

    margin-top: 7px;

    font-size: 12px;
}


/* =====================================================
   FUNCTION
===================================================== */

.function-box {

    background: #fff8fa;

    border: 1px solid #f3dce3;

    padding: 20px;

    border-radius: 16px;

    margin-bottom: 15px;
}


.function-heading {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 15px;

    font-weight: 700;

    color: #8b1e3f;
}


.function-fields {

    display: grid;

    grid-template-columns:
        repeat(4,1fr);

    gap: 10px;
}


/* =====================================================
   SWITCH
===================================================== */

.switch {

    position: relative;

    width: 45px;

    height: 24px;
}


.switch input {

    opacity: 0;

    width: 0;

    height: 0;
}


.slider {

    position: absolute;

    cursor: pointer;

    inset: 0;

    background: #ccc;

    border-radius: 30px;

    transition: .3s;
}


.slider:before {

    content: "";

    position: absolute;

    width: 18px;

    height: 18px;

    left: 3px;

    top: 3px;

    background: white;

    border-radius: 50%;

    transition: .3s;
}


.switch input:checked + .slider {

    background: #8b1e3f;
}


.switch input:checked + .slider:before {

    transform: translateX(21px);
}


/* =====================================================
   ADD FUNCTION
===================================================== */

.add-function-btn {

    border: 1px dashed #8b1e3f;

    background: white;

    color: #8b1e3f;

    padding: 12px 18px;

    border-radius: 10px;

    cursor: pointer;

    font-weight: 600;
}


/* =====================================================
   SAVE
===================================================== */

.submit-section {

    text-align: center;

    margin-top: 30px;
}


.save-btn {

    border: none;

    padding: 17px 35px;

    background:
        linear-gradient(
            135deg,
            #8b1e3f,
            #bd4267
        );

    color: white;

    border-radius: 14px;

    font-size: 16px;

    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 10px 25px
        rgba(139,30,63,.25);
}


.save-btn:hover {

    transform: translateY(-2px);
}


/* =====================================================
   MOBILE
===================================================== */

@media(max-width:700px) {

    .form-container {

        padding:
            20px 12px 60px;
    }


    .form-header h1 {

        font-size: 25px;
    }


    .form-card {

        padding: 20px;

        border-radius: 17px;
    }


    .form-grid {

        grid-template-columns: 1fr;
    }


    .function-fields {

        grid-template-columns: 1fr;
    }


    .section-title h2 {

        font-size: 18px;
    }


    .save-btn {

        width: 100%;
    }

}