/* ==========================================================
   Global
========================================================== */

*{
    box-sizing:border-box;
    margin:0;
    padding:0;
}

body{
    font-family:Arial,Helvetica,sans-serif;
    background:#f4f7fb;
    color:#222;
    line-height:1.6;
}

/* ==========================================================
   Hero
========================================================== */

.hero{
    background:linear-gradient(135deg,#2563eb,#4f46e5);
    color:#fff;
    padding:60px 20px;
    text-align:center;
}

.hero-content{
    max-width:900px;
    margin:auto;
}

.hero h1{
    font-size:42px;
    margin-bottom:15px;
}

.hero p{
    font-size:18px;
    opacity:.95;
}

/* ==========================================================
   Main Container
========================================================== */

.container{
    max-width:1100px;
    margin:35px auto;
    padding:20px;
}

form{
    background:#fff;
    padding:35px;
    border-radius:14px;
    box-shadow:0 8px 25px rgba(0,0,0,.08);
}

/* ==========================================================
   Cards
========================================================== */

.card{
    margin-bottom:30px;
    padding:25px;
    border:1px solid #e5e7eb;
    border-radius:12px;
    background:#fff;
}

.card:last-child{
    margin-bottom:0;
}

h2{
    color:#2563eb;
    margin-bottom:15px;
}

/* ==========================================================
   Section Header
========================================================== */

.section-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:18px;
    gap:15px;
}

/* ==========================================================
   Grid
========================================================== */

.grid-2{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:20px;
    margin-bottom:20px;
}

.form-group{
    display:flex;
    flex-direction:column;
}

/* ==========================================================
   Form Elements
========================================================== */

label{
    font-weight:bold;
    margin-bottom:6px;
}

input,
textarea{
    width:100%;
    padding:12px;
    border:1px solid #cbd5e1;
    border-radius:8px;
    font-size:15px;
    transition:.2s;
}

input:focus,
textarea:focus{
    outline:none;
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,.15);
}

textarea{
    resize:vertical;
    min-height:120px;
}

/* ==========================================================
   Buttons
========================================================== */

button{
    border:none;
    border-radius:8px;
    cursor:pointer;
    transition:.2s;
    font-size:15px;
}

.primary-btn{
    background:#2563eb;
    color:#fff;
    padding:14px 28px;
    font-size:17px;
}

.primary-btn:hover{
    background:#1d4ed8;
}

.add-btn{
    background:#10b981;
    color:#fff;
    padding:10px 18px;
}

.add-btn:hover{
    background:#059669;
}

.remove-btn{
    background:#dc2626;
    color:#fff;
    padding:10px 18px;
}

.remove-btn:hover{
    background:#b91c1c;
}

.secondary-btn{
    background:#6b7280;
    color:#fff;
    padding:14px 22px;
    margin-left:10px;
}

.secondary-btn:hover{
    background:#4b5563;
}

/* ==========================================================
   Action Buttons
========================================================== */

.actions{
    display:flex;
    justify-content:center;
    gap:15px;
    margin-top:35px;
    flex-wrap:wrap;
}

/* ==========================================================
   Dynamic Cards
========================================================== */

.dynamic-card{
    border:1px solid #d1d5db;
    border-radius:10px;
    background:#fafafa;
    padding:18px;
    margin-bottom:18px;
}

.dynamic-card input,
.dynamic-card textarea{
    margin-bottom:12px;
}

/* ==========================================================
   Loading Overlay
========================================================== */

.loading-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.6);
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    color:#fff;
    z-index:9999;
}

.hidden{
    display:none;
}

.loader{
    width:60px;
    height:60px;
    border:6px solid #fff;
    border-top:6px solid transparent;
    border-radius:50%;
    animation:spin 1s linear infinite;
    margin-bottom:20px;
}

@keyframes spin{
    to{
        transform:rotate(360deg);
    }
}

/* ==========================================================
   Toast
========================================================== */

.toast{
    position:fixed;
    bottom:20px;
    right:20px;
    color:#fff;
    padding:15px 22px;
    border-radius:8px;
    font-weight:bold;
    box-shadow:0 5px 18px rgba(0,0,0,.2);
    z-index:10000;
}

/* ==========================================================
   Footer
========================================================== */

footer{
    margin-top:50px;
    background:#1e293b;
    color:#fff;
    padding:30px 20px;
    text-align:center;
}

.footer-content{
    max-width:900px;
    margin:auto;
}

.footer-content h3{
    margin-bottom:10px;
}

.footer-content p{
    margin:6px 0;
}

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

@media(max-width:768px){

    .hero h1{
        font-size:32px;
    }

    .hero p{
        font-size:16px;
    }

    .container{
        padding:10px;
    }

    form{
        padding:20px;
    }

    .grid-2{
        grid-template-columns:1fr;
    }

    .section-header{
        flex-direction:column;
        align-items:flex-start;
    }

    .actions{
        flex-direction:column;
    }

    .primary-btn,
    .secondary-btn,
    .add-btn,
    .remove-btn{
        width:100%;
        margin-left:0;
    }
}