:root {
    --bg: #f4f6fb;
    --nav: #1f2937;
    --accent: #4f46e5;
}

body {
    background: var(--bg);
    color: #1f2937;
}

/* Top navbar */
.app-nav {
    background: var(--nav);
}
.app-nav .navbar-brand,
.app-nav .nav-link {
    color: #fff;
}

/* Card-like surfaces */
.card-surface {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
    overflow: hidden;
}

/* Table */
.table thead th {
    background: #f9fafb;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #6b7280;
    white-space: nowrap;
}
.table td {
    font-size: .9rem;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

/* Scrollable list box: sticky header + always-reachable horizontal scrollbar */
.list-scroll {
    max-height: calc(100vh - 220px);
    overflow: auto;
}
.list-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 3;
}
/* Make scrollbars clearly visible */
.list-scroll::-webkit-scrollbar {
    height: 12px;
    width: 12px;
}
.list-scroll::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 6px;
    border: 2px solid #f1f3f5;
}
.list-scroll::-webkit-scrollbar-track {
    background: #f1f3f5;
}
.list-scroll {
    scrollbar-width: thin;
    scrollbar-color: #9ca3af #f1f3f5;
}

/* Clickable rows */
.row-link {
    cursor: pointer;
}
.row-link:hover {
    background: #eef2ff !important;
}
.table td.actions {
    cursor: default;
}
.sort-link {
    color: inherit;
    text-decoration: none;
}
.sort-link:hover {
    color: var(--accent);
}

/* View page long values */
.value-pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    font-size: .9rem;
}

/* Attachment image preview on the detail page */
.attach-img {
    max-width: 320px;
    max-height: 320px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    display: block;
    margin-bottom: .25rem;
    object-fit: contain;
    background: #f9fafb;
}
.attach-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px;
    background: #fff;
}
.attach-file {
    display: inline-block;
    padding: 24px 16px;
    text-decoration: none;
    font-weight: 500;
}

/* Footer */
.app-footer {
    border-top: 1px solid #e5e7eb;
    margin-top: 2rem;
}

/* Login screen */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1f2937, #4f46e5);
}
.login-card {
    background: #fff;
    width: 100%;
    max-width: 380px;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}
.brand-badge {
    font-size: 2.4rem;
    line-height: 1;
}
