ploughshares/docker/ploughshares/static/css/custom.css

317 lines
6.8 KiB
CSS

/* Custom styles for Ploughshares application */
/* System font stack */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
padding-top: 20px;
padding-bottom: 20px;
color: #333333; /* Improved text contrast */
line-height: 1.5; /* Improved readability */
font-size: 16px; /* Base font size for better readability */
}
/* Ploughshares branding colors with improved contrast */
:root {
--ploughshares-blue: #2d5b96; /* Lightened blue for better readability */
--ploughshares-dark-blue: #1b365d; /* Original blue kept as dark variant */
--ploughshares-light-blue: #6b93c3; /* Lighter blue for better contrast */
--ploughshares-accent: #c4d600;
--ploughshares-dark-accent: #9aa800; /* Darker accent for better contrast */
--text-on-dark: #ffffff;
--text-on-light: #333333;
--link-color: #0056b3; /* High contrast link color */
--link-hover: #003d7a; /* Darker on hover for better feedback */
--success-color: #2e7d32; /* Accessible green */
--warning-color: #e65100; /* Accessible orange */
--info-color: #0277bd; /* Accessible blue */
--error-color: #c62828; /* Accessible red */
}
/* Header styles */
.header {
border-bottom: 1px solid #d0d0d0;
margin-bottom: 30px;
}
.header h3 {
margin-top: 0;
margin-bottom: 0;
line-height: 40px;
color: var(--text-on-light);
}
/* Footer styles */
.footer {
padding-top: 19px;
color: #555555; /* Improved contrast from #777 */
border-top: 1px solid #d0d0d0;
margin-top: 30px;
}
/* Form styles */
.form-group {
margin-bottom: 15px;
}
.form-control:focus {
border-color: var(--ploughshares-light-blue);
box-shadow: 0 0 0 0.2rem rgba(74, 122, 171, 0.25);
}
/* Improved form labels for accessibility */
label {
font-weight: 500;
margin-bottom: 0.5rem;
color: #333333;
}
/* Card styles */
.card {
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
border: 1px solid #d0d0d0;
}
.card-header {
background-color: var(--ploughshares-blue);
color: white;
font-weight: 500;
}
.document-card {
margin-bottom: 15px;
}
/* Logo styles */
.logo-container {
display: flex;
align-items: center;
}
.navbar-brand img {
max-height: 40px;
width: auto;
margin-right: 10px;
/* Improved logo contrast with background */
background-color: white;
padding: 3px;
border-radius: 4px;
}
.footer img {
height: 24px;
width: auto;
/* Improved logo contrast with background */
background-color: white;
padding: 2px;
border-radius: 3px;
}
/* Currency styles */
.currency-value {
font-weight: 600;
color: var(--success-color); /* More accessible green */
}
.amount-cell {
text-align: right;
}
td.amount-cell {
text-align: right;
}
/* Version display */
.version {
font-size: 0.8em;
color: #555555; /* Improved contrast */
}
/* Navigation styles */
.navbar-nav {
gap: 1rem;
}
.nav-item {
margin: 0 0.5rem;
}
/* Link styles with improved accessibility */
a {
color: var(--link-color);
text-decoration: underline; /* Always underline links for better visibility */
}
a:hover, a:focus {
color: var(--link-hover);
text-decoration: underline;
}
/* Button styles with improved accessibility */
.btn {
font-weight: 500;
border-radius: 4px;
}
.btn-primary {
background-color: var(--ploughshares-blue);
border-color: var(--ploughshares-blue);
color: white; /* Ensure text contrast */
}
.btn-primary:hover,
.btn-primary:focus {
background-color: var(--ploughshares-dark-blue); /* Darker for hover state */
border-color: var(--ploughshares-dark-blue);
color: white;
}
.btn-success {
background-color: var(--success-color);
border-color: var(--success-color);
color: white; /* Ensure text contrast */
}
.btn-warning {
background-color: var(--warning-color);
border-color: var(--warning-color);
color: white; /* Ensure text contrast */
}
.btn-info {
background-color: var(--info-color);
border-color: var(--info-color);
color: white; /* Ensure text contrast */
}
.btn-danger {
background-color: var(--error-color);
border-color: var(--error-color);
color: white; /* Ensure text contrast */
}
/* Focus states for accessibility */
a:focus, button:focus, input:focus, select:focus, textarea:focus, [tabindex]:focus {
outline: 3px solid var(--ploughshares-accent);
outline-offset: 2px;
}
/* Button icons using Bootstrap Icons */
.btn-add i, .btn-edit i, .btn-delete i, .btn-view i {
margin-right: 4px;
}
/* Navbar styles */
.navbar {
background-color: var(--ploughshares-blue) !important;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.navbar-light .navbar-brand {
color: var(--text-on-dark);
}
.navbar-light .navbar-nav .nav-link {
color: rgba(255, 255, 255, 0.9); /* Improved contrast from white */
font-weight: 500;
padding: 0.5rem 1rem;
}
.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus {
color: var(--ploughshares-accent);
background-color: rgba(255, 255, 255, 0.1);
border-radius: 4px;
}
.navbar-light .navbar-toggler {
border-color: rgba(255, 255, 255, 0.7); /* Improved contrast */
padding: 0.5rem;
}
.navbar-light .navbar-toggler-icon {
background-image: none;
position: relative;
}
.navbar-light .navbar-toggler-icon::before {
content: "☰";
font-size: 1.5rem;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
color: rgba(255, 255, 255, 0.9); /* Improved contrast */
}
/* Table styles with improved accessibility */
.table {
border-collapse: collapse;
width: 100%;
}
.table th {
background-color: var(--ploughshares-blue);
color: white;
font-weight: 500;
border-bottom: 2px solid var(--ploughshares-dark-blue);
}
.table td {
border-bottom: 1px solid #dee2e6;
padding: 0.75rem;
vertical-align: middle;
}
.table tbody tr:hover {
background-color: rgba(45, 91, 150, 0.05);
}
/* Skip to content link for keyboard users */
.skip-link {
position: absolute;
top: -40px;
left: 0;
background: var(--ploughshares-blue);
color: white;
padding: 8px;
z-index: 100;
transition: top 0.2s ease-in-out;
}
.skip-link:focus {
top: 0;
}
/* High contrast mode support */
@media (forced-colors: active) {
.btn {
border: 2px solid transparent;
}
a {
text-decoration: underline;
}
}
/* Responsive adjustments */
@media (max-width: 768px) {
.navbar-brand img {
max-height: 30px;
}
.table-responsive {
overflow-x: auto;
}
.btn {
padding: 0.375rem 0.5rem;
}
body {
font-size: 15px; /* Slightly smaller font on mobile but still readable */
}
}