:root {
    --app-primary: #ff5a1f;
    --app-primary-dark: #df430c;
    --app-primary-soft: #fff0e9;
    --app-danger: #d92d3f;
    --app-warning: #9a5b13;
    --app-text: #171717;
    --app-muted: #71717a;
    --app-border: #e4e4e7;
    --app-surface: #ffffff;
    --app-background: #f6f6f4;
    --app-shadow: 0 10px 28px rgba(24, 24, 27, 0.07);
}

* {
    box-sizing: border-box;
}

body.app-body {
    min-height: 100vh;
    margin: 0;
    color: var(--app-text);
    background: var(--app-background);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

a {
    color: var(--app-primary-dark);
}

.app-navbar {
    padding: 0.9rem 0;
    background: #fff;
    border-bottom: 1px solid var(--app-border);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--app-text);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.brand:hover {
    color: var(--app-text);
}

.brand-mark {
    display: inline-grid;
    width: 2.1rem;
    height: 2.1rem;
    place-items: center;
    color: #fff;
    background: var(--app-text);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 800;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.basic-home {
    display: grid;
    min-height: calc(100vh - 65px);
    padding: 3rem 0;
    place-items: center;
}

.basic-hero {
    max-width: 52rem;
    padding: clamp(3rem, 8vw, 6rem) 1.25rem;
    text-align: center;
}

.hero-kicker {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--app-primary-dark);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.14em;
}

.hero-title {
    max-width: 48rem;
    margin: 0 auto 1.2rem;
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 850;
    letter-spacing: -0.07em;
    line-height: 0.98;
}

.hero-copy {
    max-width: 36rem;
    margin: 0 auto 1.9rem;
    color: var(--app-muted);
    font-size: 1.02rem;
    line-height: 1.7;
}

.page-shell {
    padding-top: 3.5rem;
    padding-bottom: 5rem;
}

.page-heading {
    margin-bottom: 1.75rem;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 0.65rem;
    padding: 0.25rem 0.55rem;
    color: #9a3412;
    background: var(--app-primary-soft);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.page-title {
    margin-bottom: 0.45rem;
    font-size: clamp(2rem, 4vw, 2.65rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.08;
}

.page-subtitle {
    max-width: 40rem;
    margin-bottom: 0;
    color: var(--app-muted);
}

.content-card,
.auth-card,
.search-card {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    box-shadow: var(--app-shadow);
}

.content-card {
    overflow: hidden;
}

.content-card-body {
    padding: clamp(1.35rem, 4vw, 2rem);
}

.auth-page {
    display: grid;
    min-height: 100vh;
    padding: 3rem 1.25rem;
    place-items: center;
}

.auth-wrap {
    width: 100%;
    max-width: 29rem;
}

.auth-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 1.4rem;
}

.auth-card {
    padding: clamp(1.6rem, 5vw, 2.4rem);
}

.auth-title {
    margin-bottom: 0.4rem;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.auth-subtitle {
    margin-bottom: 1.75rem;
    color: var(--app-muted);
}

.auth-footer {
    margin: 1.5rem 0 0;
    color: var(--app-muted);
    font-size: 0.88rem;
    text-align: center;
}

.auth-footer a {
    font-weight: 750;
    text-decoration: none;
}

.form-label {
    margin-bottom: 0.45rem;
    color: #3f3f46;
    font-size: 0.85rem;
    font-weight: 700;
}

.form-control {
    min-height: 3rem;
    padding: 0.7rem 0.85rem;
    color: var(--app-text);
    background: #fff;
    border-color: #d4d4d8;
    border-radius: 0.65rem;
}

.form-control::placeholder {
    color: #a1a1aa;
}

.form-control:focus {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 0.22rem rgba(255, 90, 31, 0.13);
}

.form-hint {
    margin-top: 0.5rem;
    color: var(--app-muted);
    font-size: 0.8rem;
}

.btn {
    padding: 0.65rem 1rem;
    border-radius: 0.6rem;
    font-size: 0.88rem;
    font-weight: 750;
}

.btn-sm {
    padding: 0.46rem 0.75rem;
    font-size: 0.8rem;
}

.btn-primary {
    background: var(--app-primary);
    border-color: var(--app-primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: var(--app-primary-dark) !important;
    border-color: var(--app-primary-dark) !important;
}

.btn-outline-primary {
    color: var(--app-text);
    background: #fff;
    border-color: #c9c9ce;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: #fff;
    background: var(--app-text);
    border-color: var(--app-text);
}

.btn-outline-secondary {
    color: #52525b;
    border-color: #d4d4d8;
}

.btn-outline-secondary:hover {
    color: var(--app-text);
    background: #f1f1f1;
    border-color: #b8b8be;
}

.btn-soft-warning {
    color: var(--app-warning);
    background: #fff4df;
    border-color: transparent;
}

.btn-soft-warning:hover {
    color: #fff;
    background: var(--app-warning);
}

.btn-soft-danger {
    color: var(--app-danger);
    background: #fff0f1;
    border-color: transparent;
}

.btn-soft-danger:hover {
    color: #fff;
    background: var(--app-danger);
}

.alert {
    border: 1px solid transparent;
    border-radius: 0.7rem;
    font-size: 0.88rem;
}

.alert-danger {
    color: #9f2434;
    background: #fff0f1;
    border-color: #ffd2d7;
}

.search-card {
    padding: 1rem;
    box-shadow: none;
}

.table-card {
    overflow: hidden;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: #fafafa;
    margin-bottom: 0;
}

.table thead th {
    padding: 0.9rem 1.05rem;
    color: var(--app-muted);
    background: #f7f7f7;
    border-bottom-color: var(--app-border);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.95rem 1.05rem;
    border-bottom-color: #ededee;
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 700;
}

.user-avatar {
    display: inline-grid;
    width: 2.3rem;
    height: 2.3rem;
    flex: 0 0 auto;
    place-items: center;
    color: #9a3412;
    background: var(--app-primary-soft);
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 850;
}

.id-badge {
    color: var(--app-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.78rem;
}

.empty-state {
    padding: 4rem 1rem;
    color: var(--app-muted);
    text-align: center;
}

.empty-state strong {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--app-text);
    font-size: 1.05rem;
}

@media (max-width: 767.98px) {
    .page-shell {
        padding-top: 2.25rem;
    }

    .basic-home {
        min-height: calc(100vh - 65px);
        padding: 1.5rem 0;
    }

    .hero-title {
        font-size: clamp(2.8rem, 14vw, 4rem);
    }

    .auth-page {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 419.98px) {
    .nav-actions .btn {
        padding-inline: 0.65rem;
    }

    .brand {
        gap: 0.45rem;
    }
}
