.spectral-calculator-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.calculator-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    transition: all 0.3s;
}

.tab-btn.active {
    color: #2563eb;
    border-bottom: 2px solid #2563eb;
    margin-bottom: -2px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row label {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.form-row input {
    margin-top: 5px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.spd-table {
    width: 100%;
    border-collapse: collapse;
    max-height: 400px;
    overflow-y: auto;
    display: block;
}

.spd-table thead {
    background: #f5f5f5;
    position: sticky;
    top: 0;
}

.spd-table th,
.spd-table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: center;
}

.spd-power {
    width: 100%;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.btn-primary {
    background: #2563eb;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #6b7280;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.result-item {
    padding: 15px;
    background: #f9fafb;
    border-radius: 6px;
    border-left: 4px solid #2563eb;
}

.result-item label {
    font-weight: 600;
    color: #374151;
}

.result-item span {
    font-size: 24px;
    color: #2563eb;
    font-weight: bold;
}

/* Add to assets/css/calculator.css */

.metadata-form {
    max-width: 800px;
}

.metadata-note {
    color: #6b7280;
    font-style: italic;
    margin-bottom: 20px;
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.form-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1f2937;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 8px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}

.form-group label small {
    display: block;
    font-weight: normal;
    color: #6b7280;
    font-size: 12px;
    margin-top: 2px;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.action-buttons-fixed {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 15px;
    border-top: 2px solid #e5e7eb;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.library-item {
    padding: 15px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.library-item h4 {
    margin-top: 0;
    color: #1f2937;
}

.library-meta {
    font-size: 13px;
    color: #6b7280;
    margin: 10px 0;
}

.library-meta p {
    margin: 5px 0;
}

.library-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.library-actions button {
    flex: 1;
    padding: 6px 12px;
    font-size: 13px;
}

/* Add to assets/css/calculator.css */

.chart-section {
    margin: 30px 0;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.chart-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1f2937;
    font-size: 18px;
}

.chart-container {
    min-height: 400px;
    background: white;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 20px;
}

#polar-chart {
    min-height: 600px;
}

/* Example Library Styles */
.example-library-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border: 2px solid #f97316;
    border-left: 6px solid #f97316;
    border-radius: 8px;
}

.example-library-section h3 {
    margin-top: 0;
    color: #f97316;
}

.library-selector {
    max-width: 400px;
}

.library-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
}

.search-dropdown {
    position: relative;
    display: flex;
    gap: 0;
}

.example-search-input {
    flex: 1;
    padding: 10px 40px 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
}

.search-icon-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    padding: 4px;
}

.search-icon-btn:hover {
    color: #374151;
}

.example-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.example-dropdown.hidden {
    display: none;
}

.example-list {
    padding: 8px 0;
}

.example-category {
    margin-bottom: 8px;
}

.category-header {
    padding: 8px 16px;
    background: #f3f4f6;
    font-weight: 600;
    font-size: 13px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-items {
    padding: 4px 0;
}

.example-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.example-item:hover {
    background: #f9fafb;
}

.example-name {
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 2px;
}

.example-meta {
    font-size: 12px;
    color: #6b7280;
}

/* Scrollbar styling */
.example-dropdown::-webkit-scrollbar {
    width: 8px;
}

.example-dropdown::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.example-dropdown::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.example-dropdown::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}