feat(phase2): aircraft market, fleet management, finances, loans
- market.php: Buy new aircraft (6 types: Dash8 to A380) - aircraft.php: Fleet management, crew assignment, route planning - finances.php: Account balance, transactions, loans - Database.php: Extended with loan/transaction/aircraft methods - schema.sql: Aircraft types table, 10M starting balance, INSERT OR IGNORE - dashboard.php: Updated with fleet/financial overview - Fixed: duplicate function declarations in Database.php - Fixed: initializeSchema() with idempotent error handling
This commit is contained in:
@@ -1048,3 +1048,373 @@ a:hover {
|
||||
height: 48px;
|
||||
}
|
||||
}
|
||||
|
||||
/* ============================================
|
||||
PHASE 2: AIRCRAFT, MARKET & FINANCES STYLES
|
||||
============================================ */
|
||||
|
||||
/* Aircraft Market Grid */
|
||||
.aircraft-market-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
||||
gap: var(--space-lg);
|
||||
}
|
||||
|
||||
.market-aircraft-card {
|
||||
background: var(--bg-secondary);
|
||||
border: 3px solid var(--text-primary);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: var(--space-lg);
|
||||
box-shadow: var(--shadow-md);
|
||||
transition: transform var(--transition-fast);
|
||||
}
|
||||
|
||||
.market-aircraft-card:hover {
|
||||
transform: translateY(-4px);
|
||||
box-shadow: var(--shadow-lg);
|
||||
}
|
||||
|
||||
.market-aircraft-card.disabled {
|
||||
opacity: 0.6;
|
||||
filter: grayscale(30%);
|
||||
}
|
||||
|
||||
.market-aircraft-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: var(--space-md);
|
||||
padding-bottom: var(--space-md);
|
||||
border-bottom: 2px dashed var(--border-color);
|
||||
}
|
||||
|
||||
.market-aircraft-name {
|
||||
font-family: var(--font-primary);
|
||||
font-size: 1.25rem;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.market-aircraft-price {
|
||||
font-family: var(--font-primary);
|
||||
font-size: 1.5rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.market-aircraft-specs {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-sm);
|
||||
}
|
||||
|
||||
.spec-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: var(--space-xs) 0;
|
||||
}
|
||||
|
||||
.spec-label {
|
||||
color: var(--text-secondary);
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.spec-value {
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.cannot-afford {
|
||||
text-align: center;
|
||||
padding: var(--space-md);
|
||||
background: var(--bg-tertiary);
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
|
||||
/* Aircraft Types Grid */
|
||||
.aircraft-types-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
||||
gap: var(--space-md);
|
||||
}
|
||||
|
||||
.aircraft-type-card {
|
||||
background: var(--bg-tertiary);
|
||||
border: 2px solid var(--border-color);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-md);
|
||||
}
|
||||
|
||||
.aircraft-type-name {
|
||||
font-family: var(--font-primary);
|
||||
font-size: 1.1rem;
|
||||
margin-bottom: var(--space-sm);
|
||||
padding-bottom: var(--space-sm);
|
||||
border-bottom: 1px dashed var(--border-color);
|
||||
}
|
||||
|
||||
.aircraft-type-stats {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-xs);
|
||||
}
|
||||
|
||||
.aircraft-type-stat {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
/* Balance Banner */
|
||||
.balance-banner {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background: var(--accent-gradient);
|
||||
color: white;
|
||||
padding: var(--space-lg);
|
||||
}
|
||||
|
||||
.balance-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-xs);
|
||||
}
|
||||
|
||||
.balance-label {
|
||||
font-size: 0.875rem;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.balance-value {
|
||||
font-family: var(--font-primary);
|
||||
font-size: 2rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Period Stats */
|
||||
.period-stats {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||
gap: var(--space-md);
|
||||
}
|
||||
|
||||
.period-card {
|
||||
background: var(--bg-tertiary);
|
||||
border: 2px solid var(--border-color);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-md);
|
||||
}
|
||||
|
||||
.period-card h3 {
|
||||
font-family: var(--font-primary);
|
||||
font-size: 1rem;
|
||||
margin-bottom: var(--space-md);
|
||||
padding-bottom: var(--space-sm);
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.period-amounts {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-sm);
|
||||
}
|
||||
|
||||
.amount-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.amount-row.total {
|
||||
font-weight: bold;
|
||||
padding-top: var(--space-sm);
|
||||
border-top: 1px dashed var(--border-color);
|
||||
margin-top: var(--space-sm);
|
||||
}
|
||||
|
||||
/* Loan Info */
|
||||
.loan-info {
|
||||
background: var(--info-bg);
|
||||
border: 2px solid var(--accent-color);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-md);
|
||||
}
|
||||
|
||||
.loan-info h3 {
|
||||
font-family: var(--font-primary);
|
||||
margin-bottom: var(--space-md);
|
||||
}
|
||||
|
||||
.loan-info ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.loan-info li {
|
||||
padding: var(--space-xs) 0;
|
||||
border-bottom: 1px dashed var(--border-color);
|
||||
}
|
||||
|
||||
.loan-info li:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/* Aircraft Detail Modal */
|
||||
.aircraft-detail-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: var(--space-lg);
|
||||
padding-bottom: var(--space-md);
|
||||
border-bottom: 2px dashed var(--border-color);
|
||||
}
|
||||
|
||||
.aircraft-detail-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: var(--space-md);
|
||||
}
|
||||
|
||||
.detail-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-xs);
|
||||
}
|
||||
|
||||
.detail-label {
|
||||
font-size: 0.75rem;
|
||||
color: var(--text-secondary);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.detail-value {
|
||||
font-weight: 600;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.maintenance-history {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: var(--space-md) 0 0 0;
|
||||
}
|
||||
|
||||
.maintenance-history li {
|
||||
padding: var(--space-sm);
|
||||
background: var(--bg-tertiary);
|
||||
border-radius: var(--radius-sm);
|
||||
margin-bottom: var(--space-sm);
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
/* Info Grid */
|
||||
.info-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
gap: var(--space-lg);
|
||||
}
|
||||
|
||||
.info-card {
|
||||
background: var(--bg-secondary);
|
||||
border: 2px solid var(--border-color);
|
||||
border-radius: var(--radius-md);
|
||||
padding: var(--space-md);
|
||||
}
|
||||
|
||||
.info-card h3 {
|
||||
font-family: var(--font-primary);
|
||||
font-size: 1rem;
|
||||
margin-bottom: var(--space-md);
|
||||
}
|
||||
|
||||
.info-list {
|
||||
list-style: disc;
|
||||
padding-left: var(--space-lg);
|
||||
}
|
||||
|
||||
.info-list li {
|
||||
padding: var(--space-xs) 0;
|
||||
font-size: 0.875rem;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
/* Maintenance Progress */
|
||||
.maintenance-progress {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-sm);
|
||||
}
|
||||
|
||||
.maintenance-bar {
|
||||
flex: 1;
|
||||
height: 8px;
|
||||
background: var(--bg-tertiary);
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.maintenance-bar-fill {
|
||||
height: 100%;
|
||||
background: var(--comic-green);
|
||||
transition: width var(--transition-normal);
|
||||
}
|
||||
|
||||
.maintenance-bar-fill.warning {
|
||||
background: var(--comic-orange);
|
||||
}
|
||||
|
||||
.maintenance-bar-fill.danger {
|
||||
background: var(--comic-red);
|
||||
}
|
||||
|
||||
/* D-flex utilities */
|
||||
.d-flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.flex-col {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.align-start {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.gap-sm {
|
||||
gap: var(--space-sm);
|
||||
}
|
||||
|
||||
.gap-md {
|
||||
gap: var(--space-md);
|
||||
}
|
||||
|
||||
.w-100 {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Responsive table container */
|
||||
.table-container {
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
/* Aircraft condition colors */
|
||||
.condition-excellent {
|
||||
color: var(--comic-green);
|
||||
}
|
||||
|
||||
.condition-good {
|
||||
color: var(--accent-color);
|
||||
}
|
||||
|
||||
.condition-warning {
|
||||
color: var(--comic-orange);
|
||||
}
|
||||
|
||||
.condition-danger {
|
||||
color: var(--comic-red);
|
||||
}
|
||||
|
||||
/* Aircraft table */
|
||||
.aircraft-table td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user