Web-page-generator / admin.css
Ivan000's picture
Upload 9 files (#3)
89496fa verified
/* === RESET & BASE === */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: Arial, sans-serif;
}
body {
background: #f4f6f8;
color: #333;
line-height: 1.5;
}
/* === HEADER === */
header {
background: #2c3e50;
color: white;
padding: 1rem;
text-align: center;
}
header h1 {
font-size: 1.8rem;
}
/* === MAIN CONTAINER === */
main {
max-width: 1000px;
margin: 2rem auto;
padding: 0 1rem;
}
/* === NAVIGATION TABS === */
.admin-tabs, .tab-nav {
display: flex;
justify-content: center;
gap: 12px;
margin: 1rem 0;
}
.admin-tabs button,
.tab-nav button {
background: #bdc3c7;
color: #2c3e50;
border: none;
padding: 10px 16px;
border-radius: 6px;
font-weight: bold;
cursor: pointer;
transition: background 0.2s ease;
}
.admin-tabs button:hover,
.tab-nav button:hover {
background: #95a5a6;
}
.admin-tabs button.active,
.tab-nav button.active {
background: #2c3e50;
color: #fff;
}
/* === SECTIONS === */
.admin-tab {
display: none;
}
.admin-tab.active {
display: block;
}
/* === CARDS & PANELS === */
.card {
background: #fff;
padding: 1rem 1.5rem;
margin-bottom: 2rem;
border-radius: 8px;
box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.card h2, .card h3 {
margin-bottom: 1rem;
color: #2c3e50;
}
/* === FORM STYLING === */
form {
margin: 1rem 0;
}
form input, form select {
display: block;
width: 100%;
padding: 0.6rem;
margin-bottom: 0.8rem;
border: 1px solid #ccc;
border-radius: 6px;
}
form button {
background: #3498db;
color: white;
border: none;
padding: 0.6rem 1.2rem;
border-radius: 6px;
cursor: pointer;
}
form button:hover {
background: #2980b9;
}
/* === TABLES === */
table {
width: 100%;
border-collapse: collapse;
margin-top: 1rem;
font-size: 14px;
}
th, td {
padding: 0.6rem;
border: 1px solid #ddd;
text-align: left;
}
th {
background: #ecf0f1;
font-weight: bold;
}
tbody tr:nth-child(even) {
background: #f9f9f9;
}
tbody tr:hover {
background: #f0f8ff;
}
/* === ACCOUNTING HIGHLIGHTING === */
#accountingBody tr.income {
background-color: #d4f8d4; /* light green */
}
#accountingBody tr.expense {
background-color: #f8d4d4; /* light red */
}
#accountingBody tr.non-member {
border-left: 4px solid red;
font-style: italic;
opacity: 0.9;
}
#summaryBody tr.income-summary {
background: #d4f8d4;
font-weight: bold;
}
#summaryBody tr.expense-summary {
background: #f8d4d4;
font-weight: bold;
}
/* === BUTTONS === */
button {
margin-top: 1rem;
padding: 0.5rem 1rem;
border-radius: 6px;
border: none;
font-weight: bold;
cursor: pointer;
}
#exportMembers {
background: #27ae60;
color: white;
}
#exportMembers:hover {
background: #1e8449;
}
#exportAccounting {
background: #e67e22;
color: white;
}
#exportAccounting:hover {
background: #ca6f1e;
}
#exportInventory {
background: #9b59b6;
color: white;
}
#exportInventory:hover {
background: #8e44ad;
}
button[id^="toggle"] {
background: #7f8c8d;
color: white;
}
button[id^="toggle"]:hover {
background: #636e72;
}
/* === CHARTS === */
.chart-container {
width: 400px;
max-width: 100%;
margin: 20px auto;
padding: 15px;
background: #fff;
border-radius: 12px;
box-shadow: 0 4px 10px rgba(0,0,0,0.1);
text-align: center;
}
.chart-container h3 {
margin-bottom: 10px;
font-size: 1.2em;
color: #333;
}
.chart-legend {
margin-top: 10px;
display: flex;
justify-content: center;
gap: 15px;
font-size: 0.9em;
}
.chart-legend span {
display: flex;
align-items: center;
}
.chart-legend i {
display: inline-block;
width: 14px;
height: 14px;
margin-right: 5px;
border-radius: 3px;
}
.legend-income i {
background-color: rgba(75,192,192,0.7);
}
.legend-expense i {
background-color: rgba(255,99,132,0.7);
}
#monthlyChart {
width: 100%;
max-width: 800px;
margin: auto;
}
/* === RESPONSIVE (optional) === */
@media (max-width: 768px) {
.admin-tabs, .tab-nav {
flex-direction: column;
align-items: center;
}
table, thead, tbody, th, td, tr {
display: block;
}
table thead {
display: none;
}
table tr {
margin-bottom: 1rem;
background: #fff;
border: 1px solid #ccc;
padding: 1rem;
border-radius: 6px;
}
table td {
padding: 0.5rem 0;
border: none;
position: relative;
padding-left: 50%;
}
table td::before {
position: absolute;
top: 0.5rem;
left: 1rem;
font-weight: bold;
content: attr(data-label);
}
}
.modal.hidden { display: none; }
.modal {
position: fixed; top: 0; left: 0;
width: 100%; height: 100%;
background: rgba(0,0,0,0.5);
}
.modal-content {
background: #fff; padding: 20px;
margin: 10% auto; width: 300px;
}