/*
 * File:        /css/site.css
 * Description: Shared site-wide styles for the NDT Financial Reporting System.
 * Author:      Iain Daddy
 * Copyright:   (c) 2026 Iain Daddy. All rights reserved.
 * License:     Internal Use Only
 * Version:     1.0.0
 * LastUpdated: 2026-03-13
 */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 40px;
}

h1 {
    color: #333;
    margin: 0 0 40px;
    border-bottom: 2px solid #666;
    padding-bottom: 4px;
}

h2 {
    background: #ccf;
    padding: 8px;
    margin-top: 30px;
}

h3 {
    background: #eef;
    padding: 6px;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th,
td {
    border: none;
    padding: 6px;
}

th {
    background: #eee;
}

.narow-wrapper {
    max-width: 700px;
    margin: auto;
    padding: 40px;
}

.wide-wrapper {
    width: calc(100% - 32px);
    margin: auto;
    padding: 40px;
    box-sizing: border-box;
}

.block {
    border: 1px solid #ccc;
    margin-bottom: 15px;
    padding: 10px;
    background: #f9f9f9;
}

.block h2 {
    margin: 0 0 10px;
}

.groups {
    margin-left: 20px;
    padding: 10px;
    background: #eef;
}

.group-item {
    margin-bottom: 5px;
}

.money {
    text-align: right;
    white-space: nowrap;
}

.negative {
    color: red;
    font-weight: bold;
}

.total-row {
    font-weight: bold;
    background: #f0f0f0;
}

.header-bar {
    position: fixed;
    top: 0;
    width: 94%;
    background: #fff;
    z-index: 1000;
}

.title-and-menu {
    flex: 1;
    background: #fff;
    padding-top: 10px;
}

.topbar-menu {
    display: flex;
    gap: 20px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ccc;
    padding: 10px 20px;
    align-items: center;
    font-size: 14px;
}

.menu-link {
    margin-right: 10px;
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    font-weight: bold;
}

.menu-link.help {
    margin-left: auto;
}

.menu-link:hover {
    color: #e05d29;
}

.menu-icon {
    height: 20px;
    margin-right: 6px;
}

.summary-table {
    display: table;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    margin-bottom: 20px;
    width: auto;
    max-width: 90%;
    padding: 0 10px;
}

.summary-table th {
    font-size: 1.2em;
    padding: 8px 0 4px;
    text-align: left;
}

.summary-table td {
    padding: 2px 8px;
    white-space: nowrap;
}

.summary-table .total-row td {
    font-weight: bold;
    padding-top: 6px;
    border-top: 1px solid #aaa;
}

.center-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #eee;
    padding: 8px 12px;
    border-top: 2px solid #666;
    border-bottom: 1px solid #ccc;
    margin-top: 20px;
}

.block-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #333;
    background: none;
    padding: 0;
}

.block-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.toggle-btn {
    background: none;
    border: 1px solid #999;
    padding: 2px 6px;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    border-radius: 4px;
    color: #333;
}

.toggle-btn:hover {
    background-color: #ddd;
}

.graph-icon {
    cursor: pointer;
    margin-left: 10px;
    vertical-align: middle;
    width: 18px;
    height: 18px;
}

.graph-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.graph-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    position: relative;
    max-width: 800px;
    width: 90%;
    height: 500px;
}

.graph-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

canvas {
    width: 100% !important;
    height: 90% !important;
}
