@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
    --base-clr: #11121a;
    --line-clr: #42434a;
    --hover-clr: #222533;
    --text-clr: #e6e6ef;
    --accent-clr: #5e63ff;
    --secondary-text-clr: #b0b3c1;
    --bad: #ff6b6b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-family: 'Poppins', sans-serif;
    line-height: 1.5;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    background-color: var(--base-clr);
    color: var(--text-clr);
    display: grid;
}

main {
    padding: min(30px, 7%);
}

.container {
    max-width: 1200px;
}

h1 {
    margin-bottom: 0.75rem;
}

.controls {
    margin-bottom: 0.75rem;
    color: var(--secondary-text-clr);
}

.table {
    border: 1px solid var(--line-clr);
    border-radius: 10px;
    overflow: hidden;
}

.row {
    display: grid;
    grid-template-columns:         
        minmax(140px, 1fr)  /* Van */
        minmax(90px, 1fr)     /* Current */
        minmax(90px, 1fr)     /* Previous */
        minmax(90px, 1fr)     /* Difference */
        minmax(140px, 1.2fr)  /* Updated By */
        minmax(170px, 1.2fr); /* Submitted */

    padding: 0.6rem;
    border-bottom: 1px solid var(--line-clr);
    background-color: var(--hover-clr);
    font-size: 0.9rem;
    white-space: nowrap;
}

.row > div {
    padding: 0 0.5rem;
    display: flex;
}

.row:last-child {
    border-bottom: none;
}

.row.header {
    background-color: #191b27;
    font-weight: 600;
}

.row.flagged {
    color: var(--bad);
}

#message {
    margin: 0.75rem 0;
    color: var(--secondary-text-clr);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

button {
    background-color: var(--accent-clr);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
}

.row:not(.header):nth-child(even) {
    background-color: #1a1c28;
}

.row:not(.header):nth-child(odd) {
    background-color: #222533;
}

@media(max-width: 800px) {
    body {
        grid-template-columns: 1fr;
    }

    main {
        padding: 2em 1em 60px 1em;
    }

    .row {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .row.header {
        display: none;
    }
}

@media (max-width: 800px) {
  .row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .row > div {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .row > div::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--secondary-text-clr);
    flex-shrink: 0;
  }
}
