/* Manufacturing Quote System - Professional Business Style */

/* Color Palette */
:root {
    --primary-color: #1976d2;
    --primary-dark: #1565c0;
    --primary-light: #42a5f5;
    --accent-color: #ff6f00;
    --success-color: #2e7d32;
    --warning-color: #f57c00;
    --danger-color: #d32f2f;
    --text-primary: #212121;
    --text-secondary: #616161;
    --border-color: #e0e0e0;
    --background-light: #fafafa;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--background-light);
}

/* Typography - Clean and Professional */
h1 {
    font-size: 24px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

h2 {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 15px;
}

h3 {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

/* Header - Simple and Professional */
.header {
    background: #fff;
    border-bottom: 2px solid var(--primary-color);
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.company-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

/* Navigation - Simple Tab Style */
.nav-links {
    display: flex;
    gap: 0;
    margin-top: 15px;
    border-bottom: 1px solid #ddd;
}

.nav-links a {
    display: inline-block;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-bottom: none;
    background: #f8f8f8;
    margin-right: -1px;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    background: #fff;
    color: var(--primary-color);
}

.nav-links a.active {
    background: #fff;
    border-top: 3px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Cards - Clean Business Style */
.card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Tables - Professional Look */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th {
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    font-weight: 600;
    text-align: left;
    padding: 12px 10px;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

td {
    padding: 8px 10px;
    border: 1px solid #ddd;
}

tbody tr {
    transition: all 0.2s ease;
}

tbody tr:hover {
    background: #f5f5f5;
    transform: scale(1.005);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Forms - Clean and Functional */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    background: #fff;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

/* Buttons - Simple and Professional */
.btn {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.btn:hover {
    background: var(--primary-dark);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #757575;
}

.btn-secondary:hover {
    background: #616161;
}

.btn-danger {
    background: #d32f2f;
}

.btn-danger:hover {
    background: #b71c1c;
}

.btn-success {
    background: #388e3c;
}

.btn-success:hover {
    background: #2e7d32;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

/* Status Indicators */
.status {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: bold;
}

.status-draft {
    background: #f5f5f5;
    color: #616161;
    border: 1px solid #e0e0e0;
}

.status-pending {
    background: #fff8e1;
    color: #f57c00;
    border: 1px solid #ffe0b2;
}

.status-sent {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.status-approved {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.status-rejected {
    background: #ffebee;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

/* Dashboard Metrics - Business Style */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 20px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.metric-value {
    font-size: 32px;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1;
}

.metric-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

/* Messages */
.message {
    padding: 10px 15px;
    margin: 15px 0;
    border: 1px solid;
}

.message.success {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.message.error {
    background: #ffebee;
    border-color: #f44336;
    color: #d32f2f;
    border-left: 4px solid #f44336;
}

/* Grid Layouts */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

/* Modal - Simple Overlay */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 50px auto;
    padding: 20px;
    border: 1px solid #333;
    width: 90%;
    max-width: 600px;
}

.modal-header {
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.close {
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
}

.close:hover {
    color: #000;
}

/* Utility Classes */
.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.no-border {
    border: none;
}

.bold {
    font-weight: bold;
}

/* Print Styles */
@media print {
    .header,
    .nav-links,
    .btn,
    .no-print {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .card {
        border: 1px solid #000;
        break-inside: avoid;
    }
}

/* Additional Visual Enhancements */
.card h2 {
    position: relative;
    padding-left: 15px;
}

.card h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--primary-color);
}

/* Add subtle animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.3s ease-out;
}

/* Add hover effect to table actions */
td a.btn:hover {
    transform: scale(1.05);
}

/* Dashboard Revenue Chart Styling */
.chart-container {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Add subtle gradient to header */
.header {
    background: linear-gradient(to bottom, #ffffff, #fafafa);
}

/* Add accent to form labels */
label::after {
    content: ':';
    color: var(--text-secondary);
}

/* Style select dropdowns */
select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

/* Add loading animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.text-center:has-text('Loading') {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    table {
        font-size: 12px;
    }
}