@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

.animate-slide-in {
    animation: slideIn 0.3s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.2s ease-out forwards;
}

.nav-item {
    transition: background-color 0.15s ease, padding-left 0.15s ease;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    background-color: rgba(255, 255, 255, 0.15);
    border-right: 3px solid white;
}

.tab-btn {
    transition: all 0.15s ease;
    border-bottom: 2px solid transparent;
}

.tab-btn:hover {
    color: #2F4E9D;
}

.tab-btn.active {
    color: #2F4E9D;
    border-bottom-color: #2F4E9D;
}

.card-hover {
    transition: all 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.budget-bar {
    height: 24px;
    border-radius: 12px;
    overflow: hidden;
    background: #e5e7eb;
}

.budget-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 0.5s ease;
}

.approval-step {
    position: relative;
}

.approval-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 36px;
    left: 17px;
    width: 2px;
    height: calc(100% - 20px);
    background: #d1d5db;
}

.approval-step.completed:not(:last-child)::after {
    background: #2F4E9D;
}

.kanban-column {
    min-height: 200px;
}

/* Caps a data table's height to roughly the visible viewport so its
   scrollbars (the horizontal one especially) stay on-screen instead of
   sitting below however many rows the table has -- previously you had to
   scroll all the way down a long list just to find the horizontal scrollbar. */
.scroll-table {
    overflow: auto;
    max-height: calc(100vh - 300px);
}

.scroll-table thead th {
    position: sticky;
    top: 0;
    background: #f9fafb;
    z-index: 1;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

body.privacy-mode .privacy-blur {
    filter: blur(6px);
    transition: filter 0.15s ease;
}

body.privacy-mode.hover-reveal .privacy-blur:hover {
    filter: none;
}

/* Upload controls: a label wrapping a hidden file input, so the whole box is
   clickable, droppable, and pasteable. See fileDropZone() in components.js. */
.file-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 18px 16px;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    background: #f9fafb;
    color: #6b7280;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.file-drop:hover {
    border-color: #2F4E9D;
    background: #eef2ff;
    color: #2F4E9D;
}

.file-drop.is-dragging {
    border-color: #2F4E9D;
    border-style: solid;
    background: #dce4ff;
    color: #2F4E9D;
}

.file-drop.has-files {
    border-style: solid;
    border-color: #86efac;
    background: #f0fdf4;
}

.file-drop.file-drop-rejected {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #b91c1c;
}

/* The inline variant, for a toolbar row where a full drop box would tower
   over the buttons next to it. */
.file-drop-compact {
    flex-direction: row;
    padding: 7px 12px;
    gap: 8px;
    border-radius: 8px;
    text-align: left;
}

.file-drop-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    opacity: 0.7;
}

.file-drop-compact .file-drop-icon {
    width: 16px;
    height: 16px;
}

.file-drop-text {
    display: block;
    font-size: 13px;
    line-height: 1.35;
}

.file-drop-compact .file-drop-text {
    font-size: 12px;
}

.file-drop-browse {
    text-decoration: underline;
    font-weight: 500;
}

.file-drop-hint {
    display: block;
    font-size: 11px;
    opacity: 0.75;
    margin-top: 2px;
}

/* Empty until something is picked, so it takes no room in the resting state. */
.file-drop-files:empty {
    display: none;
}

.file-drop-files {
    font-size: 12px;
    font-weight: 500;
    color: #15803d;
    word-break: break-all;
}

.file-drop-rejected .file-drop-files {
    color: #b91c1c;
}

/* Long notes collapse to a preview rather than stretching their row. */
.note-cell {
    max-width: 26rem;
    overflow-wrap: anywhere;
}

.note-cell p {
    margin: 0;
}

.note-cell p + p,
.note-cell ul,
.note-cell ol {
    margin-top: 4px;
}
