/* global css */
:root {
    color-scheme: light dark;

    /* define colors for app */
    --bg-light: #f0f2f5;
    --bg-dark: #121212;
    --card-light: #fafafa;
    --card-dark: #222222;
    --card-shadow: rgba(0, 0, 0, 0.24);
    --muted-light: #646464;
    --muted-dark: #848484;
    --primary: #2673dd;
    --error-light: #ee2c4a;
    --error-dark: #a82830;
    --warning-light: #ffbb00;
    --warning-dark: #b28400;
    --success-light: #44cc77;
    --success-dark: #309053;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    background: light-dark(var(--bg-light), var(--bg-dark));
    color: light-dark(var(--bg-dark), var(--bg-light));
}

.app {
    max-width: 1100px;
    margin: 28px auto;
    padding: 20px;
}

.error {
    color: light-dark(var(--error-light), var(--error-dark));
}

.success {
    color: light-dark(var(--success-light), var(--success-dark));
}

.muted {
    color: light-dark(var(--muted-light), var(--muted-dark));
}

h1 {
    font-size: 18px;
    margin: 0;
}

.card {
    background: light-dark(var(--card-light), var(--card-dark));
    border-radius: 12px;
    box-shadow: 0 6px 18px var(--card-shadow);
    padding: 16px;
}

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

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

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2dd4bf, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

.userbar {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* not found page */
.main-card {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 64vh;
}

/* navbar */
nav ul {
    list-style: none;
    padding: 10px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

nav button {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}

nav button.active {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0.06));
    color: var(--primary);
    font-weight: 600;
}

/* input */
form {
    width: 100%;
}

label {
    display: block;
    font-size: 13px;
    color: light-dark(var(--muted-light), var(--muted-dark));
    margin-bottom: 6px;
}

input[type=text],
input[type=password],
input[type=url] {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid light-dark(var(--muted-light), var(--muted-dark));
    background: transparent;
}

select {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid light-dark(var(--muted-light), var(--muted-dark));
}

.button {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 10px;
    border: 0;
    cursor: pointer;
    font-weight: 600;
}

.button-primary {
    background: var(--primary);
    color: white;
}

.button-ghost {
    background: transparent;
    border: 1px solid light-dark(var(--muted-light), var(--muted-dark));
}

/* utilities */
.row {
    display: flex;
    gap: 10px;
    align-items: center
}

.space {
    height: 12px
}

table {
    width: 100%;
    border-collapse: collapse
}

th,
td {
    padding: 8px;
    border-bottom: 1px solid #f1f5f9;
    text-align: left
}

.small {
    font-size: 13px
}

.right {
    margin-left: auto
}

.list-scroll {
    max-height: 420px;
    overflow: auto;
    padding-right: 6px;
}

footer {
    margin-top: 18px;
    text-align: center;
    color: light-dark(var(--muted-light), var(--muted-dark));
    font-size: 13px;
}

@media (min-width: 768px) {
    form {
        width: 60%;
    }

    .grid {
        grid-template-columns: 260px 1fr;
    }
}