/* Minimalist styling with additions for table and filters */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f8f8f8;
    color: #333;
    line-height: 1.4;
}

.header {
    background: white;
    border-bottom: 1px solid #ddd;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #0066cc;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: #f0f0f0;
    color: #0066cc;
}

.nav-link.active {
    background: #0066cc;
    color: white;
}

.tagline {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

.main-content {
    display: flex;
    min-height: calc(100vh - 80px);
}

.sidebar {
    width: 300px;
    background: white;
    border-right: 1px solid #ddd;
    padding: 20px 0;
    overflow-y: auto;
    flex-shrink: 0;
}

.content-area {
    flex: 1;
    padding: 20px;
    background: #f8f8f8;
    overflow-x: auto; /* Ensure table is scrollable on small screens */
}

.category {
    margin-bottom: 5px;
}

.category-header {
    padding: 12px 20px;
    background: #f0f0f0;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-weight: bold;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.category-header:hover {
    background: #e0e0e0;
}

.category-header.active {
    background: #0066cc;
    color: white;
}

.subcategory-list {
    display: none;
    background: white;
}

.subcategory-list.active {
    display: block;
}

.subcategory {
    padding: 8px 40px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.subcategory:hover {
    background: #f0f0f0;
}

.subcategory.selected {
    background: #e6f3ff;
    color: #0066cc;
    font-weight: bold;
}

.breadcrumb {
    background: white;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.breadcrumb-counter {
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

/* Filter Styles */
#filters {
    background: white;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

#filters label {
    font-weight: bold;
    font-size: 14px;
}

#filters select, #filters button {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 14px;
}

#filters button {
    cursor: pointer;
    background: #e0e0e0;
}
#filters button:hover {
    background: #d0d0d0;
}

/* Table Styles */
.table-container {
    width: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

thead th {
    background-color: #f0f0f0;
    font-weight: bold;
}

thead th.sortable {
    cursor: pointer;
}

thead th.sortable:hover {
    background-color: #e0e0e0;
}

thead th .sort-arrow {
    display: inline-block;
    margin-left: 5px;
    opacity: 0.5;
}

tbody tr:hover {
    background-color: #f8f8f8;
}

.sidebar-action {
    padding: 12px 20px;
    margin: 0 0 10px 0;
    background: #0066cc;
    color: white;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
}
.sidebar-action:hover {
    background: #0055aa;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { 
        transform: translateY(-50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

.modal-header {
    background: #f8f8f8;
    padding: 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.modal-icon {
    background: #0066cc;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    font-family: monospace;
}

.modal-body {
    padding: 20px;
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section h3 {
    color: #0066cc;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: bold;
}

.modal-section p {
    margin: 0;
    color: #333;
    line-height: 1.5;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .modal-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

/* Make table rows clickable */
tbody tr {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

tbody tr:hover {
    background-color: #f0f8ff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.1);
}

tbody tr:hover td:first-child {
    color: #0066cc;
    text-decoration: underline;
    font-weight: 500;
}

