/* UI/UX overrides for bills and tasks (dark mode, headers, compact buttons) */
/* These rules refine table headers, tasks controls, and bill info layout */

.data-table thead th {
    padding: 6px 8px;
    font-size: 0.85rem;
    line-height: 1.2;
}

/* Ensure tables use theme variables nicely in dark mode */
.dark-mode .data-table,
.data-table {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}
.dark-mode .data-table thead th,
.data-table thead th {
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}
.dark-mode .data-table tbody tr {
    border-top: 1px solid var(--border-light);
}

/* Compact tasks action buttons */
#tasks-table .action-buttons {
    display: inline-flex;
    gap: 6px;
}
#tasks-table .action-buttons .btn,
#tasks-table .status-toggle {
    padding: 4px 6px;
    font-size: 0.8rem;
    border-radius: 6px;
    min-width: auto;
    height: auto;
    line-height: 1.2;
}
#tasks-table .status-toggle {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

/* Task date state colors using theme variables */
.task-due-today { color: var(--warning); }
.task-overdue { color: var(--error); }
.task-normal { color: var(--text-primary); }

/* Status badge alignment */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Bills: layout tweaks */
.bill-info strong {
    text-transform: uppercase;
}
.bill-info .bill-amount {
    font-weight: 600;
}
.bill-info .bill-paid-date {
    margin-top: 2px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Ensure bill name is readable inside bill cards (override globals) */
.bill-card .bill-name {
    color: var(--text-primary) !important;
}
.dark-mode .bill-card .bill-name {
    color: rgba(255, 255, 255, 0.92) !important;
}

/* ---- Dark mode activation for cards (bills, tasks, generic content) ---- */
.dark-mode .bill-card,
.dark-mode .content-card,
.dark-mode .task-card {
    background: rgba(15, 15, 15, 0.95);
    border: none;
    color: rgba(255, 255, 255, 0.92);
}

.dark-mode .bill-card-header,
.dark-mode .bill-card-title,
.dark-mode .bill-card-meta {
    color: rgba(255, 255, 255, 0.92);
}

/* Leaner action buttons in dark mode: minimal background, subtle hover */
.dark-mode .bill-card-actions .btn,
.dark-mode .content-card .btn {
    background: transparent;
    border-color: transparent;
    color: #94a3b8;
}

.dark-mode .bill-card-actions .btn:hover,
.dark-mode .content-card .btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.92);
}

/* Fluid dashboard scaling (no device-specific breakpoints) */
#tab-chart-content .content-card,
#tab-chart-content .summary-card-modern{
    max-width: 100%;
    overflow: hidden;
}

#tab-chart-content .transaction-info,
#tab-chart-content .transaction-name{
    min-width: 0;
}

.home-totals-grid{
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.home-quick-grid{
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
