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

body {
    background: #0f172a;
    color: #f1f5f9;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
}

.crud {
    width: 90%;
    max-width: 1200px;
    margin: 40px auto;
    background: #1e293b; 
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* --- Typography & Headers --- */
.head {
    text-align: center;
    margin-bottom: 30px;
}

.head h1 {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #10b9817e;
    letter-spacing: 1px;
    font-family: 'Courier New', Courier, monospace;
}
.head h1 span{
    color: #d6dcdadf;
    font-size: 1.6rem;
    font-family: 'Courier New', Courier, monospace;
}
.head h1 span .design{
    color: #10b981;
}
.head p {
    color: #d6dcdaac;
    margin-top: 5px;
    letter-spacing: 1px;
    font-family: 'Courier New', Courier, monospace;
}

/* --- Form Components & Inputs --- */
input {
    width: 100%;
    height: 45px;
    outline: none;
    border: 1px solid #334155;
    background: #0f172a;
    margin: 8px 0;
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    transition: all 0.3s ease;
}

input:focus {
    border-color: #10b981; 
    background: #1e293b;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
    transform: scale(1.01);
}
#search:focus{
 transform: scale(1.001);   
}
.price {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.price input {
    flex: 1;
    min-width: 80px;
}

#total {
    background: #059669; 
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    border-radius: 8px;
    font-weight: bold;
    min-height: 45px;
    margin: 8px 0;
}
#total::before{
    content: 'total:';
    margin-right: 10px;
}

/* --- Action Buttons --- */
button {
    width: 100%;
    height: 45px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.4s ease;
    text-transform: uppercase;
}

button:hover {
    filter: brightness(1.1);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
    letter-spacing: 1px;
}

/* --- Search & Secondary Controls --- */
.btnsearch {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

#deleteAll {
    margin: 20px 0;
}

#deleteAll button {
    background: linear-gradient(135deg, #f43f5e, #be123c); /* Sophisticated Rose/Red */
}

/* --- Data Table & Scroll Management --- */
.outputs {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 8px;
    background: #1e293b;
    -webkit-overflow-scrolling: touch;
}

/* Custom Scrollbar Styling */
.outputs::-webkit-scrollbar {
    height: 8px;
}

.outputs::-webkit-scrollbar-track {
    background: #0f172a;
}

.outputs::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 10px;
}

table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    margin-top: 30px;
    text-align: center;
}

table th {
    background: #334155;
    padding: 15px;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #94a3b8;
}

table td {
    padding: 12px;
    border-bottom: 1px solid #334155;
    font-size: 0.9rem;
}

tr:hover {
    background: rgba(16, 185, 129, 0.05); 
}

table button {
    height: 32px;
    font-size: 0.75rem;
    border-radius: 6px;
    padding: 0 10px;
}

/* --- Dashboard Styling --- */
.dashboard {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    justify-content: center;
}

.stat-item {
    background: #0f172a;
    padding: 15px 25px;
    border-radius: 12px;
    border-top: 3px solid #10b981; 
    flex: 1;
    text-align: center;
}

.stat-item span:first-child {
    color: #64748b;
    font-size: 0.9rem;
    display: block;
}

.stat-item span:last-child {
    font-size: 1.5rem;
    font-weight: bold;
    color: #10b981;
}
/* --- Responsive Design --- */
@media (max-width: 768px) {
    .crud {
        width: 95%;
        padding: 15px;
        margin: 20px auto;
    }

    .head head {
        font-size: 2rem;
    }

    .price {
        flex-direction: column;
        gap: 5px;
    }

    .price input, #total {
        width: 100%;
        margin: 2px 0;
    }

    .btnsearch {
        flex-direction: column;
        gap: 10px;
    }

    table {
        min-width: 600px;
    }
}

@media (max-width: 480px) {
    .head head {
        font-size: 1.5rem;
    }
    
    input, button {
        height: 40px;
    }
}