.ctm-dashboard-wrapper {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.ctm-dashboard-inner {
    background: #ffffff;
    border-radius: 8px;
    padding: 1rem;
}

.ctm-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

.ctm-nav a {
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    text-decoration: none;
    border: 1px solid transparent;
}

.ctm-nav a.active {
    border-color: #2271b1;
}

.ctm-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ctm-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.ctm-button {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #f6f7f7;
    cursor: pointer;
    text-decoration: none;
}

.ctm-button-primary {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.ctm-button-danger {
    background: #d63638;
    color: #fff;
    border-color: #d63638;
}

.ctm-import-form {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.ctm-import-label input[type="file"] {
    display: none;
}

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

.ctm-table th,
.ctm-table td {
    border: 1px solid #e0e0e0;
    padding: 0.5rem;
    font-size: 0.9rem;
}

.ctm-table tbody tr:hover {
    background: #f9f9f9;
    cursor: pointer;
}

/* Modal */
.ctm-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
}

.ctm-modal-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 95%;
    max-width: 700px;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.ctm-modal-header,
.ctm-modal-footer {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.ctm-modal-footer {
    border-top: 1px solid #e0e0e0;
    border-bottom: none;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.ctm-modal-body {
    padding: 1rem;
    overflow-y: auto;
}

.ctm-modal-close {
    border: none;
    background: transparent;
    font-size: 1.2rem;
    cursor: pointer;
}

.ctm-form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
}

.ctm-form-row label {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

/* Login */
.ctm-login-wrapper {
    max-width: 500px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.ctm-login-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.5rem;
}

/* Mobile tweaks */
@media (max-width: 600px) {
    .ctm-page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ctm-import-form {
        flex-direction: column;
        align-items: flex-start;
    }
}
