/* Scoped to avoid breaking Portal Top Nav */
body.tracker-editor-layout {
    font-family: Arial, sans-serif;
    background-color: var(--bg-surface-hover);
    margin: 0;
    padding: 0;
    color: #333;
}

#admin-dashboard.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 50px;
}

.hidden {
    display: none !important;
}

.controls-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.filters {
    display: flex;
    gap: 15px;
    flex: 1;
    max-width: 600px;
}

/* Inputs */
.input-field {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
}

/* Scoped Buttons */
#admin-dashboard button,
.modal button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: 0.2s;
}

.btn-primary {
    background: #66b2a0;
    color: white;
}

.btn-primary:hover {
    background: #4ca08c;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

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

.btn-danger {
    background: #f44336;
    color: white;
    padding: 6px 12px;
}

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

.btn-edit {
    background: #2196F3;
    color: white;
    padding: 6px 12px;
}

.btn-edit:hover {
    background: #1976D2;
}

/* List & Accordion */
.list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.accordion-item {
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    background: #fff;
    border-bottom: 1px solid transparent;
    transition: background 0.2s;
}

.accordion-header:hover {
    background: #f9f9f9;
}

.accordion-header.active {
    border-bottom: 1px solid #eee;
    background: #f0f7f5;
}

.acc-title {
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.acc-badge {
    background: #eee;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: #555;
    text-transform: uppercase;
}

.accordion-content {
    padding: 20px;
    display: none;
    background: #fafafa;
}

.accordion-content.show {
    display: block;
}

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

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding: 40px 0;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

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

.close:hover {
    color: #333;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
    color: #555;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 14px;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}