html {
    color-scheme: light;
}

html.dark {
    color-scheme: dark;
}

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    min-width: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    border-radius: 0.5rem;
    padding: 0.625rem 0.75rem;
    font-size: 0.925rem;
    font-weight: 500;
    color: rgb(63 63 70);
    transition: background 150ms ease, color 150ms ease;
}

.nav-link:hover {
    background: rgb(244 244 245);
    color: rgb(24 24 27);
}

.dark .nav-link {
    color: rgb(212 212 216);
}

.dark .nav-link:hover {
    background: rgb(39 39 42);
    color: white;
}

.nav-link-active {
    background: rgb(255 237 213);
    color: rgb(194 65 12);
}

.dark .nav-link-active {
    background: rgba(234, 88, 12, 0.16);
    color: rgb(251 146 60);
}

.icon-button {
    display: inline-flex;
    height: 2.5rem;
    width: 2.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    border: 1px solid rgb(228 228 231);
    background: white;
    color: rgb(63 63 70);
}

.icon-button:hover {
    background: rgb(244 244 245);
    color: rgb(24 24 27);
}

.dark .icon-button {
    border-color: rgb(63 63 70);
    background: rgb(9 9 11);
    color: rgb(228 228 231);
}

.dark .icon-button:hover {
    background: rgb(39 39 42);
    color: white;
}

.form-control {
    width: 100%;
    max-width: 100%;
    border-radius: 0.5rem;
    border: 1px solid rgb(212 212 216);
    background: white;
    padding: 0.625rem 0.75rem;
    color: rgb(24 24 27);
    outline: none;
}

.form-control:focus {
    border-color: rgb(234 88 12);
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.form-control[readonly] {
    background: rgb(244 244 245);
    color: rgb(82 82 91);
}

.dark .form-control {
    border-color: rgb(63 63 70);
    background: rgb(24 24 27);
    color: white;
}

.dark .form-control[readonly] {
    background: rgb(39 39 42);
    color: rgb(212 212 216);
}

.field-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgb(63 63 70);
}

@media (max-width: 639px) {
    .btn-primary,
    .btn-secondary,
    .btn-danger {
        min-height: 44px;
        padding: 0.58rem 0.75rem;
        font-size: 0.95rem;
    }
}

.dark .field-label {
    color: rgb(212 212 216);
}

.btn-primary,
.btn-secondary,
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.5rem;
    padding: 0.625rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.btn-primary {
    background: rgb(234 88 12);
    color: white;
}

.btn-primary:hover {
    background: rgb(194 65 12);
}

.btn-secondary {
    border: 1px solid rgb(212 212 216);
    background: white;
    color: rgb(39 39 42);
}

.btn-secondary:hover {
    background: rgb(244 244 245);
}

.dark .btn-secondary {
    border-color: rgb(63 63 70);
    background: rgb(24 24 27);
    color: rgb(244 244 245);
}

.dark .btn-secondary:hover {
    background: rgb(39 39 42);
}

.btn-danger {
    border: 1px solid rgb(254 202 202);
    background: rgb(254 242 242);
    color: rgb(185 28 28);
}

.btn-danger:hover {
    background: rgb(254 226 226);
}

.dark .btn-danger {
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(127, 29, 29, 0.25);
    color: rgb(252 165 165);
}
