@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;600&display=swap');

:root {
    --bg-color: #fdfbf7;
    --card-bg: #ffffff;
    --primary: #c7ceea; /* Pastel Lavender */
    --secondary: #b5ead7; /* Pastel Mint */
    --accent: #ffb7b2; /* Pastel Pink */
    --peach: #ffdac1; /* Pastel Peach */
    --text-color: #555;
    --border-radius: 12px;
}

body {
    font-family: 'Quicksand', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
}

main {
    width: 100%;
    max-width: 800px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.actions-cell {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.actions-cell form {
    display: inline;
}

h1, h2 {
    color: #4a4a4a;
    text-align: center;
}

section {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 16px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

label {
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
    color: #666;
}

input[type="text"], input[type="date"], input[type="number"], input[type="time"], select {
    width: 100%;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

input[type="text"]:focus, input[type="date"]:focus, input[type="number"]:focus, input[type="time"]:focus, select:focus {
    border-color: var(--primary);
    outline: none;
}

button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
    font-size: 1rem;
}

button:active {
    transform: scale(0.98);
}

button[type="submit"] {
    background-color: var(--secondary);
    color: #4a6da7;
}

button.edit-btn {
    background-color: var(--peach);
    color: #d66c44;
}

button.delete-btn {
    background-color: var(--accent);
    color: #fff;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

thead tr {
    background-color: var(--primary);
    color: white;
    text-align: left;
}

th, td {
    padding: 15px;
}

th:first-child, td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

th:last-child, td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

tbody tr:nth-child(even) {
    background-color: #faf9f9;
}

tbody tr:hover {
    background-color: #f0f4f8;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close:hover {
    color: #000;
}
.maps-link {
    display: inline-block;
    color: rgb(37, 142, 240);
    text-decoration: underline;
    font-weight: 600;
}

@media (max-width: 768px) {
    body {
        padding: 20px 12px;
    }

    section {
        padding: 16px;
        margin-bottom: 20px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    th,
    td {
        padding: 10px;
        white-space: nowrap;
    }

    .actions-cell {
        min-width: 150px;
    }

    .modal-content {
        padding: 20px;
        width: calc(100% - 24px);
    }
}