/* Expense detail view modal (edx-*) */
.edx-overlay {
    position: fixed; inset: 0; z-index: 1200;
    background: rgba(15, 23, 42, 0.45);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
}
.edx-dialog {
    background: #fff; border-radius: 10px; width: min(920px, 100%);
    max-height: min(92vh, 900px); display: flex; flex-direction: column;
    box-shadow: 0 12px 40px rgba(30, 45, 90, 0.22);
    border: 1px solid #e2e7f3; overflow: hidden;
}
.edx-header {
    display: flex; align-items: center; gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    background: linear-gradient(135deg, #1e2d5a 0%, #2e4494 100%);
    color: #fff; flex-shrink: 0;
}
.edx-header-main { display: flex; align-items: center; gap: 0.55rem; flex: 1; min-width: 0; }
.edx-header-icon { font-size: 1.25rem; opacity: 0.9; }
.edx-title { margin: 0; font-size: 0.95rem; font-weight: 700; line-height: 1.2; }
.edx-sub { display: block; font-size: 0.62rem; opacity: 0.8; margin-top: 0.1rem; }
.edx-status {
    font-size: 0.6rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; padding: 0.2rem 0.45rem; border-radius: 999px;
    background: rgba(255, 255, 255, 0.15); color: #fff;
}
.edx-status--approved { background: #dcfce7; color: #15803d; }
.edx-status--draft { background: #fef9c3; color: #a16207; }
.edx-status--rejected { background: #fee2e2; color: #b91c1c; }
.edx-status--cancelled { background: #f1f5f9; color: #64748b; }
.edx-close {
    border: none; background: rgba(255, 255, 255, 0.12); color: #fff;
    width: 30px; height: 30px; border-radius: 6px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.edx-close:hover { background: rgba(255, 255, 255, 0.22); }
.edx-body {
    flex: 1; overflow-y: auto; padding: 0.75rem 0.85rem;
    display: flex; flex-direction: column; gap: 0.75rem;
}
.edx-section-title {
    margin: 0 0 0.45rem; font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em; color: #8492b4;
}
.edx-grid {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem 0.75rem;
}
.edx-item { display: flex; flex-direction: column; gap: 0.12rem; min-width: 0; }
.edx-item--wide { grid-column: 1 / -1; }
.edx-label {
    font-size: 0.58rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; color: #8492b4;
}
.edx-value { font-size: 0.76rem; color: #1a1f36; word-break: break-word; }
.edx-value--notes { white-space: pre-wrap; }
.edx-muted { color: #64748b; font-weight: 400; }
.edx-table-wrap { overflow-x: auto; border: 1px solid #e8edf7; border-radius: 6px; }
.edx-table { width: 100%; border-collapse: collapse; font-size: 0.72rem; }
.edx-table th {
    background: #f4f6fb; color: #5a6a8a; font-weight: 700; text-align: left;
    padding: 0.35rem 0.5rem; border-bottom: 1px solid #e2e7f3;
    font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.edx-table td { padding: 0.35rem 0.5rem; border-bottom: 1px solid #f0f3fa; color: #1a1f36; }
.edx-table tbody tr:last-child td { border-bottom: none; }
.edx-num { text-align: right; white-space: nowrap; }
.edx-num--bold { font-weight: 700; color: #1d4ed8; }
.edx-tfoot-label { text-align: right; font-weight: 700; color: #5a6a8a; }
.edx-empty { margin: 0; color: #94a3b8; font-size: 0.74rem; }
.edx-footer {
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
    padding: 0.55rem 0.85rem; border-top: 1px solid #e8edf7; background: #f8fafc; flex-shrink: 0;
}
.edx-total-label { display: block; font-size: 0.58rem; font-weight: 700; text-transform: uppercase; color: #8492b4; }
.edx-total-val { font-size: 1.05rem; font-weight: 700; color: #1d4ed8; }
.edx-footer-actions { display: inline-flex; gap: 0.4rem; }
.edx-btn {
    border-radius: 6px; padding: 0.35rem 0.7rem; font-size: 0.74rem; font-weight: 600;
    cursor: pointer; border: 1px solid transparent; display: inline-flex; align-items: center; gap: 0.3rem;
}
.edx-btn--primary { background: #2e4494; color: #fff; border-color: #2e4494; }
.edx-btn--primary:hover { background: #1e2d5a; }
.edx-btn--ghost { background: #fff; color: #475569; border-color: #d1d9ef; }
.edx-btn--ghost:hover { background: #f8fafc; }
@media (max-width: 768px) {
    .edx-grid { grid-template-columns: 1fr 1fr; }
    .edx-footer { flex-direction: column; align-items: stretch; }
    .edx-footer-actions { justify-content: flex-end; }
}
