/* ─── Warehouse Expenses Page ──────────────────────────────────────────────── */

.wexp-card {
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.wexp-card-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: 1rem 1.25rem;
    font-size: .875rem;
    font-weight: 700;
    color: #0f172a;
    border-bottom: 1px solid #f1f5f9;
}

.wexp-card-icon {
    font-size: .9rem;
    color: #7c3aed;
}

.wexp-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ede9fe;
    color: #6d28d9;
    font-size: .7rem;
    font-weight: 700;
    margin-left: .25rem;
}

.wexp-card-body {
    padding: 1.25rem;
}

.wexp-card-body.p-0 {
    padding: 0;
}

/* ─── Form ──────────────────────────────────────────────────────────────────── */

.wexp-form {
    /* just a wrapper */
}

.wexp-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: .75rem;
    align-items: end;
}

.wexp-field {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.wexp-field--wide {
    grid-column: span 2;
}

@media (max-width: 640px) {
    .wexp-field--wide {
        grid-column: span 1;
    }
}

.wexp-field--action,
.wexp-field--actions {
    display: flex;
    flex-direction: row;
    gap: .5rem;
    align-items: flex-end;
}

.wexp-label {
    font-size: .75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.wexp-input,
.wexp-select {
    height: 38px;
    padding: 0 .75rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: .8125rem;
    color: #0f172a;
    background: #fff;
    outline: none;
    width: 100%;
    transition: border-color .15s;
}

.wexp-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    padding-right: 2rem;
}

.wexp-input:focus,
.wexp-select:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08);
}

.wexp-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    height: 38px;
    padding: 0 1.125rem;
    background: #7c3aed;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: .8125rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    text-decoration: none;
}

.wexp-btn-primary:hover {
    background: #6d28d9;
}

.wexp-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    height: 38px;
    padding: 0 1rem;
    background: #f1f5f9;
    color: #475569;
    border: none;
    border-radius: 10px;
    font-size: .8125rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}

.wexp-btn-secondary:hover {
    background: #e2e8f0;
}

/* ─── Expense Rows ──────────────────────────────────────────────────────────── */

.wexp-row {
    border-bottom: 1px solid #f1f5f9;
}

.wexp-row:last-child {
    border-bottom: none;
}

.wexp-row-view {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .875rem 1.125rem;
    flex-wrap: wrap;
}

.wexp-row-edit {
    padding: 1rem 1.125rem;
    background: #fafbff;
    border-top: 1px solid #e8edf5;
}

.wexp-row-left {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
}

.wexp-row-right {
    display: flex;
    align-items: center;
    gap: .625rem;
    flex-shrink: 0;
}

.wexp-row-cat {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .875rem;
    flex-shrink: 0;
}

.wexp-cat--rent {
    background: #eff6ff;
    color: #2563eb;
}

.wexp-cat--salary {
    background: #f0fdf4;
    color: #16a34a;
}

.wexp-cat--other {
    background: #faf5ff;
    color: #7c3aed;
}

.wexp-row-name {
    font-size: .875rem;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wexp-row-meta {
    font-size: .75rem;
    color: #94a3b8;
    margin-top: .125rem;
}

.wexp-amount {
    font-size: .9375rem;
    font-weight: 700;
    color: #0f172a;
}

.wexp-status-pill {
    display: inline-flex;
    align-items: center;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
}

.wexp-status-pill--active {
    background: #dcfce7;
    color: #166534;
}

.wexp-status-pill--inactive {
    background: #f1f5f9;
    color: #94a3b8;
}

.wexp-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font-size: .8rem;
    transition: all .15s;
}

.wexp-btn-icon:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.wexp-btn-icon--danger {
    color: #dc2626;
    border-color: #fecaca;
}

.wexp-btn-icon--danger:hover {
    background: #fef2f2;
}

/* ─── Monthly Summary ───────────────────────────────────────────────────────── */

.wexp-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: .875rem;
}

.wexp-summary-item {
    border-radius: 12px;
    padding: 1rem 1.125rem;
    background: #f8fafc;
    border: 1px solid #e8edf5;
}

.wexp-summary-item.wexp-cat--rent {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.wexp-summary-item.wexp-cat--salary {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.wexp-summary-item.wexp-cat--other {
    background: #faf5ff;
    border-color: #e9d5ff;
}

.wexp-summary-item--total {
    background: #fefce8;
    border-color: #fef08a;
}

.wexp-summary-label {
    font-size: .75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .4rem;
}

.wexp-summary-value {
    font-size: 1.125rem;
    font-weight: 800;
    color: #0f172a;
}

.wexp-summary-item--total .wexp-summary-label {
    color: #92400e;
}

.wexp-summary-item--total .wexp-summary-value {
    color: #b45309;
}
