/* Page layout */
body {
    margin: 0;
    padding: 0;
    background: #f2f4f7;
    font-family: "Inter", sans-serif;
    display: flex;
    justify-content: center;
    padding-top: 40px;
}

/* Main container */
.container {
    width: 90%;
    max-width: 900px;
    background: #fff;
    padding: 25px;
    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

/* Header with Add Button right aligned */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.add-btn {
    background: #42a5f5;
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.add-btn:hover {
    background: #1e88e5;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    border-radius: 10px;
    overflow: hidden;
}

thead {
    background: #42a5f5;
    color: #fff;
}

th, td {
    padding: 14px;
    border-bottom: 1px solid #eee;
}

tbody tr:hover {
    background: #f5f7fa;
}

/* Buttons */
.action-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

.edit-btn {
    background: #ffca28;
}

.delete-btn {
    background: #e53935;
    color: white;
}

/* ---------------- MODAL ---------------- */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content.modern {
    width: 420px;
    background: #ffffff;
    padding: 28px;
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    animation: modalPop 0.3s ease;
}

@keyframes modalPop {
    from {
        transform: scale(0.92);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.close-x {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.5;
}

.close-x:hover {
    opacity: 1;
}

/* Form Inputs */
.form-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-group label {
    font-weight: 600;
    font-size: 14px;
}

.input-group input {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #cfd8dc;
    font-size: 15px;
    background: #f9f9f9;
    transition: 0.2s;
}

.input-group input:focus {
    border-color: #42a5f5;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(66,165,245,0.18);
    outline: none;
}

/* Modal buttons */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.cancel-btn,
.save-btn {
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

.cancel-btn {
    background: #eceff1;
}

.save-btn {
    background: #42a5f5;
    color: white;
}
/* Toast */
#toast {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: #43a047;
    color: white;
    padding: 14px 20px;
    border-radius: 10px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: 0.3s;
    z-index: 9999;
}
a
#toast.show {
    opacity: 1;
    transform: translateY(0);
}
