* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* خلفية متدرجة متحركة */
body {
    background: linear-gradient(-45deg, #0d0d0d, #1a1a1a, #202020, #121212);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: #fff;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    min-height: 100vh;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* حاوية المشروع */
.crud {
    width: 85%;
    margin: auto;
    padding: 20px;
}

/* العنوان */
.head {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
}
.head h2 {
    margin: 10px;
    font-size: 2.5rem;
}

/* المدخلات */
.input {
    background: rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    margin-bottom: 20px;
}

input {
    width: 100%;
    height: 45px;
    outline: none; 
    border: none;
    background-color: rgba(255,255,255,0.1);
    margin: 10px 0;
    border-radius: 8px;
    padding: 10px;
    color: #fff;
    font-size: 1rem;
    transition: 0.3s;
}
input:focus {
    background: rgba(255,255,255,0.15);
    transform: scale(1.03);
}

/* الحقول الخاصة بالأسعار */
.price {
    display: flex;
    align-items: center;
    gap: 10px;
}
.price input {
    flex: 1;
}

/* total */
#total {
    background: #530879;
    padding: 10px 15px;
    border-radius: 6px;
    font-weight: bold;
    white-space: nowrap; /* يمنع النزول لسطر جديد */
}
#total::before {
    content: 'TOTAL: ';
}

/* زر الانشاء */
#submit {
    background-color: #240d77;
    margin: 10px 0;
    font-size: 1.1rem;
    padding: 12px;
}
#submit:hover{
    background-color: #037514;
}

/* الأزرار */
button {
    width: 100%;
    height: 45px;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    background-color: #0d0235;
    color: #fff;
    transition: 0.3s;
    font-size: 1rem;
}
button:hover{
    background: #490423;
    letter-spacing: 1px;
}

/* أزرار البحث */
.buttonsearch {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}
.buttonsearch button {
    flex: 1;
}

/* زر Delete All */
#deleteAll{
    margin: 20px 0;
}

/* الجدول */
table{
    width: 100%;
    text-align: center;
    margin: 20px 0;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
th,td{
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
th {
    background: rgba(255,255,255,0.1);

}

/* معالجة مشكلة الحقول في الموبايل */
@media (max-width: 600px) {
    .price {
        flex-direction: column; /* خليهم تحت بعض */
        align-items: stretch;   /* ياخدوا العرض بالكامل */
    }

    .price input {
        width: 100%; /* كل حقل ياخد العرض كله */
    }
}
