/* 
 * Accounting Module - Premium Dark Theme Styling
 * Standalone styles specific to the financial dashboard, invoices, and payments.
 */

:root {
    --acc-bg: #0f172a; /* Slate 900 */
    --acc-card-bg: #1e293b; /* Slate 800 */
    --acc-text-primary: #f8fafc; /* Slate 50 */
    --acc-text-secondary: #94a3b8; /* Slate 400 */
    --acc-border: rgba(255, 255, 255, 0.1);
    --acc-accent-blue: #3b82f6; /* Blue 500 */
    --acc-accent-green: #10b981; /* Emerald 500 */
    --acc-accent-orange: #f59e0b; /* Amber 500 */
    --acc-accent-red: #ef4444; /* Red 500 */
}

.accounting-container {
    padding: 20px 30px;
}

.acc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--acc-border);
    padding-bottom: 20px;
}

.acc-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--acc-text-primary);
}

.acc-title .material-icons {
    color: var(--acc-accent-blue);
    font-size: 2rem;
}

/* Dashboard Metric Cards */
.acc-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.acc-metric-card {
    background: var(--acc-card-bg);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--acc-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.acc-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.acc-metric-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--acc-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.acc-metric-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--acc-text-primary);
}

/* Tables */
.acc-table-container {
    background: var(--acc-card-bg);
    border-radius: 12px;
    border: 1px solid var(--acc-border);
    overflow-x: auto;
    margin-bottom: 30px;
}

.acc-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.acc-table th {
    padding: 16px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--acc-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--acc-border);
    background: rgba(0,0,0,0.2);
}

.acc-table td {
    padding: 16px;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid var(--acc-border);
    color: var(--acc-text-primary);
}

.acc-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.acc-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Phase 4: Financial Reports */
.acc-card {
    background: var(--acc-card-bg);
    border: 1px solid var(--acc-border);
    border-radius: 12px;
    overflow: hidden;
}

.acc-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--acc-border);
    background: rgba(0, 0, 0, 0.2);
}

.acc-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--acc-text-primary);
}

.chart-bar-container {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.chart-bar-label {
    width: 140px;
    font-size: 0.85rem;
    color: var(--acc-text-secondary);
    font-weight: 600;
}

.chart-bar-track {
    flex: 1;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    margin: 0 16px;
    overflow: hidden;
}

.chart-bar-fill {
    height: 100%;
    background: var(--acc-accent-blue);
    border-radius: 6px;
}

.chart-bar-value {
    width: 80px;
    text-align: right;
    font-size: 0.85rem;
    color: var(--acc-text-primary);
    font-weight: 700;
}

/* Status Badges */
.acc-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.acc-badge.paid { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.acc-badge.unpaid { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.acc-badge.partial { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.acc-badge.draft { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; }

/* Action Buttons */
.acc-btn {
    background: var(--acc-accent-blue);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, transform 0.1s;
    outline: none;
}

.acc-btn:hover { background: #2563eb; }
.acc-btn-outline {
    background: transparent;
    border: 1px solid var(--acc-accent-blue);
    color: var(--acc-accent-blue);
}
.acc-btn-outline:hover { background: rgba(59, 130, 246, 0.1); }

/* Modals / Forms */
.acc-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.acc-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.acc-modal-content {
    background: var(--acc-card-bg);
    border: 1px solid var(--acc-border);
    border-radius: 12px;
    width: 500px;
    max-width: 90vw;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.acc-modal-overlay.active .acc-modal-content { transform: translateY(0); }

.acc-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--acc-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.acc-modal-title { font-size: 1.25rem; font-weight: 700; color: var(--acc-text-primary); }

.acc-modal-close {
    background: transparent; border: none; color: var(--acc-text-secondary);
    cursor: pointer; font-size: 1.5rem; transition: color 0.2s;
}
.acc-modal-close:hover { color: var(--acc-text-primary); }

.acc-modal-body { padding: 24px; }
.acc-form-group { margin-bottom: 20px; }
.acc-form-label {
    display: block; font-size: 0.8rem; font-weight: 600; color: var(--acc-text-secondary);
    margin-bottom: 8px; text-transform: uppercase;
}
.acc-form-input {
    width: 100%; padding: 12px 14px; background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--acc-border); border-radius: 8px; color: var(--acc-text-primary);
    font-size: 0.95rem; font-family: inherit; transition: border-color 0.2s; box-sizing: border-box;
}
.acc-form-input:focus { outline: none; border-color: var(--acc-accent-blue); }

.acc-modal-footer {
    padding: 20px 24px; border-top: 1px solid var(--acc-border);
    display: flex; justify-content: flex-end; gap: 12px;
}
