* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: #f4f1ee;
}

/* Layout */
.container {
    display: flex;
    min-height: 100vh;
}

/* LEFT SIDE */
.left {
    flex: 1;
    background: url('https://images.unsplash.com/photo-1512820790803-83ca734da794') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: white;
}

.left h1 {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    line-height: 1.3;
    max-width: 400px;
}

/* RIGHT SIDE */
.right {
    flex: 1;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.card {
    width: 100%;
    max-width: 350px;
}

.card h2 {
    margin-bottom: 20px;
}

/* FORM */
input, select {
    width: 100%;
    padding: 14px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

button {
    width: 100%;
    padding: 12px 16px;
    background: black;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #333;
}

/* NAV */
.nav {
    background: black;
    color: white;
    padding: 15px;
    font-size: 14px;
}

.dashboard {
    padding: 20px;
}

/* TABLE STYLES */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

thead {
    background: #111;
    color: white;
}

th, td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid #ddd;
}

tr:nth-child(even) {
    background: #f9f9f9;
}

tr:hover {
    background: #f1f1f1;
}

table button {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 4px;
}

table button:hover {
    background: #555;
}

/* RESPONSIVE TABLE */
table,
thead,
tbody,
th,
td,
tr {
    display: block;
}

thead tr {
    display: none;
}

tbody tr {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
}

tbody td {
    display: flex;
    justify-content: space-between;
    padding: 6px 10px;
    position: relative;
}

tbody td::before {
    content: attr(data-label);
    font-weight: bold;
}

/* GRID FOR DASHBOARD CARDS */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {

    .container {
        flex-direction: column;
    }

    .left {
        height: 200px;
        text-align: center;
    }

    .left h1 {
        font-size: 24px;
    }

    .right {
        flex: none;
        height: auto;
        padding: 30px 20px;
    }

    .card {
        max-width: 100%;
    }

    /* Restore table layout on small screens for better readability */
    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: table;
    }

    thead tr {
        display: table-row;
    }

    tbody tr {
        display: table-row;
        border: none;
        margin-bottom: 0;
    }

    tbody td {
        display: table-cell;
        padding: 10px;
    }

    tbody td::before {
        content: none;
    }
}