* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 28px;
    color: #667eea;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-links a:hover {
    background: #f0f0f0;
}

.nav-links a.active {
    background: #667eea;
    color: white;
}

.logout-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #c0392b;
}

/* Container */
.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 1400px;
    margin: 0 auto;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #f0f0f0;
}

.tab-btn.active {
    background: #667eea;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Header Actions */
.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header-actions h2 {
    color: #333;
    font-size: 24px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #d68910;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

/* Boat Selector */
.boat-selector {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.boat-selector label {
    font-weight: 500;
    color: #333;
}

.boat-selector select {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

/* Pricing Matrix */
.pricing-matrix {
    overflow-x: auto;
}

.pricing-matrix table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.pricing-matrix th {
    background: #667eea;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.pricing-matrix td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.pricing-matrix tr:last-child td {
    border-bottom: none;
}

.pricing-matrix tr:hover {
    background: #f8f9fa;
}

.pricing-matrix .price-cell {
    font-weight: 600;
    color: #27ae60;
}

.pricing-matrix .edit-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.pricing-matrix .edit-btn:hover {
    background: #2980b9;
}

/* Adjustments List */
.adjustments-list {
    display: grid;
    gap: 20px;
}

.adjustment-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.adjustment-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.adjustment-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.adjustment-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.adjustment-badge.active {
    background: #d4edda;
    color: #155724;
}

.adjustment-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

.adjustment-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    color: #666;
}

.adjustment-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.toggle-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.toggle-btn.deactivate {
    background: #e74c3c;
    color: white;
}

.toggle-btn.activate {
    background: #27ae60;
    color: white;
}

/* Calculator */
.calculator-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    max-width: 600px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.calculation-result {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.calculation-result h3 {
    color: #333;
    margin-bottom: 20px;
}

.price-breakdown {
    display: grid;
    gap: 15px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.price-row.total {
    border-top: 2px solid #667eea;
    border-bottom: none;
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
}

/* Job Stats */
.job-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-card.success {
    border-left: 5px solid #27ae60;
}

.stat-card.error {
    border-left: 5px solid #e74c3c;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.stat-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #333;
}

/* Jobs List */
.jobs-list {
    background: white;
    border-radius: 10px;
    padding: 20px;
}

.job-item {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 20px;
    align-items: center;
}

.job-item:last-child {
    border-bottom: none;
}

.job-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.job-status.pending {
    background: #fff3cd;
    color: #856404;
}

.job-status.processing {
    background: #d1ecf1;
    color: #0c5460;
}

.job-status.completed {
    background: #d4edda;
    color: #155724;
}

.job-status.failed {
    background: #f8d7da;
    color: #721c24;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #333;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Impact Preview */
.impact-preview {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.impact-preview table {
    width: 100%;
    margin-top: 15px;
}

.impact-preview th,
.impact-preview td {
    padding: 10px;
    text-align: left;
}

.impact-preview .positive {
    color: #27ae60;
}

.impact-preview .negative {
    color: #e74c3c;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 18px;
}

/* Platforms Checkboxes */
#platforms-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

#platforms-checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
}

#platforms-checkboxes input[type="checkbox"] {
    width: auto;
}
