/* RESET */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial;
    background: #f5f5f5;
}

/* APP BAR */
.app-bar {
    background: #d32f2f;
    color: white;
    padding: 16px;
    text-align: center;
    position: sticky;
    top: 0;
}

/* LAYOUT */
main {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* CARD */
.card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* FORM */
.field {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

input, select, textarea {
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

textarea {
    min-height: 80px;
}

/* BUTTON */
button {
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: #d32f2f;
    color: white;
    font-size: 16px;
}

button:disabled {
    background: #ccc;
}

/* PREVIEW */
.preview-box p {
    margin: 6px 0;
}

/* SUMMARY */
.summary-grid {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

/* TABLE */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #d32f2f;
    color: white;
}

td, th {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: center;
}

/* ACTION BUTTONS */
.action-btn {
    border: none;
    padding: 6px;
    margin: 2px;
    border-radius: 5px;
    color: white;
}

.edit { background: orange; }
.delete { background: red; }

/* 📱 TABLET */
@media (min-width: 768px) {
    main {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .card:last-child {
        grid-column: span 2;
    }
}

/* 💻 DESKTOP */
@media (min-width: 1024px) {
    main {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .card:nth-child(1) {
        grid-column: span 1;
    }

    .card:nth-child(4) {
        grid-column: span 3;
    }
}