body {
    font-family: sans-serif;
    margin: 0;
    display: flex;
    background-color: #f0f8f0; /* Light green background */
}

.sidebar {
    width: 250px;
    background-color: #9ccc9c; /* Darker green */
    color: #333;
    padding: 20px;
    height: 100vh;
    box-sizing: border-box;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo-container img {
    max-width: 100px;
    border-radius: 50%;
}

.admin-panel-title {
    text-align: center;
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 30px;
}

.sidebar nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar nav ul li a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: #333;
    border-radius: 5px;
    margin-bottom: 10px;
}

.sidebar nav ul li a.active,
.sidebar nav ul li a:hover {
    background-color: #f0f8f0;
}

.main-content {
    flex-grow: 1;
    padding: 40px;
}

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

.header-buttons {
    display: flex;
    gap: 10px;
}

.header h1 {
    margin: 0;
    color: #333;
}

.add-btn, .upload-dataset-btn {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.upload-dataset-btn {
    background-color: #2196F3;
}

.add-btn:hover, .upload-dataset-btn:hover {
    background-color: #45a049;
}

.upload-dataset-btn:hover {
    background-color: #1976D2;
}

.table-wrapper {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

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

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

th {
    font-weight: bold;
}

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

td button {
    margin-right: 5px;
    padding: 5px 10px;
    border-radius: 3px;
    border: 1px solid #ddd;
    cursor: pointer;
}

td button:hover {
    background-color: #f0f0f0;
}

/* Modal Styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; 
    background-color: rgba(0,0,0,0.4); 
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 50%;
    border-radius: 10px;
    position: relative;
}

.close-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#herb-form input,
#herb-form textarea {
    width: 95%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

#herb-form button {
     background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
}

#add-recipe-btn, #add-alternative-btn {
    background-color: #5cb85c !important;
    margin-top: 5px;
    margin-bottom: 15px;
}

.sub-item-form {
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 10px;
    background-color: #f9f9f9;
}

.sub-item-form label {
    display: block;
    margin-top: 5px;
    font-weight: bold;
    font-size: 0.9em;
}

.remove-sub-item-btn {
    background-color: #d9534f;
    color: white;
    border: none;
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 3px;
    cursor: pointer;
    float: right;
} 

.credits {
    font-size: 0.8em;
    color: #666;
    font-style: italic;
}

/* Dataset Upload Styles */
.upload-instructions {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #2196F3;
}

.upload-instructions h3 {
    margin-top: 0;
    color: #2196F3;
}

.upload-instructions ul {
    margin: 10px 0;
    padding-left: 20px;
}

.upload-instructions li {
    margin-bottom: 5px;
    color: #555;
}

.sample-format {
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 3px;
    margin-top: 10px;
}

.sample-format h4 {
    margin-top: 0;
    color: #333;
}

.sample-format pre {
    background-color: #fff;
    padding: 10px;
    border-radius: 3px;
    overflow-x: auto;
    font-size: 12px;
    margin: 5px 0;
    border: 1px solid #ddd;
}

.upload-options {
    margin: 15px 0;
    padding: 10px;
    background-color: #f0f8ff;
    border-radius: 5px;
}

.upload-options label {
    display: block;
    margin-bottom: 8px;
    color: #333;
}

.upload-options input[type="checkbox"] {
    margin-right: 8px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background-color: #4CAF50;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    color: #666;
    font-size: 14px;
}

.upload-summary {
    background-color: #e8f5e8;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    border-left: 4px solid #4CAF50;
}

.upload-summary h4 {
    margin-top: 0;
    color: #2e7d32;
}

#upload-results {
    font-family: monospace;
    font-size: 14px;
    line-height: 1.4;
}

#dataset-form input[type="file"] {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 2px dashed #ccc;
    border-radius: 5px;
    background-color: #fafafa;
}

#dataset-form input[type="file"]:hover {
    border-color: #2196F3;
    background-color: #f0f8ff;
}

.download-sample-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.download-sample-btn:hover {
    background-color: #45a049;
    color: white;
    text-decoration: none;
}

/* Archive button styles */
.archive-btn {
    background-color: #ff9800;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 5px;
}

.archive-btn:hover {
    background-color: #f57c00;
}

.unarchive-btn {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 5px;
}

.unarchive-btn:hover {
    background-color: #45a049;
}

/* Permit Review Styles */
.filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: #f5f5f5;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn.active {
    background: #4CAF50;
    color: white;
}

.tab-btn:hover:not(.active) {
    background: #e0e0e0;
}

.badge {
    background: rgba(255,255,255,0.2);
    color: inherit;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.tab-btn:not(.active) .badge {
    background: #ddd;
    color: #666;
}

.permits-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 400px;
}

.permits-list {
    padding: 20px;
}

.permit-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    background: #fafafa;
    transition: all 0.3s ease;
}

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

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

.permit-info h3 {
    margin: 0 0 5px 0;
    color: #2E7D32;
    font-size: 18px;
}

.store-name {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.permit-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

.permit-status.pending {
    background: #FFF3E0;
    color: #F57C00;
}

.permit-status.approved {
    background: #E8F5E8;
    color: #2E7D32;
}

.permit-status.rejected {
    background: #FFEBEE;
    color: #C62828;
}

.permit-details {
    margin-bottom: 15px;
}

.permit-details p {
    margin: 5px 0;
    color: #555;
    font-size: 14px;
}

.rejection-reason {
    color: #C62828 !important;
    font-style: italic;
    background: #FFEBEE;
    padding: 8px;
    border-radius: 4px;
    margin-top: 10px;
}

.permit-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.permit-actions .btn {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #2196F3;
    color: white;
}

.btn-success {
    background: #4CAF50;
    color: white;
}

.btn-danger {
    background: #F44336;
    color: white;
}

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

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.document-link {
    color: #2196F3;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.document-link:hover {
    text-decoration: underline;
}

/* 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);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f5f5f5;
    border-radius: 8px 8px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: #2E7D32;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 20px;
}

.detail-row {
    display: flex;
    margin-bottom: 15px;
    align-items: flex-start;
}

.detail-row label {
    font-weight: bold;
    min-width: 120px;
    color: #555;
}

.detail-row span {
    flex: 1;
    color: #333;
}

.review-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.review-actions .btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.reject-form {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 4px solid #F44336;
}

.reject-form h4 {
    margin: 0 0 15px 0;
    color: #C62828;
}

.reject-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    box-sizing: border-box;
}

.form-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.loading-state, .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.loading-state i {
    font-size: 48px;
    color: #4CAF50;
    margin-bottom: 20px;
}

.empty-state i {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    color: #666;
}

.empty-state p {
    margin: 0;
    color: #999;
}

/* Document Viewer Styles */
.document-viewer {
    margin: 20px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.document-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #2196F3;
    color: white;
}

.document-viewer-header h4 {
    margin: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-close-viewer {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.3s ease;
}

.btn-close-viewer:hover {
    background: rgba(255,255,255,0.3);
}

.document-warning {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px;
    background: #FFF3E0;
    border-radius: 6px;
    color: #F57C00;
    font-size: 14px;
    font-weight: 500;
}

/* View Document Button as Link */
.detail-row button.document-link {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: inherit;
}

/* Disabled Button Styles */
.btn:disabled,
.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    background: #ccc !important;
}

.btn:disabled:hover,
.btn[disabled]:hover {
    opacity: 0.5;
    transform: none;
}