* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Tahoma, "Segoe UI", Arial, sans-serif;
    background: radial-gradient(900px 500px at 20% 10%, rgba(37, 99, 235, 0.18), transparent 60%),
        radial-gradient(900px 500px at 90% 40%, rgba(16, 185, 129, 0.18), transparent 60%),
        #0b1220;
    color: #e5e7eb;
}

header {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(15, 23, 42, 0.95));
    color: white;
    text-align: center;
    padding: 34px 18px;
}

.header-inner {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.header-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-weight: 700;
    font-size: 13px;
}

header h1 {
    margin-bottom: 10px;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 30px auto;
}

.dashboard {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.left,
.right {
    display: grid;
    gap: 16px;
}

.form-card,
.table-card,
.card {
    background: rgba(255, 255, 255, 0.06);
    padding: 22px;
    margin-bottom: 18px;
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card {
    margin-bottom: 0;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.05));
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.hint {
    margin-top: 10px;
    color: rgba(248, 250, 252, 0.7);
    font-size: 14px;
}

.muted {
    color: rgba(248, 250, 252, 0.65);
    font-size: 14px;
}

h2 {
    margin-bottom: 15px;
    color: #f8fafc;
}

input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    font-size: 16px;
    background: rgba(15, 23, 42, 0.55);
    color: #f8fafc;
}

input::placeholder {
    color: rgba(248, 250, 252, 0.65);
}

button {
    background: linear-gradient(135deg, #2563eb, #22c55e);
    color: white;
    padding: 12px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 16px;
}

button:hover {
    filter: brightness(1.05);
}

.row-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.row-actions button {
    flex: 1;
}

button.secondary {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

button.secondary:hover {
    filter: brightness(1.1);
}

.summary {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.45);
    display: grid;
    gap: 6px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    overflow: hidden;
    border-radius: 10px;
}

.table-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.table-wrap {
    margin-top: 10px;
    overflow: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

th {
    background: rgba(15, 23, 42, 0.8);
    color: white;
}

th, td {
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

.delete-btn {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    padding: 8px 12px;
}

.delete-btn:hover {
    filter: brightness(1.05);
}

#grandTotal {
    margin-top: 20px;
    text-align: right;
    color: #86efac;
}

.total-row {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 700px) {
    table {
        font-size: 12px;
    }

    header h1 {
        font-size: 24px;
    }
}

@media (min-width: 900px) {
    .dashboard {
        grid-template-columns: 0.9fr 1.3fr;
        align-items: start;
    }

    .grid-2 {
        grid-template-columns: 1fr 1fr;
        align-items: end;
    }

    .grid-2 button {
        grid-column: 1 / -1;
        width: fit-content;
        justify-self: start;
        padding-inline: 22px;
    }

    .row-actions button {
        flex: 0;
    }
}