:root {
    --primary: #2563eb;
    --danger: #dc2626;
    --success: #16a34a;
    --neutral: #4b5563;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 16px;
    background-color: #f8fafc;
    color: #1f2937;
    line-height: 1.3;
    min-width: 900px;
}

.container {
    width: 1000px;
    margin: 0 auto;
    background-color: white;
    padding: 20px 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.title-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo {
    display: block;
    max-width: 200px;
    height: auto;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 12px 0;
}

.box {
    border: 1px solid var(--border);
    padding: 12px;
    margin: 8px 0;
    background: #fff;
    border-radius: 6px;
    box-shadow: var(--shadow);
}

.input-section {
    background: #f9f9f9 !important;
    border: 1px solid var(--border);
    padding: 16px;
    margin: 16px 0;
    border-radius: 8px;
}

.fw {
    grid-column: 1/-1;
}

input, select {
    width: 100%;
    padding: 6px 10px;
    margin: 3px 0 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 13px;
    transition: border-color 0.2s;
    background: white;
    height: 30px;
}

input:hover, select:hover {
    border-color: #cbd5e1;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
}

input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 4px 6px;
}

label {
    display: block;
    margin-top: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 13px;
}

button {
    padding: 6px 12px;
    margin: 4px;
    cursor: pointer;
    border: 0;
    border-radius: 4px;
    font-weight: 500;
    color: #fff;
    transition: all 0.15s;
    font-size: 13px;
    min-width: 90px;
    height: 30px;
}

button:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    background: white;
}

th, td {
    border: 1px solid var(--border);
    padding: 8px 10px;
    text-align: left;
    font-size: 13px;
}

th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #374151;
}

tr:nth-child(even) {
    background-color: #f8fafc;
}

.del { background: var(--danger); }
.add { background: var(--success); }
.calc { background: var(--primary); }
.print-btn { background: var(--neutral); }

h1 {
    color: #1f2937;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    text-align: left;
    line-height: 1.2;
}

h2 {
    color: #374151;
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
}

h3, h4 {
    color: #374151;
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
}

.table-note {
    color: #6b7280;
    font-size: 12px;
    margin: 4px 0;
    padding-left: 8px;
}

.button-row {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    padding: 8px 0;
}

.bottom-buttons {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 8px 0;
}

.button-group {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-left: 4px;
}

#layers, #dowels {
    margin-bottom: 8px;
}

/* Print styles */
@media print {
    .input-section,
    .add,
    .calc,
    .del,
    .print-btn {
        display: none !important;
    }
    
    .container {
        margin: 0;
        box-shadow: none;
    }
    
    table {
        page-break-inside: avoid;
    }
    
    @page {
        margin: 0.5in;
    }

    #slabTable tr th:last-child,
    #slabTable tr td:last-child {
        display: none;
    }
}